/* === GENERAL STYLES === */
body {
    margin: 0;
    font-family: 'Montserrat', Arial, sans-serif;
    background: #fff;
    color: #111;
}

/* === HEADER BAR === */
header {
    display: flex;
    align-items: center;
    background: #fff;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid #ccc;
}

/* === MOBILE HEADER === */
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 2rem;
    min-height: 56px;
    background: #fff;
    box-sizing: border-box;
    flex: 1;
}

.mobile-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #111;
    letter-spacing: 1px;
    margin-right: auto;
}

.mobile-logo {
    display: block;
    height: 59px;
    width: 59px;
    object-fit: contain;
    margin-right: 1rem;
    margin-left: -1.2rem;
}

/* === HAMBURGER ICON === */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 200;
    margin-left: 1rem;
}

.hamburger span {
    display: block;
    height: 4px;
    width: 100%;
    background: #111;
    margin: 5px 0;
    border-radius: 2px;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Nav close button (optional) */
.nav-close {
    display: none;
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    color: #111;
    font-size: 2.2rem;
    cursor: pointer;
    z-index: 300;
    padding: 0;
    line-height: 1;
}

/* === NAVIGATION (DESKTOP) === */
header nav {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-right: 1rem;
    background: none;
    position: static;
    box-shadow: none;
    height: auto;
    width: auto;
    padding: 0;
    transform: none;
}

header nav .nav-links a {
    color: #111;
    background: #fff;
    margin: 0 0.3rem;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 1rem;
    padding: 0.3rem 0.7rem;
    border-radius: 8px 8px 0 0;
    border-bottom: 3px solid transparent;
    box-shadow: none;
    transition:
        color 0.2s,
        background 0.2s,
        border-bottom 0.2s,
        box-shadow 0.2s;
    position: relative;
    z-index: 1;
}

header nav .nav-links a.active {
    color: #fff;
    font-weight: bold;
    background: #111;
    border-radius: 8px 8px 0 0;
    border-bottom: 3px solid #fff;
    box-shadow: 0 2px 8px #1112;
    padding-bottom: 0.4rem;
    transition: background 0.2s, box-shadow 0.2s, border-bottom 0.2s;
    z-index: 2;
}

/* === HERO SECTION === */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, #fff, #eee, #fff, #eee, #fff);
    background-size: 400% 400%;
    animation: heroGradient 10s ease-in-out infinite;
    color: #111;
    padding: 6rem 0 4rem 0;
    border-bottom: 6px solid #111;
    margin-bottom: 2.5rem;
    min-height: 65vh;
}

@keyframes heroGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

#star-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    display: block;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-flex {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5rem;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 1200px;
    margin: 1.1rem auto 0 auto;
}

.profile-pic-hero {
    width: 360px;
    height: 360px;
    border-radius: 50%;
    border: 4px solid #111;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 0 40px 8px #1112;
    flex-shrink: 0;
    margin-left: 15rem;
    margin-top: -25px;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    cursor: pointer;
}

.profile-pic-hero:hover,
.profile-pic-hero:focus {
    transform: scale(1.08) rotate(-3deg);
    box-shadow: 0 0 60px 16px #1114, 0 0 0 8px #eee;
    border-color: #111;
    outline: none;
}

.profile-pic-hero:active {
    transform: scale(0.96) rotate(2deg);
    box-shadow: 0 0 32px 8px #1112;
    border-color: #111;
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: none;
    text-align: left;
}

.hero-text p.hero-greeting {
    margin-top: 0;
    margin-bottom: 0.1rem;
    font-size: 2.2rem;
    color: #111;
    font-weight: 600;
}

.hero-text h1 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 3rem;
    letter-spacing: 2px;
    color: #111;
    text-shadow: 0 2px 16px #1112;
    white-space: nowrap;
}

.hero-btn {
    background: #111;
    color: #fff;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 24px #1112;
    margin-top: 1rem;
    margin-bottom: 10%;
    align-self: flex-start;
    margin-left: 0;
}

.hero-btn:hover {
    background: #fff;
    color: #111;
    box-shadow: 0 8px 32px #1113;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #333;
}

/* === MAIN CONTAINER === */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    background: #fff;
}

