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


html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #ffffff;
    color: #111111;
    line-height: 1.6;
}

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

.container {
    width: min(1120px, 90%);
    margin: auto;
}

/* ---------- NAVBAR ---------- */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid #eeeeee;

    backdrop-filter: blur(10px);

}

.nav-container {
    height: 75px;

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

}

.logo {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span {
    color: #2563eb;
}

nav {
    display: flex;
    gap: 30px;
}

nav a {
    color: #555555;
    font-size: 14px;
    transition: 0.25s ease;
}

nav a:hover {
    color: #111111;
}

.nav-button {
    background: #111111;
    color: #ffffff;

    padding: 10px 18px;
    border-radius: 7px;

    font-size: 14px;

    transition: 0.25s ease;

}

.nav-button:hover {
    background: #2563eb;
    transform: translateY(-2px);
}



/* ---------- HERO ---------- */

.hero {
    min-height: calc(100vh - 75px);

    display: flex;
    align-items: center;

    background:
        linear-gradient(#f8fafc 1px, transparent 1px),
        linear-gradient(90deg, #f8fafc 1px, transparent 1px);

    background-size: 40px 40px;


}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 70px;

    /* */
    align-items: center;
    /* */

}

.hero-content {
    animation: heroAppear 0.8s ease forwards;
}

.small-heading {
    display: inline-block;

    /* */
    color: #2563eb;
    background: #eff6ff;

    padding: 7px 12px;
    border-radius: 30px;

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

    margin-bottom: 20px;
    /* */

}

.hero h1 {
    font-size: clamp(42px, 6vw, 70px);
    line-height: 1.05;

    /* */
    letter-spacing: -3px;

    max-width: 700px;
    /* */

}

.hero h1 span {
    display: block;
    color: #2563eb;
}

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

    /* */
    color: #666666;
    font-size: 17px;

    margin-top: 25px;
    /* */

}

.hero-buttons {
    display: flex;
    gap: 12px;

    /* */
    margin-top: 32px;
    /* */

}

.primary-button,
.secondary-button {
    padding: 13px 20px;
    border-radius: 7px;

    /* */
    font-size: 14px;
    font-weight: 600;

    transition: 0.25s ease;
    /* */

}

.primary-button {
    background: #111111;
    color: #ffffff;
}

.primary-button:hover {
    background: #2563eb;
    transform: translateY(-3px);
}

.secondary-button {
    border: 1px solid #dddddd;
    background: #ffffff;
}

.secondary-button:hover {
    border-color: #111111;
    transform: translateY(-3px);
}

.availability {
    display: flex;
    align-items: center;
    gap: 9px;

    /* */
    margin-top: 25px;

    color: #777777;
    font-size: 13px;
    /* */

}

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

    /* */
    background: #22c55e;
    border-radius: 50%;

    box-shadow: 0 0 0 5px #dcfce7;
    /* */

}

/* ---------- HERO CODE CARD ---------- */

.hero-card {
    animation: float 5s ease-in-out infinite;
}

.code-window {
    background: #111111;
    color: #ffffff;

    /* */
    border-radius: 13px;

    overflow: hidden;

    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
    /* */

}

.window-top {
    height: 48px;

    /* */
    display: flex;
    align-items: center;

    padding: 0 18px;

    background: #181818;
    border-bottom: 1px solid #292929;
    /* */

}

.window-top p {
    margin: 0 auto;

    /* */
    font-size: 12px;
    color: #888888;
    /* */

}

.dots {
    display: flex;
    gap: 6px;
}

.dots span {
    width: 10px;
    height: 10px;

    /* */
    /* background: #555555; */
    border-radius: 50%;
    /* */

}

.dot-1 {
    background-color: red;
}

.dot-2 {
    background-color: yellow;
}

.dot-3 {
    background-color: green;
}



.code-content {
    padding: 35px 30px;

    /* */
    font-family: "Courier New", monospace;
    font-size: 14px;

    line-height: 2.2;
    /* */

}

.tag {
    color: #60a5fa;
}

.indent {
    padding-left: 20px;
}

.cursor {
    color: #60a5fa;
    animation: blink 1s infinite;
}

/* ---------- ANIMATIONS ---------- */

