:root {
    --bg: #070b14;
    --bg-soft: #0b1120;
    --card: rgba(17, 24, 39, 0.76);
    --card-solid: #111827;

    --text: #f8fafc;
    --text-soft: #cbd5e1;
    --muted: #94a3b8;

    --primary: #7c6cff;
    --primary-light: #a69cff;
    --secondary: #38bdf8;
    --success: #34d399;

    --border: rgba(148, 163, 184, 0.15);
    --border-bright: rgba(124, 108, 255, 0.38);

    --shadow:
        0 24px 60px rgba(0, 0, 0, 0.32);

    --radius: 22px;
    --max-width: 1180px;
}


/* LIGHT THEME */

body.light {
    --bg: #f8fafc;
    --bg-soft: #f1f5f9;

    --card: rgba(255, 255, 255, 0.88);
    --card-solid: #ffffff;

    --text: #0f172a;
    --text-soft: #334155;
    --muted: #64748b;

    --border: rgba(15, 23, 42, 0.11);
}


/* RESET */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
    scroll-padding-top: 85px;
}


body {
    font-family: "Inter", sans-serif;

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(124, 108, 255, 0.12),
            transparent 28%
        ),
        radial-gradient(
            circle at 90% 30%,
            rgba(56, 189, 248, 0.08),
            transparent 25%
        ),
        var(--bg);

    color: var(--text);

    line-height: 1.7;

    overflow-x: hidden;
}


img {
    width: 100%;
    display: block;
}


a {
    color: inherit;
    text-decoration: none;
}


button,
input,
textarea {
    font: inherit;
}


/* CONTAINER */

.container {
    width:
        min(
            calc(100% - 40px),
            var(--max-width)
        );

    margin-inline: auto;
}


/* SECTION */

.section {
    padding: 95px 0;
}


.section-alt {
    background:
        linear-gradient(
            180deg,
            transparent,
            rgba(124, 108, 255, 0.035),
            transparent
        );
}


.section-heading {
    max-width: 720px;

    margin-bottom: 45px;
}


.section-heading.center {
    text-align: center;

    margin-inline: auto;
}


.section-tag {
    margin-bottom: 8px;

    color: var(--secondary);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.15em;
}


.section-heading h2,
.contact-left h2 {
    font-family:
        "Poppins",
        sans-serif;

    font-size:
        clamp(
            32px,
            5vw,
            50px
        );

    line-height: 1.17;

    letter-spacing: -2px;
}


.section-description {
    margin-top: 14px;

    color: var(--muted);

    font-size: 14px;
}


.gradient-text {
    background:
        linear-gradient(
            110deg,
            #a69cff,
            #60a5fa,
            #38bdf8
        );

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}


/* BUTTONS */

.btn {
    min-height: 49px;

    padding: 0 21px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    border-radius: 13px;

    font-size: 14px;
    font-weight: 700;

    transition: 0.25s ease;
}


.btn:hover {
    transform: translateY(-3px);
}


.btn-primary {
    color: white;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            #4f8cff
        );

    box-shadow:
        0 14px 35px
        rgba(124, 108, 255, 0.25);
}


.btn-secondary {
    background: var(--card);

    border:
        1px solid var(--border);
}


/* LOADER */

.loader {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: grid;
    place-items: center;

    background: #070b14;

    transition: 0.35s ease;
}


.loader.hide {
    opacity: 0;
    visibility: hidden;
}


.loader-box {
    text-align: center;
}


.loader-logo {
    width: 70px;
    height: 70px;

    margin: 0 auto 22px;

    display: grid;
    place-items: center;

    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );

    font-family:
        "Poppins",
        sans-serif;

    font-size: 23px;
    font-weight: 800;

    color: white;
}


.loader-bar {
    width: 180px;
    height: 3px;

    overflow: hidden;

    border-radius: 100px;

    background:
        rgba(255, 255, 255, 0.1);
}


.loader-bar span {
    display: block;

    width: 50%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--secondary)
        );

    animation:
        loaderMove 1s ease-in-out infinite alternate;
}


.loader p {
    margin-top: 12px;

    color: #94a3b8;

    font-size: 11px;

    letter-spacing: 0.12em;
}


@keyframes loaderMove {

    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(100%);
    }

}


/* HEADER */

.header {
    position: fixed;

    top: 0;

    width: 100%;

    z-index: 1000;

    border-bottom:
        1px solid transparent;

    transition: 0.3s;
}


.header.scrolled {
    background:
        rgba(7, 11, 20, 0.85);

    border-color:
        var(--border);

    backdrop-filter:
        blur(20px);
}


body.light .header.scrolled {
    background:
        rgba(248, 250, 252, 0.9);
}


.nav-container {
    height: 78px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 25px;
}


.logo,
.footer-logo {
    font-family:
        "Poppins",
        sans-serif;

    font-weight: 800;

    letter-spacing: -1px;
}


.logo {
    font-size: 24px;
}


.logo span,
.footer-logo span {
    color: var(--primary-light);
}


.nav {
    display: flex;

    align-items: center;

    gap: 28px;
}


.nav-link {
    position: relative;

    color: var(--muted);

    font-size: 14px;
    font-weight: 600;
}


.nav-link:hover,
.nav-link.active {
    color: var(--text);
}


.nav-link::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -7px;

    width: 0;
    height: 2px;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--secondary)
        );

    transition: 0.25s;
}


.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}


.nav-actions {
    display: flex;
    align-items: center;

    gap: 10px;
}


.resume-btn {
    padding: 10px 16px;

    border:
        1px solid var(--border-bright);

    border-radius: 12px;

    background:
        rgba(124, 108, 255, 0.08);

    font-size: 13px;
    font-weight: 700;
}


.icon-btn {
    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    border:
        1px solid var(--border);

    border-radius: 12px;

    background: var(--card);

    color: var(--text);

    cursor: pointer;
}


.menu-btn {
    display: none;
}


/* HERO */

.hero {
    min-height: 100vh;

    padding: 140px 0 80px;

    display: flex;
    align-items: center;
}


.hero-grid {
    display: grid;

    grid-template-columns:
        1.15fr 0.85fr;

    align-items: center;

    gap: 80px;
}


.availability-badge {
    width: fit-content;

    padding: 8px 13px;

    margin-bottom: 24px;

    display: flex;
    align-items: center;

    gap: 9px;

    border:
        1px solid
        rgba(52, 211, 153, 0.2);

    border-radius: 100px;

    background:
        rgba(52, 211, 153, 0.06);

    color: #6ee7b7;

    font-size: 12px;
    font-weight: 700;
}


.availability-badge span {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--success);

    box-shadow:
        0 0 15px
        var(--success);
}


.hello {
    color: var(--muted);

    font-size: 17px;
}


.hero h1 {
    margin-bottom: 19px;

    font-family:
        "Poppins",
        sans-serif;

    font-size:
        clamp(
            55px,
            7vw,
            86px
        );

    line-height: 1;

    letter-spacing: -4px;
}


.hero h2 {
    margin-bottom: 20px;

    font-family:
        "Poppins",
        sans-serif;

    font-size:
        clamp(
            23px,
            3vw,
            34px
        );

    line-height: 1.3;
}


.hero-description {
    max-width: 620px;

    color: var(--text-soft);

    font-size: 15px;

    line-height: 1.8;
}


.hero-buttons {
    margin-top: 30px;

    display: flex;

    gap: 13px;
}


.hero-links {
    margin-top: 23px;

    display: flex;

    gap: 22px;
}


.hero-links a {
    color: var(--muted);

    font-size: 13px;
    font-weight: 600;
}


.hero-links a:hover {
    color: var(--secondary);
}


/* PROFILE */

.profile-card {
    max-width: 400px;

    margin-left: auto;

    padding: 30px;

    text-align: center;

    border:
        1px solid var(--border);

    border-radius: 30px;

    background:
        linear-gradient(
            145deg,
            rgba(19, 27, 45, 0.94),
            rgba(10, 15, 27, 0.94)
        );

    box-shadow: var(--shadow);
}


body.light .profile-card {
    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f8fafc
        );
}


.photo-ring {
    width: 138px;
    height: 138px;

    margin: 0 auto 20px;

    padding: 4px;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );
}


.photo-ring img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    border-radius: 50%;

    border:
        5px solid
        var(--card-solid);
}


.profile-card h3 {
    font-family:
        "Poppins",
        sans-serif;

    font-size: 24px;
}


.profile-position {
    color: var(--primary-light);

    font-size: 14px;
    font-weight: 700;
}


.location {
    margin-top: 4px;

    color: var(--muted);

    font-size: 13px;
}


.profile-skills {
    margin-top: 22px;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 8px;
}


.profile-skills span,
.tech-list span,
.education-tags span {
    padding: 7px 11px;

    border:
        1px solid var(--border);

    border-radius: 100px;

    background:
        rgba(124, 108, 255, 0.06);

    color: var(--text-soft);

    font-size: 11px;
    font-weight: 700;
}


.profile-stats {
    margin-top: 25px;

    padding-top: 22px;

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    border-top:
        1px solid var(--border);
}


.profile-stats div:first-child {
    border-right:
        1px solid var(--border);
}


.profile-stats strong {
    display: block;

    font-size: 20px;
}


.profile-stats span {
    color: var(--muted);

    font-size: 10px;
}


.profile-contact {
    width: 100%;

    min-height: 46px;

    margin-top: 23px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid var(--border-bright);

    border-radius: 12px;

    background:
        rgba(124, 108, 255, 0.1);

    font-size: 13px;
    font-weight: 700;
}


/* ABOUT */

.about-grid {
    display: grid;

    grid-template-columns:
        1fr 0.85fr;

    gap: 70px;
}


.about-text p {
    margin-bottom: 17px;

    color: var(--text-soft);
}


.about-text .large-text {
    color: var(--text);

    font-family:
        "Poppins",
        sans-serif;

    font-size: 21px;
}


.about-details {
    overflow: hidden;

    border:
        1px solid var(--border);

    border-radius: var(--radius);

    background: var(--card);
}


.detail-row {
    padding: 15px 18px;

    display: flex;
    justify-content: space-between;

    gap: 20px;

    border-bottom:
        1px solid var(--border);

    font-size: 13px;
}


.detail-row:last-child {
    border-bottom: 0;
}


.detail-row span {
    color: var(--muted);
}


.detail-row strong {
    text-align: right;
}


.green {
    color: var(--success);
}


/* SKILLS */

.skills-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 18px;
}


.skill-card {
    min-height: 180px;

    padding: 23px;

    border:
        1px solid var(--border);

    border-radius: 20px;

    background: var(--card);

    transition: 0.25s;
}


.skill-card:hover {
    transform: translateY(-6px);

    border-color:
        var(--border-bright);

    box-shadow:
        0 18px 40px
        rgba(0, 0, 0, 0.14);
}


.skill-top {
    margin-bottom: 18px;

    display: flex;
    justify-content: space-between;
    align-items: center;
}


.skill-icon {
    min-width: 45px;
    height: 45px;

    padding: 0 8px;

    display: grid;
    place-items: center;

    border-radius: 12px;

    background:
        rgba(124, 108, 255, 0.12);

    color: var(--primary-light);

    font-size: 11px;
    font-weight: 800;
}


.level {
    padding: 5px 9px;

    border-radius: 100px;

    font-size: 9px;
    font-weight: 800;
}


.foundation {
    color: #93c5fd;

    background:
        rgba(96, 165, 250, 0.09);
}


.learning {
    color: #c4b5fd;

    background:
        rgba(124, 108, 255, 0.1);
}


.basic {
    color: #6ee7b7;

    background:
        rgba(52, 211, 153, 0.08);
}


.tool {
    color: var(--text-soft);

    background:
        rgba(148, 163, 184, 0.09);
}


.skill-card h3 {
    margin-bottom: 7px;

    font-family:
        "Poppins",
        sans-serif;

    font-size: 17px;
}


.skill-card p {
    color: var(--muted);

    font-size: 12px;
}


/* PROJECTS */

.projects-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 24px;
}


.project-card {
    overflow: hidden;

    border:
        1px solid var(--border);

    border-radius: 25px;

    background: var(--card);

    transition: 0.3s;
}


.project-card:hover {
    transform: translateY(-7px);

    border-color:
        var(--border-bright);

    box-shadow: var(--shadow);
}


/* FULL PROJECT IMAGE */

.project-image {
    min-height: 340px;

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            #090d18,
            #111827
        );
}


body.light .project-image {
    background:
        linear-gradient(
            145deg,
            #eef2f7,
            #ffffff
        );
}


.project-image img {
    width: 100%;
    height: 100%;

    max-height: 310px;

    object-fit: contain;

    object-position: center;

    transition: 0.4s;
}


.project-card:hover
.project-image img {
    transform: scale(1.02);
}


.project-status {
    position: absolute;

    top: 17px;
    right: 17px;

    z-index: 2;

    padding: 7px 11px;

    border-radius: 100px;

    background:
        rgba(7, 11, 20, 0.84);

    color: white;

    font-size: 10px;
    font-weight: 800;
}


.project-content {
    padding: 26px;
}


.project-number {
    color: var(--primary-light);

    font-size: 11px;
    font-weight: 800;
}


.project-content h3 {
    margin: 7px 0 11px;

    font-family:
        "Poppins",
        sans-serif;

    font-size: 23px;
}


