/* Darkroom: safelight-red room, film grain, prints that develop as they move.
   Colour tokens come from theme.js: --a safelight, --b fixer / secondary, --bg ground, --glow strength.
   Hidden "undeveloped" states only apply under html.anim (GSAP loaded, motion allowed),
   html.reveal (same, outside the admin preview) or html.intro (the opening countdown). */

:root {
  --paper: #f3ece2;
  --ink: #f3ece2;
  --ink2: rgba(243, 236, 226, .72);
  --ink3: rgba(243, 236, 226, .5);
  --rule: rgba(243, 236, 226, .1);
  --sans: 'Familjen Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: var(--font-display, 'Newsreader'), Georgia, serif;
  --pad: clamp(16px, 3.4vw, 52px);
  --grain-img: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.theme-light {
  --ink: #1d1411;
  --ink2: rgba(29, 20, 17, .74);
  --ink3: rgba(29, 20, 17, .52);
  --rule: rgba(29, 20, 17, .14);
}
/* Colours derived from the local safelight pair: redeclared wherever a block can carry its own --a/--b. */
:root, [data-sec], .print, .modal-panel, .tray {
  --ground2: color-mix(in srgb, var(--bg), color-mix(in srgb, var(--a), var(--ink)) 5%);
  --ground3: color-mix(in srgb, var(--bg), color-mix(in srgb, var(--a), var(--ink)) 9%);
  --deep: color-mix(in srgb, var(--bg), var(--a) 16%);
  --deep2: color-mix(in srgb, var(--bg), var(--a) 24%);
  --safe-hi: color-mix(in srgb, var(--a) 58%, #ffd6c8);
  --safe-glow: color-mix(in srgb, var(--a) calc(60% * var(--glow)), transparent);
}
.theme-light, .theme-light [data-sec], .theme-light .print, .theme-light .modal-panel, .theme-light .tray {
  --safe-hi: color-mix(in srgb, var(--a) 80%, #000);
  --deep: color-mix(in srgb, var(--bg), var(--a) 12%);
  --deep2: color-mix(in srgb, var(--bg), var(--a) 20%);
}

/* ============ base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html:not(.lenis) { scroll-behavior: smooth; } }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
html.modal-open, html.menu-open, html.archive-open { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  --cur-a: var(--a);
  transition: --cur-a 1.2s ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
img, video, iframe { display: block; max-width: 100%; }
h1, h2, h3, h4, p, figure, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--serif); font-style: var(--dstyle, italic); font-weight: var(--dlw, 300); letter-spacing: -.025em; line-height: .95; text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--a); color: var(--paper); }
main, .foot { position: relative; z-index: 2; }
.noscript { text-align: center; padding: 40vh 20px; }
.empty { color: var(--ink2); font-size: 1rem; padding: 10px 0; }

/* ============ ambience ============ */
.safelight {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(70% 60% at 50% -8%,
    color-mix(in srgb, var(--cur-a) calc(42% * var(--glow)), transparent),
    color-mix(in srgb, var(--cur-a) calc(12% * var(--glow)), transparent) 45%, transparent 72%);
}
.vignette { position: fixed; inset: 0; z-index: 89; pointer-events: none; background: radial-gradient(120% 100% at 50% 40%, transparent 55%, rgba(0, 0, 0, .6)); }
.theme-light .vignette { background: radial-gradient(120% 100% at 50% 40%, transparent 60%, rgba(0, 0, 0, .14)); }
.grain { position: fixed; inset: -60px; z-index: 90; pointer-events: none; display: none; background-image: var(--grain-img); opacity: .11; animation: grain 1s steps(6) infinite; }
.grain-on .grain { display: block; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-38px, 22px); } 40% { transform: translate(26px, -44px); } 60% { transform: translate(-52px, -18px); } 80% { transform: translate(40px, 36px); } 100% { transform: translate(0, 0); } }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot span { width: 12px; height: 12px; border-radius: 50%; background: var(--a); box-shadow: 0 0 18px 4px var(--safe-glow); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ============ nav ============ */
.nav {
  position: fixed; z-index: 95; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 20px;
  padding: max(16px, env(safe-area-inset-top)) var(--pad) 38px;
  font-size: .92rem;
  pointer-events: none;
  background: linear-gradient(color-mix(in srgb, var(--bg) 90%, transparent), transparent);
  transition: opacity .6s;
}
.nav > * { pointer-events: auto; }
.nav::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .45s; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.nav.is-solid { padding-bottom: 16px; background: none; transition: opacity .6s, padding .45s; }
.nav.is-solid::before { opacity: 1; }
html.intro .nav { opacity: 0; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); }
.brand-mark {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font: italic 400 .9rem/1 var(--serif);
  background: var(--deep);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cur-a) 55%, transparent);
}
.brand-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-links { margin-left: auto; display: flex; gap: clamp(14px, 2.4vw, 34px); }
.nav-links a { color: var(--ink2); padding: 4px 0; transition: color .35s, background-size .45s; background: linear-gradient(var(--cur-a), var(--cur-a)) 0 100% / 0 2px no-repeat; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); background-size: 100% 2px; }
.nav-toggle { display: none; position: relative; margin-left: auto; width: 44px; height: 44px; background: var(--ground3); }
.nav-toggle span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink); transition: transform .3s, top .3s; }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav.open .nav-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.nav.open .nav-toggle span:last-child { top: 21px; transform: rotate(-45deg); }