@keyframes blink {
    50% {
        opacity: 0;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    /* */
    50% {
        transform: translateY(-20px);
    }

    /* */

}

@keyframes heroAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    /* */
    to {
        opacity: 1;
        transform: translateY(0);
    }

    /* */

}

/* ---------- GENERAL SECTIONS ---------- */

.section {
    padding: 110px 0;
}

.section-heading {
    margin-bottom: 55px;
}

.section-heading p {
    color: #2563eb;

    /* */
    font-size: 12px;
    font-weight: 700;

    letter-spacing: 2px;

    margin-bottom: 10px;
    /* */

}

.section-heading h2 {
    font-size: clamp(32px, 4vw, 48px);

    /* */
    line-height: 1.1;

    letter-spacing: -2px;
    /* */

}

.section-heading h2 span {
    color: #777777;
}

/* ---------- ABOUT ---------- */

/* ABOUT PHOTO */

.about-content {
    margin-top: 50px;
}

.about-photo {
    width: 230px;
    height: 280px;
    margin: 0 auto 45px;
    overflow: hidden;
    border-radius: 20px;
    border: 5px solid #ffffff;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}


/* .about-grid { */
/* display: grid; */

/* */
/* grid-template-columns: 1.3fr 0.7fr; */

/* gap: 80px; */
/* */

/* } */

.about-text {
    /* max-width: 1200px; */
    text-align: center;
}

.about-text p {
    color: #666666;

    font-size: 17px;

    margin-bottom: 10px;

}

.about-text strong {
    color: #111111;
}

.about-info {
    display: grid;

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

    gap: 12px;



}

.info-box {
    border: 1px solid #e7e7e7;

    border-radius: 10px;

    padding: 25px;

    display: flex;
    flex-direction: column;

    justify-content: center;

    transition: 0.5s ease;
    background-color: oklch(99% .005 240);
    text-align: center;

}

.info-box:hover {
    border-color: #2563eb;

    transform: scale(1.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
    /* */

}



.info-box strong {
    font-size: 30px;
}

.info-box span {
    color: #888888;

    /* */
    font-size: 13px;
    font-weight: bolder;
    /* */

}

/* ------------------SKILLS------------------- */




.skills-section {
    background: #f4f8fc;
    padding: 80px 20px;
}

/* Heading */

.section-heading {
    text-align: center;
    margin-bottom: 70px;
}

.section-heading p {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 15px;
}

.section-heading h2 {
    font-size: 42px;
    margin: 10px 0 20px;
    color: #0f172a;
}

.section-heading h2 span {
    color: #2563eb;
}

.skills-description {
    color: #475569;
    font-size: 18px;
    max-width: 700px;
    margin: auto;
    line-height: 1.6;
}


/* Skills Grid */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}


/* Card */

.skill-card {
    background: #f8fbff;
    border: 1px solid #cbd5e1;
    border-radius: 18px;
    padding: 35px 30px;
    transition: 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.skill-card h3 {
    font-size: 25px;
    color: #17202a;
    margin-bottom: 45px;
}


/* Individual Skill */

.skill {
    margin-bottom: 30px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 17px;
    color: #1e293b;
}

.skill-info span:last-child {
    color: #64748b;
}


/* Progress Bar */

.progress {
    width: 100%;
    height: 10px;
    background: #cbd9eb;
    border-radius: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #2458a8;
    border-radius: 20px;
}


/* Responsive */

@media (max-width: 900px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .section-heading h2 {
        font-size: 34px;
    }
}

@media (max-width: 500px) {
    .skills-section {
        padding: 60px 15px;
    }

    .skill-card {
        padding: 25px 20px;
    }

    .section-heading h2 {
        font-size: 30px;
    }

    .skills-description {
        font-size: 15px;
    }
}



/* ---------- PROJECTS ---------- */

.projects-grid {
    display: grid;

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

    gap: 25px;

}





.project-card {
    border: 1px solid #e5e5e5;

    /* */
    border-radius: 12px;

    overflow: hidden;

    transition: 0.35s ease;
    /* */

}

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

    /* */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    /* */

}

.project-top {
    display: flex;

    /* */
    justify-content: space-between;

    padding: 18px 20px;

    font-size: 11px;

    font-weight: 700;
    /* */

}

.project-label {
    /* color: #888888; */
    color: #6b91e3;

    /* */
    letter-spacing: 1px;
    /* */

}

.project-arrow {
    font-size: 20px;
}


.project-preview {
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5e5e5;
}

.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
    transition: transform 0.5s ease;
}