.project-content p {
    color: var(--muted);

    font-size: 13px;

    line-height: 1.75;
}


.tech-list {
    margin-top: 19px;

    display: flex;
    flex-wrap: wrap;

    gap: 7px;
}


.project-footer {
    margin-top: 21px;

    padding-top: 16px;

    display: flex;
    justify-content: space-between;

    gap: 20px;

    border-top:
        1px solid var(--border);

    color: var(--text-soft);

    font-size: 11px;
    font-weight: 700;
}


/* EDUCATION */

.education-card {
    padding: 34px;

    display: grid;

    grid-template-columns:
        160px 1fr;

    gap: 35px;

    border:
        1px solid var(--border);

    border-radius: 24px;

    background: var(--card);
}


.education-date {
    color: var(--primary-light);

    font-size: 14px;
    font-weight: 800;
}


.degree-label {
    color: var(--secondary);

    font-size: 10px;
    font-weight: 800;
}


.education-main h3 {
    margin-top: 7px;

    font-family:
        "Poppins",
        sans-serif;

    font-size: 23px;
}


.education-main h4 {
    margin-top: 7px;

    color: var(--text-soft);
}


.education-main > p {
    margin-top: 5px;

    color: var(--muted);

    font-size: 13px;
}


.education-tags {
    margin-top: 19px;

    display: flex;
    flex-wrap: wrap;

    gap: 8px;
}


.cgpa {
    color: #6ee7b7 !important;
}


/* CONTACT */

.contact {
    padding-bottom: 110px;
}


.contact-card {
    padding: 46px;

    display: grid;

    grid-template-columns:
        1fr 0.9fr;

    gap: 55px;

    border:
        1px solid var(--border);

    border-radius: 30px;

    background:
        linear-gradient(
            135deg,
            rgba(124, 108, 255, 0.08),
            rgba(56, 189, 248, 0.035)
        );
}


.contact-left > p:not(.section-tag) {
    margin-top: 17px;

    color: var(--muted);

    font-size: 14px;
}


.contact-details {
    margin-top: 26px;

    display: grid;

    gap: 10px;
}


.contact-details a {
    padding: 14px 16px;

    border:
        1px solid var(--border);

    border-radius: 14px;

    background: var(--card);
}


.contact-details small {
    display: block;

    color: var(--muted);

    font-size: 9px;
}


.contact-details strong {
    font-size: 13px;
}


.contact-form {
    padding: 24px;

    display: grid;

    gap: 15px;

    border:
        1px solid var(--border);

    border-radius: 20px;

    background: var(--card);
}


.input-group label {
    display: block;

    margin-bottom: 7px;

    color: var(--text-soft);

    font-size: 11px;
    font-weight: 700;
}


.input-group input,
.input-group textarea {
    width: 100%;

    padding: 13px 15px;

    border:
        1px solid var(--border);

    border-radius: 12px;

    background: var(--bg-soft);

    color: var(--text);

    outline: none;
}


.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(124, 108, 255, 0.1);
}


.submit-btn {
    width: 100%;

    border: 0;

    cursor: pointer;
}


.form-message {
    min-height: 18px;

    text-align: center;

    font-size: 12px;
}


/* FOOTER */

.footer {
    padding: 34px 0 20px;

    border-top:
        1px solid var(--border);
}


.footer-content {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 25px;
}


.footer p,
.footer-center {
    color: var(--muted);

    font-size: 11px;
}


.footer-links {
    display: flex;

    gap: 15px;
}


.footer-links a {
    color: var(--muted);

    font-size: 11px;
    font-weight: 700;
}


.footer-links a:hover {
    color: var(--secondary);
}


.copyright {
    margin-top: 25px;

    padding-top: 17px;

    border-top:
        1px solid var(--border);

    text-align: center;

    color: var(--muted);

    font-size: 10px;
}


/* TABLET */

@media (max-width: 1050px) {

    .skills-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


/* MOBILE NAV */

@media (max-width: 960px) {

    .nav {
        position: fixed;

        top: 78px;
        left: 20px;
        right: 20px;

        padding: 22px;

        display: none;
        flex-direction: column;

        gap: 16px;

        border:
            1px solid var(--border);

        border-radius: 20px;

        background:
            rgba(7, 11, 20, 0.97);
    }


    body.light .nav {
        background:
            rgba(248, 250, 252, 0.97);
    }


    .nav.open {
        display: flex;
    }


    .menu-btn {
        display: grid;
    }


    .hero-grid,
    .about-grid,
    .contact-card {
        grid-template-columns: 1fr;
    }


    .hero-grid {
        gap: 50px;
    }


    .profile-card {
        margin-inline: auto;
    }


    .projects-grid {
        grid-template-columns: 1fr;
    }


    .education-card {
        grid-template-columns: 1fr;
    }

}


/* MOBILE */

@media (max-width: 700px) {

    .container {
        width:
            min(
                calc(100% - 28px),
                var(--max-width)
            );
    }


    .section {
        padding: 74px 0;
    }


    .hero {
        min-height: auto;

        padding:
            120px 0 68px;
    }


    .resume-btn {
        display: none;
    }


    .hero-grid {
        text-align: center;
    }


    .availability-badge {
        margin-inline: auto;
    }


    .hero h1 {
        font-size: 52px;

        letter-spacing: -2px;
    }


    .hero h2 {
        font-size: 23px;
    }


    .hero-description {
        margin-inline: auto;

        font-size: 14px;
    }


    .hero-buttons,
    .hero-links {
        justify-content: center;

        flex-wrap: wrap;
    }


    .skills-grid {
        grid-template-columns: 1fr;
    }


    .project-image {
        min-height: 270px;

        height: auto;

        padding: 12px;
    }


    .project-image img {
        max-height: 245px;

        object-fit: contain;
    }


    .contact-card {
        padding: 25px;
    }


    .footer-content {
        flex-direction: column;

        text-align: center;
    }


    .detail-row {
        flex-direction: column;

        gap: 2px;
    }


    .detail-row strong {
        text-align: left;
    }

}


/* SMALL MOBILE */

@media (max-width: 480px) {

    .hero h1 {
        font-size: 44px;
    }


    .hero h2 {
        font-size: 21px;
    }


    .hero-buttons {
        flex-direction: column;
    }


    .hero-buttons .btn {
        width: 100%;
    }


    .profile-card {
        padding: 24px 18px;
    }


    .contact-card {
        padding: 22px 16px;
    }


    .contact-form {
        padding: 20px 15px;
    }


    .project-content {
        padding: 22px;
    }

}

/* =========================================================
   FINAL MOBILE HERO + HEADER OPTIMIZATION
   Desktop design remains unchanged.
========================================================= */

@media (max-width: 700px) {

    html {
        scroll-padding-top: 70px;
    }

    .nav-container {
        height: 66px;
        gap: 10px;
    }

    .logo {
        font-size: 21px;
    }

    .nav-actions {
        gap: 7px;
    }

    .icon-btn {
        width: 37px;
        height: 37px;
        border-radius: 10px;
    }

    .nav {
        top: 72px;
        left: 14px;
        right: 14px;
        padding: 18px;
        border-radius: 16px;
    }

    .hero {
        min-height: auto;
        padding: 94px 0 48px;
        align-items: flex-start;
    }

    .hero-grid {
        gap: 30px;
        text-align: center;
    }

    .availability-badge {
        max-width: 100%;
        margin: 0 auto 16px;
        padding: 7px 11px;
        gap: 7px;
        font-size: 10px;
        line-height: 1.35;
        white-space: normal;
        justify-content: center;
    }

    .availability-badge span {
        width: 7px;
        height: 7px;
        flex: 0 0 7px;
    }

    .hello {
        font-size: 14px;
        line-height: 1.4;
    }

    .hero h1 {
        margin-top: 3px;
        margin-bottom: 12px;
        font-size: clamp(42px, 13vw, 52px);
        line-height: 0.98;
        letter-spacing: -2px;
    }

    .hero h2 {
        max-width: 340px;
        margin: 0 auto 14px;
        font-size: clamp(19px, 5.8vw, 23px);
        line-height: 1.28;
    }

    .hero-description {
        max-width: 360px;
        margin-inline: auto;
        font-size: 13px;
        line-height: 1.65;
    }

    .hero-buttons {
        margin-top: 22px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .hero-buttons .btn {
        width: 100%;
        min-height: 46px;
        padding: 0 12px;
        font-size: 12px;
        border-radius: 12px;
    }

    .hero-links {
        margin-top: 18px;
        gap: 0;
        justify-content: center;
        flex-wrap: nowrap;
    }

    .hero-links a {
        padding: 0 12px;
        font-size: 12px;
        line-height: 1;
        border-right: 1px solid var(--border);
    }

    .hero-links a:last-child {
        border-right: 0;
    }

    .hero-profile {
        width: 100%;
    }

    .profile-card {
        width: 100%;
        max-width: 360px;
        margin-inline: auto;
        padding: 20px 18px;
        border-radius: 22px;
    }

    .photo-ring {
        width: 96px;
        height: 96px;
        margin-bottom: 12px;
    }

    .profile-card h3 {
        font-size: 20px;
    }

    .profile-position {
        margin-top: 1px;
        font-size: 12px;
    }

    .location {
        margin-top: 2px;
        font-size: 11px;
    }

    .profile-skills {
        margin-top: 14px;
        gap: 6px;
    }

    .profile-skills span {
        padding: 5px 9px;
        font-size: 9px;
    }

    .profile-stats {
        margin-top: 16px;
        padding-top: 14px;
    }

    .profile-stats strong {
        font-size: 17px;
    }

    .profile-contact {
        min-height: 42px;
        margin-top: 15px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {

    .container {
        width: calc(100% - 24px);
    }

    .hero {
        padding-top: 86px;
        padding-bottom: 44px;
    }

    .availability-badge {
        width: fit-content;
        max-width: 330px;
        font-size: 9px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero h2 {
        font-size: 19px;
    }

    .hero-description {
        font-size: 12.5px;
        line-height: 1.6;
    }

    /* Keep both main actions side-by-side on mobile */
    .hero-buttons {
        flex-direction: initial;
        grid-template-columns: 1fr 1fr;
    }

    .hero-buttons .btn {
        width: 100%;
        min-height: 44px;
        font-size: 11.5px;
    }

    .hero-links a {
        padding: 0 9px;
        font-size: 11px;
    }

    .profile-card {
        padding: 18px 15px;
    }

    .photo-ring {
        width: 88px;
        height: 88px;
    }

    .profile-skills {
        display: none;
    }

    .profile-stats {
        margin-top: 13px;
    }

    .profile-contact {
        margin-top: 13px;
    }
}

@media (max-width: 360px) {

    .logo {
        font-size: 19px;
    }

    .icon-btn {
        width: 35px;
        height: 35px;
    }

    .hero-buttons {
        grid-template-columns: 1fr;
    }

    .hero-links a {
        padding: 0 7px;
        font-size: 10.5px;
    }
}

/* =========================================================
   REFERENCE-MATCH MOBILE LAYOUT
   Keeps the phone view dense like the supplied screenshot.
   Desktop/tablet rules above remain intact.
========================================================= */
@media (max-width: 700px) {
    :root { --radius: 14px; }

    body { line-height: 1.45; }
    .container { width: calc(100% - 30px); }
    .section { padding: 26px 0; }
    .section-heading { margin-bottom: 14px; }
    .section-heading.center { text-align: left; margin-inline: 0; }
    .section-tag { font-size: 8px; margin-bottom: 3px; letter-spacing: .14em; }
    .section-heading h2, .contact-left h2 {
        font-size: 24px;
        line-height: 1.05;
        letter-spacing: -1.2px;
    }
    .section-description { margin-top: 0; font-size: 9px; line-height: 1.35; }

    /* Header */
    .nav-container { height: 58px; }
    .logo { font-size: 22px; }
    .resume-btn { display: none; }
    .icon-btn { width: 37px; height: 37px; font-size: 15px; }
    .nav { top: 64px; left: 15px; right: 15px; }

    /* Hero: preserve two columns on phone */
    .hero { min-height: auto; padding: 76px 0 20px; display: block; }
    .hero-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.35fr) minmax(118px, .65fr);
        gap: 14px;
        align-items: start;
        text-align: left;
    }
    .hero-content { min-width: 0; }
    .availability-badge {
        margin: 0 0 12px;
        padding: 5px 8px;
        font-size: 8px;
        line-height: 1.2;
        white-space: nowrap;
    }
    .availability-badge span { width: 6px; height: 6px; flex: 0 0 6px; }
    .hello { font-size: 12px; }
    .hero h1 {
        margin: 2px 0 7px;
        font-size: clamp(33px, 9.8vw, 43px);
        line-height: .96;
        letter-spacing: -2.2px;
    }
    .hero h2 {
        max-width: none;
        margin: 0 0 7px;
        font-size: clamp(15px, 4.2vw, 18px);
        line-height: 1.08;
    }
    .hero-description {
        max-width: none;
        margin: 0;
        font-size: 9.5px;
        line-height: 1.45;
    }
    .hero-buttons {
        margin-top: 12px;
        display: grid;
        grid-template-columns: 1.05fr 1fr;
        gap: 7px;
    }
    .hero-buttons .btn {
        min-height: 34px;
        padding: 0 8px;
        border-radius: 8px;
        font-size: 9px;
    }
    .hero-links {
        margin-top: 10px;
        justify-content: flex-start;
        gap: 14px;
        flex-wrap: nowrap;
    }
    .hero-links a {
        padding: 0;
        border: 0;
        font-size: 9px;
        font-weight: 700;
    }

    /* Right profile area */
    .hero-profile { width: 100%; padding-top: 34px; }
    .profile-card {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        text-align: center;
    }
    body.light .profile-card { background: transparent; }
    .photo-ring {
        width: min(126px, 31vw);
        height: min(126px, 31vw);
        margin: 0 auto 10px;
        padding: 3px;
        box-shadow: 0 0 24px rgba(124,108,255,.28);
    }
    .photo-ring img { border-width: 4px; }
    .profile-card h3, .profile-position, .location, .profile-skills, .profile-contact { display: none; }
    .profile-stats {
        margin-top: 0;
        padding: 9px 0 0;
        grid-template-columns: 1fr 1fr;
        border: 1px solid var(--border);
        border-radius: 11px;
        overflow: hidden;
        background: rgba(10, 15, 27, .72);
    }
    .profile-stats div { padding: 0 3px 8px; }
    .profile-stats strong { font-size: 14px; }
    .profile-stats span { font-size: 7px; }
    .profile-stats::after {
        content: "⌖  Mumbai, Maharashtra";
        grid-column: 1 / -1;
        display: block;
        padding: 7px 4px;
        border-top: 1px solid var(--border);
        color: var(--muted);
        font-size: 7px;
        text-align: center;
    }

    /* About */
    .about-grid {
        grid-template-columns: 1.25fr .75fr;
        gap: 18px;
        align-items: start;
    }
    .about-text .large-text { display: none; }
    .about-text p { margin-bottom: 0; font-size: 10px; line-height: 1.5; }
    .about-details { border-radius: 12px; }
    .detail-row {
        padding: 7px 8px;
        display: block;
        font-size: 7.5px;
        line-height: 1.3;
    }
    .detail-row span { display: block; font-size: 6.5px; }
    .detail-row strong { display: block; margin-top: 1px; text-align: left; font-size: 7.5px; }

    /* Skills: 4 across like reference */
    .skills-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
    .skill-card {
        min-height: 88px;
        padding: 8px;
        border-radius: 10px;
    }
    .skill-top { margin-bottom: 6px; }
    .skill-icon {
        min-width: 24px;
        height: 24px;
        padding: 0 4px;
        border-radius: 6px;
        font-size: 6px;
    }
    .level { display: none; }
    .skill-card h3 { margin-bottom: 3px; font-size: 8.5px; line-height: 1.15; }
    .skill-card p { font-size: 6.7px; line-height: 1.35; }

    /* Projects: 2 side by side */
    .projects-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
    .project-card { border-radius: 12px; }
    .project-image { min-height: 118px; height: 118px; padding: 7px; }
    .project-image img { max-height: 105px; object-fit: contain; }
    .project-status { top: 6px; right: 6px; padding: 3px 5px; font-size: 5.5px; }
    .project-content { padding: 9px; }
    .project-number { font-size: 6px; }
    .project-content h3 { margin: 3px 0 5px; font-size: 11px; line-height: 1.15; }
    .project-content p { font-size: 7px; line-height: 1.45; }
    .tech-list { margin-top: 7px; gap: 4px; }
    .tech-list span { padding: 3px 5px; font-size: 5.5px; }
    .project-footer { margin-top: 7px; padding-top: 6px; gap: 4px; font-size: 5.5px; }

    /* Education horizontal */
    .education-card {
        padding: 11px;
        grid-template-columns: 98px 1fr;
        gap: 12px;
        border-radius: 12px;
        align-items: center;
    }
    .education-date { font-size: 8px; }
    .degree-label { display: none; }
    .education-main h3 { margin-top: 0; font-size: 10px; line-height: 1.15; }
    .education-main h4 { margin-top: 3px; font-size: 7.5px; }
    .education-main > p { margin-top: 2px; font-size: 6.5px; line-height: 1.3; }
    .education-tags { margin-top: 5px; gap: 4px; }
    .education-tags span { padding: 3px 5px; font-size: 5.5px; }

    /* Contact compact like reference */
    .contact { padding-bottom: 25px; }
    .contact-card {
        padding: 11px;
        grid-template-columns: 1fr;
        gap: 8px;
        border-radius: 12px;
    }
    .contact-left > p:not(.section-tag), .contact-details { display: none; }
    .contact-left { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
    .contact-left h2 { font-size: 22px; }
    .contact-left::after {
        content: "I’m always open to discussing opportunities, collaborations or just a tech chat.";
        max-width: 45%;
        color: var(--muted);
        font-size: 6.7px;
        line-height: 1.35;
        text-align: right;
    }
    .contact-form {
        padding: 0;
        grid-template-columns: 1fr 1fr 1.2fr;
        gap: 6px;
        border: 0;
        background: transparent;
    }
    .input-group label { margin-bottom: 2px; font-size: 5.5px; }
    .input-group input, .input-group textarea {
        min-height: 34px;
        padding: 7px 8px;
        border-radius: 7px;
        font-size: 6.5px;
    }
    .input-group textarea { height: 34px; min-height: 34px; resize: none; }
    .submit-btn { grid-column: 1 / -1; min-height: 30px; font-size: 7px; border-radius: 7px; }
    .form-message { grid-column: 1 / -1; min-height: 0; font-size: 6px; }

    /* Footer single compact line */
    .footer { padding: 18px 0 14px; }
    .footer-content { flex-direction: row; text-align: left; gap: 8px; }
    .footer-logo { font-size: 14px; }
    .footer p { display: none; }
    .footer-center { font-size: 5.5px; text-align: center; }
    .footer-links { gap: 7px; }
    .footer-links a { font-size: 5.5px; }
    .copyright { margin-top: 8px; padding-top: 7px; font-size: 5.5px; }
}

@media (max-width: 390px) {
    .container { width: calc(100% - 24px); }
    .hero-grid { grid-template-columns: minmax(0, 1.3fr) minmax(108px, .7fr); gap: 10px; }
    .hero h1 { font-size: 33px; }
    .hero h2 { font-size: 14px; }
    .hero-description { font-size: 8.8px; }
    .hero-links { gap: 10px; }
    .skills-grid { gap: 5px; }
    .skill-card { padding: 7px 6px; }
    .project-content h3 { font-size: 10px; }
}

/* =========================================================
   FINAL PROJECT ACTION BUTTONS
   SONEXA + AI RESUME ANALYZER
========================================================= */

.project-actions {
    margin-top: 18px;

    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 10px;
}


.project-actions .project-btn {
    width: 100%;
    min-width: 0;
    min-height: 46px;

    padding: 0 15px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    border: 1px solid var(--border-bright);
    border-radius: 14px;

    background:
        rgba(10, 15, 27, 0.62);

    color: var(--text);

    font-size: 12px;
    font-weight: 800;

    line-height: 1;

    white-space: nowrap;

    cursor: pointer;

    transition:
        transform .22s ease,
        border-color .22s ease,
        background .22s ease,
        box-shadow .22s ease,
        color .22s ease;
}


.project-actions .project-btn svg {
    width: 18px;
    height: 18px;

    flex: 0 0 18px;
}


/* GitHub */

.project-actions .github-btn {
    border-color:
        rgba(166, 156, 255, .75);
}


.project-actions .github-btn:hover {
    background:
        rgba(124, 108, 255, .10);

    border-color:
        var(--primary-light);

    transform:
        translateY(-2px);
}


/* SONEXA APK */

.project-actions .download-btn {
    color: #ffffff;

    border-color: transparent;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );

    box-shadow:
        0 10px 24px
        rgba(124, 108, 255, .24);
}


.project-actions .download-btn:hover {
    transform:
        translateY(-2px);

    box-shadow:
        0 14px 30px
        rgba(124, 108, 255, .34);
}


/* AI Resume Analyzer Live Demo */

.project-actions .live-btn {
    color: #ffffff;

    border-color: transparent;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );

    box-shadow:
        0 10px 24px
        rgba(124, 108, 255, .24);
}


.project-actions .live-btn:hover {
    transform:
        translateY(-2px);

    box-shadow:
        0 14px 30px
        rgba(124, 108, 255, .34);
}


/* Temporary inactive buttons until real URLs are added */

.project-actions .demo-disabled,
.project-actions .project-link-pending {
    opacity: .58;
    cursor: not-allowed;
}


/* Live Demo must not navigate before deployment */

.project-actions .demo-disabled {
    pointer-events: none;
}


/* Light mode */

body.light .project-actions .project-btn {
    background:
        rgba(255, 255, 255, .72);
}


body.light .project-actions .download-btn {
    color: #ffffff;

    border-color: transparent;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );

    box-shadow:
        0 10px 24px
        rgba(124, 108, 255, .22);
}


body.light .project-actions .live-btn {
    color: #ffffff;

    border-color: transparent;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );

    box-shadow:
        0 10px 24px
        rgba(124, 108, 255, .22);
}


