/* Component: site header / navigation. Ported verbatim from prototype/src/components/Nav.astro (scoped + global blocks). */
.nav{position:fixed;inset:0 0 auto 0;z-index:20;display:flex;align-items:center;gap:var(--s-6);padding:var(--gutter);pointer-events:none;font-size:var(--text-2xs);font-weight:500;line-height:1}
.nav a,.nav summary{pointer-events:auto;position:relative;display:inline-block;padding:.5rem 0}
.mark{font-weight:600;letter-spacing:.1em;margin-right:var(--s-4)}
.primary{display:flex;flex:1;justify-content:space-between}
.primary ul{display:flex;gap:var(--s-6);margin:0;padding:0;list-style:none;position:relative}
.nav a::after{content:'';position:absolute;left:0;right:0;bottom:.2rem;height:1px;background:currentColor;transform:scaleX(0);transform-origin:right;transition:transform .5s cubic-bezier(.32,.72,0,1)}
/* the line draws in from the left and leaves to the right */
.nav a:hover::after,.nav a:focus-visible::after{transform:scaleX(1);transform-origin:left}
.nav a[aria-current]::after{transform:scaleX(1);transform-origin:left}
/* sliding indicator replaces the per-link underline once JS has measured it */
.l.ready a[aria-current]::after{transform:scaleX(0);transition:none}
.l.ready .ind{position:absolute;left:0;bottom:calc(.5rem - .3rem);height:1px;width:var(--w,0);background:currentColor;transform:translateX(var(--x,0));transition:transform 620ms var(--ease-out),width 620ms var(--ease-out);pointer-events:none}
.ind{display:none}.l.ready .ind{display:block}
.menu{display:none;margin-left:auto;pointer-events:auto}
.menu summary{list-style:none;cursor:pointer}.menu summary::-webkit-details-marker{display:none}
.menu[open]{position:fixed;inset:0;background:var(--paper);padding:var(--gutter)}
.menu[open] summary{position:absolute;right:var(--gutter);top:var(--gutter)}
.menu ul{list-style:none;margin:5rem 0 0;padding:0;display:grid;gap:.25rem;font-family:var(--font-display);font-weight:var(--dw);font-size:clamp(2.5rem,13vw,5rem);line-height:.95}
.menu ul a{letter-spacing:0;text-transform:uppercase}
html.navc .primary{display:none}html.navc .menu{display:block}html.navc .nav{justify-content:space-between}
/* hovering the name: ONE motion. The letters scramble and drop out at random (the same rhythm as the menu words) while the mark is drawn left to right on the same clock; leaving reverses both. */
.nav .mark{position:relative;overflow:hidden}
.nav .mark::after{display:none}
.nav .mark .mt{display:inline-block;white-space:nowrap}
.nav .mark .mkg{position:absolute;left:-.04rem;top:50%;width:1.45rem;height:1.45rem;margin-top:-.725rem;fill:currentColor}
/* after a click on the name the mark simply stays through the page load */
/* ONE underline for the whole menu: it slides from the tab you were on to the tab you are on, also across page loads. The per-link line stays for hovering only. */
/* pages that never scroll (Works, Photography) keep the menu exactly where the scrolling pages have it: Safari reserves a wider gutter there than the 6px bar, so the gutter is replaced by the same 6px of padding */
/* the menu is laid out against the FULL window width (100vw, scrollbar included) with a constant 6px right allowance, so it never moves whether the page has no scrollbar, the 6px one, or Safari's 17px default while a page is still loading */
.nav.nav.nav{left:0;right:auto;width:100vw;box-sizing:border-box;padding-right:calc(clamp(.9rem,1.5vw,1.4rem) + 6px)!important}
@supports selector(::-webkit-scrollbar){html:has(main.home){scrollbar-gutter:auto}}
html.uli .nav a[aria-current]::after{transform:scaleX(0)!important;transition:none!important}
.nav .ind{display:none!important}
/* each pixel of the mark eases on/off over a tenth of a second so nothing pops */
.nav .mark.run .mt,.nav .mark.full .mt{color:transparent}
.nav .mark .ov{position:absolute;left:0;top:0;pointer-events:none;display:none}
.nav .mark.run .ov{display:block}
.nav .mark .ov b{position:absolute;font-weight:inherit;white-space:pre;transform-origin:50% 50%}
.nav .mark .ov i{position:absolute;left:0;top:0;opacity:0;background:currentColor}
.nav .ul{position:absolute;left:0;top:0;height:1px;background:currentColor;pointer-events:none;opacity:0;will-change:transform,width;transition:transform .62s cubic-bezier(.32,.72,0,1),width .62s cubic-bezier(.32,.72,0,1)}
.nav .ul.on{opacity:1}
@media (prefers-reduced-motion:reduce){.nav .ul{transition:none}}

/* ---- menu as in S1 ---- */
.nav.nav.nav{gap:clamp(1rem,2.4vw,2.2rem);padding:clamp(.9rem,1.5vw,1.4rem);font-family:var(--font-nav);font-size:.6875rem;font-weight:500;letter-spacing:.07em;text-transform:uppercase}
.nav.nav.nav .caps{text-transform:uppercase;letter-spacing:.07em}
.nav.nav.nav .mark{font-weight:600;letter-spacing:.12em;margin-right:0}
.nav.nav.nav .primary{display:flex;flex:1;justify-content:space-between;align-items:center}
.nav.nav.nav .l{gap:clamp(.9rem,1.8vw,1.8rem)}
.nav.nav.nav .l a{text-transform:uppercase;opacity:.5;transition:opacity .4s}
.nav.nav.nav .l a:hover,.nav.nav.nav .l a[aria-current]{opacity:1}
.nav.nav.nav .r{gap:1.4rem;align-items:center}
.nav.nav.nav .r a{opacity:1}
/* compact menu: decided by JS from innerWidth (which always includes the scrollbar), so a page with a scrollbar (About) and one without get the SAME menu at the same window width */
html.navc .nav.nav.nav{flex-wrap:wrap;row-gap:.2rem;justify-content:flex-start}
html.navc .nav.nav.nav .menu{display:none}
html.navc .nav.nav.nav .primary{display:contents}
html.navc .nav.nav.nav .l{order:3;width:100%;overflow-x:auto;padding-bottom:.1rem;scrollbar-width:none;-ms-overflow-style:none}
html.navc .nav.nav.nav .l::-webkit-scrollbar{display:none;width:0;height:0}
html.navc .nav.nav.nav .l a{white-space:nowrap}
html.navc .nav.nav.nav .r{margin-left:auto}
/* compact menu (phones, tablets): a solid white bar, so page text never shows through it while scrolling. The CG / Illustration pages keep their own transparent difference-blend menu over the pictures. */
html.navc:not(:has(.stage)) .nav.nav.nav{background:#fff;mix-blend-mode:normal;pointer-events:auto}
html.navc:not(:has(.stage)) .nav.nav.nav,html.navc:not(:has(.stage)) .nav.nav.nav a,html.navc:not(:has(.stage)) .nav.nav.nav summary,html.navc:not(:has(.stage)) .nav.nav.nav button{color:#0a0a0a!important}

/* Skip link: lives inside the header, hidden until focused. Owned by the header component so every layout (base and concept) gets it. */
.nav .skip-link{position:absolute;left:var(--gutter);top:-4rem;z-index:30;background:var(--ink);color:var(--paper);padding:.6rem 1rem;font-size:var(--text-sm);letter-spacing:0;text-transform:none;opacity:1}
.nav .skip-link:focus{top:var(--gutter)}
.nav .skip-link::after{display:none}