.project-card:hover .project-preview img {
    transform: scale(1.03);
}




.project-info {
    padding: 28px;
}

.project-info h3 {
    font-size: 22px;

    /* */
    margin-bottom: 10px;
    color: black;
    /* */

}

.project-info p {
    color: #777777;

    /* */
    font-size: 14px;
    /* */

}

.technologies {
    display: flex;

    /* */
    flex-wrap: wrap;

    gap: 7px;

    margin: 20px 0;
    /* */

}

.technologies span,
.service-tags span {
    padding: 5px 9px;

    /* */
    border-radius: 5px;

    background: #f3f4f6;

    color: #555555;

    font-size: 11px;
    /* */

}

.project-link {
    color: #2563eb;

    /* */
    font-size: 14px;

    font-weight: 700;
    /* */

}

.project-link:hover {
    text-decoration: underline;
}

.more-projects {
    text-align: center;

    /* */
    margin-top: 45px;
    /* */

}

.more-projects p {
    color: #888888;

    /* */
    margin-bottom: 10px;
    /* */

}

.more-projects a {
    color: #2563eb;

    /* */
    font-weight: 600;
    /* */

}


/* ---------- SERVICES ---------- */

.services-section {
    background: #f8fafc;
}

.service-box {
    display: grid;

    /* */
    grid-template-columns: 80px 1fr 60px;

    gap: 30px;

    align-items: center;

    background: #ffffff;

    border: 1px solid #e5e5e5;

    border-radius: 12px;

    padding: 35px;

    transition: 0.3s ease;
    /* */

}

.service-box:hover {
    transform: translateY(-5px);

    /* */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
    /* */

}

.service-number {
    font-family: monospace;

    /* */
    color: #2563eb;

    font-size: 14px;
    /* */

}

.service-content h3 {
    font-size: 25px;

    /* */
    margin-bottom: 8px;
    /* */

}

.service-content p {
    color: #777777;

    /* */
    max-width: 700px;
    /* */

}

.service-tags {
    display: flex;

    /* */
    flex-wrap: wrap;

    gap: 7px;

    margin-top: 18px;
    /* */

}

.service-icon {
    width: 50px;
    height: 50px;

    /* */
    display: flex;

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

    border-radius: 50%;

    background: #111111;

    color: #ffffff;

    font-size: 20px;
    /* */

}

/* ---------- CONTACT ---------- */

.contact-section {
    padding: 120px 0;

    /* */
    background: #111111;

    color: #ffffff;
    /* */

}

.contact-container {
    display: grid;

    /* */
    grid-template-columns: 1fr 0.8fr;

    gap: 100px;

    align-items: center;
    /* */

}

.contact-heading p:first-child {
    color: #60a5fa;

    /* */
    font-size: 12px;

    font-weight: 700;

    letter-spacing: 2px;
    /* */

}

.contact-heading h2 {
    font-size: clamp(40px, 5vw, 62px);

    /* */
    line-height: 1.05;

    letter-spacing: -3px;

    margin: 15px 0 20px;
    /* */

}

.contact-heading h2 span {
    display: block;

    /* */
    color: #888888;
    /* */

}

.contact-description {
    color: #999999;

    /* */
    max-width: 500px;
    /* */

}

.contact-links {
    display: flex;

    /* */
    flex-direction: column;
    /* */

}

.contact-link {
    display: flex;

    /* */
    justify-content: space-between;

    padding: 18px 0;

    border-bottom: 1px solid #333333;

    color: #cccccc;

    transition: 0.25s ease;
    /* */

}

.contact-link:hover {
    color: #ffffff;

    /* */
    padding-left: 8px;
    /* */

}

.contact-link span:last-child {
    color: #60a5fa;
}

/* ---------- FOOTER ---------- */

footer {
    background: #111111;

    /* */
    color: #ffffff;

    border-top: 1px solid #292929;

    padding: 30px 0;
    /* */

}

