@media (max-width: 780px) {
    html {
        scroll-snap-type: none;
    }

    section,
    footer {
        scroll-snap-align: none;
        scroll-snap-stop: normal;
    }

    .site-controls {
        top: 0.85rem;
        right: 0.85rem;
        gap: 0.6rem;
    }

    .site-logo img {
        width: clamp(86px, 26vw, 118px);
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
    }

    #intro {
        align-items: flex-start;
        height: 100svh;
        height: 100dvh;
        min-height: 0;
        max-height: 100svh;
        max-height: 100dvh;
        padding-top: clamp(4.5rem, 14svh, 6rem);
        padding-bottom: 0;
    }

    #intro .text {
        width: 100%;
        padding: 0 1rem;
    }

    .typing-intro {
        font-size: clamp(1.65rem, 9vw, 2.65rem);
        line-height: 1.18;
    }

    .typing-line {
        white-space: normal;
    }

    .typing-cursor {
        width: 2px;
    }

    .intro-name-mark {
        min-height: 48px;
    }

    .intro-name-mark img {
        width: clamp(180px, 58vw, 260px);
    }

    .intro-wave {
        position: absolute;
        right: 1.25rem;
        top: auto;
        bottom: max(0.85rem, env(safe-area-inset-bottom));
        font-size: clamp(3.5rem, 18vw, 6rem);
    }

    .intro-wave.is-visible {
        transform: translate(0, 0) rotate(0deg) scale(1);
        animation-name: wave-hello-mobile;
    }

    .intro-actions {
        margin-top: 1rem;
        gap: 0.7rem;
        min-height: 0;
        width: min(100%, 420px);
    }

    .intro-action {
        min-height: 50px;
        flex: 1 1 132px;
    }

    .intro-email-action,
    .intro-linkedin-action {
        min-width: 0;
        padding: 0 0.8rem;
    }

    .intro-blog-action {
        min-width: 0;
        padding: 0 0.9rem;
    }

    .intro-map {
        position: absolute;
        right: 1.25rem;
        top: auto;
        bottom: max(0.85rem, env(safe-area-inset-bottom));
        width: clamp(92px, 24vw, 130px);
        transform: translate(18px, 0) scale(0.94);
    }

    .intro-map.is-visible {
        transform: translate(0, 0) scale(1);
    }

    .intro-scroll-cue {
        display: none;
    }
}

@media (max-width: 440px) {
    #intro {
        padding-top: clamp(4.25rem, 12svh, 5.5rem);
    }

    .intro-wave,
    .intro-map {
        right: 0.9rem;
        bottom: max(0.7rem, env(safe-area-inset-bottom));
    }

    .intro-action {
        flex-basis: calc(50% - 0.35rem);
    }

    .intro-blog-action {
        flex-basis: 100%;
    }
}

@media (max-width: 820px) {
    #projects {
        min-height: auto;
        padding: 4.75rem 1rem 3rem;
        display: block;
    }

    #projects h1 {
        margin-bottom: 1.25rem;
        font-size: clamp(2.35rem, 12vw, 3.25rem);
    }

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

    .project-showcase-media {
        order: -1;
    }

    .project-showcase-title {
        font-size: clamp(1.8rem, 8vw, 2.8rem);
    }

    .project-showcase-summary {
        font-size: 0.95rem;
    }

    .project-actions a {
        width: 44px;
        height: 44px;
        border-radius: 8px;
    }

    .blog-page {
        padding: 6rem 1.25rem 3rem;
    }

    .blog-nameplate {
        font-size: clamp(3.5rem, 18vw, 5rem);
    }

    .blog-story--featured,
    .blog-columns,
    .blog-columns--two {
        grid-template-columns: 1fr;
    }

    .blog-col-rule {
        height: 1px;
        width: auto;
    }

    .blog-story--featured .blog-story-headline {
        font-size: clamp(2rem, 9vw, 2.8rem);
    }

    .thought-page {
        padding: 6rem 1.25rem 3rem;
    }

    .thought-body {
        column-count: 1;
    }
}

