/* Layout concept: a credits sheet. Work is logged newest first, grouped by year, and every
   project opens as its own page with a film slate standing in until stills are added. */
:root {
  --ink: #0a0d12;
  --panel: #10151c;
  --line: #232c38;
  --text: #e8e5de;
  --muted: #8d97a4;
  --accent: #6fd3ff;
  --warm: #ffb454;
  --f-display: 'Anybody', 'Arial Narrow', Impact, sans-serif;
  --f-body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: dark;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  padding-block: 20px 40px;
  padding-left: max(clamp(16px, 3.2vw, 64px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(16px, 3.2vw, 64px), env(safe-area-inset-right, 0px));
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { max-width: 1800px; margin-inline: auto; display: flex; flex-direction: column; gap: clamp(56px, 9vw, 110px); }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* header */
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.top nav { display: flex; gap: 22px; }
.top a { text-decoration: none; transition: color .2s; }
.top a:hover { color: var(--accent); }

/* home hero */
.hero { display: flex; flex-direction: column; gap: 36px; }
.hero-head { display: grid; grid-template-columns: auto minmax(0, 1fr); justify-items: end; gap: 24px 48px; align-items: end; }
h1 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 850;
  font-variation-settings: "wdth" 135;
  font-size: clamp(3.2rem, 11vw, 9.5rem);
  line-height: .86;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
h1 span { display: block; }
h1 span + span { color: var(--accent); }
.study { display: grid; gap: 4px; padding-bottom: 8px; max-width: 28ch; }
.study b { font-family: var(--f-body); font-weight: 600; font-size: 16px; letter-spacing: 0; text-transform: none; color: var(--text); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts > div { display: grid; gap: 4px; padding: 16px 0; }
.facts > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.facts b { font-family: var(--f-display); font-variation-settings: "wdth" 110; font-weight: 700; font-size: 1.5rem; line-height: 1.1; }

/* section heads */
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px 24px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 26px; }
h2 { margin: 0; font-family: var(--f-display); font-weight: 800; font-variation-settings: "wdth" 120; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1; text-transform: uppercase; text-wrap: balance; }

/* work index */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; }
.chip { font: 500 12px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: transparent; border: 1px solid var(--line); padding: 10px 14px; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip[aria-pressed="true"] { color: var(--ink); background: var(--accent); border-color: var(--accent); }
.years { display: flex; flex-direction: column; gap: 44px; }
.year { margin: 0 0 4px; display: flex; align-items: baseline; gap: 16px; font-family: var(--f-display); font-variation-settings: "wdth" 130; font-weight: 800; font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1; color: var(--muted); }
.year small { font-family: var(--f-mono); font-size: 12px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-variation-settings: normal; }
.row { position: relative; display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) minmax(0, 19rem); gap: 8px 32px; padding: 28px 0 30px; border-top: 1px solid var(--line); }
.when { padding-top: 5px; }
.main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.row h3 { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.7rem); font-weight: 600; line-height: 1.2; text-wrap: balance; }
.row h3 a { text-decoration: none; transition: color .2s; }
.row h3 a.stretch::after { content: ""; position: absolute; inset: 0; }
.row:hover h3 a { color: var(--accent); }
.row p { margin: 0; color: var(--muted); max-width: 62ch; text-wrap: pretty; }
.tools { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tools li { font: 500 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--line); padding: 6px 8px; }
.side { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; min-width: 0; }
.type { padding-top: 5px; }
.go { color: var(--text); transition: color .2s, transform .2s; }
.row:hover .go { color: var(--accent); transform: translateX(4px); }