/* ============ shared bits ============ */
.sec { position: relative; padding: clamp(110px, 18vh, 200px) var(--pad); }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(36px, 6vh, 70px); }
.sec-head h2, .h2 { font-size: clamp(3rem, 9vw, 9rem); letter-spacing: -.04em; overflow-wrap: anywhere; }
.sec-head p { max-width: 28ch; color: var(--ink2); font-size: 1rem; }
html.reveal [data-rv] { opacity: 0; }

.prose { color: var(--ink2); }
.prose p { margin: 0 0 1em; }
.prose p:last-child, .prose ul:last-child { margin-bottom: 0; }
.prose ul { margin: 0 0 1em; padding-left: 1.2em; list-style: disc; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--a); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--safe-hi); text-decoration: underline; text-underline-offset: 3px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 11px 18px;
  background: var(--ground3); color: var(--ink);
  font-weight: 500; font-size: .95rem; line-height: 1.2;
  transition: background .4s, box-shadow .4s;
}
.btn:hover { background: var(--deep2); }
.btn-primary { box-shadow: inset 0 -4px 0 var(--a); }
.btn-primary:hover { box-shadow: inset 0 -44px 0 var(--a); color: var(--paper); }
.btn i { font-size: .85em; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; background: var(--ground3); color: var(--ink2); transition: background .4s, color .4s; }
.icon-btn:hover { background: var(--deep2); color: var(--ink); }

