:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #6b6b6b;
  --faint: #a8a8a6;
  --line: #e8e8e6;
  --soft: #f4f4f2;
  --dark: #0d0d0d;
  --dark-fg: #efefed;
  --dark-muted: #8c8c8a;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --max: 1280px;
  --gutter: max(20px, calc((100vw - var(--max)) / 2));
  --tile-h: clamp(190px, 21vw, 300px);
  --top-h: 56px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

.wrap { padding-inline: var(--gutter); }
.label {
  font: 500 11.5px/1.4 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- top bar */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgb(255 255 255 / .86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top-inner { height: var(--top-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: 22px; font-size: 14px; }
.nav a { text-decoration: none; color: var(--muted); white-space: nowrap; transition: color .15s; }
.nav a:hover, .nav a.on { color: var(--fg); }

/* ---------- intro */
.intro {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: clamp(32px, 6vw, 96px); align-items: end;
  padding-top: clamp(48px, 7vw, 104px); padding-bottom: clamp(48px, 7vw, 96px);
}
.intro h1 { max-width: 13em; font-size: clamp(38px, 5.4vw, 74px); line-height: 1.03; letter-spacing: -.04em; }
.lede { margin-top: 28px; font-size: clamp(17px, 1.45vw, 20px); line-height: 1.5; color: var(--muted); max-width: 36em; }
.stats { display: flex; flex-wrap: wrap; gap: 12px 48px; margin: 40px 0 0; }
.stats dt { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.stats dd { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.links { margin-top: 32px; display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; }
.intro-img img { width: 100%; background: var(--soft); }
.intro-img figcaption, .tile figcaption, .loops figcaption, .yt figcaption, .a-fig figcaption {
  margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--muted);
}

/* ---------- skills index */
.index { padding-block: 40px 56px; border-top: 1px solid var(--line); }
.index-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); font-size: 14px; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.chip .n { font: 500 11px/1 var(--mono); color: var(--faint); }
.chip:hover { border-color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip[aria-pressed="true"] .n { color: var(--faint); }

.filterbar {
  position: sticky; top: var(--top-h); z-index: 15;
  background: var(--fg); color: var(--bg); font-size: 14px;
}
.filterbar .wrap { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.filterbar .label { color: var(--faint); }
.filterbar strong { font-weight: 500; }
.fb-clear { margin-left: auto; background: none; border: 0; color: var(--bg); cursor: pointer; opacity: .8; }
.fb-clear:hover { opacity: 1; }

/* Filtered view: company name + matching work only */
html:has(body[data-filter]) { scroll-padding-top: calc(var(--top-h) + 60px); }
body[data-filter] .row[data-cat]:not(.match),
body[data-filter] .phase:not(.match),
body[data-filter] .co:not(.match),
body[data-filter] .now,
body[data-filter] .co-hero,
body[data-filter] .co-body,
body[data-filter] .loops { display: none; }
body[data-filter] .co { padding-block: 48px 0; }
body[data-filter] .co-name { font-size: clamp(36px, 5vw, 64px); }
body[data-filter] .work { margin-top: 28px; }

/* ---------- now (Larkin) */
.now { padding-block: 64px 80px; border-top: 1px solid var(--line); }
.now-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px 64px; align-items: end; margin-bottom: 40px; }
.now-name { margin-top: 14px; font-size: clamp(40px, 5.5vw, 72px); line-height: 1; letter-spacing: -.045em; }
.now-intro { font-size: clamp(17px, 1.45vw, 20px); line-height: 1.5; max-width: 36em; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #1fb45a; margin-right: 8px; vertical-align: 1px; box-shadow: 0 0 0 3px rgb(31 180 90 / .18); }

/* ---------- company */
.co { padding-block: clamp(72px, 10vw, 140px) 40px; border-top: 1px solid var(--line); }
.co-head { display: grid; gap: 10px; }
.co-name { font-size: clamp(52px, 9vw, 128px); line-height: .92; letter-spacing: -.05em; }
.co-role { margin-top: 10px; font-size: 16px; max-width: 34em; }
.co-role span { display: block; color: var(--muted); }
.now .co-role { margin-top: 12px; }
.co-hero { margin-top: clamp(32px, 4vw, 56px); }
.co-hero img { width: 100%; max-height: 82vh; object-fit: cover; background: var(--soft); }
.co-body { margin-top: clamp(32px, 4vw, 56px); }
.co-intro { font-size: clamp(19px, 1.9vw, 26px); line-height: 1.38; letter-spacing: -.012em; max-width: 34em; }
.site-link {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
  padding: 9px 16px; border: 1px solid var(--fg); border-radius: 999px;
  font-size: 14px; text-decoration: none; transition: background .15s, color .15s;
}
.site-link:hover { background: var(--fg); color: var(--bg); }
.now .site-link { margin-top: 20px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; margin-top: clamp(40px, 5vw, 64px); }
.fact h3 { padding-bottom: 12px; border-bottom: 1px solid var(--fg); }
.fact li { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.45; }
.loops { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.loops video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--soft); }

/* ---------- galleries */
.work { margin-top: clamp(48px, 6vw, 80px); }
.phase { margin-bottom: 40px; }
.phase-label {
  margin-inline: var(--gutter); padding-block: 18px 32px; border-top: 1px solid var(--fg);
  font-size: clamp(24px, 2.4vw, 32px); line-height: 1.1; letter-spacing: -.025em;
}
.row { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 24px; padding-left: var(--gutter); margin-bottom: 40px; }
.now .row { grid-template-columns: minmax(0, 1fr); }
.row-head { padding-top: 2px; }
.row-head h4 { font-size: 15px; line-height: 1.35; }
.strip-wrap { position: relative; min-width: 0; }
.strip {
  display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scrollbar-width: none;
  padding-right: var(--gutter); padding-bottom: 4px;
}
.strip::-webkit-scrollbar { display: none; }
.tile { flex: 0 0 auto; width: calc(var(--tile-h) * var(--ar)); max-width: 86vw; scroll-snap-align: start; }
.tile.wide { --tile-h: clamp(230px, 34vw, 480px); }
.tile img, .tile video { width: 100%; height: var(--tile-h); object-fit: cover; background: var(--soft); }
.tile figcaption { max-width: max(100%, 220px); padding-right: 8px; }
.zoom { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.zoom img, .zoom video { transition: opacity .2s; }
.zoom:hover img, .zoom:hover video { opacity: .92; }
.badge {
  position: absolute; left: 10px; top: 10px; padding: 4px 7px;
  background: rgb(0 0 0 / .55); color: #fff; border-radius: 4px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.nudge {
  position: absolute; top: calc(var(--tile-h) / 2 - 20px); width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid var(--line); background: rgb(255 255 255 / .92);
  cursor: pointer; opacity: 0; transition: opacity .2s; font-size: 16px;
}
.nudge.prev { left: 10px; }
.nudge.next { right: calc(var(--gutter) + 10px); }
.strip-wrap:hover .nudge:not([disabled]) { opacity: 1; }
.nudge[disabled] { pointer-events: none; }

/* ---------- sections */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px 40px; flex-wrap: wrap; margin-bottom: 32px; }
.sec-title { font-size: clamp(32px, 4.4vw, 56px); line-height: 1; letter-spacing: -.04em; }
.sec-head p { max-width: 30em; }

.videos { padding-block: clamp(72px, 10vw, 140px) 40px; border-top: 1px solid var(--line); }
.yt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 16px; }
.yt-grid .yt:first-child { grid-column: span 2; grid-row: span 2; }
.yt-play, .yt-frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: var(--dark); cursor: pointer; overflow: hidden; }
.yt-play img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, opacity .2s; }
.yt-play:hover img { transform: scale(1.02); opacity: .9; }
.play { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgb(255 255 255 / .92); }
.play::after { content: ""; position: absolute; left: 22px; top: 18px; border-left: 16px solid var(--fg); border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.writing { padding-block: clamp(72px, 10vw, 120px); border-top: 1px solid var(--line); }
.posts { border-top: 1px solid var(--fg); }
.post { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 24px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.post-title { font-size: clamp(18px, 1.8vw, 24px); letter-spacing: -.015em; line-height: 1.3; }
.post:hover .post-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

.photos { background: var(--dark); color: var(--dark-fg); padding-block: clamp(72px, 10vw, 140px); }
.photos .sec-head { flex-direction: column; align-items: flex-start; gap: 16px; }
.photos .sec-head p { color: var(--dark-muted); }
.masonry { columns: 3 300px; column-gap: 12px; }
.masonry figure { break-inside: avoid; margin-bottom: 12px; }
.masonry img { width: 100%; background: #1a1a1a; }

.about { padding-block: clamp(72px, 10vw, 120px); }
.about-grid { display: grid; grid-template-columns: 160px minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px 56px; align-items: start; }
.portrait img { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; background: var(--soft); }
.about-text p { font-size: 18px; line-height: 1.5; max-width: 32em; }
.about-text p + p { margin-top: 16px; }
.before h3 { padding-bottom: 10px; border-bottom: 1px solid var(--fg); }
.before li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.45; color: var(--muted); }
.before strong { font-weight: 500; color: var(--fg); display: block; }

.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 28px 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.foot span:last-child { display: flex; gap: 18px; }

/* ---------- lightbox */
.lb {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgb(10 10 10 / .97); color: var(--dark-fg);
}
.lb::backdrop { background: transparent; }
.lb[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.lb-stage { display: flex; align-items: center; justify-content: center; padding: 56px 72px 12px; min-height: 0; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lb-cap { display: flex; gap: 16px; justify-content: center; align-items: baseline; padding: 8px 24px 24px; font-size: 14px; color: var(--dark-fg); text-align: center; }
.lb-cap .label { color: var(--dark-muted); flex: none; }
.lb-btn { position: absolute; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgb(255 255 255 / .08); color: #fff; font-size: 18px; cursor: pointer; }
.lb-btn:hover { background: rgb(255 255 255 / .18); }
.lb-close { top: 12px; right: 12px; font-size: 24px; }
.lb-prev { left: 14px; top: 50%; margin-top: -22px; }
.lb-next { right: 14px; top: 50%; margin-top: -22px; }
.lb.single .lb-prev, .lb.single .lb-next { display: none; }

/* ---------- articles */
.wrap-narrow { max-width: calc(720px + 2 * 20px); margin-inline: auto; padding-inline: 20px; }
.wrap-wide { max-width: calc(1080px + 2 * 20px); margin-inline: auto; padding-inline: 20px; }
.a-head { padding-top: clamp(40px, 7vw, 96px); padding-bottom: 32px; }
.a-head .back { display: inline-block; margin-bottom: 40px; text-decoration: none; }
.a-head h1 { margin-top: 12px; font-size: clamp(34px, 5vw, 60px); line-height: 1.04; letter-spacing: -.04em; }
.a-cover img { width: 100%; max-height: 70vh; object-fit: cover; background: var(--soft); }
.a-body { padding-top: 48px; padding-bottom: 40px; font-size: 18px; line-height: 1.65; }
.a-body > * + * { margin-top: 20px; }
.a-body h2 { margin-top: 56px; font-size: 28px; line-height: 1.2; letter-spacing: -.025em; }
.a-body h3 { margin-top: 44px; font-size: 21px; line-height: 1.3; letter-spacing: -.015em; }
.a-body h4 { margin-top: 36px; font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.a-body ul, .a-body ol { padding-left: 1.25em; }
.a-body ul { list-style: disc; }
.a-body li + li { margin-top: 8px; }
.a-body hr { border: 0; border-top: 1px solid var(--line); margin-block: 48px; }
.a-body strong { font-weight: 600; }
.a-body blockquote { margin: 0; padding-left: 20px; border-left: 2px solid var(--fg); }
.a-fig img, .a-fig video { width: 100%; background: var(--soft); }
.a-body .cols { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 12px; align-items: start; }
.a-body .cols > div > * + * { margin-top: 12px; }
.a-body .cols-2 { --n: 2; } .a-body .cols-3 { --n: 3; } .a-body .cols-4 { --n: 4; } .a-body .cols-5 { --n: 5; }
.a-body .cols figcaption { font-size: 12.5px; }
.a-body .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px; }
.a-body .split h3 { margin-top: 0; }
.a-body .split > div > * + * { margin-top: 16px; }
.a-end { padding-bottom: 80px; font-size: 15px; color: var(--muted); }

/* ---------- responsive */
@media (max-width: 1080px) {
  .nav { gap: 16px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 120px minmax(0, 1fr); }
  .portrait img { width: 120px; height: 120px; }
  .before { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  :root { --top-h: 92px; }
  .intro { grid-template-columns: 1fr; }
  .intro-img { max-width: 420px; }
  .top-inner { height: auto; flex-direction: column; align-items: stretch; gap: 8px; padding-block: 12px 10px; }
  .nav { overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .nav::-webkit-scrollbar { display: none; }
  .now-grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 12px; }
  .yt-grid { grid-template-columns: 1fr 1fr; }
  .nudge { display: none; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --tile-h: 230px; }
  .tile.wide { --tile-h: calc(86vw / var(--ar)); }
  .facts { grid-template-columns: 1fr; }
  .loops { grid-template-columns: 1fr; }
  .yt-grid { grid-template-columns: 1fr; }
  .yt-grid .yt:first-child { grid-column: auto; grid-row: auto; }
  .post { grid-template-columns: 1fr; gap: 4px; }
  .post-kind { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .lb-stage { padding: 56px 8px 8px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; margin: 0; }
  .a-body { font-size: 17px; }
  .a-body .cols-3, .a-body .cols-4, .a-body .cols-5 { --n: 2; }
  .a-body .split { grid-template-columns: 1fr; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
.a-body .lead { font-size: 21px; line-height: 1.5; letter-spacing: -.01em; }
.a-body .note { font-size: 14px; color: var(--muted); }
