/* GLOBAL */

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

img, iframe, video, embed, object {
    max-width: 100%;
    height: auto;
    display: block;
}

body {
    background: linear-gradient(135deg, #add8e6 0%, #00008b 50%, #000000 100%);
    color: white;
    font-family: "Inter", sans-serif;
}


.section-title {
    text-align: left;
    margin-top: 40px;
    font-size: 2rem;
}

/* NAVBAR */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(135deg, rgba(173, 216, 230, 0.9) 0%, rgba(0, 0, 139, 0.9) 50%, rgba(0, 0, 0, 0.9) 100%);
    padding: 15px 16px;
    display: flex;
    justify-content: space-between; /* site name left, links to right */
    align-items: center;
    z-index: 50;
}

.nav-left {
    font-size: 1.4rem;
    font-weight: bold;
    color: #4f4fe6;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto; /* push nav links to the far right */
    margin-right: 72px; /* nudge the nav group further left (doubled) */
}

.nav-right a {
    text-decoration: none;
    font-weight: bold;
    color: #4f4fe6;
    font-size: 1.1rem;
}

.nav-right a:hover {
    color: #ffffff;
}

/* thin bar under the navbar */
nav::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 6px;
    background: #000000;
    bottom: -6px;
}

/* responsive: reduce nav text and spacing on small screens */
@media (max-width: 600px) {
    nav { padding: 12px 10px; }
    .nav-left { font-size: 1.2rem; }
    .nav-right a { font-size: 0.95rem; }
    .hex-grid { gap: 18px; }
    .nav-right { margin-left: 0; margin-right: 24px; gap: 10px; }
}

/* HERO */
.hero {
    padding-top: 160px;
    text-align: center;
    padding-bottom: 150px;
}

.hero-name {
    font-size: 3rem;
}

.hero-subtitle {
    margin-top: 10px;
    font-size: 1.2rem;
    color: #c0c9e8;
}

.hero-skill-line {
    margin-top: 40px;
    font-size: 1.5rem;
}

#typed-skill {
    font-weight: bold;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
    transition: color 220ms ease;
}

/* Blinking cursor (vertical bar) that inherits the skill color and is vertically aligned */
#typed-skill::after {
    content: "|";
    display: inline-block;
    margin-left: 3px;
    color: inherit; /* matches the current skill color set by JS */
    opacity: 1;
    /* slightly shifted right compared to previous position to avoid overlapping the last character */
    transform: translate(-0.45ch, -0.12em);
    /* smooth blink: fade out and back in */
    animation: blink 1s ease-in-out infinite;
    transition: color 220ms ease, opacity 160ms ease;
}

@keyframes blink {
    0% { opacity: 1; }
    45% { opacity: 0; }
    55% { opacity: 0; }
    100% { opacity: 1; }
}

/* SKILL HEXAGONS */
.hex-grid {
    margin: 40px auto 20px;
    max-width: 740px;
    width: min(100%, 740px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hex-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px; /* no overlap */
}

.hex-row:nth-child(2) {
    transform: translateX(0);
}

.hex {
    text-align: center;
}

.hex-inner {
    width: 120px;
    height: 104px;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a2340;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.hex-inner:hover {
    animation: pulse 600ms ease-in-out;
    box-shadow: 0 12px 18px rgba(0, 0, 0, 0.35);
}

@keyframes pulse {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-4px) scale(1.05); }
}

.hex-icon {
    display: none;
}

.hex-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.js-color .hex-logo {
    width: 120px;
    height: 120px;
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
}

.hex-label {
    display: none;
}