/* ============ prints (shared: clothesline, portrait, showreel, text media) ============ */
.print { position: relative; --d: 1; }
.swing { display: block; transform-origin: 50% 0; transform: rotate(var(--rot, 0deg)); }
.peg { position: absolute; z-index: 3; left: 50%; top: -14px; width: 12px; height: 30px; margin-left: -6px; background: #9c7f5d; border-radius: 2px 2px 4px 4px; }
.peg::after { content: ''; position: absolute; left: 3px; right: 3px; top: 12px; height: 3px; background: #6b553b; }
.paper { display: block; background: var(--paper); padding: 9px; box-shadow: 0 14px 40px rgba(0, 0, 0, .45); transition: box-shadow .4s; }
.frame {
  position: relative; display: block; aspect-ratio: var(--ar, .8); background: #e7ddcd; overflow: hidden; isolation: isolate;
  --e1: color-mix(in srgb, var(--a) 12%, #0d0504);
  --e2: color-mix(in srgb, var(--a) 26%, #0d0504);
  --e3: color-mix(in srgb, var(--a) 8%, #0d0504);
}
.emul {
  position: absolute; inset: 0; display: block;
  background:
    radial-gradient(circle at var(--x1, 50%) var(--y1, 50%), var(--t1, transparent), transparent 58%),
    radial-gradient(circle at var(--x2, 50%) var(--y2, 50%), var(--t2, transparent), transparent 62%),
    linear-gradient(var(--ang, 160deg), var(--e1), var(--e2) 70%, var(--e3));
  opacity: calc(var(--d) * var(--d) * (3 - 2 * var(--d)));
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent calc((1 - var(--d)) * 85% - 20%), #000 calc((1 - var(--d)) * 85% + 8%));
  mask-image: radial-gradient(circle at 50% 50%, transparent calc((1 - var(--d)) * 85% - 20%), #000 calc((1 - var(--d)) * 85% + 8%));
}
.emul::after { content: ''; position: absolute; inset: 0; z-index: 2; background-image: var(--grain-img); opacity: .22; pointer-events: none; }
/* real images develop out to full opacity */
.emul.has-img {
  background: #120806;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent calc((1 - var(--d)) * 93% - 28%), #000 calc((1 - var(--d)) * 93%));
  mask-image: radial-gradient(circle at 50% 50%, transparent calc((1 - var(--d)) * 93% - 28%), #000 calc((1 - var(--d)) * 93%));
}
.emul.has-img::after { opacity: .1; }
.emul > img, .emul > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.emul::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; background: var(--a); mix-blend-mode: soft-light; transition: opacity .6s; }
.duo-on .emul.has-img > img { filter: sepia(.32) saturate(.85) contrast(1.04); transition: filter .6s; }
.duo-on .emul.has-img::before { opacity: .38; }
.duo-on :is(.print-btn:hover, .print-btn:focus-visible, .portrait:hover) .emul.has-img > img { filter: none; }
.duo-on :is(.print-btn:hover, .print-btn:focus-visible, .portrait:hover) .emul.has-img::before { opacity: 0; }
.edge { position: absolute; inset: 0; z-index: 3; display: block; pointer-events: none; box-shadow: inset 0 0 26px 10px rgba(60, 18, 10, .75); opacity: min(1, calc(var(--d) * 2.6)); mix-blend-mode: multiply; }
.has-img + .edge { box-shadow: inset 0 0 22px 4px rgba(60, 18, 10, .5); }
.pmark, .plabel, .pflag { position: absolute; z-index: 4; font-size: .72rem; line-height: 1.25; color: #fff; mix-blend-mode: difference; pointer-events: none; }
.pmark { left: 12px; top: 11px; }
.pflag { right: 12px; top: 11px; display: flex; gap: 8px; align-items: center; }
.plabel { left: 12px; right: 12px; bottom: 11px; }
.ph-initials { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; font: var(--dstyle, italic) var(--dlw, 300) clamp(4rem, 12vw, 9rem)/1 var(--serif); letter-spacing: -.04em; color: rgba(243, 236, 226, .82); pointer-events: none; opacity: calc(var(--d) * var(--d)); }
.cap { display: block; padding-top: 16px; }
.cap-t { display: block; font: var(--dstyle, italic) var(--dlw, 300) 1.28rem/1.05 var(--serif); letter-spacing: -.015em; transition: color .4s; }
.cap-m { display: block; margin-top: 5px; color: var(--ink2); font-size: .84rem; }
.print-btn { display: block; width: 100%; text-align: left; }
.print-btn:hover .cap-t, .print-btn:focus-visible .cap-t { color: var(--safe-hi); }
.print-btn:hover .paper { box-shadow: 0 18px 50px rgba(0, 0, 0, .55), 0 0 36px -6px var(--safe-glow); }
.print-btn:focus-visible { outline: none; }
.print-btn:focus-visible .paper { outline: 2px solid var(--ink); outline-offset: 4px; }

/* media that lives inside a print (showreel, text sections) */
.facade { position: absolute; inset: 0; width: 100%; display: grid; place-items: center; overflow: hidden; background: #120806; }
.facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .86; transition: opacity .4s, transform .8s; }
.facade:hover img { opacity: 1; transform: scale(1.02); }
.play { position: relative; z-index: 2; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; color: var(--paper); font-size: 1.3rem; background: color-mix(in srgb, var(--a) 82%, transparent); box-shadow: 0 0 40px 4px var(--safe-glow); transition: transform .4s; }
.play .fa-play { margin-left: 4px; }
.facade:hover .play { transform: scale(1.06); }
.facade-label { position: absolute; z-index: 2; left: 14px; bottom: 14px; padding: 6px 10px; font-size: .78rem; font-weight: 500; color: var(--paper); background: rgba(14, 6, 5, .72); }
.ph-soft { position: absolute; inset: 0; background: linear-gradient(160deg, var(--e1), var(--e2) 70%, var(--e3)); }
.player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
img.player { object-fit: cover; }
img.player.contain, video.player { object-fit: contain; }
.linkcard {
  position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: var(--paper); font-weight: 500; text-align: center; padding: 20px;
  background: radial-gradient(70% 70% at 50% 45%, color-mix(in srgb, var(--a) 30%, transparent), transparent 70%), linear-gradient(160deg, var(--e1, #220d09), var(--e2, #3d140d) 70%, var(--e3, #170908));
}
.linkcard i { font-size: 2.2rem; color: var(--safe-hi); }
.linkcard span { font: var(--dstyle, italic) var(--dlw, 300) clamp(1.2rem, 2.4vw, 1.8rem)/1.1 var(--serif); }
.linkcard:hover span { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.reel-sound { position: absolute; z-index: 5; right: 12px; bottom: 12px; width: 42px; height: 42px; display: grid; place-items: center; color: var(--paper); background: rgba(14, 6, 5, .7); }
.reel-sound:hover { background: var(--a); }

/* ============ hero ============ */
.hero { position: relative; padding: 0 var(--pad); }
.hero-in { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 120px 0 clamp(28px, 5vh, 56px); }
.name { font-size: clamp(2.4rem, 15.5vw, 15rem); line-height: .86; letter-spacing: -.045em; margin-bottom: clamp(28px, 5vh, 60px); }
.nl { display: block; overflow: hidden; padding: .04em .06em .1em 0; white-space: nowrap; }
.nl > span { display: inline-block; }
.nl + .nl { padding-left: clamp(0px, 10vw, 160px); }
.hero-foot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 24px 40px; align-items: end; }
.role { font-size: clamp(1.05rem, 1.5vw, 1.35rem); max-width: 34ch; }
.tagline { margin-top: 8px; color: var(--ink2); font-size: .98rem; transition: opacity .4s, transform .4s; }
.tagline.out { opacity: 0; transform: translateY(6px); }
.hero-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag { display: inline-flex; align-items: center; gap: 10px; justify-self: start; padding: 10px 16px; background: var(--deep); font-weight: 500; font-size: .95rem; }
.tag i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--a); box-shadow: 0 0 12px 3px var(--safe-glow); }
.cue { color: var(--ink2); font-size: .9rem; text-align: right; }
.countdown { display: none; }
html.intro .countdown { display: grid; position: absolute; inset: 0; place-items: center; z-index: 5; pointer-events: none; }
.cd-n { grid-area: 1 / 1; font: italic 300 clamp(9rem, 38vw, 34rem)/1 var(--serif); color: var(--ink); text-shadow: 0 0 60px var(--safe-glow); opacity: 0; font-variant-numeric: tabular-nums; }
.cd-label { grid-area: 1 / 1; align-self: end; margin-bottom: 12vh; font-size: .95rem; color: var(--ink2); letter-spacing: .02em; }
html.intro :is(.name .nl > span, .role, .tagline, .hero-acts, .tag, .cue) { opacity: 0; }
.reel-wrap { padding: clamp(10px, 4vh, 40px) 0 clamp(40px, 10vh, 110px); }
.reel { width: min(100%, 1180px, calc(66vh * 1.7778 + 18px)); margin: 0 auto; --ar: 1.7778; }
.reel .swing { transform: rotate(-.4deg); }

/* ============ work: the clothesline ============ */
.sec-work { position: relative; padding: 0; overflow: hidden; }
.work-head { padding: clamp(80px, 12vh, 130px) var(--pad) 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px 28px; flex-wrap: wrap; }
.work-head h2 { font-size: clamp(3rem, 7.4vw, 7.6rem); overflow-wrap: anywhere; }
.work-intro { margin-top: 12px; max-width: 42ch; color: var(--ink2); font-size: .98rem; }
.trays { display: flex; gap: 8px; flex-wrap: wrap; }
.trays[hidden] { display: none; }
.tray { position: relative; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 9px 14px 14px; background: var(--ground3); text-align: left; min-width: 92px; transition: background .4s; }
.tray b { font-weight: 500; font-size: .92rem; line-height: 1.2; }
.tray span { font-size: .72rem; color: var(--ink2); }
.tray::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--b); opacity: .55; transition: background .4s, opacity .4s, height .4s; }
.tray:hover { background: color-mix(in srgb, var(--bg), var(--a) 13%); }
.tray[aria-pressed="true"] { background: var(--deep); }
.tray[aria-pressed="true"]::after { background: var(--a); opacity: 1; height: 7px; }
.line-note { width: 100%; min-height: 1.5em; color: var(--ink2); font-size: .92rem; }
.track { position: relative; display: flex; flex-wrap: wrap; align-items: flex-start; gap: clamp(28px, 4vw, 56px) clamp(24px, 3vw, 44px); padding: 70px var(--pad) 90px; --pw: clamp(220px, 26vw, 320px); }
.track > .empty { padding: 0; }
.cord { display: none; }
.cord path { stroke: #b9a58b; }
.track .print { flex: 0 0 auto; width: min(calc(var(--pw) * var(--wf, 1)), 100%); }
.endcard { flex: 0 0 auto; width: min(360px, 70vw); align-self: center; padding: 30px; background: var(--ground2); color: var(--ink2); font-size: .95rem; }
.endcard h3 { font-size: 2rem; color: var(--ink); margin-bottom: 10px; }
.endcard .btn { margin-top: 18px; }

/* pinned desktop mode (set by site.js) */
.sec-work.is-pinned { height: 100vh; display: flex; flex-direction: column; }
.sec-work.is-pinned .track { flex: 1; flex-wrap: nowrap; width: max-content; align-items: flex-start; padding: 104px 24vw 40px 8vw; gap: clamp(28px, 3.2vw, 52px); will-change: transform; }
.sec-work.is-pinned .track .print { width: min(calc(var(--ph, 44vh) * var(--hf, 1) * var(--ar) + 18px), 74vw); }
.sec-work.is-pinned .cord { display: block; position: absolute; left: 0; top: 78px; height: 46px; pointer-events: none; overflow: visible; }
.sec-work.is-pinned .endcard { align-self: flex-start; margin-top: 30px; }

/* featured line: "see all" */
.see-all { align-self: flex-end; }
.endcard-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.endcard-acts .btn { margin-top: 0; }

/* ============ all works: full grid ============ */
.archive { position: fixed; inset: 0; z-index: 97; overflow: auto; overscroll-behavior: contain; background: var(--bg); }
.archive[hidden] { display: none; }
.archive::after { content: ''; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(90% 60% at 50% 0%, color-mix(in srgb, var(--a) calc(14% * var(--glow, 1)), transparent), transparent 70%); }
.archive-in { position: relative; z-index: 1; padding: 0 var(--pad) clamp(60px, 10vh, 120px); }
.archive-head { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px 24px; padding: max(18px, env(safe-area-inset-top)) 0 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.archive-head h2 { font-size: clamp(2.6rem, 6.4vw, 6rem); letter-spacing: -.04em; }
.archive-count { color: var(--ink2); font-size: .92rem; margin-top: 4px; }
.archive-head .trays, .archive-head .line-note { grid-column: 1 / -1; }
.archive-head .line-note { min-height: 1.4em; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); align-items: start; gap: clamp(34px, 4.4vw, 60px) clamp(22px, 3vw, 40px); padding-top: clamp(40px, 6vh, 64px); }
.grid > .empty { grid-column: 1 / -1; }
.grid .print { --rot: 0deg !important; }

/* ============ about ============ */
.about { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(30px, 6vw, 100px); align-items: start; }
.about .h2 { margin-bottom: clamp(26px, 4vh, 46px); }
.lead { font-family: var(--serif); font-weight: var(--dlw, 300); font-size: clamp(1.25rem, 2.1vw, 1.9rem); line-height: 1.35; max-width: 30ch; }
.lead strong { font-weight: 500; }
.lead a { text-decoration: underline; text-underline-offset: 4px; }
.about .body { margin-top: 24px; max-width: 52ch; }
.facts { margin-top: clamp(30px, 5vh, 56px); display: grid; }
.facts div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 16px; padding: 14px 16px; }
.facts div:nth-child(odd) { background: var(--ground2); }
.facts dt { color: var(--ink2); font-size: .9rem; }
.facts dd { overflow-wrap: anywhere; }
.portrait { width: min(100%, 460px); justify-self: end; --ar: .8; }
.portrait .swing { transform: rotate(1.4deg); }

.spec-block { margin-top: clamp(90px, 15vh, 170px); }
.soft-title { margin: 0 0 22px; font-size: clamp(1.8rem, 3.6vw, 3.2rem); }
.spec-list { display: grid; }
.spec { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 12px 24px; align-items: baseline; padding: clamp(14px, 2.4vh, 26px) clamp(12px, 1.6vw, 24px); transition: background .5s; }
.spec:nth-child(odd) { background: var(--ground2); }
.spec:hover { background: color-mix(in srgb, var(--bg), var(--a) 11%); }
.spec-n { color: var(--ink2); font-size: .85rem; font-variant-numeric: tabular-nums; }
.spec-name { font: var(--dstyle, italic) var(--dlw, 300) clamp(2.6rem, 8vw, 8rem)/.9 var(--serif); letter-spacing: -.045em; overflow-wrap: anywhere; text-wrap: balance; transition: color .5s; }
.spec:hover .spec-name { color: var(--safe-hi); }
.soft-title.shelf { margin-top: clamp(70px, 12vh, 130px); }
.bottles { display: flex; flex-wrap: wrap; gap: 14px 12px; }
.bottle { position: relative; padding: 20px 22px 14px; margin-top: 12px; background: var(--ground3); font-weight: 500; border-radius: 5px 5px 14px 14px; min-width: 132px; transition: transform .5s, background .5s; }
.bottle::before { content: ''; position: absolute; top: -12px; left: 50%; width: 30px; height: 12px; margin-left: -15px; background: var(--b); border-radius: 3px 3px 0 0; }
.bottle:hover { transform: translateY(-6px) rotate(-1.5deg); background: var(--deep); }

/* ============ experience: multi-track timeline ============ */
.xv { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: clamp(24px, 4vw, 64px); align-items: start; margin-bottom: clamp(40px, 7vh, 80px); }
.xv-print { position: relative; aspect-ratio: 3 / 2; background: var(--ground2); border: 1px solid color-mix(in srgb, var(--a) 55%, transparent); box-shadow: 0 0 70px -10px color-mix(in srgb, var(--a) calc(35% * var(--glow)), transparent); display: grid; place-items: center; color: var(--ink2); font-size: .95rem; overflow: hidden; }
.xv-print::before { content: ''; position: absolute; inset: 11%; border: 1px dashed color-mix(in srgb, var(--ink) 16%, transparent); }
.xv-print span { position: absolute; font-size: .8rem; letter-spacing: .02em; }
.xv-print .xv-tag { top: 12px; left: 14px; right: 14px; }
.xv-print .xv-ph { position: static; max-width: 70%; text-align: center; font: var(--dstyle, italic) var(--dlw, 300) clamp(1.15rem, 2.2vw, 1.8rem)/1.15 var(--serif); color: var(--ink); overflow-wrap: anywhere; }
.xv-print .xv-dur { bottom: 12px; right: 14px; font-variant-numeric: tabular-nums; }
.xv-info h3 { font-size: clamp(2.2rem, 4.6vw, 4.6rem); letter-spacing: -.035em; margin-bottom: clamp(20px, 3vh, 32px); overflow-wrap: anywhere; }
.xv-info dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px; margin-bottom: 22px; }
.xv-info dt { color: var(--ink2); font-size: .85rem; }
.xv-info dd { font-size: 1.05rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.xv-info .prose { max-width: 52ch; }
.xv-link { margin-top: 20px; }
.xtl-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; color: var(--ink2); font-size: .9rem; }
.xtl-all { padding: 8px 16px; border: 1px solid var(--a); border-radius: 99px; color: var(--ink); font-size: .88rem; }
.xtl-all:hover { background: var(--deep); }
.xtl-all[hidden] { display: none; }
.xtl-scroll { overflow-x: auto; scrollbar-color: rgba(243, 236, 226, .25) transparent; border: 1px solid var(--rule); background: color-mix(in srgb, var(--bg) 60%, transparent); }
.xtl { --lab: 180px; position: relative; min-width: max(960px, calc(var(--lab) + var(--span) * 210px)); user-select: none; -webkit-user-select: none; }
.xtl-ruler, .xtl-row { display: grid; grid-template-columns: var(--lab) minmax(0, 1fr); }
.xtl-ruler { height: 42px; border-bottom: 1px solid var(--rule); font-size: .8rem; color: var(--ink2); }
.xtl-ruler > span { position: sticky; left: 0; z-index: 3; display: flex; align-items: center; padding-left: 18px; border-right: 1px solid var(--rule); background: var(--bg); }
.xtl-years { position: relative; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--ink) 22%, transparent) 0 1px, transparent 1px calc(100% / (var(--span) * 4))) bottom / 100% 7px no-repeat; }
.xtl-years span { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding-left: 9px; left: calc((var(--y) - var(--from)) / var(--span) * 100%); border-left: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); }
.xtl-row { min-height: calc(24px + var(--lanes, 1) * 60px); border-bottom: 1px solid color-mix(in srgb, var(--ink) 7%, transparent); }
.xtl-row:last-of-type { border-bottom: 0; }
.xtl-name { position: sticky; left: 0; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 0 18px; text-align: left; background: var(--bg); border-right: 1px solid var(--rule); font: var(--dstyle, italic) var(--dlw, 300) 1.25rem/1.1 var(--serif); transition: color .3s; overflow-wrap: anywhere; }
.xtl-name small { flex: none; font: 400 .72rem var(--sans); color: var(--ink2); border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); padding: 3px 6px; }
.xtl-name:hover, .xtl-row.on .xtl-name { color: var(--safe-hi); }
.xtl-lane { position: relative; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--ink) 6%, transparent) 0 1px, transparent 1px calc(100% / var(--span))); }
.xc {
  position: absolute; top: calc(12px + var(--ln, 0) * 60px); height: 52px;
  left: calc((var(--s) - var(--from)) / var(--span) * 100%);
  width: calc((var(--e) - var(--s)) / var(--span) * 100% - 6px); min-width: 36px;
  display: flex; flex-direction: column; justify-content: space-between; padding: 7px 12px; text-align: left; overflow: hidden;
  background: var(--ground3); border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); color: var(--ink);
  transition: background-color 1.3s ease calc(var(--i, 0) * 90ms), color 1s ease calc(var(--i, 0) * 90ms + .3s), border-color .35s, box-shadow .35s;
}
.xc small { font-size: .72rem; color: var(--ink2); letter-spacing: .03em; white-space: nowrap; }
.xc span { font-size: .92rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xc.alt { background: color-mix(in srgb, var(--b) 20%, transparent); border-color: color-mix(in srgb, var(--b) 45%, transparent); }
.xc:hover { border-color: color-mix(in srgb, var(--ink) 50%, transparent); }
.xc.on { border-color: var(--a); box-shadow: 0 0 0 1px var(--a), 0 0 32px -4px var(--safe-glow); }
.xc.on small { color: var(--safe-hi); }
.xc:focus-visible { outline-offset: 2px; }
html.anim .xtl:not(.dev) .xc { background: var(--paper); border-color: var(--paper); color: transparent; box-shadow: none; }
html.anim .xtl:not(.dev) .xc small { color: transparent; }
.xtl-ov { position: absolute; top: 0; bottom: 0; left: var(--lab); right: 0; pointer-events: none; z-index: 2; }
.xtl-now { position: absolute; top: 0; bottom: 0; left: calc((var(--t) - var(--from)) / var(--span) * 100%); width: 1px; background: var(--a); box-shadow: 0 0 12px 1px var(--safe-glow); }
.xtl-now b { position: absolute; top: 10px; left: 6px; font-weight: 500; font-size: .75rem; color: var(--safe-hi); white-space: nowrap; }
.xtl-ph { position: absolute; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, var(--ink) 55%, transparent); opacity: 0; transition: opacity .2s; }
.xtl-ph b { position: absolute; top: 10px; left: 6px; font-weight: 500; font-size: .75rem; white-space: nowrap; background: var(--bg); padding: 0 4px; }
.xtl:hover .xtl-ph { opacity: 1; }
.xtl.solo .xtl-row:not(.on) { display: none; }