.footer-container {
    display: flex;

    /* */
    justify-content: space-between;

    align-items: center;
    /* */

}

.footer-container p {
    color: #777777;

    /* */
    font-size: 12px;
    /* */

}

.footer-right {
    text-align: right;
}

/* =========================================
RESPONSIVE DESIGN
========================================= */

/* =========================================
   RESPONSIVE DESIGN
========================================= */

@media (max-width: 900px) {

    .hero-container {
        grid-template-columns: 1fr;
        padding: 80px 0;
    }

    .hero-card {
        max-width: 650px;
        width: 100%;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .contact-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}


/* =========================================
   MOBILE — BOTTOM NAVIGATION
========================================= */


@media (max-width: 600px) {



    /* ---------- Hero ---------- */

    .hero {
        min-height: calc(100vh - 70px);
    }

    .hero h1 {
        letter-spacing: -2px;
    }

    .hero-description {
        font-size: 15px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .primary-button,
    .secondary-button {
        text-align: center;
    }


    /* ---------- Sections ---------- */

    .section {
        padding: 80px 0;
    }


    /* ---------- Skills ---------- */

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


    /* ---------- Projects ---------- */

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


    /* ---------- About ---------- */

    .about-info {
        grid-template-columns: 1fr 1fr;
    }

    .about-photo {
        width: 190px;
        height: 240px;
    }


    /* ---------- Services ---------- */

    .service-box {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .service-icon {
        margin-top: 10px;
    }


    /* ---------- Contact ---------- */

    .contact-section {
        padding: 80px 0;
    }


    /* ---------- Footer ---------- */

    .footer-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .footer-right {
        text-align: left;
    }


    /* ---------- Code Window ---------- */

    .code-content {
        padding: 25px 18px;
        font-size: 11px;
        overflow-x: auto;
    }

    .window-top p {
        margin: 0 auto;
    }
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    /* ---------- TOP NAVBAR ---------- */

    .navbar {
        position: fixed;

        top: 0;
        bottom: auto;
        left: 0;

        width: 100%;
        height: 62px;

        z-index: 9999;

        background: rgba(255, 255, 255, 0.97);

        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);

        border-bottom: 1px solid #e5e5e5;
        border-top: none;

        box-shadow: 0 3px 20px rgba(0, 0, 0, 0.05);
    }

    /* ---------- NAV CONTAINER ---------- */

    .nav-container {
        width: 100%;
        height: 100%;

        padding: 0 20px;

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

    /* ---------- MOBILE LOGO ---------- */

    .logo {
        display: block;

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

        letter-spacing: -1px;

        color: #111111;
    }

    .logo span {
        color: #2563eb;
    }

    /* ---------- HIDE DESKTOP NAV ---------- */

    nav {
        display: none;
    }

    /* ---------- HIDE LET'S TALK ---------- */

    .nav-button {
        display: none;
    }

    /* ---------- PAGE SPACING ---------- */

    body {
        padding-top: 62px;
        padding-bottom: 0;
    }


    /* ---------- HERO ---------- */

    .hero {
        min-height: calc(100vh - 62px);
    }

    .hero h1 {
        letter-spacing: -2px;
    }

    .hero-description {
        font-size: 15px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .primary-button,
    .secondary-button {
        text-align: center;
    }


    /* ---------- SECTIONS ---------- */

    .section {
        padding: 80px 0;
    }


    /* ---------- SKILLS ---------- */

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


    /* ---------- PROJECTS ---------- */

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


    /* ---------- ABOUT ---------- */

    .about-info {
        grid-template-columns: 1fr 1fr;
    }

    .about-photo {
        width: 190px;
        height: 240px;
    }


    /* ---------- SERVICES ---------- */

    .service-box {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .service-icon {
        margin-top: 10px;
    }


    /* ---------- CONTACT ---------- */

    .contact-section {
        padding: 80px 0;
    }


    /* ---------- FOOTER ---------- */

    .footer-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .footer-right {
        text-align: left;
    }


    /* ---------- CODE WINDOW ---------- */

    .code-content {
        padding: 25px 18px;
        font-size: 11px;
        overflow-x: auto;
    }

    .window-top p {
        margin: 0 auto;
    }
}

/* =========================================================
   CINEMATIC MOTION ENHANCEMENTS
   Animation-only layer — existing visual design preserved.
   ========================================================= */

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

body {
    overflow-x: hidden;
}

@media (min-width: 601px) {
    .navbar {
        transition: box-shadow 0.35s ease, background-color 0.35s ease,
            border-color 0.35s ease, transform 0.35s ease;
    }

    .navbar.nav-scrolled {
        background: rgba(255, 255, 255, 0.88);
        border-bottom-color: rgba(229, 229, 229, 0.9);
        box-shadow: 0 10px 35px rgba(0, 0, 0, 0.07);
    }
}

/* Page-load choreography */
.hero-content>* {
    opacity: 0;
    transform: translateY(22px);
    animation: heroItemIn 0.85s cubic-bezier(.22, 1, .36, 1) forwards;
}

.hero-content> :nth-child(1) {
    animation-delay: 0.08s;
}

.hero-content> :nth-child(2) {
    animation-delay: 0.18s;
}

.hero-content> :nth-child(3) {
    animation-delay: 0.30s;
}

.hero-content> :nth-child(4) {
    animation-delay: 0.43s;
}

.hero-content> :nth-child(5) {
    animation-delay: 0.56s;
}

.hero-card {
    opacity: 0;
    animation:
        heroCardIn 1s cubic-bezier(.22, 1, .36, 1) 0.30s forwards,
        float 5s ease-in-out 1.35s infinite;
    transform-origin: center;
}

@keyframes heroItemIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroCardIn {
    from {
        opacity: 0;
        transform: translate3d(35px, 18px, 0) scale(.97);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

/* Ambient hero depth without changing the existing background */
.hero {
    position: relative;
    isolation: isolate;
}

.hero::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    right: 8%;
    top: 12%;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.035);
    filter: blur(55px);
    pointer-events: none;
    z-index: -1;
    animation: ambientDrift 9s ease-in-out infinite;
}

@keyframes ambientDrift {

    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(-20px, 25px, 0) scale(1.08);
    }
}

/* Scroll reveal states */
.motion-reveal,
.motion-left,
.motion-right,
.motion-scale {
    opacity: 0;
    will-change: opacity, transform;
}

.motion-reveal {
    transform: translate3d(0, 45px, 0) scale(.985);
}

.motion-left {
    transform: translate3d(-55px, 18px, 0);
}

.motion-right {
    transform: translate3d(55px, 18px, 0);
}

.motion-scale {
    transform: translate3d(0, 20px, 0) scale(.94);
}

.motion-reveal.is-visible,
.motion-left.is-visible,
.motion-right.is-visible,
.motion-scale.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    transition:
        opacity 0.8s cubic-bezier(.22, 1, .36, 1),
        transform 0.9s cubic-bezier(.22, 1, .36, 1);
}

/* Staggered children */
.stagger-item {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
}

.stagger-item.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition:
        opacity 0.7s cubic-bezier(.22, 1, .36, 1),
        transform 0.75s cubic-bezier(.22, 1, .36, 1);
}

/* Preserve the original layout while making cards feel physical */
.project-card,
.skill-card,
.info-box,
.service-box {
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.project-card {
    position: relative;
    transition:
        transform 0.45s cubic-bezier(.22, 1, .36, 1),
        box-shadow 0.45s ease,
        border-color 0.35s ease;
}

.project-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 42%;
    height: 100%;
    background: linear-gradient(105deg,
            transparent 0%,
            rgba(255, 255, 255, 0.22) 48%,
            transparent 100%);
    transform: skewX(-18deg);
    pointer-events: none;
    opacity: 0;
    transition: left 0.7s ease, opacity 0.2s ease;
}

.project-card:hover::after {
    left: 135%;
    opacity: 1;
}

.project-card:hover .project-arrow {
    transform: translate3d(4px, -4px, 0) rotate(4deg);
}

.project-arrow {
    transition: transform 0.35s cubic-bezier(.22, 1, .36, 1);
}

.project-preview img {
    transition: transform 0.8s cubic-bezier(.22, 1, .36, 1);
}

.project-card:hover .project-preview img {
    transform: scale(1.055);
}

/* Buttons and links */
.primary-button,
.secondary-button,
.nav-button,
.project-link,
.contact-link,
.more-projects a {
    position: relative;
    overflow: hidden;
}

.primary-button::after,
.secondary-button::after,
.nav-button::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg,
            transparent 25%,
            rgba(255, 255, 255, .22) 50%,
            transparent 75%);
    transform: translateX(-130%);
    transition: transform 0.65s ease;
    pointer-events: none;
}