/* === ABOUT SECTION === */
.about-flex {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.about-profile-pic {
    width: 300px;
    height: 360px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid #111;
    box-shadow: 0 2px 16px #1112;
    background: #fff;
    flex-shrink: 0;
    transition: transform 0.4s, box-shadow 0.4s, border-color 0.4s, filter 0.4s;
}

.about-profile-pic:hover,
.about-profile-pic:focus {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 32px #1113;
    border-color: #111;
    outline: none;
    filter: grayscale(100%);
}

.about-details {
    flex: 1;
    min-width: 220px;
}

.about-name {
    display: block;
    font-size: 1.7rem;
    font-weight: 700;
    margin-top: 0.2rem;
    margin-bottom: 1.2rem;
    color: #111;
    letter-spacing: 1px;
}

.about p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #333;
    margin-top: 0;
    margin-bottom: 1.2rem;
}

/* === SECTION DESIGN === */
.about,
.skills,
.education,
.experience,
.projects,
.contact {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px #1111;
    padding: 2.5rem 2.5rem;
    margin-bottom: 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 80vh;
}

.about:hover,
.skills:hover,
.education:hover,
.experience:hover,
.projects:hover,
.contact:hover {
    box-shadow: 0 0 18px 2px #1112, 0 4px 24px #1111;
    transition: box-shadow 0.3s, border-color 0.2s;
}

/* === SECTION HEADINGS === */
section h2 {
    font-size: 2rem;
    color: #111;
    margin-top: -0.5rem;
    margin-bottom: 2rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px #1111;
    text-align: center;
    width: 100%;
    display: block;
}

/* === SKILLS SECTION === */
.skills li i {
    margin-right: 0;
    margin-bottom: 0.4rem;
    font-size: 8.5em;
    vertical-align: middle;
}

.skills ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    justify-content: center;
    align-items: center;
}

.skills li {
    background: #fff;
    color: #111;
    border: 2px solid #111;
    border-radius: 15px;
    padding: 1.2rem 0.8rem 0.6rem 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 2px 8px #1111;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    min-height: 180px;
    text-align: center;
    gap: 0.3rem;
    margin: 0;
}

.skills li:hover {
    background: #111;
    color: #fff;
    border-color: #fff;
}

/* === EDUCATION, WORK, EXPERIENCE === */
.education ul,
.experience ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.education li,
.experience li {
    margin-bottom: 1.2rem;
    font-size: 1.08rem;
    color: #333;
    line-height: 1.6;
}

.education strong,
.experience strong {
    color: #111;
    font-weight: 700;
    letter-spacing: 1px;
}

.education-img-wrap {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    align-items: center;
    justify-content: center;
}

.education-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px #1111;
    padding: 1.5rem 2rem;
    width: 100%;
    max-width: 900px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.education-item:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 32px #1112;
    border: 1.5px solid #111;
}

.univ-logo {
    width: 320px;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 4px 24px #1111;
    background: #fff;
    border: 2px solid #111;
    flex-shrink: 0;
}

.education-details {
    font-size: 1.18rem;
    color: #333;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 1rem;
}

.education-details strong {
    color: #111;
    font-size: 1.25rem;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

/* === EXPERIENCE SECTION === */
#experience h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: #222;
    text-align: center;
}

.experience-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    /* balanced space between cards */
    justify-items: center;
    padding: 0 10px;
    /* slight padding on edges */
}