/* ============ contact ============ */
.sec-contact { padding-bottom: clamp(40px, 8vh, 80px); }
.contact-h { font-size: clamp(3.2rem, 13vw, 13.5rem); letter-spacing: -.05em; line-height: .88; overflow-wrap: anywhere; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 30px 60px; margin-top: clamp(34px, 6vh, 70px); align-items: end; }
.mail { display: inline-block; max-width: 100%; font: var(--dstyle, italic) var(--dlw, 300) clamp(1.4rem, 3.8vw, 4.4rem)/1.05 var(--serif); letter-spacing: -.03em; padding: 6px 0; overflow-wrap: anywhere; background: linear-gradient(var(--a), var(--a)) 0 100% / 100% 5px no-repeat; transition: background-size .5s, color .5s; }
.mail:hover { background-size: 100% 100%; color: var(--paper); }
.contact-grid > :only-child { grid-column: 1 / -1; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.links a { display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; background: var(--ground3); font-weight: 500; transition: background .4s; }
.links a small { color: var(--ink2); font-weight: 400; font-size: .82rem; }
.links a i { color: var(--safe-hi); }
.links a:hover { background: var(--deep2); }
.avail { color: var(--ink2); margin-top: 14px; max-width: 40ch; }

/* ============ custom text sections ============ */
.text-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(30px, 6vw, 100px); align-items: start; }
.text-grid.has-media { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.text-grid .prose { max-width: 60ch; font-size: 1.05rem; }
.text-grid .btn { margin-top: 26px; }
.text-media { width: min(100%, 560px); justify-self: end; }

/* ============ footer ============ */
.foot { padding: 0 var(--pad) calc(clamp(18px, 3vh, 30px) + env(safe-area-inset-bottom)); overflow: hidden; }
.foot-name { font: var(--dstyle, italic) var(--dlw, 300) clamp(1.6rem, 10vw, 17rem)/.9 var(--serif); letter-spacing: -.05em; white-space: nowrap; color: var(--deep); margin-top: clamp(60px, 10vh, 120px); }
.foot-note { display: flex; justify-content: space-between; align-items: center; gap: 14px 20px; flex-wrap: wrap; color: var(--ink2); font-size: .84rem; margin-top: 14px; }
.foot-socials { display: flex; flex-wrap: wrap; gap: 6px; }
.foot-socials .icon-btn { width: 38px; height: 38px; font-size: .9rem; }
.foot-top:hover { color: var(--ink); }

/* ============ project modal ============ */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: clamp(0px, 3vw, 40px); }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .35s; }
@keyframes fade { from { opacity: 0; } }
.m-close { position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 3; width: 46px; height: 46px; display: grid; place-items: center; background: var(--ground3); color: var(--ink); font-size: 1.1rem; transition: background .3s; }
.m-close:hover { background: var(--a); color: var(--paper); }
.modal-panel {
  position: relative; z-index: 2; width: min(1180px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain;
  background: var(--ground2); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--a) 45%, transparent);
  box-shadow: 0 0 80px -10px color-mix(in srgb, var(--a) calc(35% * var(--glow)), transparent), 0 40px 120px -40px #000;
  animation: develop .6s ease;
}
@keyframes develop { from { opacity: 0; filter: brightness(2.2) contrast(.5) blur(6px); } }
.m-stage { position: relative; background: #070302; }
.m-frame { position: relative; width: 100%; max-height: 74vh; max-width: calc(74vh * var(--r)); aspect-ratio: var(--r); margin: 0 auto; background: #070302; }
.m-frame > .ph { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--ink2); font-size: .85rem; background: radial-gradient(circle at 45% 40%, color-mix(in srgb, var(--a) 40%, transparent), transparent 60%), linear-gradient(160deg, color-mix(in srgb, var(--a) 12%, #0d0504), color-mix(in srgb, var(--a) 26%, #0d0504) 70%, color-mix(in srgb, var(--a) 8%, #0d0504)); }
.m-frame > .ph::after { content: ''; position: absolute; inset: 0; background-image: var(--grain-img); opacity: .2; pointer-events: none; }
.m-frame > .ph i { font-size: 2rem; color: var(--safe-hi); }
.m-cap { padding: 10px 18px; font-size: .86rem; color: var(--ink2); background: #070302; text-align: center; }
.m-arrow { position: absolute; top: min(50%, 37vh); z-index: 4; width: 44px; height: 44px; margin-top: -22px; display: grid; place-items: center; background: rgba(14, 6, 5, .72); color: var(--paper); transition: background .3s; }
.m-arrow:hover { background: var(--a); }
.m-arrow.prev { left: 12px; }
.m-arrow.next { right: 12px; }
.m-dots { display: flex; justify-content: center; gap: 4px; padding: 6px 0 8px; background: #070302; }
.m-dot { width: 24px; height: 24px; display: grid; place-items: center; }
.m-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: rgba(243, 236, 226, .4); transition: .3s; }
.m-dot[aria-current="true"]::before { width: 22px; border-radius: 0; background: var(--a); }
.m-body { padding: clamp(22px, 3.2vw, 40px); }
.m-body .eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--safe-hi); font-size: .85rem; }
.m-body h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); letter-spacing: -.035em; margin-bottom: 18px; overflow-wrap: anywhere; }
.m-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 18px; color: var(--ink2); font-size: .92rem; }
.m-meta i { color: var(--safe-hi); margin-right: 8px; font-size: .9em; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.pill { padding: 6px 12px; background: var(--ground3); font-size: .84rem; }
.m-body .prose { max-width: 66ch; }
.m-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.m-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--rule); }
.m-navbtn { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; color: var(--ink2); font-weight: 500; transition: color .3s; }
.m-navbtn:hover { color: var(--safe-hi); }
.m-count { color: var(--ink3); font-size: .85rem; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
@media (min-width: 900px) {
  .modal-panel.is-tall { display: grid; grid-template-columns: auto minmax(340px, 1fr); }
  .modal-panel.is-tall .m-stage { display: grid; align-content: center; }
  .modal-panel.is-tall .m-frame { width: calc(min(84vh, 880px) * var(--r)); max-width: none; max-height: none; }
  .modal-panel.is-tall .m-body { max-height: min(84vh, 880px); overflow: auto; }
}
@media (max-width: 899px) {
  .modal { padding: 0; }
  .modal-panel { width: 100%; height: 100%; max-height: none; border: 0; }
  .m-frame { max-height: 70vh; max-width: calc(70vh * var(--r)); }
  .m-close { top: max(10px, env(safe-area-inset-top)); right: 10px; }
}

/* before / after slider */
.ba { --pos: 50%; position: absolute; inset: 0; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: pan-y; cursor: ew-resize; background: #000; }
.ba-layer { position: absolute; inset: 0; }
.ba-layer > img, .ba-layer > video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--a); pointer-events: none; }
.ba-knob { position: absolute; top: 50%; left: var(--pos); width: 46px; height: 46px; margin: -23px 0 0 -23px; display: grid; place-items: center; border-radius: 50%; color: var(--paper); background: var(--a); box-shadow: 0 0 24px var(--safe-glow); pointer-events: none; }
.ba:focus-visible { outline: none; }
.ba:focus-visible .ba-knob { outline: 2px solid var(--paper); outline-offset: 3px; }
.ba-label { position: absolute; bottom: 14px; padding: 5px 9px; font-size: .75rem; font-weight: 500; color: var(--paper); background: rgba(14, 6, 5, .7); pointer-events: none; }
.ba-label.l { left: 12px; }
.ba-label.r { right: 12px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 200; padding: 11px 18px; background: var(--ground3); color: var(--ink); box-shadow: inset 0 -3px 0 var(--a), 0 12px 30px rgba(0, 0, 0, .4); font-size: .9rem; opacity: 0; transform: translate(-50%, 20px); pointer-events: none; transition: opacity .3s, transform .3s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  .grain, .tag i, .boot span { animation: none; }
  .modal-panel, .modal-backdrop { animation: none; }
  .tagline { transition: none; }
}