.primary-button:hover::after,
.secondary-button:hover::after,
.nav-button:hover::after {
    transform: translateX(130%);
}

.primary-button:active,
.secondary-button:active,
.nav-button:active {
    transform: translateY(1px) scale(.985);
}

.project-link,
.contact-link,
.more-projects a {
    transition: color .25s ease, padding-left .3s ease, transform .3s ease;
}

.project-link:hover,
.more-projects a:hover {
    padding-left: 5px;
}

.contact-link:hover {
    transform: translateX(4px);
}

/* Subtle interactive depth */
.skill-card,
.info-box,
.service-box {
    transition:
        transform 0.4s cubic-bezier(.22, 1, .36, 1),
        box-shadow 0.4s ease,
        border-color 0.3s ease;
}

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

/* Progress bars animate only after their skill section enters */
.progress-bar {
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 1.15s cubic-bezier(.22, 1, .36, 1);
}

.progress-bar.progress-animated {
    transform: scaleX(1);
}

/* Active section navigation */
nav a,
.mobile-nav-panel a {
    position: relative;
}

nav a::after,
.mobile-nav-panel a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -7px;
    height: 2px;
    background: #2563eb;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .3s ease;
}

nav a.active {
    color: #111111;
}

nav a.active::after,
.mobile-nav-panel a.active::after {
    transform: scaleX(1);
}