/* =========================================================
   MOBILE PROJECT ACTIONS
   Compact two-button layout like the reference
========================================================= */

@media (max-width: 700px) {

    .project-actions {
        margin-top: 9px;

        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr);

        gap: 5px;
    }


    .project-actions .project-btn {
        min-height: 28px;

        padding: 0 5px;

        gap: 4px;

        border-radius: 7px;

        font-size: 6px;
        font-weight: 800;

        white-space: nowrap;

        box-shadow: none;
    }


    .project-actions .project-btn svg {
        width: 9px;
        height: 9px;

        flex: 0 0 9px;
    }


    .project-actions .project-btn:hover {
        transform: none;
    }

}


/* Very small phones */

@media (max-width: 390px) {

    .project-actions {
        gap: 4px;
    }


    .project-actions .project-btn {
        min-height: 26px;

        padding: 0 4px;

        font-size: 5.5px;
    }


    .project-actions .project-btn svg {
        width: 8px;
        height: 8px;

        flex-basis: 8px;
    }

}


/* Ultra-small fallback */

@media (max-width: 330px) {

    .project-actions {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   FINAL PREMIUM LIGHT MODE POLISH
   Dark theme + existing layouts remain unchanged.
========================================================= */

body.light {
    --bg: #f4f7fb;
    --bg-soft: #eef3f9;

    --card: rgba(255, 255, 255, 0.84);
    --card-solid: #ffffff;

    --text: #101828;
    --text-soft: #344054;
    --muted: #667085;

    --primary: #6d5dfc;
    --primary-light: #7467f5;
    --secondary: #168acb;
    --success: #159d72;

    --border: rgba(31, 41, 55, 0.10);
    --border-bright: rgba(109, 93, 252, 0.34);

    --shadow:
        0 22px 55px rgba(15, 23, 42, 0.10),
        0 4px 14px rgba(15, 23, 42, 0.04);

    background:
        radial-gradient(
            circle at 8% 8%,
            rgba(109, 93, 252, 0.10),
            transparent 30%
        ),
        radial-gradient(
            circle at 92% 28%,
            rgba(22, 138, 203, 0.08),
            transparent 27%
        ),
        linear-gradient(
            180deg,
            #f8faff 0%,
            #f4f7fb 42%,
            #f8fafc 100%
        );

    background-attachment: fixed;
}

/* Header / navigation */

body.light .header.scrolled {
    background: rgba(248, 250, 255, 0.86);
    border-color: rgba(31, 41, 55, 0.08);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.055);
    backdrop-filter: blur(22px) saturate(150%);
}

body.light .nav-link {
    color: #667085;
}

body.light .nav-link:hover,
body.light .nav-link.active {
    color: #101828;
}

body.light .resume-btn {
    background: rgba(109, 93, 252, 0.07);
    border-color: rgba(109, 93, 252, 0.24);
    color: #4738d1;
}

body.light .resume-btn:hover {
    background: rgba(109, 93, 252, 0.12);
    border-color: rgba(109, 93, 252, 0.38);
}

body.light .icon-btn {
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(31, 41, 55, 0.10);
    color: #202939;
    box-shadow: 0 7px 20px rgba(15, 23, 42, 0.05);
}

body.light .icon-btn:hover {
    border-color: rgba(109, 93, 252, 0.30);
    background: #ffffff;
}

body.light .nav {
    color: #202939;
}

/* General section styling */

body.light .section-alt {
    background:
        linear-gradient(
            180deg,
            transparent,
            rgba(109, 93, 252, 0.035),
            rgba(22, 138, 203, 0.018),
            transparent
        );
}

body.light .section-tag {
    color: #3974c8;
}

body.light .section-description {
    color: #667085;
}

body.light .gradient-text {
    background:
        linear-gradient(
            110deg,
            #5b4df1,
            #4267d5,
            #1787bf
        );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Buttons */

body.light .btn-primary {
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #6d5dfc,
            #2f8bd3
        );
    box-shadow:
        0 14px 32px rgba(91, 77, 241, 0.20);
}

body.light .btn-primary:hover {
    box-shadow:
        0 18px 38px rgba(91, 77, 241, 0.27);
}

body.light .btn-secondary {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(31, 41, 55, 0.11);
    color: #202939;
    box-shadow: 0 7px 20px rgba(15, 23, 42, 0.045);
}

body.light .btn-secondary:hover {
    border-color: rgba(109, 93, 252, 0.30);
    background: #ffffff;
}

/* Hero */

body.light .availability-badge {
    background: rgba(21, 157, 114, 0.07);
    border-color: rgba(21, 157, 114, 0.18);
    color: #107757;
}

body.light .hello,
body.light .hero-links a {
    color: #667085;
}

body.light .hero-description {
    color: #475467;
}

body.light .hero-links a:hover {
    color: #3974c8;
}

/* Profile card */

body.light .profile-card {
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.96),
            rgba(247, 249, 255, 0.94)
        );
    border-color: rgba(31, 41, 55, 0.09);
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.09),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