@media (max-width: 900px) {
    :root {
        --pad: 32px;
        --gap: 12px;
        --cell-size: calc((100vw - (var(--pad) * 2) - var(--gap)) / 2);
    }

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

    .welcome-tile {
        grid-column: 1 / -1;
    }

    .goals-tile,
    .time-tile,
    .books-tile,
    .status-tile {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 760px) {
    #education {
        min-height: auto;
        padding: 4rem 1rem 3rem;
    }

    #education h1 {
        margin-bottom: 1.5rem;
        font-size: clamp(2.35rem, 12vw, 3.25rem);
        line-height: 1.05;
    }

    .education-carousel {
        min-height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .education-tile,
    .education-tile.is-active {
        position: static;
        width: min(100%, 360px);
        max-width: 360px;
        min-height: auto;
        transform: scale(1);
        opacity: 1;
        filter: none;
        cursor: default;
        padding: 1.5rem 1rem;
    }

    .education-tile.is-before,
    .education-tile.is-after {
        transform: scale(1);
        filter: none;
    }

    .education-tile img {
        width: min(126px, 70%);
        height: 126px;
        margin-bottom: 1rem;
    }

    .education-copy {
        min-height: 0;
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 700px) {
    footer {
        margin-top: 0;
        padding: 36px 20px 18px;
    }

    .footer-container {
        flex-direction: column;
        gap: 32px;
    }

    .footer-brand {
        max-width: none;
    }

    .copyright {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .site-path {
        top: 1.1rem;
        left: 1rem;
        max-width: calc(100vw - 9.5rem);
        font-size: 0.82rem;
    }

    :root {
        --pad: 20px;
        --cell-size: auto;
    }

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

    .tile,
    .welcome-tile,
    .goals-tile,
    .time-tile,
    .books-tile,
    .status-tile {
        grid-column: 1 / -1;
        width: auto;
    }

    .tile-content {
        padding: 22px;
    }

    .time-value {
        font-size: clamp(2.1rem, 10vw, 3rem);
        font-size: clamp(2.1rem, 12cqw, 3.15rem);
    }

    .social-list {
        grid-template-columns: repeat(3, 44px);
        gap: 12px;
    }

    .social-list a {
        width: 44px;
        height: 44px;
    }

    .social-icon {
        width: 32px;
        height: 32px;
    }

    .os-switcher {
        top: 0.9rem;
        right: 1rem;
        gap: 6px;
    }

    .os-switcher button {
        min-height: 34px;
        padding: 0 10px;
        font-size: 0.68rem;
    }

    .root-page[data-os="windows"] .windows-desktop {
        padding: 76px 18px 66px;
    }

    .windows-taskbar {
        grid-template-columns: auto 1fr;
        height: auto;
        min-height: 52px;
    }

    .windows-start-menu {
        left: 6px;
        bottom: 52px;
        grid-template-columns: 1fr;
        width: calc(100vw - 12px);
        min-height: 0;
    }

    .windows-start-menu-right {
        display: none;
    }

    .windows-clock {
        display: none;
    }

    .windows-taskbar-apps {
        overflow-x: auto;
    }

    .root-page[data-os="macos"] .macos-desktop {
        padding: 68px 18px 108px;
    }

    .macos-menu-bar {
        gap: 10px;
        font-size: 0.7rem;
    }

    .macos-folders {
        margin-left: 0;
    }

    .macos-dock {
        bottom: 12px;
        max-width: calc(100vw - 24px);
        min-height: 58px;
        padding: 8px 10px;
    }

    .macos-dock button {
        width: 44px;
        height: 44px;
        border-radius: 11px;
    }

    .root-page[data-os="linux"] .linux-terminal-shell {
        padding: 64px 14px 22px;
    }

    .linux-terminal-form {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

@media (hover: none) {
    .project-nav-btn:hover {
        transform: none;
    }

    .project-actions a::before,
    .project-actions a::after {
        display: none;
    }
}