/* ============ tablet ============ */
@media (max-width: 1000px) {
  .hero-foot { grid-template-columns: minmax(0, 1fr) auto; }
  .cue { display: none; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .portrait { justify-self: start; }
  .xv { grid-template-columns: minmax(0, 1fr); }
  .xv-print { max-width: 520px; }
  .text-grid.has-media { grid-template-columns: minmax(0, 1fr); }
  .text-media { justify-self: start; }
}

/* ============ phone: menu overlay + vertical print stack ============ */
@media (max-width: 800px) {
  body { font-size: 16px; }
  .nav { padding-bottom: 26px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0; z-index: -1; margin: 0;
    flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px;
    padding: 90px var(--pad) 40px;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
  }
  .nav.open .nav-links { opacity: 1; visibility: visible; }
  .nav-links a { font: var(--dstyle, italic) var(--dlw, 300) clamp(2.2rem, 11vw, 3.4rem)/1.1 var(--serif); color: var(--ink); letter-spacing: -.03em; }
  .hero-foot { grid-template-columns: minmax(0, 1fr); }
  .nl + .nl { padding-left: 0; }
  .sec-head { flex-direction: column; align-items: flex-start; }
  .work-head { padding-top: 90px; }
  .trays { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); width: calc(100% + var(--pad) * 2); scrollbar-width: none; }
  .trays::-webkit-scrollbar { display: none; }
  .tray { flex: 0 0 auto; }
  .archive-head { position: relative; grid-template-columns: minmax(0, 1fr); }
  .archive-close { justify-self: start; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 14px; }
  .grid .cap-m { display: none; }
  .track { display: block; padding: 56px var(--pad) 30px; --pw: min(76vw, 330px); }
  .track .print { position: sticky; top: 78px; width: min(var(--pw), calc(58svh * var(--ar) + 18px)); margin: 0 auto 26vh; background: var(--bg); padding-top: 14px; padding-bottom: 6px; }
  .track .print:nth-of-type(even) .swing { transform: rotate(1.6deg); }
  .track .print:nth-of-type(odd) .swing { transform: rotate(-1.4deg); }
  .track .print:last-of-type { margin-bottom: 0; }
  .endcard { margin: 26vh auto 0; width: var(--pw); }
  .facts div { grid-template-columns: 7rem minmax(0, 1fr); }
  .spec { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .xtl { --lab: 118px; min-width: max(820px, calc(var(--lab) + var(--span) * 175px)); }
  .xtl-name { font-size: 1.05rem; padding: 0 12px; gap: 8px; }
  .xtl-name small { display: none; }
  .xtl-ruler > span { padding-left: 12px; }
  .xv-info dl { gap: 14px 20px; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .portrait { width: min(100%, 360px); }
  .foot-note { justify-content: flex-start; }
}