body.light .photo-ring {
    box-shadow: 0 12px 34px rgba(109, 93, 252, 0.20);
}

body.light .profile-position {
    color: #5f53d9;
}

body.light .profile-skills span,
body.light .tech-list span,
body.light .education-tags span {
    background: rgba(109, 93, 252, 0.055);
    border-color: rgba(109, 93, 252, 0.13);
    color: #475467;
}

body.light .profile-contact {
    background: rgba(109, 93, 252, 0.075);
    border-color: rgba(109, 93, 252, 0.25);
    color: #4438bf;
}

body.light .profile-contact:hover {
    background: rgba(109, 93, 252, 0.115);
}

/* About */

body.light .about-details {
    background: rgba(255, 255, 255, 0.80);
    border-color: rgba(31, 41, 55, 0.09);
    box-shadow: 0 15px 36px rgba(15, 23, 42, 0.05);
}

body.light .detail-row:hover {
    background: rgba(109, 93, 252, 0.028);
}

/* Skills */

body.light .skill-card {
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.92),
            rgba(248, 250, 255, 0.86)
        );
    border-color: rgba(31, 41, 55, 0.085);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
}

body.light .skill-card:hover {
    border-color: rgba(109, 93, 252, 0.28);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.085);
}

body.light .skill-icon {
    background: rgba(109, 93, 252, 0.09);
    color: #5f53d9;
}

body.light .foundation {
    color: #275f9e;
    background: rgba(59, 130, 246, 0.09);
}

body.light .learning {
    color: #6846c7;
    background: rgba(124, 108, 255, 0.09);
}

body.light .basic {
    color: #16775a;
    background: rgba(21, 157, 114, 0.085);
}

body.light .tool {
    color: #475467;
    background: rgba(100, 116, 139, 0.075);
}

/* Projects */

body.light .project-card {
    background:
        linear-gradient(
            155deg,
            rgba(255, 255, 255, 0.96),
            rgba(249, 251, 255, 0.90)
        );
    border-color: rgba(31, 41, 55, 0.09);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.05);
}

body.light .project-card:hover {
    border-color: rgba(109, 93, 252, 0.26);
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.10);
}

body.light .project-image {
    background:
        radial-gradient(
            circle at 50% 15%,
            rgba(109, 93, 252, 0.07),
            transparent 42%
        ),
        linear-gradient(
            145deg,
            #edf2f8,
            #fbfcff
        );
    border-bottom: 1px solid rgba(31, 41, 55, 0.055);
}

body.light .project-status {
    background: rgba(17, 24, 39, 0.86);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.13);
}

body.light .project-number {
    color: #6255db;
}

body.light .project-content p {
    color: #667085;
}

body.light .project-footer {
    color: #475467;
}

/* Education */

body.light .education-card {
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.93),
            rgba(248, 250, 255, 0.86)
        );
    border-color: rgba(31, 41, 55, 0.09);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05);
}

body.light .education-date {
    color: #5f53d9;
}

body.light .degree-label {
    color: #3974c8;
}

body.light .education-main h4 {
    color: #475467;
}

body.light .education-main > p {
    color: #667085;
}

body.light .cgpa {
    color: #16775a !important;
}

/* Contact */

body.light .contact-card {
    background:
        linear-gradient(
            135deg,
            rgba(109, 93, 252, 0.055),
            rgba(22, 138, 203, 0.025),
            rgba(255, 255, 255, 0.56)
        );
    border-color: rgba(31, 41, 55, 0.09);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.055);
}

body.light .contact-details a,
body.light .contact-form {
    background: rgba(255, 255, 255, 0.84);
    border-color: rgba(31, 41, 55, 0.09);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

body.light .contact-details a:hover {
    border-color: rgba(109, 93, 252, 0.26);
    background: #ffffff;
}

body.light .input-group input,
body.light .input-group textarea {
    background: #f8faff;
    border-color: rgba(31, 41, 55, 0.11);
    color: #101828;
}

body.light .input-group input::placeholder,
body.light .input-group textarea::placeholder {
    color: #98a2b3;
}

body.light .input-group input:focus,
body.light .input-group textarea:focus {
    background: #ffffff;
    border-color: rgba(109, 93, 252, 0.52);
    box-shadow: 0 0 0 3px rgba(109, 93, 252, 0.09);
}

/* Footer */

body.light .footer {
    border-color: rgba(31, 41, 55, 0.085);
}

body.light .footer-links a:hover {
    color: #3974c8;
}

/* Project action buttons */

body.light .project-actions .project-btn {
    background: rgba(255, 255, 255, 0.90);
    border-color: rgba(109, 93, 252, 0.20);
    color: #273245;
    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.05);
}

body.light .project-actions .github-btn:hover {
    background: rgba(109, 93, 252, 0.07);
    border-color: rgba(109, 93, 252, 0.36);
    color: #4438bf;
}

body.light .project-actions .download-btn,
body.light .project-actions .live-btn {
    color: #ffffff;
    border-color: transparent;
    background:
        linear-gradient(
            135deg,
            #6d5dfc,
            #2f8bd3
        );
    box-shadow: 0 10px 24px rgba(91, 77, 241, 0.18);
}

body.light .project-actions .download-btn:hover,
body.light .project-actions .live-btn:hover {
    box-shadow: 0 14px 30px rgba(91, 77, 241, 0.25);
}

/* Mobile-only light polish without changing the layout */

@media (max-width: 960px) {
    body.light .nav {
        background: rgba(248, 250, 255, 0.97);
        border-color: rgba(31, 41, 55, 0.09);
        box-shadow: 0 18px 44px rgba(15, 23, 42, 0.09);
        backdrop-filter: blur(20px);
    }
}

@media (max-width: 700px) {
    body.light .profile-card {
        background: transparent;
        box-shadow: none;
    }

    body.light .profile-stats {
        background: rgba(255, 255, 255, 0.84);
        border-color: rgba(31, 41, 55, 0.09);
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    }

    body.light .photo-ring {
        box-shadow: 0 0 24px rgba(109, 93, 252, 0.18);
    }

    body.light .skill-card,
    body.light .project-card,
    body.light .education-card {
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.045);
    }

    body.light .contact-form {
        background: transparent;
        box-shadow: none;
    }

    body.light .project-actions .project-btn {
        box-shadow: none;
    }
}



/* =========================================================
   SONEXA FINAL PROJECT SHOWCASE
========================================================= */

.sonexa-showcase {
    display: block;
    height: auto;
    min-height: 330px;
    padding: 54px 20px 22px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(155, 107, 255, 0.22),
            transparent 52%
        ),
        linear-gradient(
            145deg,
            #100b1c,
            #07070d
        );
}

.sonexa-screen-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
}

.sonexa-screen-grid img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 20;
    object-fit: cover;
    object-position: top;
    opacity: 1;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 12px;
    background: #07070d;
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.34),
        0 0 18px rgba(155, 107, 255, 0.08);
    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.sonexa-project-card:hover .sonexa-screen-grid img {
    transform: translateY(-3px);
    border-color: rgba(155, 107, 255, 0.32);
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.38),
        0 0 22px rgba(155, 107, 255, 0.14);
}

body.light .sonexa-showcase {
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(109, 93, 252, 0.14),
            transparent 52%
        ),
        linear-gradient(
            145deg,
            #ece9fa,
            #f8f9ff
        );
}

body.light .sonexa-screen-grid img {
    border-color: rgba(75, 61, 160, 0.17);
    box-shadow:
        0 14px 28px rgba(45, 39, 91, 0.13),
        0 0 16px rgba(109, 93, 252, 0.07);
}

@media (max-width: 700px) {
    .sonexa-showcase {
        min-height: 270px;
        padding: 48px 12px 16px;
    }

    .sonexa-screen-grid {
        gap: 7px;
    }

    .sonexa-screen-grid img {
        border-radius: 9px;
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.30);
    }
}

@media (max-width: 380px) {
    .sonexa-showcase {
        min-height: 245px;
        padding-inline: 9px;
    }

    .sonexa-screen-grid {
        gap: 5px;
    }

    .sonexa-screen-grid img {
        border-radius: 7px;
    }
}


/* =========================================================
   FREEGI FEATURED PROJECT SHOWCASE
========================================================= */

.freegi-showcase {
    display: block;
    height: auto;
    min-height: 330px;
    padding: 54px 20px 22px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(0, 175, 168, 0.22),
            transparent 52%
        ),
        linear-gradient(
            145deg,
            #071b1a,
            #06100f
        );
}

.freegi-screen-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
}

.freegi-screen-grid img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 20;
    object-fit: cover;
    object-position: top;
    opacity: 1;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 12px;
    background: #f7fffe;
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.32),
        0 0 18px rgba(0, 175, 168, 0.08);
    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.freegi-project-card:hover .freegi-screen-grid img {
    transform: translateY(-3px);
    border-color: rgba(0, 175, 168, 0.38);
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.36),
        0 0 22px rgba(0, 175, 168, 0.15);
}

body.light .freegi-showcase {
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(0, 175, 168, 0.15),
            transparent 52%
        ),
        linear-gradient(
            145deg,
            #e7f8f6,
            #f8fffe
        );
}

body.light .freegi-screen-grid img {
    border-color: rgba(0, 128, 122, 0.18);
    box-shadow:
        0 14px 28px rgba(14, 77, 73, 0.13),
        0 0 16px rgba(0, 175, 168, 0.07);
}

@media (max-width: 700px) {
    .freegi-showcase {
        min-height: 270px;
        padding: 48px 12px 16px;
    }

    .freegi-screen-grid {
        gap: 7px;
    }

    .freegi-screen-grid img {
        border-radius: 9px;
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.27);
    }
}

@media (max-width: 380px) {
    .freegi-showcase {
        min-height: 245px;
        padding-inline: 9px;
    }

    .freegi-screen-grid {
        gap: 5px;
    }

    .freegi-screen-grid img {
        border-radius: 7px;
    }
}


/* =========================================================
   MOBILE PROJECT CARDS — FINAL ONE-COLUMN OVERRIDE
========================================================= */

@media (max-width: 700px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .project-card {
        width: 100%;
        border-radius: 18px;
    }

    .project-image {
        height: auto;
        min-height: 250px;
        padding: 18px;
    }

    .sonexa-showcase,
    .freegi-showcase {
        height: auto;
        min-height: 285px;
        padding: 48px 15px 18px;
    }

    .sonexa-screen-grid,
    .freegi-screen-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        max-width: 520px;
    }

    .sonexa-screen-grid img,
    .freegi-screen-grid img {
        width: 100%;
        max-height: none;
        aspect-ratio: 9 / 20;
        object-fit: cover;
        object-position: top;
        border-radius: 10px;
    }

    .project-image > img {
        width: 100%;
        height: auto;
        max-height: 280px;
        object-fit: contain;
    }

    .project-status {
        top: 12px;
        right: 12px;
        padding: 6px 9px;
        font-size: 9px;
    }

    .project-content {
        padding: 18px;
    }

    .project-number {
        font-size: 9px;
    }

    .project-content h3 {
        margin: 7px 0 9px;
        font-size: 20px;
        line-height: 1.2;
    }

    .project-content p {
        font-size: 13px;
        line-height: 1.58;
    }

    .tech-list {
        gap: 7px;
        margin-top: 14px;
    }

    .tech-list span {
        padding: 6px 9px;
        font-size: 9px;
    }

    .project-actions {
        gap: 10px;
        margin-top: 16px;
    }

    .project-actions .project-btn {
        min-height: 42px;
        padding: 10px 12px;
        font-size: 10px;
    }

    .project-footer {
        margin-top: 14px;
        padding-top: 12px;
        gap: 8px;
        font-size: 9px;
    }
}

@media (max-width: 380px) {
    .sonexa-showcase,
    .freegi-showcase {
        min-height: 255px;
        padding-inline: 11px;
    }

    .sonexa-screen-grid,
    .freegi-screen-grid {
        gap: 6px;
    }

    .project-content {
        padding: 16px;
    }

    .project-content h3 {
        font-size: 18px;
    }
}

/* MOBILE PROJECT SHOWCASE — CONTENT-FIT FINAL FIX */
@media (max-width: 700px) {
    .projects-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .project-card {
        width: 100%;
        min-width: 0;
    }

    .project-image,
    .sonexa-showcase,
    .freegi-showcase {
        height: auto;
        min-height: 0;
    }

    .sonexa-showcase,
    .freegi-showcase {
        display: block;
        padding: 42px 12px 12px;
    }

    .sonexa-screen-grid,
    .freegi-screen-grid {
        width: 100%;
        max-width: none;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-items: start;
        gap: 7px;
        margin: 0;
    }

    .sonexa-screen-grid img,
    .freegi-screen-grid img {
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: none;
        aspect-ratio: 9 / 20;
        object-fit: contain;
        object-position: center top;
        border-radius: 8px;
    }

    .project-image > img {
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: none;
        object-fit: contain;
    }
}