/* about */
.about { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px clamp(32px, 6vw, 90px); align-items: start; }
.about-l { display: flex; flex-direction: column; gap: 36px; min-width: 0; }
.statement { margin: 0; font-size: clamp(1.35rem, 2.8vw, 1.95rem); line-height: 1.32; font-weight: 500; text-wrap: pretty; }
.statement em { font-style: normal; color: var(--accent); }
.exp { margin: 0; padding: 0; list-style: none; display: grid; }
.exp li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 4px 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.exp b { font-weight: 600; }
.exp span:last-child { color: var(--muted); }
.disc { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.disc li { display: grid; gap: 7px; }
.disc .row2 { display: flex; justify-content: space-between; gap: 12px; }
.disc .row2 b { font-weight: 500; }
.dbtn { all: unset; box-sizing: border-box; display: grid; gap: 7px; width: 100%; cursor: pointer; }
.dbtn:hover .row2 b, .dbtn[aria-pressed="true"] .row2 b { color: var(--accent); }
.dbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.bar { height: 3px; background: var(--line); }
.bar span { display: block; height: 100%; background: var(--accent); }
.software { display: grid; gap: 12px; margin-top: 28px; }

/* contact */
.contact { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; padding: clamp(24px, 5vw, 56px); border: 1px solid var(--line); background: var(--panel); }
.contact h2 { font-size: clamp(2.2rem, 7vw, 5rem); line-height: .95; max-width: 14ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.mailrow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; max-width: 100%; }
.mail { font-family: var(--f-display); font-variation-settings: "wdth" 110; font-weight: 700; font-size: clamp(1.1rem, 4.6vw, 2rem); line-height: 1.2; text-decoration: none; border-bottom: 2px solid var(--accent); overflow-wrap: anywhere; user-select: all; transition: color .2s; }
.mail:hover { color: var(--accent); }
button.btn { background: transparent; cursor: pointer; }
button.btn:hover { background: var(--accent); color: var(--ink); }
.btn { font: 500 13px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding: 15px 20px; border: 1px solid var(--accent); color: var(--accent); transition: background .2s, color .2s; }
.btn:hover { background: var(--accent); color: var(--ink); }
.btn.solid { background: var(--accent); color: var(--ink); }
.btn.solid:hover { background: transparent; color: var(--accent); }

footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding-top: 18px; border-top: 1px solid var(--line); }