/* Color codes */
.excel-color { background: #0f6b32; }
.ppt-color { background: #d14423; }
.python-color { background: #366fb3; }
.sql-color { background: #8f9dff; }
.tableau-color { background: #4aa3ff; }

/* New skill colors */
.html-color { background: #e44d26; }
.css-color { background: #264de4; }
.js-color { background: #e4c21a; }
.figma-color { background: #8323ff; }
.canva-color { background: #00c4cc; }

/* Improve icon contrast for light backgrounds */
.js-color .hex-icon,
.canva-color .hex-icon { color: #111; }

/* ABOUT */
.about-section {
    max-width: 1100px;
    margin: auto;
    padding: 40px 12px;
    text-align: left;
}

.about-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.about-left {
    flex: 0 0 50%;
}

.about-right {
    flex: 0 0 40%;
    max-width: 340px;
    align-self: flex-start;
}

.profile-container {
    position: relative;
    width: 100%;
    height: 300px; /* match roughly two overlapping hex rows */
    border-radius: 10px;
    overflow: hidden;
    background: #f0f0f0;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-text {
    margin-top: 22px;
}

.linkedin-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: #0e76a8; /* LinkedIn blue */
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 160ms ease, transform 120ms ease;
}
.linkedin-button:hover { background: #0b5f8a; transform: translateY(-2px); }
.linkedin-button:focus { outline: 2px solid #cde6ff; outline-offset: 3px; }

.linkedin-button svg, .linkedin-button img { width: 20px; height: 20px; color: white; display:block; }

/* EXPERIENCE */
.experience-section {
    max-width: 1100px; /* wider so two longer cards fit neatly */
    margin: 28px auto;
    padding: 8px;
}

.experience-section > .section-title {
    text-align: left;
    margin-top: 100px;
    margin-bottom: 30px;
}

.timeline.vertical {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 40px 0;
}

.timeline.vertical .timeline-line {
    position: absolute;
    left: 120px; /* adjust based on year width */
    top: 40px;
    bottom: 40px;
    width: 6px;
    background: #2358ff;
    z-index: 1;
}

.timeline.vertical .timeline-line::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -12px;
    width: 30px;
    height: 6px;
    background: #2358ff;
}

.timeline.vertical .timeline-line::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: -12px;
    width: 30px;
    height: 6px;
    background: #2358ff;
}

.timeline.vertical .timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 80px;
    position: relative;
    width: 100%;
}

.timeline.vertical .timeline-circle {
    position: absolute;
    left: 112.9px; /* center on line */
    width: 20px;
    height: 20px;
    background: #2358ff;
    border-radius: 50%;
    z-index: 2;
}

.timeline.vertical .year {
    width: 100px;
    text-align: right;
    font-size: 2rem;
    font-weight: bold;
    color: #2358ff;
    margin-right: 50px;
    position: relative;
    z-index: 2;
}

.timeline.vertical .experiences {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    z-index: 2;
}

.timeline.vertical .ticker {
    width: 100px;
    height: 100px;
    background: #131b35;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid #2358ff;
}

.timeline.vertical .ticker:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(35, 88, 255, 0.3);
}

.timeline.vertical .ticker img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.large-logo {
    width: 70px !important;
    height: 70px !important;
}

.popout-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popout-modal.show {
    display: flex;
}

.popout-content {
    background: #131b35;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
    color: white;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #9fb0c9;
}

.close-btn:hover {
    color: white;
}

.popout-content h3 {
    margin-top: 0;
    color: #2358ff;
}

.popout-content p {
    margin: 10px 0;
    color: #9fb0c9;
}

/* Responsive: stack experiences on narrow screens */
@media (max-width: 1000px) {
    .about-content {
        display: flex;
        flex-wrap: wrap;
        gap: 28px;
    }

    .about-left, .about-right {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .about-right {
        margin-top: 18px;
    }

    .profile-container {
        height: auto;
        min-height: 220px;
    }

    .timeline.vertical .timeline-line {
        left: 66px;
    }
    .timeline.vertical .timeline-circle {
        left: 58px;
    }
    .timeline.vertical .year {
        width: 66px;
        margin-right: 26px;
        font-size: 1.2rem;
    }

    .timeline.vertical .experiences {
        gap: 22px;
    }

    .timeline.vertical .ticker {
        width: 78px;
        height: 78px;
    }

    .timeline.vertical .ticker img {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 700px) {
    nav {
        padding: 10px 12px;
    }

    .nav-right {
        flex-wrap: wrap;
        justify-content: flex-end;
        margin-left: 0;
        margin-right: 0;
        gap: 8px;
    }

    .nav-left {
        font-size: 1.1rem;
    }

    .nav-right a {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.6rem;
        margin-top: 30px;
    }

    .hero-subtitle,
    .hero-skill-line {
        font-size: 1rem;
    }

    .experience-section {
        width: 100%;
        padding: 8px;
    }

    .hex-grid {
        gap: 8px;
    }

    .hex-inner {
        width: 84px;
        height: 72px;
    }

    .hex-logo {
        width: 44px;
        height: 44px;
    }

    .hex-icon { font-size: 1.4rem; }
    .logo-placeholder img { width: 48px; height: 48px; }
}

/* CONTACT */
.contact-section {
    max-width: 1100px;
    margin: auto;
    padding: 40px 12px;
    text-align: left;
}

.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.contact-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.contact-left {
    flex: 1;
}

.caution-tape {
    position: relative;
    background: repeating-linear-gradient(45deg, #ffff00 0px, #ffff00 20px, #000000 20px, #000000 40px);
    padding: 15px;
    border-radius: 6px;
    overflow: hidden;
}

.tape-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    transform: rotate(45deg);
    z-index: 3;
    pointer-events: none;
}

.contact-form {
    position: relative;
    z-index: 2;
}

.contact-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    margin-bottom: 12px;
    padding: 12px;
    background: #1a2340;
    border: none;
    color: white;
    border-radius: 6px;
}

.contact-form button {
    width: 100%;
    background: #2358ff;
    border: none;
    padding: 12px;
    color: white;
    border-radius: 6px;
}

/* SPOTIFY */
.spotify-section {
    flex: 1;
    text-align: center;
}

.spotify-section iframe {
    height: 100%;
    width: 100%;
}

@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
        gap: 20px;
    }

    .contact-left,
    .contact-right {
        flex: none;
    }

    .contact-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 600px) {
    nav { padding: 10px 12px; }
    .nav-left { font-size: 1rem; }
    .nav-right a { font-size: 0.85rem; }
    .nav-right { gap: 6px; }

    .section-title { font-size: 1.4rem; }

    .hero-subtitle,
    .hero-skill-line { font-size: 0.9rem; }

    .hex-inner { width: 70px; height: 60px; }
    .hex-logo { width: 36px; height: 36px; }

    .timeline.vertical .ticker { width: 60px; height: 60px; }
    .timeline.vertical .ticker img { width: 40px; height: 40px; }

    .contact-right h3 { font-size: 1rem; }
}