@media (max-width: 380px) {
    .sonexa-showcase,
    .freegi-showcase {
        min-height: 0;
        padding: 38px 9px 10px;
    }

    .sonexa-screen-grid,
    .freegi-screen-grid {
        gap: 5px;
    }
}

/* Local project posters: show the complete screenshot without cropping */
.local-project-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    padding: 24px 16px;
    overflow: hidden;
}
.local-project-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    object-position: center;
}
.local-project-image.sonexa-poster { background: #0b1025; }
.local-project-image.freegi-poster { background: #eaf4ed; }
.image-help {
    color: var(--muted);
    text-align: center;
    padding: 40px 16px;
    font-size: 13px;
}
@media (max-width: 700px) {
    .local-project-image { min-height: 170px; padding: 18px 10px; }
    .local-project-image img { max-height: none; width: 100%; }
}

/* Dhanviq uses the same full-image treatment as the other app posters. */
.dhanviq-poster { background: #061a3b; }
.dhanviq-poster img { width: 100%; height: auto; max-height: 360px; object-fit: contain; }
@media (max-width: 700px) { .dhanviq-poster img { max-height: none; } }


/* =========================================================
   SONEXA APK PICKER — COMPACT MODAL
========================================================= */

.sonexa-download-wrap { width: 100%; min-width: 0; }
.project-actions .sonexa-download-toggle { width: 100%; min-height: 46px; font: inherit; }
.project-actions .sonexa-download-toggle svg { width: 18px; height: 18px; flex: 0 0 18px; }

.sonexa-download-backdrop {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(2, 6, 18, .76);
    backdrop-filter: blur(8px);
}
.sonexa-download-backdrop[hidden] { display: none; }
body.sonexa-dialog-open { overflow: hidden; }

.sonexa-download-dialog {
    width: min(100%, 460px);
    max-height: min( min(720px, 88vh), 88dvh );
    overflow-y: auto;
    padding: 22px;
    border: 1px solid var(--border-bright);
    border-radius: 22px;
    background: var(--card-solid);
    color: var(--text);
    box-shadow: 0 28px 90px rgba(0,0,0,.45);
    animation: sonexaDialogIn .18s ease-out;
}
@keyframes sonexaDialogIn {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.sonexa-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sonexa-dialog-eyebrow { color: var(--secondary); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.sonexa-dialog-header h3 { margin: 5px 0 3px; font-family: "Poppins", sans-serif; font-size: 22px; line-height: 1.3; }
.sonexa-dialog-header p { color: var(--muted); font-size: 12px; }
.sonexa-dialog-close { flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font-size: 23px; line-height: 1; cursor: pointer; }
.sonexa-detect-status { margin: 0 0 12px; padding: 10px 12px; border-radius: 11px; background: rgba(124,108,255,.08); color: var(--text-soft); font-size: 12px; line-height: 1.55; }
.sonexa-apk-list { display: grid; gap: 9px; }
.sonexa-apk-option { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 13px; background: var(--card); color: var(--text); text-decoration: none; transition: border-color .2s ease, background .2s ease; }
.sonexa-apk-option:hover { border-color: var(--primary-light); background: rgba(124,108,255,.07); }
.sonexa-option-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px; background: rgba(124,108,255,.13); color: var(--primary-light); font-size: 11px; font-weight: 800; }
.sonexa-option-copy { display: grid; flex: 1; gap: 3px; min-width: 0; }
.sonexa-option-copy strong { font-size: 12px; }
.sonexa-option-copy small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.sonexa-option-arrow { color: var(--muted); font-size: 19px; }
.sonexa-apk-option.is-recommended { border-color: var(--success); background: rgba(52,211,153,.07); }
.sonexa-recommended-label { color: var(--success); font-size: 10px; font-style: normal; font-weight: 800; }
.sonexa-download-note { margin-top: 14px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.sonexa-download-note a { color: var(--primary-light); text-decoration: underline; text-underline-offset: 3px; }
body.light .sonexa-download-dialog { background: #fff; }

@media (max-width: 480px) {
    .sonexa-download-backdrop { padding: 12px; }
    .sonexa-download-dialog { padding: 18px; border-radius: 18px; }
    .sonexa-dialog-header h3 { font-size: 20px; }
}

/* =========================================================
   FINAL RESPONSIVE REFINEMENT — TABLET + MOBILE
   Keeps desktop styling intact and restores readable phone UI.
========================================================= */

@media (max-width: 960px) {
    .container { width: min(calc(100% - 36px), var(--max-width)); }
    .hero-grid { grid-template-columns: 1fr; gap: 34px; }
    .hero-content { min-width: 0; }
    .hero-profile { width: 100%; }
    .profile-card { margin-inline: auto; }
    .about-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
    .skills-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
    .contact-card { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 700px) {
    html { scroll-padding-top: 72px; }
    body { overflow-x: hidden; line-height: 1.6; }
    .container { width: calc(100% - 32px); }
    .section { padding: 54px 0; }
    .section-heading { margin-bottom: 24px; }
    .section-heading.center { text-align: center; margin-inline: auto; }
    .section-tag { font-size: 10px; margin-bottom: 6px; }
    .section-heading h2, .contact-left h2 { font-size: clamp(27px, 7vw, 36px); line-height: 1.15; letter-spacing: -1px; }
    .section-description { margin-top: 10px; font-size: 13px; line-height: 1.6; }

    /* Header and navigation */
    .nav-container { height: 66px; gap: 10px; }
    .logo { font-size: 20px; white-space: nowrap; }
    .nav-actions { gap: 7px; }
    .resume-btn { display: none; }
    .icon-btn { width: 39px; height: 39px; }
    .nav { top: 72px; left: 16px; right: 16px; padding: 18px; gap: 15px; }
    .nav-link { font-size: 15px; padding: 3px 0; }

    /* Hero: readable stacked layout */
    .hero { min-height: auto; padding: 100px 0 46px; display: block; }
    .hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: 28px; text-align: left; }
    .hero-content { width: 100%; }
    .availability-badge { max-width: 100%; margin: 0 0 18px; padding: 8px 11px; font-size: 11px; line-height: 1.4; white-space: normal; }
    .availability-badge span { flex: 0 0 8px; }
    .hello { font-size: 15px; }
    .hero h1 { margin: 5px 0 14px; font-size: clamp(48px, 13vw, 66px); line-height: 1; letter-spacing: -2.5px; }
    .hero h2 { margin: 0 0 14px; font-size: clamp(21px, 6vw, 27px); line-height: 1.25; }
    .hero-description { max-width: 100%; margin: 0; font-size: 14px; line-height: 1.75; }
    .hero-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
    .hero-buttons .btn { width: 100%; min-height: 48px; font-size: 14px; }
    .hero-links { justify-content: flex-start; flex-wrap: wrap; gap: 17px; margin-top: 20px; }
    .hero-links a { font-size: 13px; }
    .hero-profile { width: 100%; padding: 0; }
    .profile-card { width: 100%; max-width: 420px; margin: 0 auto; padding: 22px 18px; border: 1px solid var(--border); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
    body.light .profile-card { background: var(--card); }
    .photo-ring { width: 116px; height: 116px; margin: 0 auto 14px; }
    .profile-card h3 { display: block; font-size: 21px; }
    .profile-position, .location { display: block; font-size: 13px; }
    .profile-skills { display: flex; margin-top: 16px; gap: 7px; }
    .profile-skills span { font-size: 10px; padding: 6px 9px; }
    .profile-stats { margin-top: 18px; padding-top: 15px; }
    .profile-stats strong { font-size: 19px; }
    .profile-stats span { font-size: 10px; }
    .profile-contact { display: flex; min-height: 42px; margin-top: 16px; font-size: 12px; }
    .profile-stats::after { content: none; }

    /* About and details */
    .about-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
    .about-text .large-text { display: block; font-size: 18px; line-height: 1.5; }
    .about-text p { margin-bottom: 12px; font-size: 13px; line-height: 1.7; }
    .about-details { border-radius: 16px; }
    .detail-row { display: flex; flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 14px; font-size: 12px; }
    .detail-row span { flex: 0 0 38%; font-size: 12px; }
    .detail-row strong { flex: 1; text-align: right; font-size: 12px; overflow-wrap: anywhere; }

    /* Skills */
    .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .skill-card { min-height: 145px; padding: 16px; border-radius: 15px; }
    .skill-top { margin-bottom: 12px; }
    .skill-icon { min-width: 38px; height: 38px; padding: 0 7px; font-size: 10px; }
    .level { display: inline-flex; padding: 4px 7px; font-size: 8px; }
    .skill-card h3 { margin-bottom: 6px; font-size: 14px; line-height: 1.3; }
    .skill-card p { font-size: 11px; line-height: 1.5; }

    /* Projects: one full-width card per row */
    .projects-grid { grid-template-columns: 1fr; gap: 18px; }
    .project-card { border-radius: 19px; }
    .project-image { min-height: 0; height: auto; padding: 14px; }
    .project-image img { width: 100%; height: auto; max-height: 340px; object-fit: contain; }
    .local-project-image { min-height: 0; padding: 14px; }
    .local-project-image img { max-height: 340px; }
    .project-status { top: 12px; right: 12px; padding: 6px 9px; font-size: 9px; }
    .project-content { padding: 19px; }
    .project-number { font-size: 10px; }
    .project-content h3 { margin: 6px 0 9px; font-size: 19px; line-height: 1.3; }
    .project-content p { font-size: 13px; line-height: 1.7; }
    .tech-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
    .tech-list span { padding: 6px 9px; font-size: 10px; }
    .project-actions { grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }
    .project-actions .project-btn { min-height: 44px; padding: 0 9px; gap: 6px; border-radius: 11px; font-size: 10px; white-space: normal; }
    .project-actions .project-btn svg { width: 15px; height: 15px; flex-basis: 15px; }
    .project-footer { margin-top: 15px; padding-top: 12px; gap: 8px; font-size: 10px; }

    /* Education */
    .education-card { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 17px; border-radius: 16px; }
    .education-date { font-size: 12px; }
    .degree-label { display: inline-block; font-size: 10px; }
    .education-main h3 { margin-top: 5px; font-size: 17px; line-height: 1.35; }
    .education-main h4 { margin-top: 5px; font-size: 13px; }
    .education-main > p { margin-top: 7px; font-size: 12px; line-height: 1.6; }
    .education-tags { margin-top: 10px; gap: 6px; }
    .education-tags span { padding: 5px 8px; font-size: 9px; }

    /* Contact */
    .contact { padding-bottom: 45px; }
    .contact-card { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 20px; border-radius: 18px; }
    .contact-left { display: block; }
    .contact-left > p:not(.section-tag), .contact-details { display: block; }
    .contact-left::after { content: none; }
    .contact-left h2 { font-size: 29px; }
    .contact-left p { font-size: 13px; line-height: 1.6; }
    .contact-form { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
    .input-group label { display: block; margin-bottom: 5px; font-size: 12px; }
    .input-group input, .input-group textarea { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 9px; font-size: 13px; }
    .input-group textarea { min-height: 100px; resize: vertical; }
    .submit-btn { grid-column: auto; min-height: 45px; font-size: 13px; }
    .form-message { grid-column: auto; min-height: 18px; font-size: 11px; }

    /* Footer */
    .footer { padding: 28px 0 18px; }
    .footer-content { flex-direction: column; align-items: center; text-align: center; gap: 13px; }
    .footer-logo { font-size: 20px; }
    .footer p { display: block; font-size: 11px; }
    .footer-center { font-size: 11px; }
    .footer-links { flex-wrap: wrap; justify-content: center; gap: 16px; }
    .footer-links a { font-size: 12px; }
    .copyright { margin-top: 18px; padding-top: 13px; font-size: 10px; }

    /* APK dialog */
    .sonexa-download-backdrop { padding: 14px; align-items: center; }
    .sonexa-download-dialog { width: 100%; max-width: 440px; max-height: 88dvh; overflow-y: auto; padding: 18px; border-radius: 18px; }
    .sonexa-dialog-header h3 { font-size: 20px; }
    .sonexa-apk-option { padding: 11px; }
}

@media (max-width: 390px) {
    .container { width: calc(100% - 26px); }
    .hero h1 { font-size: 46px; }
    .project-actions { grid-template-columns: 1fr; }
    .project-actions .project-btn { min-height: 46px; font-size: 12px; }
    .detail-row { padding: 10px 11px; }
    .detail-row span, .detail-row strong { font-size: 11px; }
    .sonexa-dialog-header h3 { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* =========================================================
   SHARED APK DOWNLOAD DIALOGS — ALL THREE APPS
========================================================= */
.project-actions .app-download-trigger { appearance: none; font-family: inherit; }
.app-download-backdrop { position: fixed; inset: 0; z-index: 6000; display: grid; place-items: center; padding: 18px; background: rgba(2, 6, 18, .78); backdrop-filter: blur(8px); }
.app-download-backdrop[hidden] { display: none; }
body.app-download-open { overflow: hidden; }
.app-download-dialog { width: min(100%, 450px); max-height: min(86vh, 720px); overflow-y: auto; padding: 22px; border: 1px solid var(--border-bright); border-radius: 21px; background: var(--card-solid); color: var(--text); box-shadow: 0 28px 90px rgba(0,0,0,.48); animation: appDownloadIn .18s ease-out; }
@keyframes appDownloadIn { from { opacity: 0; transform: translateY(9px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.app-download-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.app-download-eyebrow { color: var(--secondary); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.app-download-header h3 { margin: 5px 0 3px; font-family: "Poppins", sans-serif; font-size: 21px; line-height: 1.3; }
.app-download-header p { color: var(--muted); font-size: 12px; }
.app-download-close { flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font-size: 23px; line-height: 1; cursor: pointer; }
.app-download-status { margin: 0 0 12px; padding: 10px 12px; border-radius: 11px; background: rgba(124,108,255,.08); color: var(--text-soft); font-size: 12px; line-height: 1.55; }
.app-apk-list { display: grid; gap: 9px; }
.app-apk-option { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 13px; background: var(--card); color: var(--text); text-decoration: none; transition: border-color .2s ease, background .2s ease; }
.app-apk-option:hover, .app-apk-option.is-recommended { border-color: var(--success); background: rgba(52,211,153,.07); }
.app-apk-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px; background: rgba(124,108,255,.13); color: var(--primary-light); font-size: 11px; font-weight: 800; }
.app-apk-copy { display: grid; flex: 1; gap: 3px; min-width: 0; }
.app-apk-copy strong { font-size: 12px; }
.app-apk-copy small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.app-apk-arrow { color: var(--muted); font-size: 19px; }
.app-recommended-label { color: var(--success); font-size: 10px; font-style: normal; font-weight: 800; }
.app-download-note { margin-top: 13px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.app-download-note a { color: var(--primary-light); text-decoration: underline; text-underline-offset: 3px; }
body.light .app-download-dialog { background: #fff; }
@media (max-width: 480px) { .app-download-backdrop { padding: 12px; } .app-download-dialog { padding: 18px; border-radius: 18px; max-height: 88dvh; } .app-download-header h3 { font-size: 19px; } }



/* =========================================================
   RESPONSIVE POLISH — FINAL OVERRIDES
   Keeps the existing purple/blue identity and all page content.
========================================================= */
:root {
    --max-width: 1160px;
    --radius: 20px;
}
html { scroll-behavior: smooth; }
body {
    min-width: 320px;
    background:
        radial-gradient(ellipse at 12% 8%, rgba(124,108,255,.15), transparent 34rem),
        radial-gradient(ellipse at 88% 34%, rgba(56,189,248,.075), transparent 30rem),
        linear-gradient(180deg, var(--bg) 0%, #080d19 48%, var(--bg) 100%);
}
body.light {
    background:
        radial-gradient(ellipse at 12% 8%, rgba(124,108,255,.10), transparent 34rem),
        radial-gradient(ellipse at 88% 34%, rgba(56,189,248,.06), transparent 30rem),
        var(--bg);
}
.container { width: min(calc(100% - 48px), var(--max-width)); }
.section { padding-block: clamp(64px, 8vw, 100px); }
section[id] { scroll-margin-top: 88px; }
:where(a, button, input, textarea):focus-visible {
    outline: 3px solid rgba(166,156,255,.85);
    outline-offset: 3px;
}
button { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }

.header { transition: background .25s ease, border-color .25s ease, box-shadow .25s ease; }
.header.scrolled {
    background: rgba(7,11,20,.88);
    box-shadow: 0 10px 35px rgba(0,0,0,.16);
}
body.light .header.scrolled { background: rgba(248,250,252,.92); }
.nav-container { min-width: 0; }
.nav { gap: clamp(14px, 2vw, 27px); }
.nav-link { white-space: nowrap; }
.nav-actions { flex-shrink: 0; }
.icon-btn, .resume-btn { min-height: 42px; }
.menu-btn { font-size: 19px; }

.hero {
    min-height: min(850px, 100svh);
    padding-block: 132px 76px;
}
.hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    gap: clamp(34px, 6vw, 76px);
}
.hero-content, .hero-profile { min-width: 0; }
.availability-badge { max-width: 100%; line-height: 1.45; }
.hero h1 { font-size: clamp(54px, 6.4vw, 82px); overflow-wrap: anywhere; }
.hero h2 { font-size: clamp(22px, 2.6vw, 33px); }
.hero-description { max-width: 600px; }
.profile-card {
    width: min(100%, 390px);
    margin-inline: auto;
    padding: clamp(22px, 3vw, 32px);
    backdrop-filter: blur(14px);
}
.photo-ring { width: clamp(112px, 11vw, 138px); height: clamp(112px, 11vw, 138px); }

.about-grid { grid-template-columns: minmax(0,1fr) minmax(0,.9fr); gap: clamp(28px,5vw,68px); }
.detail-row { align-items: flex-start; }
.detail-row span { flex: 0 0 34%; }
.detail-row strong { min-width: 0; overflow-wrap: anywhere; }

.skills-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.skill-card { min-width: 0; }
.skill-card h3 { overflow-wrap: anywhere; }

.projects-grid { grid-template-columns: repeat(2, minmax(0,1fr)); align-items: stretch; }
.project-card { min-width: 0; display: flex; flex-direction: column; }
.project-content { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.project-content h3 { overflow-wrap: anywhere; }
.project-content p { overflow-wrap: anywhere; }
.project-actions { margin-top: auto; padding-top: 20px; }
.project-actions .project-btn { min-width: 0; min-height: 46px; }
.project-actions .project-btn span { min-width: 0; }
.project-image { overflow: hidden; }
.local-project-image img { width: 100%; height: auto; object-fit: contain; }

.contact-card { min-width: 0; }
.contact-form, .contact-left { min-width: 0; }
.input-group input, .input-group textarea { max-width: 100%; }
.footer-content { flex-wrap: wrap; row-gap: 16px; }
.footer-links { flex-wrap: wrap; }

.app-download-dialog { overscroll-behavior: contain; }
.app-apk-option { overflow-wrap: anywhere; }
.app-apk-copy small { overflow-wrap: anywhere; }

@media (max-width: 1100px) {
    .nav { gap: 15px; }
    .nav-link { font-size: 12px; }
    .hero-grid { gap: 34px; }
    .skills-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 960px) {
    .container { width: min(calc(100% - 40px), var(--max-width)); }
    .nav-container { height: 70px; }
    .nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 20px; right: 20px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 17px;
        background: var(--card-solid);
        box-shadow: 0 20px 50px rgba(0,0,0,.28);
    }
    .nav.open { display: flex; }
    .nav-link { display: block; padding: 11px 12px; border-radius: 10px; font-size: 14px; }
    .nav-link:hover, .nav-link.active { background: rgba(124,108,255,.09); }
    .nav-link::after { display: none; }
    .menu-btn { display: grid; }
    .hero { min-height: auto; padding: 112px 0 66px; }
    .hero-grid { grid-template-columns: minmax(0,1fr) minmax(260px,.78fr); }
    .about-grid { gap: 28px; }
}
@media (max-width: 700px) {
    .container { width: calc(100% - 36px); }
    .section { padding-block: 58px; }
    .section-heading { margin-bottom: 28px; }
    .section-heading h2, .contact-left h2 { letter-spacing: -1.2px; }
    .hero { padding: 100px 0 48px; }
    .hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: 30px; }
    .hero-content { text-align: left; }
    .availability-badge { width: fit-content; font-size: 11px; }
    .hero h1 { font-size: clamp(48px, 12vw, 68px); letter-spacing: -2.5px; }
    .hero h2 { font-size: clamp(21px, 5.5vw, 28px); }
    .hero-description { font-size: 14px; }
    .hero-buttons { flex-wrap: wrap; gap: 10px; }
    .hero-buttons .btn { flex: 1 1 160px; }
    .hero-links { flex-wrap: wrap; gap: 18px; }
    .profile-card { max-width: 430px; }
    .about-grid { grid-template-columns: 1fr; gap: 24px; }
    .about-text .large-text { font-size: 19px; }
    .skills-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
    .skill-card { min-height: 0; padding: 17px; }
    .projects-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
    .project-image { padding: 14px; }
    .local-project-image img { max-height: none; }
    .project-content { padding: 20px; }
    .project-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
    .project-actions .project-btn { padding-inline: 10px; font-size: 12px; }
    .contact-card { grid-template-columns: minmax(0,1fr); padding: 20px; gap: 22px; }
    .footer-content { flex-direction: column; align-items: center; text-align: center; }
    .footer p { display: block; }
    .footer-links { justify-content: center; gap: 16px; }
}
@media (max-width: 420px) {
    .container { width: calc(100% - 28px); }
    .nav-container { height: 64px; }
    .logo { font-size: 20px; }
    .nav-actions { gap: 6px; }
    .icon-btn { width: 38px; height: 38px; }
    .hero { padding-top: 91px; }
    .availability-badge { font-size: 10px; padding: 7px 9px; }
    .hero h1 { font-size: clamp(43px, 12vw, 52px); }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn { width: 100%; }
    .profile-card { padding: 22px 17px; }
    .detail-row { gap: 10px; padding: 13px 14px; font-size: 12px; }
    .detail-row span { flex-basis: 31%; }
    .skills-grid { gap: 9px; }
    .skill-card { padding: 14px 12px; }
    .skill-top { gap: 6px; }
    .level { font-size: 8px; padding: 4px 6px; }
    .skill-card h3 { font-size: 15px; }
    .skill-card p { font-size: 11px; }
    .project-content { padding: 17px; }
    .project-actions { grid-template-columns: 1fr; }
    .project-actions .project-btn { min-height: 46px; font-size: 12px; }
    .project-footer { flex-wrap: wrap; }
}
@media (max-width: 350px) {
    .container { width: calc(100% - 24px); }
    .logo { font-size: 18px; }
    .nav-actions { gap: 5px; }
    .icon-btn { width: 35px; height: 35px; }
    .skills-grid { grid-template-columns: 1fr 1fr; }
    .profile-skills { gap: 6px; }
    .profile-skills span { font-size: 10px; }
}

/* =========================================================
   FINAL RESPONSIVE OVERRIDES — KEEP HERO BESIDE PROFILE
   This block intentionally comes last to override older
   responsive rules above it.
========================================================= */

html { overflow-x: clip; }
body { overflow-x: clip; }
.container { width: min(1180px, calc(100% - 40px)); }

/* Desktop and laptop: introduction left, profile right */
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(290px, .85fr);
    align-items: center;
    gap: clamp(28px, 5vw, 68px);
}
.hero-content, .hero-profile { min-width: 0; }
.hero-profile { display: flex; justify-content: center; }
.profile-card { width: 100%; max-width: 390px; margin-inline: auto; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-buttons .btn { min-height: 48px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 18px; }

/* Cards and buttons should never force horizontal overflow */
.projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-card, .project-content, .skill-card { min-width: 0; }
.project-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.project-actions .project-btn { min-width: 0; min-height: 46px; padding-inline: 9px; white-space: nowrap; }
.project-actions .project-btn span { white-space: nowrap; }
.detail-row strong { min-width: 0; overflow-wrap: anywhere; }

/* Tablet: retain two-column hero and compact header menu */
@media (max-width: 960px) {
    .nav-container { height: 70px; }
    .menu-btn { display: grid; }
    .nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 20px;
        right: 20px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 17px;
        background: var(--card-solid);
        box-shadow: 0 20px 50px rgba(0,0,0,.28);
    }
    .nav.open { display: flex; }
    .nav-link { display: block; padding: 11px 12px; font-size: 14px; }
    .nav-link::after { display: none; }
    .hero { min-height: auto; padding: 112px 0 62px; }
    .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(235px, .78fr); gap: 22px; }
    .hero h1 { font-size: clamp(43px, 6vw, 62px); letter-spacing: -2px; }
    .hero h2 { font-size: clamp(19px, 2.8vw, 27px); }
    .profile-card { padding: 22px 16px; }
    .skills-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Mobile and larger phones: keep profile beside the intro */
@media (max-width: 700px) {
    .container { width: calc(100% - 30px); }
    .section { padding-block: 58px; }
    .hero { min-height: auto; padding: 96px 0 48px; }
    .hero-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(112px, .62fr);
        align-items: center;
        gap: 12px;
    }
    .hero-content { text-align: left; }
    .availability-badge { width: fit-content; max-width: 100%; padding: 7px 9px; font-size: 10px; line-height: 1.4; }
    .hello { font-size: 13px; }
    .hero h1 { font-size: clamp(36px, 8vw, 50px); line-height: 1.08; letter-spacing: -2px; }
    .hero h2 { font-size: clamp(16px, 3.7vw, 22px); line-height: 1.35; }
    .hero-description { font-size: 12px; line-height: 1.65; }
    .hero-buttons { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 17px; }
    .hero-buttons .btn { width: 100%; min-height: 42px; padding-inline: 8px; font-size: 11px; }
    .hero-links { gap: 10px; margin-top: 15px; }
    .hero-links a { font-size: 10px; }
    .hero-profile { width: 100%; min-width: 0; }
    .profile-card { width: 100%; padding: 13px 8px; border-radius: 18px; }
    .photo-ring { width: clamp(76px, 18vw, 108px); height: clamp(76px, 18vw, 108px); margin-bottom: 12px; }
    .profile-card h3 { font-size: 15px; }
    .profile-position { font-size: 10px; }
    .location { font-size: 9px; }
    .profile-skills { gap: 4px; margin-top: 12px; }
    .profile-skills span { padding: 4px 6px; font-size: 8px; }
    .profile-stats { margin-top: 13px; padding-top: 12px; }
    .profile-stats strong { font-size: 16px; }
    .profile-stats span { font-size: 8px; }
    .profile-contact { min-height: 37px; margin-top: 12px; font-size: 10px; }
    .about-grid { grid-template-columns: 1fr; gap: 24px; }
    .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
    .skill-card { min-height: 0; padding: 15px 12px; }
    .projects-grid { grid-template-columns: 1fr; gap: 18px; }
    .project-content { padding: 18px; }
    .project-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-actions .project-btn { padding-inline: 6px; font-size: 10px; }
    .contact-card { grid-template-columns: 1fr; padding: 20px; gap: 22px; }
    .footer-content { flex-direction: column; align-items: center; text-align: center; }
    .footer-links { justify-content: center; flex-wrap: wrap; }
}

/* Small phones: stack hero only when two columns become too narrow */
@media (max-width: 360px) {
    .container { width: calc(100% - 24px); }
    .hero-grid { grid-template-columns: 1fr; gap: 22px; }
    .hero-content { text-align: left; }
    .hero h1 { font-size: 44px; }
    .hero h2 { font-size: 19px; }
    .hero-description { font-size: 13px; }
    .hero-profile { max-width: 280px; margin-inline: auto; }
    .profile-card { padding: 20px 16px; }
    .photo-ring { width: 112px; height: 112px; }
    .profile-card h3 { font-size: 20px; }
    .profile-position { font-size: 12px; }
    .location { font-size: 11px; }
    .profile-skills span { font-size: 9px; }
    .profile-contact { font-size: 11px; }
    .project-actions { grid-template-columns: 1fr; }
    .project-actions .project-btn { font-size: 12px; }
}

/* Accessibility and touch targets */
button, .btn, .project-btn, .resume-btn { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}



/* =========================================================
   FINAL RESPONSIVE FIX — NOVEMBER 2026
   Keep hero intro and profile side-by-side on mobile.
   This block overrides earlier responsive rules.
========================================================= */

html { overflow-x: clip; }
body { overflow-x: clip; }
.container { width: min(1180px, calc(100% - 40px)); }

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(290px, .85fr);
    align-items: center;
    gap: clamp(28px, 5vw, 68px);
}
.hero-content, .hero-profile { min-width: 0; }
.hero-profile { display: flex; justify-content: center; align-items: center; }
.profile-card { width: 100%; max-width: 390px; margin-inline: auto; }

.project-card, .project-content, .skill-card { min-width: 0; }
.project-content { display: flex; flex-direction: column; }
.project-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}
.project-actions .project-btn {
    min-width: 0;
    min-height: 46px;
    padding-inline: 9px;
    white-space: nowrap;
}
.project-actions .project-btn span { white-space: nowrap; }
.detail-row strong { min-width: 0; overflow-wrap: anywhere; }
.app-download-dialog { overscroll-behavior: contain; }
.app-apk-option, .app-apk-copy small { overflow-wrap: anywhere; }

@media (max-width: 1100px) {
    .nav { gap: 15px; }
    .nav-link { font-size: 12px; }
    .hero-grid { gap: 30px; }
    .skills-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
    .nav-container { height: 70px; }
    .menu-btn { display: grid; }
    .nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 20px;
        right: 20px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 17px;
        background: var(--card-solid);
        box-shadow: 0 20px 50px rgba(0,0,0,.28);
    }
    .nav.open { display: flex; }
    .nav-link { display: block; padding: 11px 12px; font-size: 14px; }
    .nav-link::after { display: none; }
    .hero { min-height: auto; padding: 112px 0 62px; }
    .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(235px, .78fr);
        gap: 22px;
    }
    .hero h1 { font-size: clamp(43px, 6vw, 62px); letter-spacing: -2px; }
    .hero h2 { font-size: clamp(19px, 2.8vw, 27px); }
    .profile-card { padding: 22px 16px; }
    .skills-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .container { width: calc(100% - 30px); }
    .section { padding-block: 48px; }
    .section-heading { margin-bottom: 25px; }
    .hero {
        min-height: auto;
        padding: 94px 0 42px;
    }
    /* Two columns on mobile: text left, profile right */
    .hero-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(118px, .68fr);
        align-items: center;
        gap: 12px;
        text-align: left;
    }
    .hero-content { text-align: left; }
    .availability-badge {
        width: fit-content;
        max-width: 100%;
        padding: 6px 8px;
        margin: 0 0 13px;
        font-size: 9px;
        line-height: 1.35;
    }
    .hello { font-size: 12px; }
    .hero h1 {
        margin: 3px 0 9px;
        font-size: clamp(34px, 8.5vw, 48px);
        line-height: 1.02;
        letter-spacing: -2px;
        overflow-wrap: anywhere;
    }
    .hero h2 {
        margin: 0 0 9px;
        font-size: clamp(15px, 3.8vw, 21px);
        line-height: 1.25;
    }
    .hero-description {
        font-size: 11px;
        line-height: 1.55;
    }
    .hero-buttons {
        display: grid;
        grid-template-columns: 1fr;
        gap: 7px;
        margin-top: 14px;
    }
    .hero-buttons .btn {
        width: 100%;
        min-height: 38px;
        padding: 7px 8px;
        font-size: 10px;
        white-space: normal;
    }
    .hero-links {
        margin-top: 13px;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 9px 12px;
    }
    .hero-links a { font-size: 9px; }

    .hero-profile {
        width: 100%;
        min-width: 0;
        align-self: center;
    }
    .profile-card {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 13px 8px;
        border-radius: 17px;
    }
    .photo-ring {
        width: clamp(76px, 19vw, 108px);
        height: clamp(76px, 19vw, 108px);
        margin: 0 auto 10px;
    }
    .profile-card h3 { font-size: clamp(12px, 3vw, 16px); line-height: 1.25; }
    .profile-position { font-size: 9px; line-height: 1.3; }
    .location { font-size: 8px; }
    .profile-skills { gap: 4px; margin-top: 9px; }
    .profile-skills span { padding: 4px 5px; font-size: 7px; }
    .profile-stats { margin-top: 10px; padding-top: 9px; }
    .profile-stats strong { font-size: 14px; }
    .profile-stats span { font-size: 7px; }
    .profile-contact { min-height: 34px; margin-top: 10px; font-size: 9px; }

    .about-grid { grid-template-columns: 1fr; gap: 22px; }
    .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .skill-card { min-height: 0; padding: 15px 12px; }
    .projects-grid { grid-template-columns: 1fr; gap: 17px; }
    .project-image { min-height: 210px; padding: 12px; }
    .project-image img { max-height: 200px; object-fit: contain; }
    .project-content { padding: 18px; }
    .project-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-actions .project-btn { min-height: 42px; padding-inline: 6px; font-size: 10px; }
    .contact-card { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
    .footer-content { flex-direction: column; align-items: center; text-align: center; }
    .footer-links { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 390px) {
    .container { width: calc(100% - 24px); }
    .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(108px, .65fr);
        gap: 9px;
    }
    .hero h1 { font-size: clamp(32px, 8.8vw, 39px); }
    .hero h2 { font-size: 14px; }
    .hero-description { font-size: 10px; }
    .hero-buttons .btn { min-height: 36px; font-size: 9px; }
    .profile-card { padding: 10px 6px; }
    .photo-ring { width: 78px; height: 78px; }
    .profile-card h3 { font-size: 12px; }
    .profile-position, .location { font-size: 8px; }
    .profile-skills span { font-size: 6.5px; padding: 3px 4px; }
    .profile-contact { font-size: 8px; }
    .project-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 340px) {
    /* Keep side-by-side even on very narrow phones, with compact sizing */
    .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(98px, .62fr);
        gap: 7px;
    }
    .hero h1 { font-size: 31px; }
    .hero h2 { font-size: 13px; }
    .hero-description { font-size: 9px; }
    .photo-ring { width: 72px; height: 72px; }
    .profile-card { padding: 8px 4px; }
    .profile-card h3 { font-size: 11px; }
    .profile-stats strong { font-size: 12px; }
    .hero-buttons .btn { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}



/* =========================================================
   CONTACT SECTION — MOBILE LAYOUT REPAIR
   Overrides older compact/mobile rules that were shrinking
   and hiding the contact details and form fields.
========================================================= */

.contact-card,
.contact-left,
.contact-details,
.contact-form,
.input-group {
    min-width: 0;
}

.contact-left {
    display: block;
    align-items: initial;
    justify-content: initial;
    gap: 0;
}

.contact-left::after {
    content: none !important;
}

.contact-left > p:not(.section-tag) {
    display: block;
    max-width: 100%;
    font-size: 14px;
    line-height: 1.7;
}

.contact-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 10px;
    margin-top: 24px;
}

.contact-details a {
    display: block;
    position: static;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 13px 15px;
    overflow: hidden;
    white-space: normal;
}

.contact-details small {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    line-height: 1.4;
}

.contact-details strong {
    display: block;
    min-width: 0;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.contact-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 15px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--card);
}

.input-group {
    display: block;
    width: 100%;
}

.input-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    line-height: 1.4;
}

.input-group input,
.input-group textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    height: auto;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.input-group textarea {
    min-height: 145px;
    resize: vertical;
}

.submit-btn {
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    grid-column: auto;
    padding: 12px 16px;
    font-size: 14px;
}

.form-message {
    grid-column: auto;
    min-height: 18px;
    font-size: 12px;
}

@media (max-width: 700px) {
    .contact {
        padding: 48px 0 58px;
    }

    .contact-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
        width: 100%;
        padding: 20px;
        border-radius: 22px;
    }

    .contact-left {
        display: block;
        text-align: left;
    }

    .contact-left > p:not(.section-tag) {
        display: block;
        margin-top: 13px;
        font-size: 13px;
        line-height: 1.65;
    }

    .contact-left h2 {
        margin-top: 0;
        font-size: clamp(29px, 7vw, 36px);
        line-height: 1.2;
        letter-spacing: -1px;
    }

    .contact-details {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
        margin-top: 20px;
    }

    .contact-details a {
        display: block;
        width: 100%;
        padding: 12px 13px;
    }

    .contact-details small {
        font-size: 9px;
    }

    .contact-details strong {
        font-size: 12px;
        overflow-wrap: anywhere;
    }

    .contact-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 13px;
        width: 100%;
        padding: 17px;
        border: 1px solid var(--border);
        border-radius: 17px;
        background: var(--card);
    }

    .input-group label {
        margin-bottom: 6px;
        font-size: 12px;
    }

    .input-group input,
    .input-group textarea {
        width: 100%;
        min-height: 46px;
        height: auto;
        padding: 11px 13px;
        font-size: 14px;
        border-radius: 11px;
    }

    .input-group textarea {
        min-height: 135px;
        resize: vertical;
    }

    .submit-btn {
        width: 100%;
        min-height: 46px;
        grid-column: auto;
        font-size: 13px;
    }

    .form-message {
        grid-column: auto;
        min-height: 18px;
        font-size: 11px;
    }
}

@media (max-width: 390px) {
    .contact-card {
        padding: 16px;
        gap: 18px;
    }

    .contact-details a {
        padding: 11px 12px;
    }

    .contact-details strong {
        font-size: 11px;
    }

    .contact-form {
        padding: 14px;
        gap: 12px;
    }
}



/* =========================================================
   CONTACT SECTION — UNIFIED VISUAL DESIGN
   Keeps contact information and the form inside one
   cohesive panel instead of two disconnected cards.
========================================================= */

.contact-card {
    align-items: stretch;
    gap: 0;
    padding: 38px;
    overflow: hidden;
    background:
        linear-gradient(
            135deg,
            rgba(124, 108, 255, 0.075),
            rgba(56, 189, 248, 0.035)
        ),
        var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.contact-left {
    min-width: 0;
    padding: 4px 34px 4px 2px;
}

.contact-left h2 {
    margin: 0;
}

.contact-left > p:not(.section-tag) {
    max-width: 460px;
}

.contact-details {
    margin-top: 25px;
    gap: 10px;
}

.contact-details a {
    border: 1px solid rgba(148, 163, 184, 0.13);
    background: rgba(7, 11, 20, 0.22);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.contact-details a:hover {
    transform: translateX(3px);
    border-color: var(--border-bright);
    background: rgba(124, 108, 255, 0.08);
}

.contact-form {
    align-self: stretch;
    align-content: start;
    min-width: 0;
    padding: 4px 0 4px 34px;
    border: 0;
    border-left: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.input-group input,
.input-group textarea {
    background: rgba(7, 11, 20, 0.38);
    border-color: rgba(148, 163, 184, 0.17);
}

.input-group input:focus,
.input-group textarea:focus {
    background: rgba(7, 11, 20, 0.52);
}

body.light .contact-card {
    background:
        linear-gradient(
            135deg,
            rgba(124, 108, 255, 0.045),
            rgba(56, 189, 248, 0.025)
        ),
        var(--card);
}

body.light .contact-details a {
    background: rgba(255, 255, 255, 0.55);
}

body.light .input-group input,
body.light .input-group textarea {
    background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 700px) {
    .contact-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 20px;
        background:
            linear-gradient(
                145deg,
                rgba(124, 108, 255, 0.065),
                rgba(56, 189, 248, 0.025)
            ),
            var(--card);
    }

    .contact-left {
        padding: 0 0 22px;
        border-bottom: 1px solid var(--border);
    }

    .contact-form {
        padding: 22px 0 0;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .contact-details a:hover {
        transform: none;
    }
}

@media (max-width: 390px) {
    .contact-card {
        padding: 16px;
    }

    .contact-left {
        padding-bottom: 18px;
    }

    .contact-form {
        padding-top: 18px;
    }
}

@media (max-width: 700px) {
    :root { --radius: 14px; }

    body { line-height: 1.45; }
    .container { width: calc(100% - 30px); }
    .section { padding: 26px 0; }
    .section-heading { margin-bottom: 14px; }
    .section-heading.center { text-align: left; margin-inline: 0; }
    .section-tag { font-size: 8px; margin-bottom: 3px; letter-spacing: .14em; }
    .section-heading h2, .contact-left h2 {
        font-size: 24px;
        line-height: 1.05;
        letter-spacing: -1.2px;
    }
    .section-description { margin-top: 0; font-size: 9px; line-height: 1.35; }

    /* Header */
    .nav-container { height: 58px; }
    .logo { font-size: 22px; }
    .resume-btn { display: none; }
    .icon-btn { width: 37px; height: 37px; font-size: 15px; }
    .nav { top: 64px; left: 15px; right: 15px; }

    /* Hero: preserve two columns on phone */
    .hero { min-height: auto; padding: 76px 0 20px; display: block; }
    .hero-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.35fr) minmax(118px, .65fr);
        gap: 14px;
        align-items: start;
        text-align: left;
    }
    .hero-content { min-width: 0; }
    .availability-badge {
        margin: 0 0 12px;
        padding: 5px 8px;
        font-size: 8px;
        line-height: 1.2;
        white-space: nowrap;
    }
    .availability-badge span { width: 6px; height: 6px; flex: 0 0 6px; }
    .hello { font-size: 12px; }
    .hero h1 {
        margin: 2px 0 7px;
        font-size: clamp(33px, 9.8vw, 43px);
        line-height: .96;
        letter-spacing: -2.2px;
    }
    .hero h2 {
        max-width: none;
        margin: 0 0 7px;
        font-size: clamp(15px, 4.2vw, 18px);
        line-height: 1.08;
    }
    .hero-description {
        max-width: none;
        margin: 0;
        font-size: 9.5px;
        line-height: 1.45;
    }
    .hero-buttons {
        margin-top: 12px;
        display: grid;
        grid-template-columns: 1.05fr 1fr;
        gap: 7px;
    }
    .hero-buttons .btn {
        min-height: 34px;
        padding: 0 8px;
        border-radius: 8px;
        font-size: 9px;
    }
    .hero-links {
        margin-top: 10px;
        justify-content: flex-start;
        gap: 14px;
        flex-wrap: nowrap;
    }
    .hero-links a {
        padding: 0;
        border: 0;
        font-size: 9px;
        font-weight: 700;
    }

    /* Right profile area */
    .hero-profile { width: 100%; padding-top: 34px; }
    .profile-card {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        text-align: center;
    }
    body.light .profile-card { background: transparent; }
    .photo-ring {
        width: min(126px, 31vw);
        height: min(126px, 31vw);
        margin: 0 auto 10px;
        padding: 3px;
        box-shadow: 0 0 24px rgba(124,108,255,.28);
    }
    .photo-ring img { border-width: 4px; }
    .profile-card h3, .profile-position, .location, .profile-skills, .profile-contact { display: none; }
    .profile-stats {
        margin-top: 0;
        padding: 9px 0 0;
        grid-template-columns: 1fr 1fr;
        border: 1px solid var(--border);
        border-radius: 11px;
        overflow: hidden;
        background: rgba(10, 15, 27, .72);
    }
    .profile-stats div { padding: 0 3px 8px; }
    .profile-stats strong { font-size: 14px; }
    .profile-stats span { font-size: 7px; }
    .profile-stats::after {
        content: "⌖  Mumbai, Maharashtra";
        grid-column: 1 / -1;
        display: block;
        padding: 7px 4px;
        border-top: 1px solid var(--border);
        color: var(--muted);
        font-size: 7px;
        text-align: center;
    }

    /* About */
    .about-grid {
        grid-template-columns: 1.25fr .75fr;
        gap: 18px;
        align-items: start;
    }
    .about-text .large-text { display: none; }
    .about-text p { margin-bottom: 0; font-size: 10px; line-height: 1.5; }
    .about-details { border-radius: 12px; }
    .detail-row {
        padding: 7px 8px;
        display: block;
        font-size: 7.5px;
        line-height: 1.3;
    }
    .detail-row span { display: block; font-size: 6.5px; }
    .detail-row strong { display: block; margin-top: 1px; text-align: left; font-size: 7.5px; }

    /* Skills: 4 across like reference */
    .skills-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
    .skill-card {
        min-height: 88px;
        padding: 8px;
        border-radius: 10px;
    }
    .skill-top { margin-bottom: 6px; }
    .skill-icon {
        min-width: 24px;
        height: 24px;
        padding: 0 4px;
        border-radius: 6px;
        font-size: 6px;
    }
    .level { display: none; }
    .skill-card h3 { margin-bottom: 3px; font-size: 8.5px; line-height: 1.15; }
    .skill-card p { font-size: 6.7px; line-height: 1.35; }

    /* Projects: 2 side by side */
    .projects-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
    .project-card { border-radius: 12px; }
    .project-image { min-height: 118px; height: 118px; padding: 7px; }
    .project-image img { max-height: 105px; object-fit: contain; }
    .project-status { top: 6px; right: 6px; padding: 3px 5px; font-size: 5.5px; }
    .project-content { padding: 9px; }
    .project-number { font-size: 6px; }
    .project-content h3 { margin: 3px 0 5px; font-size: 11px; line-height: 1.15; }
    .project-content p { font-size: 7px; line-height: 1.45; }
    .tech-list { margin-top: 7px; gap: 4px; }
    .tech-list span { padding: 3px 5px; font-size: 5.5px; }
    .project-footer { margin-top: 7px; padding-top: 6px; gap: 4px; font-size: 5.5px; }

    /* Education horizontal */
    .education-card {
        padding: 11px;
        grid-template-columns: 98px 1fr;
        gap: 12px;
        border-radius: 12px;
        align-items: center;
    }
    .education-date { font-size: 8px; }
    .degree-label { display: none; }
    .education-main h3 { margin-top: 0; font-size: 10px; line-height: 1.15; }
    .education-main h4 { margin-top: 3px; font-size: 7.5px; }
    .education-main > p { margin-top: 2px; font-size: 6.5px; line-height: 1.3; }
    .education-tags { margin-top: 5px; gap: 4px; }
    .education-tags span { padding: 3px 5px; font-size: 5.5px; }

    /* Contact compact like reference */
    .contact { padding-bottom: 25px; }
    .contact-card {
        padding: 11px;
        grid-template-columns: 1fr;
        gap: 8px;
        border-radius: 12px;
    }
    .contact-left > p:not(.section-tag), .contact-details { display: none; }
    .contact-left { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
    .contact-left h2 { font-size: 22px; }
    .contact-left::after {
        content: "I’m always open to discussing opportunities, collaborations or just a tech chat.";
        max-width: 45%;
        color: var(--muted);
        font-size: 6.7px;
        line-height: 1.35;
        text-align: right;
    }
    .contact-form {
        padding: 0;
        grid-template-columns: 1fr 1fr 1.2fr;
        gap: 6px;
        border: 0;
        background: transparent;
    }
    .input-group label { margin-bottom: 2px; font-size: 5.5px; }
    .input-group input, .input-group textarea {
        min-height: 34px;
        padding: 7px 8px;
        border-radius: 7px;
        font-size: 6.5px;
    }
    .input-group textarea { height: 34px; min-height: 34px; resize: none; }
    .submit-btn { grid-column: 1 / -1; min-height: 30px; font-size: 7px; border-radius: 7px; }
    .form-message { grid-column: 1 / -1; min-height: 0; font-size: 6px; }

    /* Footer single compact line */
    .footer { padding: 18px 0 14px; }
    .footer-content { flex-direction: row; text-align: left; gap: 8px; }
    .footer-logo { font-size: 14px; }
    .footer p { display: none; }
    .footer-center { font-size: 5.5px; text-align: center; }
    .footer-links { gap: 7px; }
    .footer-links a { font-size: 5.5px; }
    .copyright { margin-top: 8px; padding-top: 7px; font-size: 5.5px; }
}

@media (max-width: 390px) {
    .container { width: calc(100% - 24px); }
    .hero-grid { grid-template-columns: minmax(0, 1.3fr) minmax(108px, .7fr); gap: 10px; }
    .hero h1 { font-size: 33px; }
    .hero h2 { font-size: 14px; }
    .hero-description { font-size: 8.8px; }
    .hero-links { gap: 10px; }
    .skills-grid { gap: 5px; }
    .skill-card { padding: 7px 6px; }
    .project-content h3 { font-size: 10px; }
}

@media (max-width: 700px) {

    .project-actions {
        margin-top: 9px;

        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr);

        gap: 5px;
    }


    .project-actions .project-btn {
        min-height: 28px;

        padding: 0 5px;

        gap: 4px;

        border-radius: 7px;

        font-size: 6px;
        font-weight: 800;

        white-space: nowrap;

        box-shadow: none;
    }


    .project-actions .project-btn svg {
        width: 9px;
        height: 9px;

        flex: 0 0 9px;
    }


    .project-actions .project-btn:hover {
        transform: none;
    }

}


/* Very small phones */

@media (max-width: 390px) {

    .project-actions {
        gap: 4px;
    }


    .project-actions .project-btn {
        min-height: 26px;

        padding: 0 4px;

        font-size: 5.5px;
    }


    .project-actions .project-btn svg {
        width: 8px;
        height: 8px;

        flex-basis: 8px;
    }

}


/* Ultra-small fallback */

@media (max-width: 330px) {

    .project-actions {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   CONTACT FORM — READABLE MOBILE RESTORE
   Keep the latest unified contact panel, but never hide
   contact details or shrink the form into tiny columns.
========================================================= */
.contact-card,
.contact-left,
.contact-details,
.contact-form,
.input-group {
    min-width: 0;
}

.contact-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
}

.contact-left {
    display: block;
    padding: 4px 28px 4px 2px;
    text-align: left;
}

.contact-left > p:not(.section-tag) {
    display: block;
    max-width: 100%;
    font-size: 14px;
    line-height: 1.7;
}

.contact-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 22px;
}

.contact-details a {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    overflow-wrap: anywhere;
}

.contact-details small {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
}

.contact-details strong {
    display: block;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.contact-left::after {
    content: none !important;
}

.contact-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    min-width: 0;
    padding: 4px 0 4px 28px;
    border: 0;
    border-left: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.input-group {
    display: block;
    width: 100%;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
}

.input-group input,
.input-group textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 46px;
    height: auto;
    padding: 11px 13px;
    font-size: 14px;
    line-height: 1.5;
}

.input-group textarea {
    min-height: 130px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    min-height: 44px;
    grid-column: auto;
    font-size: 13px;
}

.form-message {
    grid-column: auto;
    min-height: 18px;
    font-size: 11px;
}

@media (max-width: 700px) {
    .contact-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 20px;
    }

    .contact-left {
        padding: 0 0 20px;
        border-bottom: 1px solid var(--border);
    }

    .contact-left h2 {
        font-size: clamp(25px, 6vw, 32px);
        line-height: 1.15;
    }

    .contact-left > p:not(.section-tag) {
        font-size: 13px;
    }

    .contact-details {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }

    .contact-details a {
        padding: 11px 13px;
    }

    .contact-details strong {
        font-size: 12px;
    }

    .contact-form {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 20px 0 0;
        border: 0;
        background: transparent;
    }

    .input-group label {
        font-size: 12px;
    }

    .input-group input,
    .input-group textarea {
        min-height: 46px;
        font-size: 14px;
    }

    .input-group textarea {
        min-height: 120px;
    }

    .submit-btn {
        min-height: 44px;
        font-size: 13px;
    }
}

@media (max-width: 390px) {
    .contact-card {
        padding: 16px;
    }

    .contact-left {
        padding-bottom: 17px;
    }

    .contact-form {
        padding-top: 17px;
    }

    .contact-details strong {
        font-size: 12px;
    }
}

/* Avoid accidental horizontal scrolling on narrow screens. */
@media (max-width: 700px) {
    html, body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .container,
    .hero-grid,
    .about-grid,
    .skills-grid,
    .projects-grid,
    .education-card,
    .contact-card {
        min-width: 0;
    }

    .hero-content,
    .hero-profile,
    .project-card,
    .project-content {
        min-width: 0;
    }

    .hero-description,
    .project-content p,
    .detail-row strong,
    .education-main {
        overflow-wrap: anywhere;
    }
}