/* project page */
.proj { display: flex; flex-direction: column; gap: clamp(32px, 5vw, 56px); }
.crumb { display: flex; justify-content: space-between; gap: 12px; }
.crumb a { text-decoration: none; color: var(--text); transition: color .2s; }
.crumb a:hover { color: var(--accent); }
.proj-head { display: flex; flex-direction: column; gap: 18px; }
.eyebrow { color: var(--accent); }
.ptitle { font-size: clamp(2.2rem, 7.5vw, 6rem); line-height: .95; font-variation-settings: "wdth" 120; overflow-wrap: anywhere; text-wrap: balance; }
.lead { margin: 0; max-width: 56ch; font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.4; color: var(--text); text-wrap: pretty; }
.meta { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.meta > div { display: grid; gap: 4px; padding: 14px 0; }
.meta > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.meta dd { margin: 0; font-weight: 500; }
.poster { margin: 0; border: 1px solid var(--line); background: var(--panel); }
.poster img { width: 100%; height: auto; }

.slate { border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 280px; }
.clap { height: 38px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(115deg, var(--text) 0 26px, var(--ink) 26px 52px); opacity: .92; }
.fields { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.f { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; padding: 16px 18px; border-top: 1px solid var(--line); min-width: 0; }
.f:nth-child(-n+1) { border-top: 0; }
.f.wide { grid-column: 1 / -1; }
.f:not(.wide):not(:nth-child(2)) { border-left: 1px solid var(--line); }
.f b { font-family: var(--f-display); font-variation-settings: "wdth" 115; font-weight: 700; font-size: clamp(1.1rem, 2.4vw, 1.6rem); line-height: 1.15; overflow-wrap: anywhere; }
.f.wide b { font-size: clamp(1.6rem, 5vw, 3.6rem); line-height: 1; text-transform: uppercase; text-wrap: balance; }

.h-sm { font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin-bottom: 18px; }
.watch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.watch-link { display: flex; flex-direction: column; gap: 10px; padding: 18px; text-decoration: none; border: 1px solid var(--line); background: var(--panel); transition: border-color .2s, background .2s; }
.watch-link span:first-child { font-weight: 600; font-size: 1.1rem; }
.watch-link:hover { border-color: var(--accent); }
.watch-link:hover .mono { color: var(--accent); }
.gallery { display: grid; gap: 18px; }
.gallery .h-sm { margin-bottom: 0; }
.gallery figure { margin: 0; display: grid; gap: 8px; }
.gallery img { width: 100%; height: auto; border: 1px solid var(--line); }
.pn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pn-link { display: flex; flex-direction: column; gap: 6px; padding: 18px; text-decoration: none; border: 1px solid var(--line); transition: border-color .2s; min-width: 0; }
.pn-link:last-child { text-align: right; }
.pn-link b { font-size: 1.15rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.pn-link:hover { border-color: var(--accent); }
.pn-link:hover b { color: var(--accent); }

@media (max-width: 820px) {
  .hero-head, .about { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .when { padding-top: 0; }
  .side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
  .type { padding-top: 0; }
  .facts > div + div, .meta > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .exp li { grid-template-columns: minmax(0, 1fr); }
  .fields { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .f:not(.wide):not(:nth-child(2)) { border-left: 0; }
  .f:nth-child(odd):not(.wide) { border-left: 1px solid var(--line); }
  .pn { grid-template-columns: minmax(0, 1fr); }
  .pn-link:last-child { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chip, .btn, .top a, .go, .watch-link, .pn-link, .row h3 a { transition: none; }
  .row:hover .go { transform: none; }
}

/* media */
.poster video{display:block;width:100%;height:auto;background:#000}
.cuts{margin-top:40px}
.cuts figure{margin:0 0 20px}
.cuts video{display:block;width:100%;height:auto;background:#000}
.cuts figcaption,.gallery figcaption{margin-top:8px;color:var(--muted);font-size:12px;letter-spacing:.08em;text-transform:uppercase}
.gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:16px}
.gallery .h-sm,.cuts .h-sm{grid-column:1/-1}
.gallery figure{margin:0}
.gallery img{display:block;width:100%;height:auto}
.rthumb{display:block;width:100%;max-width:304px;aspect-ratio:16/9;object-fit:cover;border:1px solid var(--line);margin-bottom:10px;margin-left:auto}
@media (max-width:820px){.rthumb{width:100%;margin-left:0}}
.rthumb.ph{display:grid;place-content:center;text-align:center;padding:8px;background:repeating-linear-gradient(135deg,#10151c 0 10px,#0d1218 10px 20px);color:var(--muted);font-size:11px;letter-spacing:.1em;text-transform:uppercase}
img.rthumb.ph{display:block}

@media (max-width:1180px){.hero-head{grid-template-columns:minmax(0,1fr);justify-items:start}.study{max-width:none}}
.study{justify-self:end;text-align:left}
@media (max-width:1180px){.study{justify-self:start}}

/* hero v2: name on top, study line underneath, wide software cell */
.hero-head{grid-template-columns:minmax(0,1fr)!important;justify-items:start!important;gap:20px}
.study{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 28px;max-width:none;padding-bottom:0;justify-self:start!important}
.study>div{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 16px}
.study b{font-size:18px}
.facts .soft{grid-column:span 2}
.facts .soft b{line-height:1.5}
@media (max-width:640px){.facts .soft{grid-column:auto}}

.facts .soft{grid-column:auto!important}
.more{margin-left:6px;padding:2px 8px;background:none;border:1px solid var(--line);color:var(--accent);cursor:pointer;font-size:11px;letter-spacing:.08em;text-transform:uppercase;font-weight:400}
.more:hover{border-color:var(--accent)}
.softall{list-style:none;margin:0;padding:16px 0 0;display:flex;flex-wrap:wrap;gap:8px}
.softall[hidden]{display:none}
.softall li{margin:0}
.tool{padding:6px 12px;background:none;border:1px solid var(--line);color:var(--text);font:inherit;font-size:14px;cursor:pointer}
.tool:hover{border-color:var(--accent)}
.tool[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:var(--ink)}

.embed{position:relative;aspect-ratio:16/9;background:#000}
.embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.cuts{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:16px}

.prog{display:flex;align-items:center;gap:12px;margin-top:4px}
.prog .mono{font-size:11px;color:var(--muted)}
.segs{display:flex;gap:4px}
.segs i{display:block;width:34px;height:8px;border:1px solid var(--line);position:relative;overflow:hidden}
.segs i.on{background:var(--accent);border-color:var(--accent)}
.segs i.cur{border-color:var(--accent)}
.segs i.cur::after{content:"";position:absolute;inset:0;width:var(--p,25%);background:var(--accent)}
.segs i.cur::before{content:"";position:absolute;top:0;bottom:0;width:6px;left:calc(var(--p,25%) - 6px);background:#fff;opacity:.7;z-index:1;animation:blink 1.6s ease-in-out infinite}
@keyframes blink{50%{opacity:.15}}
@media (prefers-reduced-motion:reduce){.segs i.cur::before{animation:none}}

#reel{margin-top:56px}
.reel{margin:0}

.intro { display: flex; flex-direction: row-reverse; gap: 28px; align-items: flex-start; margin-bottom: 8px; }
.intro .statement { margin: 0; flex: 1; min-width: 0; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.45; }
.avatar { flex: none; width: 220px; height: 260px; object-fit: cover; object-position: 50% 28%; border-radius: 6px; border: 1px solid var(--line); }
@media (max-width: 720px) { .intro { flex-direction: column; } .avatar { width: 100%; max-width: 300px; height: auto; aspect-ratio: 1; } }

/* Wide screens: keep the main video inside the window height */
.poster video { max-height: 82vh; object-fit: contain; }
.poster .embed { max-height: 82vh; }