.experience-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.experience-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 32px #1112;
    border: 1.5px solid #111;
}

    /* 🖼 Image with balanced spacing */
    .experience-card img.experience-thumb {
        border: 2px solid #111;
        width: calc(100% - 30px);
        /* leave room for margin */
        height: 200px;
        object-fit: cover;
        margin: 15px;
        /* equal spacing all around */
        border-radius: 12px;
        display: block;
    }

    /* 📝 Text content */
    .experience-card h3 {
        font-size: 1.15rem;
        font-weight: 600;
        color: #333;
        margin: 10px 15px 5px;
    }

    .experience-card p {
        font-size: 0.9rem;
        color: #555;
        line-height: 1.6;
        margin: 0 15px 20px;
        text-align: justify;
    }



    /* === PROJECTS SECTION === */
    .project-cards {
        display: flex;
        gap: 2rem;
        flex-wrap: wrap;
        justify-content: center;
        align-items: stretch;
        /* ensures all cards have equal height */
    }

    /* === PROJECT THUMBNAILS === */
    .project-thumb {
        width: 100%;
        max-width: 250px;
        height: 160px;
        object-fit: cover;
        border-radius: 12px;
        box-shadow: 0 4px 24px rgba(17, 17, 17, 0.1);
        background: #fff;
        border: 2px solid #111;
        display: block;
        margin: 0 auto 1rem auto;
    }

    .card {
        background: #fff;
        border: 2px solid #111;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(17, 17, 17, 0.1);
        padding: 1.5rem;
        width: 100%;
        max-width: 260px;
        transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
        color: #111;
        position: relative;
        overflow: hidden;
        flex: 1 1 260px;
        /* flexible width cards */
        max-width: 260px;
        min-height: 380px;
        /* force equal height */
        display: flex;
        flex-direction: column;

    }

    .card h3 {
        color: #111;
        margin-bottom: 0.7rem;
    }

    .card p {
        color: #333;
        font-size: 1rem;
        flex-grow: 1;
        /* makes descriptions stretch so all cards align */
    }

    .card:hover {
        transform: translateY(-8px) scale(1.03);
        box-shadow: 0 8px 24px rgba(17, 17, 17, 0.2);
        border-color: #111;
    }

    /* === CONTACT SECTION === */
    .contact form {
        display: flex;
        flex-direction: column;
        gap: 1.2rem;
    }

    .form-group {
        display: flex;
        flex-direction: column;
    }

    input,
    textarea {
        padding: 0.7rem;
        border: 1px solid #111;
        border-radius: 6px;
        font-size: 1rem;
        margin-top: 0.3rem;
        font-family: inherit;
        background: #fff;
        color: #111;
        transition: border-color 0.2s, background 0.2s;
    }

    input:focus,
    textarea:focus {
        border-color: #111;
        background: #eee;
        outline: none;
    }

    .contact-btn {
        background: #111;
        color: #fff;
        border: none;
        border-radius: 30px;
        padding: 0.8rem 2rem;
        font-size: 1rem;
        font-weight: 700;
        cursor: pointer;
        align-self: flex-start;
        transition: background 0.2s, color 0.2s;
    }

    .contact-btn:hover {
        background: #fff;
        color: #111;
    }

    /* === TYPING EFFECT === */
    .typing-role {
        border-right: 3px solid #111;
        padding-right: 4px;
        white-space: nowrap;
        font-size: 1.5rem;
        font-weight: 600;
        color: #111;
        animation: blink-caret 0.7s steps(1) infinite;
    }

    @keyframes blink-caret {
        50% {
            border-color: transparent;
        }
    }

    /* === FOOTER === */
    footer {
        text-align: center;
        padding: 1.5rem 0;
        background: #fff;
        color: #111;
        font-size: 1rem;
        letter-spacing: 1px;
        border-radius: 0 0 12px 12px;
        border-top: 2px solid #111;
    }

    .footer-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .footer-links {
        margin-bottom: 0.3rem;
    }

    .footer-links a {
        color: #111;
        font-size: 2rem;
        margin: 0 12px;
        transition: color 0.3s;
        text-decoration: none;
        display: inline-block;
        vertical-align: middle;
        margin-bottom: -5px;
    }

    .footer-links a:hover {
        color: #333;
    }

    .footer-links span {
        color: #111;
        margin: 0 0.2rem;
    }

    .footer-copy {
        color: #555;
        font-size: 0.95rem;
    }

    .footer-logo {
        display: block;
        height: 80px;
        width: 80px;
        object-fit: contain;
        margin: 0 auto 0.5rem auto;
    }

    .footer-contact {
        margin: 1rem 0;
        text-align: center;
        color: #111;
        font-size: 1rem;
        display: flex;
        flex-wrap: wrap;
        gap: 1.5rem;
        justify-content: center;
        align-items: center;
        margin-bottom: 1.5rem;
    }

    .footer-contact i {
        margin-right: 8px;
        color: #333;
    }

    /* === SOCIAL ICONS === */
    .hero-socials {
        display: flex;
        gap: 18px;
        margin-bottom: 1rem;
    }

    .hero-socials a {
        color: #111;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 4px;
        width: 38px;
        height: 38px;
        background: #fff;
        border-radius: 50%;
        transition: color 0.3s, background 0.3s, box-shadow 0.3s;
        text-decoration: none;
        font-size: 1.2rem;
        vertical-align: middle;
        box-shadow: 0 2px 8px #1111;
        border: 2px solid #111;
        line-height: 1;
        text-align: center;
        padding: 0;
        position: relative;
    }

    .hero-socials a i {
        display: block;
        margin: auto;
        font-size: inherit;
        line-height: 1;
        position: relative;
        width: auto;
        height: auto;
        padding: 0;
    }

    /* Social icon hover colors (keep brand colors for hover) */
    .hero-socials a[aria-label="Facebook"]:hover {
        color: #fff;
        background: #1877f3;
        border-color: #1877f3;
        box-shadow: 0 4px 16px #1877f355;
    }

    .hero-socials a[aria-label="GitHub"]:hover {
        color: #fff;
        background: #24292e;
        border-color: #24292e;
        box-shadow: 0 4px 16px #24292e55;
    }

    .hero-socials a[aria-label="LinkedIn"]:hover {
        color: #fff;
        background: #0a66c2;
        border-color: #0a66c2;
        box-shadow: 0 4px 16px #0a66c255;
    }

    .hero-socials a[aria-label="Instagram"]:hover {
        color: #fff;
        background: #e1306c;
        border-color: #e1306c;
        box-shadow: 0 4px 16px #e1306c55;
    }

    /* === SKILL ICON COLORS === */
    .skill-icon.html5 {
        color: #e44d26;
    }

    .skill-icon.css3 {
        color: #1572b6;
    }

    .skill-icon.js {
        color: #f7df1e;
    }

    .skill-icon.react {
        color: #61dafb;
    }

    .skill-icon.git {
        color: #f34f29;
    }

    .skill-icon.python {
        color: #3776ab;
    }

    .skill-icon.java {
        color: #007396;
    }

    /* === RESPONSIVE DESIGN === */
    @media (max-width: 900px) {
        .hero-flex {
            gap: 2rem;
        }

        .hero-text {
            max-width: 100%;
        }

        .container {
            max-width: 98vw;
        }

        .project-cards {
            flex-direction: column;
            align-items: center;
            gap: 1.5rem;
        }

        .card {
            width: 90vw;
            max-width: 340px;
        }

        .education-item {
            flex-direction: column;
            align-items: center;
            text-align: center;
            padding: 1rem;
        }

        .univ-logo {
            width: 90vw;
            max-width: 320px;
            height: auto;
        }

        .education-details {
            padding-left: 0;
        }
    }

    @media (max-width: 700px) {

        html,
        body {
            height: auto !important;
            max-width: 100vw;
            overscroll-behavior: contain;
        }

        .container {
            max-width: 100vw;
            padding: 0 0.5rem;
            box-sizing: border-box;
        }

        .mobile-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 1.5rem;
            min-height: 56px;
            background: #fff;
            box-sizing: border-box;
            position: sticky;
            top: 0;
            z-index: 1001;
            box-shadow: 0 2px 8px #00000022;
        }

        .mobile-title {
            margin-right: auto;
            text-align: left;
        }

        .hamburger {
            display: flex;
            position: absolute;
            top: 18px;
            right: 18px;
        }

        .nav-close {
            display: block;
        }

        header nav {
            display: none;
            position: fixed;
            top: 0;
            right: 20;
            left: auto;
            height: 100vh;
            width: 50vw;
            background: #fff;
            flex-direction: column;
            align-items: flex-start;
            box-shadow: -4px 0 24px #1111;
            z-index: 200;
            padding: 5rem 0 1.2rem 0;
            border-radius: 0;
            transform: translateX(100%);
            opacity: 0;
            transition: transform 0.4s cubic-bezier(.25, .8, .25, 1), opacity 0.3s cubic-bezier(.25, .8, .25, 1);
        }

        header nav.open {
            display: flex;
            transform: translateX(0);
            opacity: 1;
        }

        header nav .nav-links {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            width: 100%;
            gap: 0.2rem;
            padding-left: 1.2rem;
        }

        header nav .nav-links a {
            display: block;
            margin: 0.3rem 0;
            font-size: 0.98rem;
            text-align: left;
            letter-spacing: 0.5px;
            padding: 0.5rem 0.7rem;
            font-weight: 600;
            border-radius: 6px;
            width: 70%;
            transition: background 0.2s, color 0.2s;
        }

        header nav .nav-links a:hover,
        header nav .nav-links a.active {
            background: #111;
            color: #fff;
        }

        .hero {
            padding: 2.5rem 0 1.5rem 0;
            margin-bottom: 1.5rem;
        }

        .hero-flex {
            flex-direction: column-reverse;
            align-items: center;
            gap: 1.2rem;
            width: 100%;
        }

        .profile-pic-hero {
            width: 120px;
            height: 120px;
            margin-left: 0;
            margin-top: 0.3rem;
        }

        .hero-text {
            align-items: center;
            text-align: center;
            width: 100%;
        }

        .hero-text h1 {
            font-size: 2rem;
            white-space: normal;
        }

        .hero-text p.hero-greeting {
            font-size: 1.3rem;
        }

        .hero-btn {
            font-size: 1rem;
            padding: 0.6rem 1.2rem;
            margin-top: 0.7rem;
            display: block;
            width: 100%;
            max-width: 240px;
            margin-left: auto;
            margin-right: auto;
            text-align: center;
            box-sizing: border-box;
        }

        .about-flex {
            flex-direction: column;
            align-items: center;
            gap: 1rem;
        }

        .about-profile-pic {
            width: 120px;
            height: 120px;
        }

        .about-details {
            text-align: center;
        }

        .about-name {
            font-size: 1.2rem;
            margin-bottom: 0.7rem;
        }

        .about,
        .skills,
        .education,
        .work,
        .experience,
        .projects,
        .contact {
            padding: 1rem 0.5rem;
            margin-bottom: 1.2rem;
            border-radius: 8px;
            max-width: 100vw;
            box-sizing: border-box;
        }

        .skills ul {
            flex-direction: column;
            gap: 0.7rem;
            align-items: center;
        }

        .skills li {
            width: 100%;
            text-align: center;
            font-size: 1rem;
            padding: 0.5rem 0.7rem;
            box-sizing: border-box;
        }

        .skills .btn,
        .projects .btn,
        .project-cards .btn,
        .card .btn {
            display: block;
            width: 100%;
            max-width: 240px;
            margin: 1rem auto 0 auto;
            text-align: center;
            font-size: 1.1rem;
            padding: 0.7rem 1.2rem;
            border-radius: 30px;
            box-sizing: border-box;
        }

        .education-img-wrap {
            gap: 1.2rem;
        }

        .education-item {
            flex-direction: column;
            align-items: center;
            padding: 1rem 0.5rem;
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
        }

        .univ-logo {
            width: 90vw;
            max-width: 220px;
            height: auto;
        }

        .education-details {
            padding-left: 0;
            font-size: 1rem;
        }

        .project-cards {
            flex-direction: column;
            gap: 1rem;
            align-items: center;
            width: 100%;
            max-width: 100%;
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .card {
            width: 100%;
            max-width: 340px;
            min-width: 0;
            box-sizing: border-box;
            margin: 0 auto 1rem auto;
            padding: 1rem;
        }

        .contact form {
            gap: 0.7rem;
        }

        .footer-container {
            gap: 0.3rem;
        }

        .footer-links a {
            font-size: 1rem;
        }
    }

    /* === ACTIVE NAV LINK HIGHLIGHT === */
    header nav a.active {
        color: #fff;
        font-weight: bold;
        background: #111;
        border-radius: 8px 8px 0 0;
        border-bottom: 3px solid #fff;
        /* white underline */
        box-shadow: 0 2px 8px #1112;
        padding-bottom: 0.4rem;
        transition: background 0.2s, box-shadow 0.2s, border-bottom 0.2s;
    }

    /* === SCROLL ANIMATION OPTIMIZATION === */
    .scroll-fade {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
        will-change: opacity, transform;
        transition: opacity 0.9s cubic-bezier(.22, 1, .36, 1), transform 0.9s cubic-bezier(.22, 1, .36, 1);
    }

    .scroll-fade.visible {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    /* Footer logo size */
    .footer-logo-img {
        height: 86px;
        width: auto;
        display: block;
        margin: 0 auto;
    }

    section {
        scroll-margin-top: 120px !important;
    }

    @media (max-width: 1200px) {
        .hero-flex {
            gap: 2rem;
            max-width: 98vw;
            flex-wrap: wrap;
            justify-content: center;
        }

        .profile-pic-hero {
            width: 220px;
            height: 220px;
            margin-left: 0;
            margin-top: 0;
        }

        .container {
            max-width: 98vw;
            padding: 0 1rem;
        }

        .about-flex {
            gap: 1.2rem;
            flex-wrap: wrap;
        }

        .about-profile-pic {
            width: 180px;
            height: 220px;
        }

        .card {
            max-width: 320px;
            width: 90vw;
        }

        .project-cards {
            gap: 1.2rem;
            flex-wrap: wrap;
            justify-content: center;
        }

        .education-item {
            gap: 1.2rem;
            padding: 1rem;
        }

        .univ-logo {
            width: 220px;
            height: 140px;
        }
    }