/* Shared navigation, controls and reading rhythm. */
:root{--control-height:48px;--control-radius:999px;--section-gap:clamp(48px,7vw,96px)}
:where(a,button):focus-visible{outline:2px solid var(--red);outline-offset:5px}
:where(button,a){-webkit-tap-highlight-color:transparent}
:where(h1,h2,h3){overflow-wrap:break-word}
:where(p){text-wrap:pretty}
:where(.home-cta,.about-link,.story-full-btn){display:inline-flex;align-items:center;justify-content:space-between;gap:24px;min-height:var(--control-height);padding:12px 20px;border:1px solid var(--line);border-radius:var(--control-radius);background:transparent;color:var(--ink);font:400 14px/1.4 var(--font-sans);text-decoration:none;box-shadow:none;transition:background-color .2s ease,color .2s ease,border-color .2s ease}
.about-link,.story-full-btn{display:inline-flex;align-items:center;justify-content:space-between;gap:24px;min-height:48px;padding:12px 20px;border:1px solid var(--line);border-radius:999px;background:transparent;color:var(--ink);font:400 14px/1.4 var(--font-sans);box-shadow:none;text-decoration:none}
@media(hover:hover){:is(.home-cta,.about-link,.story-full-btn):hover{background:var(--ink);border-color:var(--ink);color:var(--paper);text-decoration:none}}
:where(.story-back,.article-back){min-height:44px;align-items:center;padding-block:10px}
.project-story .story-back,.article-back{display:inline-flex}
.project-story .story-end{align-items:stretch;gap:20px;padding-top:28px;padding-bottom:64px}
.project-story .story-end a{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:48px;padding:14px 20px;border:1px solid var(--line);border-radius:24px;max-width:55%;line-height:1.5;text-decoration:none;transition:background-color .2s ease,color .2s ease}
@media(hover:hover){.project-story .story-end a:hover{background:var(--ink);color:var(--paper);text-decoration:none}}
.project-story .story-image-toggle{gap:8px;padding-top:12px;align-items:center}
.project-story .story-image-toggle button{min-height:44px;min-width:74px;padding:10px 16px;border:1px solid var(--line);border-radius:999px;font-size:12px;line-height:1.4;text-decoration:none}
.project-story .story-image-toggle button[aria-pressed="true"]{background:var(--ink);color:var(--paper);border-color:var(--ink);text-decoration:none}
.article-heading h1{font-size:clamp(38px,5.5vw,76px);line-height:1.08;text-wrap:balance;letter-spacing:var(--tracking-heading)}
.article-deck{max-width:65ch}
.article-body{max-width:70ch}
.article-body h2{line-height:1.18;text-wrap:balance}
.about-section{scroll-margin-top:116px}
.article-end a{display:inline-flex;align-items:center;min-height:44px;padding-block:10px}
:where(.cover-card,.lab-card,.fullbleed-project):focus-visible{outline:2px solid var(--red);outline-offset:6px}
.cover-card:focus-visible .project-info{opacity:1;transform:none}
@media(hover:none){
.home-work .cover-card .project-info{opacity:1;transform:none}
.home-work .cover-card:after{opacity:1}
.lab-card:hover .lab-card-bg img{transform:none}
}
@media(max-width:600px){
:root{--section-gap:40px}
.home-work{padding-bottom:48px}
.about-section{padding-block:40px;scroll-margin-top:76px}
.about-tools.about-section{padding-block:40px}
.project-story{padding-top:48px}
.project-story .story-heading{padding-bottom:40px}
.project-story .story-back{margin-bottom:28px}
.project-story h1{font-size:clamp(36px,10vw,47px);line-height:1.08}
.project-story h2{font-size:clamp(28px,8vw,35px);line-height:1.16}
.project-story .story-deck{font-size:17px;line-height:1.65}
.project-story .story-text{padding-bottom:40px}
.project-story .story-text>p{line-height:1.75}
.project-story .story-image,.project-story .story-pair{margin-bottom:48px}
.project-story .story-pair .story-image{margin-bottom:0}
.project-story .story-end{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-inline:24px;padding:24px 0 48px}
.project-story .story-end a{width:100%;max-width:none;min-height:52px;text-align:left;border-radius:16px}
.project-story .story-end a:last-child{text-align:left}
.story-full{padding-bottom:48px}
.story-full-btn{width:100%;justify-content:center;min-height:48px}
.article-main{padding-top:24px}
.article-heading{margin-top:32px;margin-bottom:32px}
.article-heading h1{font-size:clamp(32px,9vw,44px);line-height:1.12}
.article-body{font-size:16px;line-height:1.75}
.article-body h2{font-size:clamp(26px,7vw,32px);margin-top:36px}
.article-related{margin-top:48px;padding-top:32px}
.article-end{gap:12px;margin-top:36px;padding-top:20px}
.about-profile-links .about-link{width:100%;max-width:350px;min-height:48px}
.landscape-footer nav{flex-wrap:wrap;row-gap:0}
.landscape-footer nav a,.footer-base>a{display:inline-flex;align-items:center;min-height:44px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}:is(.home-cta,.about-link,.story-full-btn,.story-end a){transition:none}}

/* A quiet recovery page, using the same type and controls as the portfolio. */
.not-found{min-height:calc(100svh - 100px);display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:64px;padding-block:64px}
.not-found-number{font-size:clamp(150px,25vw,360px);line-height:.85;letter-spacing:-.09em;color:var(--red);font-weight:400}
.not-found-copy{max-width:500px}
.not-found-kicker{font-size:11px;letter-spacing:.12em;color:var(--color-text-muted);margin-bottom:20px}
.not-found h1{font-size:clamp(36px,4.5vw,64px);line-height:1.08;text-wrap:balance;margin-bottom:24px}
.not-found-copy>p:not(.not-found-kicker){font-size:16px;line-height:1.7;color:var(--color-text-muted);max-width:40ch}
.not-found-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:32px}
@media(max-width:600px){.not-found{min-height:calc(100svh - 56px);grid-template-columns:1fr;gap:36px;padding-block:48px;align-content:center}.not-found-number{font-size:clamp(140px,52vw,230px)}.not-found h1{font-size:36px}.not-found-actions{flex-direction:column}.not-found-actions a{width:100%}}
body :is(a,button):focus-visible{outline:2px solid var(--red);outline-offset:5px}
@media(max-width:600px){.tool-shelf-controls button{width:44px;height:44px}.desk-entry-link{display:inline-flex;align-items:center;min-height:44px}}