/* Scroll progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 10001;
    pointer-events: none;
    background: transparent;
}

.scroll-progress-bar {
    width: 0;
    height: 100%;
    background: #2563eb;
    transform-origin: left center;
    box-shadow: 0 0 10px rgba(37, 99, 235, .35);
}

/* Desktop cursor glow */
.cursor-glow {
    position: fixed;
    width: 180px;
    height: 180px;
    left: 0;
    top: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    background: radial-gradient(circle,
            rgba(37, 99, 235, .075) 0%,
            rgba(37, 99, 235, .025) 38%,
            transparent 70%);
    transform: translate3d(-50%, -50%, 0);
    will-change: transform;
    transition: opacity .3s ease;
}

@media (hover: hover) and (pointer: fine) {
    body.cursor-active .cursor-glow {
        opacity: 1;
    }
}

/* Mobile menu — uses the existing nav links and visual language */
.mobile-menu-toggle {
    display: none;
}

.mobile-nav-panel {
    display: none;
}

@media (max-width: 600px) {
    .mobile-menu-toggle {
        display: flex;
        position: fixed;
        right: 16px;
        top: 13px;
        width: 38px;
        height: 36px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        cursor: pointer;
        z-index: 10001;
    }

    .mobile-menu-toggle span {
        width: 20px;
        height: 2px;
        background: #111111;
        border-radius: 2px;
        transition: transform .3s ease, opacity .25s ease;
    }

    .mobile-menu-toggle.is-open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.is-open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .mobile-nav-panel {
        display: flex;
        position: fixed;
        top: 62px;
        left: 12px;
        right: 12px;
        flex-direction: column;
        padding: 8px;
        background: rgba(255, 255, 255, .97);
        border: 1px solid #e5e5e5;
        border-radius: 12px;
        box-shadow: 0 18px 45px rgba(0, 0, 0, .10);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-12px) scale(.98);
        transform-origin: top center;
        transition: opacity .3s ease, transform .3s ease, visibility .3s ease;
        z-index: 10000;
    }

    .mobile-nav-panel.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }

    .mobile-nav-panel a {
        position: relative;
        padding: 12px 14px;
        color: #555555;
        font-size: 14px;
        border-radius: 7px;
        transform: translateY(-5px);
        opacity: 0;
        transition: color .25s ease, background .25s ease,
            opacity .25s ease, transform .3s ease;
    }

    .mobile-nav-panel.is-open a {
        opacity: 1;
        transform: translateY(0);
    }

    .mobile-nav-panel.is-open a:nth-child(1) {
        transition-delay: .03s;
    }

    .mobile-nav-panel.is-open a:nth-child(2) {
        transition-delay: .06s;
    }

    .mobile-nav-panel.is-open a:nth-child(3) {
        transition-delay: .09s;
    }

    .mobile-nav-panel.is-open a:nth-child(4) {
        transition-delay: .12s;
    }

    .mobile-nav-panel.is-open a:nth-child(5) {
        transition-delay: .15s;
    }

    .mobile-nav-panel.is-open a:nth-child(6) {
        transition-delay: .18s;
    }

    .mobile-nav-panel a:hover,
    .mobile-nav-panel a.active {
        background: #f8fafc;
        color: #111111;
    }

    .mobile-nav-panel a::after {
        left: 14px;
        right: auto;
        bottom: 7px;
        width: 20px;
    }

    .hero::after {
        width: 220px;
        height: 220px;
        right: -70px;
    }

    .motion-reveal,
    .motion-left,
    .motion-right {
        transform: translate3d(0, 24px, 0);
    }

    .motion-reveal.is-visible,
    .motion-left.is-visible,
    .motion-right.is-visible {
        transform: translate3d(0, 0, 0);
    }

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

