/* =========================================================
   NIRAJ KUMAR PORTFOLIO — RESPONSIVE STYLES
========================================================= */

/* =========================================================
   1120px AND BELOW
========================================================= */

@media (max-width: 1120px) {

    .navbar {
        padding-inline: 22px;
    }

    .hero {
        grid-template-columns:
            1fr
            .9fr;

        gap: 42px;
    }

    .hero h1 {
        font-size:
            clamp(
                46px,
                6.2vw,
                72px
            );
    }

    .skills-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .agriprep-card {
        padding: 46px;

        grid-template-columns:
            1fr
            1fr;
    }
}

/* =========================================================
   900px AND BELOW
========================================================= */

@media (max-width: 900px) {

    html {
        scroll-padding-top: 82px;
    }

    .navbar {
        min-height: 68px;
        padding: 12px 18px;
    }

    .brand-copy small {
        display: none;
    }

    .menu-btn {
        display: grid;
    }

    .nav-links {
        position: fixed;

        top: 77px;
        left: 13px;
        right: 13px;

        z-index: 990;

        display: flex;

        flex-direction: column;

        align-items: stretch;

        gap: 4px;

        padding: 12px;

        border:
            1px solid
            var(--line);

        border-radius: 16px;

        background:
            color-mix(
                in srgb,
                var(--bg-soft) 96%,
                transparent
            );

        box-shadow:
            var(--shadow-lg);

        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transform:
            translateY(-10px)
            scale(.98);

        transition:
            opacity .22s ease,
            visibility .22s ease,
            transform .22s ease;
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        transform:
            translateY(0)
            scale(1);
    }

    .nav-links a {
        width: 100%;
        padding: 12px 13px;
    }

    .nav-links a.active::after {
        display: none;
    }

    .nav-links .nav-cta {
        margin: 5px 0 0;
        text-align: center;
    }

    .section-pad {
        width:
            min(
                var(--max),
                calc(100% - 38px)
            );

        padding-block: 88px;
    }

    .section-heading {
        align-items: start;

        flex-direction: column;

        margin-bottom: 31px;

        gap: 12px;
    }

    .section-heading > p {
        max-width: 560px;
        text-align: left;
    }

    .hero {
        min-height: auto;

        grid-template-columns: 1fr;

        gap: 45px;

        padding-top: 72px;
        padding-bottom: 83px;
    }

    .hero-visual {
        min-height: auto;
    }

    .terminal-window {
        transform: none;
    }

    .hero-visual:hover .terminal-window {
        transform:
            translateY(-3px);
    }

    .about-grid,
    .agriprep-card,
    .contact-card {
        grid-template-columns: 1fr;
    }

    .about-grid {
        gap: 42px;
    }

    .agriprep-card {
        gap: 30px;
    }

    .product-visual {
        min-height: 390px;
    }

    .contact-card {
        gap: 38px;
        padding: 40px;
    }
}

/* =========================================================
   700px AND BELOW
========================================================= */

@media (max-width: 700px) {

    .navbar {
        padding-inline: 15px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .brand-copy strong {
        font-size: 13px;
    }

    .section-pad {
        width:
            calc(100% - 28px);

        padding-block: 74px;
    }

    .hero {
        padding-top: 55px;
        padding-bottom: 69px;

        gap: 36px;
    }

    .status-pill {
        max-width: 100%;

        font-size: 7px;

        letter-spacing: .05em;
    }

    .hero h1 {
        font-size:
            clamp(
                40px,
                12vw,
                58px
            );
    }

    .hero-text {
        font-size: 13px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-meta {
        align-items: flex-start;

        flex-direction: column;

        gap: 8px;
    }

    .meta-divider {
        display: none;
    }

    .hero-stats {
        margin-top: 28px;
    }

    .terminal-bar {
        min-height: 39px;

        padding-inline: 10px;

        font-size: 8px;
    }

    .terminal-title {
        overflow: hidden;

        text-overflow: ellipsis;

        white-space: nowrap;
    }

    .terminal-body {
        min-height: 270px;

        padding: 18px;

        font-size: 9px;

        line-height: 1.85;
    }

    .floating-chip {
        display: none;
    }

    .section-heading h2,
    .contact-copy h2 {
        font-size:
            clamp(
                34px,
                11vw,
                47px
            );
    }

    .about-story .lead {
        font-size: 16px;
    }

    .about-story {
        font-size: 13px;
    }

    .build-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .mini-card {
        min-height: 82px;
    }

    .skill-card {
        min-height: 255px;
    }

    .project-row {
        grid-template-columns:
            31px
            minmax(0,1fr)
            23px;

        gap: 9px;

        padding: 21px 2px;
    }

    .project-row:hover {
        padding-inline: 7px;
    }

    .project-row.featured {
        padding-left: 9px;
    }

    .project-main h3 {
        font-size: 19px;
    }

    .project-main > p {
        font-size: 10px;
    }

    .project-meta {
        font-size: 7px;
    }

    .stack-inline span,
    .tag-list span {
        font-size: 8px;
        padding: 4px 7px;
    }

    .projects-hint {
        font-size: 8px;
    }

    .agriprep-card {
        padding: 28px 20px;

        border-radius: 19px;
    }

    .agriprep-copy h2 {
        font-size:
            clamp(
                60px,
                19vw,
                88px
            );
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

    .product-visual {
        min-height: 350px;
    }

    .orbit-a {
        width: 280px;
        height: 190px;
    }

    .orbit-b {
        width: 200px;
        height: 270px;
    }

    .phone {
        width: 196px;
    }

    .phone-screen {
        min-height: 390px;
    }

    .contact-card {
        padding: 27px 19px;

        border-radius: 18px;
    }

    .contact-actions {
        flex-direction: column;
    }

    .contact-actions .btn {
        width: 100%;
    }

    .footer-main,
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-bottom {
        gap: 7px;
    }

    .modal-backdrop {
        padding: 12px;
    }

    .project-modal {
        max-height: 90vh;

        padding: 27px 19px;

        border-radius: 17px;
    }

    .modal-cols {
        grid-template-columns: 1fr;

        gap: 9px;

        margin-top: 19px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
    }

    .back-to-top {
        right: 14px;
        bottom: 14px;
    }

    .toast {
        bottom: 14px;

        width:
            calc(100% - 28px);
    }
}

/* =========================================================
   420px AND BELOW
========================================================= */

@media (max-width: 420px) {

    .brand-copy strong {
        font-size: 12px;
    }

    .brand {
        gap: 8px;
    }

    .nav-controls {
        gap: 5px;
    }

    .theme-toggle,
    .menu-btn {
        width: 38px;
        height: 38px;
    }

    .hero-stats {
        gap: 10px;
    }

    .hero-stats span {
        font-size: 10px;
    }
}