/* STEP 10 — Responsive polish (mobile → tablet → desktop → wide) */

html {
    overflow-x: clip;
    scroll-behavior: smooth;
}

body {
    overflow-x: clip;
}

/* Safer horizontal rhythm on very narrow screens */
@media (max-width: 22.5rem) {
    .container {
        width: min(100% - 1.5rem, var(--container-width));
    }

    .hero__layout {
        gap: var(--space-sm);
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    }

    .hero__typewriter {
        font-size: 0.62rem;
    }
}

/* Tap targets — mobile nav */
.nav-toggle-label {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0.6rem;
    box-sizing: border-box;
}

.site-nav__list a {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    padding-block: var(--space-md);
}

/* Hero CTA: stacked, compact buttons beside the portrait on phones */
.hero__actions .btn {
    width: 100%;
    min-height: 2.5rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.75rem;
    line-height: 1.25;
    text-align: center;
}

@media (min-width: 48rem) {
    .hero__actions .btn {
        width: auto;
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* Project / section padding scale */
@media (min-width: 48rem) {
    .projects,
    .section {
        padding-block: calc(var(--space-2xl) + var(--space-md));
    }
}

@media (min-width: 64rem) {
    .projects,
    .section,
    .hero {
        padding-block: calc(var(--space-2xl) + var(--space-xl));
    }

    .hero {
        padding-block: calc(var(--space-2xl) + var(--space-xl));
    }
}

/* Wide desktop: keep content readable, use container already */
@media (min-width: 90rem) {
    :root {
        --container-width: 76rem;
    }
}

/* Experience period column: avoid cramped text */
@media (min-width: 48rem) {
    .experience-item {
        grid-template-columns: minmax(7.5rem, 9.5rem) minmax(0, 1fr);
    }
}

/* Desktop nav: restore compact padding after mobile tap targets */
@media (min-width: 48rem) {
    .site-nav__list a {
        min-height: 0;
        padding-block: var(--space-xs);
    }
}

/* Footer links: better tap on mobile */
.site-footer__links a {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
}

@media (min-width: 48rem) {
    .site-footer__links a {
        min-height: 0;
    }
}

/* Prevent long placeholder URLs from blowing layout */
.project-card__links a:not(.btn),
.case-study__links a:not(.btn),
.hero__social a {
    overflow-wrap: anywhere;
}
