@media (max-width: 1080px) {
    .hero-grid,
    .project-showcase,
    .project-showcase.is-reversed,
    .two-column,
    .contact-grid,
    .education-panel {
        grid-template-columns: 1fr;
    }

    .project-showcase.is-reversed .browser-mockup {
        order: 0;
    }

    .section-intro,
    .contact-copy {
        position: static;
    }

    .stats-grid,
    .process-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 860px) {
    :root {
        --header-height: 68px;
    }

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

    .section-pad {
        padding: 86px 0;
    }

    .header-layout {
        min-height: var(--header-height);
    }

    .site-nav {
        position: fixed;
        top: calc(var(--header-height) + 10px);
        right: 14px;
        left: 14px;
        display: grid;
        gap: 4px;
        padding: 10px;
        border-color: var(--line-strong);
        background: rgba(17, 17, 14, 0.96);
        box-shadow: var(--shadow-md);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity var(--transition), transform var(--transition);
    }

    .site-nav.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .site-nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding-inline: 12px;
    }

    .menu-button {
        display: inline-block;
    }

    .header-actions .button {
        display: none;
    }

    .hero {
        min-height: auto;
        padding-top: calc(var(--header-height) + 62px);
    }

    .hero-grid {
        gap: 34px;
    }

    .hero h1 {
        font-size: clamp(2.75rem, 13vw, 4.4rem);
    }

    .hero-card {
        padding: 20px;
    }

    .focus-grid,
    .skill-grid {
        grid-template-columns: 1fr;
    }

    .skill-card.wide {
        grid-column: auto;
    }

    .project-stack {
        gap: 66px;
    }

    .project-showcase {
        gap: 24px;
    }

    .browser-screen {
        aspect-ratio: 16 / 11;
    }

    .footer-layout {
        grid-template-columns: 1fr;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    .stats-grid,
    .process-grid {
        grid-template-columns: 1fr;
    }

    .hero-meta,
    .hero-actions,
    .project-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-meta span,
    .button {
        width: 100%;
    }

    .social-row {
        gap: 8px;
    }

    .button {
        min-height: 48px;
    }

    .portrait-block {
        max-height: 420px;
    }

    .section-intro h2,
    .section-heading h2,
    .contact-copy h2,
    .education-panel h2 {
        font-size: clamp(2.1rem, 12vw, 3.2rem);
    }

    .project-content h3 {
        font-size: clamp(2rem, 12vw, 3rem);
    }

    .browser-bar small {
        max-width: 58vw;
    }

    .contact-form {
        padding: 18px;
    }

    .back-to-top {
        right: 14px;
        bottom: 14px;
    }
}