/* Reduced-motion accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .motion-reveal,
    .motion-left,
    .motion-right,
    .motion-scale,
    .stagger-item,
    .hero-content>*,
    .hero-card {
        opacity: 1 !important;
        transform: none !important;
    }

    .cursor-glow,
    .scroll-progress {
        display: none !important;
    }

    .progress-bar {
        transform: scaleX(1) !important;
    }
}

/* =========================================================
   FINAL RESPONSIVE + MOBILE MOTION POLISH
   Keeps the existing visual design; improves sizing, spacing,
   navigation, and reveal animation behavior on small screens.
   ========================================================= */

/* Prevent any animated/transformed element from creating sideways overflow. */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

/* Tablet / small laptop */
@media (max-width: 900px) {
    .container {
        width: min(92%, 720px);
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 55px;
        padding: 75px 0;
    }

    .hero-content {
        width: 100%;
    }

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

    .hero-card {
        width: min(100%, 650px);
        margin: 0 auto;
    }

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

    .about-grid {
        gap: 45px;
    }

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

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

    .project-preview {
        height: 250px;
    }

    .contact-container {
        gap: 55px;
    }
}

/* Phones */
@media (max-width: 600px) {
    html {
        scroll-padding-top: 72px;
    }

    body {
        width: 100%;
        min-width: 0;
        padding-top: 62px;
    }

    .container {
        width: calc(100% - 32px);
        max-width: none;
    }

    .navbar {
        height: 62px;
    }

    .nav-container {
        position: relative;
        width: 100%;
        padding: 0 16px;
    }

    .navbar .logo {
        font-size: 22px;
        line-height: 1;
    }

    /* Keep the hamburger inside the navbar and easy to tap. */
    .mobile-menu-toggle {
        right: 12px;
        top: 10px;
        width: 42px;
        height: 42px;
    }

    .mobile-nav-panel {
        top: 68px;
        left: 12px;
        right: 12px;
        width: auto;
        max-height: calc(100vh - 82px);
        overflow-y: auto;
    }

    .mobile-nav-panel a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .hero {
        min-height: auto;
    }

    .hero-container {
        padding: 70px 0 75px;
        gap: 45px;
    }

    .small-heading {
        margin-bottom: 16px;
        font-size: 12px;
    }

    .hero h1 {
        font-size: clamp(37px, 11vw, 54px);
        line-height: 1.06;
        letter-spacing: -2.2px;
        overflow-wrap: anywhere;
    }

    .hero-description {
        max-width: 100%;
        margin-top: 20px;
        font-size: 15px;
        line-height: 1.7;
    }

    .hero-buttons {
        width: 100%;
        margin-top: 27px;
        gap: 10px;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 16px;
    }

    .availability {
        margin-top: 21px;
    }

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

    .code-window {
        width: 100%;
        border-radius: 11px;
    }

    .window-top {
        height: 44px;
        padding: 0 13px;
    }

    .window-top p {
        font-size: 11px;
    }

    .code-content {
        padding: 22px 15px;
        font-size: clamp(9px, 2.7vw, 11px);
        line-height: 2;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .section {
        padding: 75px 0;
    }

    .section-heading {
        margin-bottom: 45px;
    }

    .section-heading h2 {
        font-size: clamp(30px, 9vw, 40px);
        letter-spacing: -1.6px;
    }

    .section-heading p {
        font-size: 11px;
    }

    .skills-section {
        padding: 70px 0;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        gap: 20px;
    }

    .skill-card {
        padding: 27px 20px;
        border-radius: 15px;
    }

    .skill-card h3 {
        font-size: 21px;
        margin-bottom: 32px;
    }

    .skill {
        margin-bottom: 25px;
    }

    .skill-info {
        font-size: 15px;
    }

    .about-content {
        margin-top: 35px;
    }

    .about-photo {
        width: 175px;
        height: 220px;
        margin-bottom: 38px;
    }

    .about-grid {
        gap: 38px;
    }

    .about-text p {
        font-size: 15px;
        line-height: 1.75;
    }

    .about-info {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .info-box {
        min-width: 0;
        padding: 20px 12px;
        text-align: center;
        align-items: center;
    }

    .info-box strong {
        font-size: 26px;
    }

    .info-box span {
        font-size: 11px;
    }

    .project-card {
        width: 100%;
        min-width: 0;
        border-radius: 11px;
    }

    .project-top {
        padding: 15px 16px;
    }

    .project-preview {
        height: clamp(190px, 55vw, 270px);
    }

    .project-info {
        padding: 23px 18px 25px;
    }

    .project-info h3 {
        font-size: 20px;
    }

    .project-info p {
        font-size: 13px;
        line-height: 1.7;
    }

    .technologies {
        margin: 17px 0;
    }

    .more-projects {
        margin-top: 35px;
        padding: 0 10px;
    }

    .service-box {
        grid-template-columns: 1fr;
        gap: 13px;
        padding: 25px 20px;
    }

    .service-content h3 {
        font-size: 21px;
    }

    .service-content p {
        font-size: 14px;
        line-height: 1.7;
    }

    .service-icon {
        margin-top: 5px;
    }

    .contact-section {
        padding: 80px 0;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .contact-heading h2 {
        font-size: clamp(39px, 11vw, 54px);
        letter-spacing: -2.2px;
    }

    .contact-description {
        font-size: 14px;
        line-height: 1.7;
    }

    .contact-link {
        min-height: 52px;
        align-items: center;
    }

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

    /* Mobile reveal animations: shorter travel distance so movement is clearly
       visible without making small screens feel slow. */
    .motion-reveal,
    .motion-left,
    .motion-right {
        transform: translate3d(0, 28px, 0);
    }

    .motion-scale {
        transform: translate3d(0, 20px, 0) scale(.97);
    }

    .motion-reveal.is-visible,
    .motion-left.is-visible,
    .motion-right.is-visible,
    .motion-scale.is-visible {
        transform: translate3d(0, 0, 0) scale(1);
    }

    .stagger-item {
        transform: translate3d(0, 22px, 0);
    }

    /* Keep touch devices from relying on hover-only effects. */
    .project-card:hover,
    .skill-card:hover,
    .info-box:hover,
    .service-box:hover {
        transform: none;
    }

    .project-card:active {
        transform: scale(.995);
    }

    /* Do not let the ambient hero decoration overpower the small screen. */
    .hero::after {
        width: 180px;
        height: 180px;
        right: -90px;
        top: 15%;
        filter: blur(45px);
    }
}

/* Very small phones */
@media (max-width: 380px) {
    .container {
        width: calc(100% - 26px);
    }

    .hero-container {
        padding-top: 58px;
    }

    .hero h1 {
        font-size: clamp(34px, 10.8vw, 44px);
    }

    .about-info {
        gap: 8px;
    }

    .info-box {
        padding: 17px 8px;
    }

    .info-box strong {
        font-size: 23px;
    }

    .info-box span {
        font-size: 10px;
    }

    .project-preview {
        height: 185px;
    }

    .code-content {
        font-size: 9px;
    }
}

/* Motion preference always wins over the mobile animation layer. */
@media (prefers-reduced-motion: reduce) {
    .hero::after {
        animation: none !important;
    }
}