/* =========================================================
   Juan Adams — site styles
   Layout concept: a living point cloud behind quiet, editorial type.
   Warm black with stone, sand and bone; muted clay, sage and slate
   for project and skill blocks.
   ========================================================= */

:root {
  color-scheme: dark;

  /* Neutrals */
  --ink: #0E0D0C;        /* page background, warm black */
  --char: #161513;       /* raised surfaces */
  --ash: #22201D;        /* borders on dark, quiet fills */
  --stone: #8F887E;      /* secondary text */
  --sand: #CBBFAE;       /* particles, highlights */
  --bone: #ECE6DC;       /* primary text */

  /* Muted tones (blocks) */
  --clay: #A9765A;
  --sage: #87917C;
  --slate: #76808C;
  --block-slate: #262B31;
  --block-sage: #2A2F27;
  --block-clay: #352822;

  --line: rgba(236, 230, 220, 0.12);
  --line-strong: rgba(236, 230, 220, 0.24);

  --display: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --max: 1320px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 400; letter-spacing: -0.03em; line-height: 1.02; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--bone); color: var(--ink); padding: 10px 16px; border-radius: 999px; font-weight: 500; text-decoration: none; }
.skip:focus { top: 12px; }

.label { font-family: var(--mono); font-size: 13px; color: var(--stone); letter-spacing: 0; }
.chapter { display: flex; align-items: baseline; gap: 12px; color: var(--stone); font-size: 15px; }
.chapter b { font-weight: 400; font-size: clamp(40px, 5vw, 64px); color: var(--bone); letter-spacing: -0.04em; line-height: 1; font-feature-settings: "tnum"; }

/* ---------- Particle field ---------- */
#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }
.no-webgl #field { display: none; }
main, .site-footer { position: relative; z-index: 1; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 100; height: var(--header-h);
  transition: background-color .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { background: rgba(14, 13, 12, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 17px; letter-spacing: -0.01em; min-height: 44px; }
.brand svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { text-decoration: none; color: var(--stone); font-size: 15px; padding: 10px 12px; border-radius: 999px; transition: color .2s ease; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--bone); }
.nav .pill { margin-left: 10px; }
.menu-toggle { display: none; }
@media (max-width: 820px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: transparent; color: var(--bone); border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; }
  .nav { position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--ink); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 24px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 18px; }
  .nav .pill { margin: 18px 0 0; justify-content: center; border-bottom: 1px solid var(--line-strong); border-radius: 999px; }
}

/* ---------- Buttons ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font: 500 15px/1 var(--body); text-decoration: none; cursor: pointer;
  border: 1px solid var(--line-strong); color: var(--bone); background: transparent;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.pill:hover { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.pill.solid { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.pill.solid:hover { background: var(--sand); border-color: var(--sand); }
.circle {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong);
  display: inline-grid; place-items: center; flex: none; transition: background-color .25s ease, color .25s ease;
}
a:hover > .circle, .row:hover .circle { background: var(--bone); color: var(--ink); }

/* =========================================================
   HOME
   ========================================================= */

/* ---------- Intro: pinned, three states ---------- */
.intro { position: relative; height: 100vh; height: 100svh; min-height: 560px; }
.intro .stage { position: relative; height: 100%; }
.intro .container { position: relative; height: 100%; }
.state {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(56px, 10vh, 112px);
  max-width: 760px;
  opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease);
  pointer-events: none;
}
.state.on { opacity: 1; transform: none; pointer-events: auto; }
/* Without scroll scenes (no JS, reduced motion): states stack as normal content */
.no-js .intro, .static .intro { height: auto; min-height: 0; padding: calc(var(--header-h) + 120px) 0 80px; }
.no-js .state, .static .state { position: relative; left: auto; right: auto; bottom: auto; opacity: 1; transform: none; pointer-events: auto; margin: 0 var(--gutter) 56px; }
.no-js .scroll-hint, .static .scroll-hint, .no-js .chip, .static .chip { display: none; }
.no-js .intro .meta, .static .intro .meta { top: calc(var(--header-h) + 28px); }
.state h1 { font-size: clamp(64px, 11vw, 168px); line-height: .9; letter-spacing: -0.055em; }
.state h2 { font-size: clamp(40px, 5.6vw, 84px); line-height: .98; letter-spacing: -0.045em; }
.state p { margin-top: 22px; color: var(--stone); font-size: clamp(17px, 1.5vw, 20px); max-width: 44ch; }
.state .note { margin-top: 18px; }
.intro .meta { position: absolute; top: calc(var(--header-h) + 28px); left: var(--gutter); right: var(--gutter); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.intro .scroll-hint { position: absolute; right: var(--gutter); bottom: clamp(56px, 10vh, 112px); display: flex; align-items: center; gap: 12px; color: var(--stone); font-size: 14px; }
.ticks { display: flex; gap: 6px; }
.ticks i { width: 22px; height: 2px; background: var(--line-strong); transition: background-color .3s ease; }
.ticks i.on { background: var(--bone); }

/* Real photo that fades in over the particle portrait */
.portrait-photo {
  position: absolute; z-index: 1; opacity: 0; pointer-events: none; object-fit: contain;
  filter: saturate(.6) sepia(.1) contrast(1.04) brightness(.96) blur(8px);
  transform: scale(1.03);
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%); mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  /* leaving: quick, soft dissolve */
  transition: opacity .55s ease-in, filter .55s ease-in, transform .55s ease-in;
}
.portrait-photo.show {
  opacity: .94; filter: saturate(.6) sepia(.1) contrast(1.04) brightness(.96) blur(0);
  transform: none;
  /* arriving: slower, eased */
  transition: opacity 1.2s var(--ease), filter 1.2s var(--ease), transform 1.4s var(--ease);
}
.static .portrait-photo, .no-js .portrait-photo { display: none; }

/* Floating chips (pop in on state 2) */
.chip {
  position: absolute; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  background: rgba(22, 21, 19, 0.72); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 14px; color: var(--bone); white-space: nowrap;
  opacity: 0; transform: translateY(10px) scale(.96); transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sand); flex: none; }
.chip small { display: block; color: var(--stone); font-size: 12px; }
.intro[data-state="1"] .chip { opacity: 1; transform: none; }
.intro[data-state="1"] .chip:nth-of-type(2) { transition-delay: .08s; }
.intro[data-state="1"] .chip:nth-of-type(3) { transition-delay: .16s; }
.intro[data-state="1"] .chip:nth-of-type(4) { transition-delay: .24s; }
.chip.c1 { right: 30%; top: 22%; }
.chip.c2 { right: 6%; top: 34%; }
.chip.c3 { right: 34%; top: 58%; }
.chip.c4 { right: 8%; top: 66%; }
@media (max-width: 820px) {
  .chip { display: none; }
  .intro .scroll-hint { display: none; }
}

/* ---------- Generic section ---------- */
.section { position: relative; padding: clamp(96px, 12vw, 176px) 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(48px, 6vw, 88px); }
.section-head h2 { font-size: clamp(40px, 5.4vw, 80px); letter-spacing: -0.045em; }
.section-head p { color: var(--stone); max-width: 50ch; font-size: 18px; }
@media (max-width: 820px) { .section-head { grid-template-columns: 1fr; } }

.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- About (1.0) ---------- */
.about-home .grid { display: grid; grid-template-columns: minmax(0, 0.35fr) minmax(0, 1fr); gap: 32px 64px; }
.about-home .statement { font-size: clamp(28px, 3.4vw, 50px); line-height: 1.12; letter-spacing: -0.03em; max-width: 26ch; }
.about-home .facts { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px 32px; color: var(--stone); font-size: 15px; }
.about-home .actions { margin-top: 36px; }
.photos { margin-top: clamp(56px, 8vw, 112px); display: grid; grid-template-columns: 1.1fr 0.8fr 1fr; gap: clamp(12px, 2vw, 24px); align-items: start; }
.photos figure { margin: 0; overflow: hidden; border-radius: 4px; background: var(--char); }
.photos figure:nth-child(2) { margin-top: 18%; }
.photos figure:nth-child(3) { margin-top: 6%; }
.photos img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 40% 35%; transform: scale(1.03); transition: transform .4s ease-out; will-change: transform; }
.photos figcaption { padding: 10px 2px 0; background: var(--ink); }
@media (max-width: 820px) {
  .about-home .grid { grid-template-columns: 1fr; }
  .photos { grid-template-columns: 1fr 1fr; }
  .photos figure:nth-child(3) { display: none; }
}

/* ---------- Work: horizontal reel ---------- */
.work { position: relative; padding-top: clamp(96px, 12vw, 160px); }
.work .head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 4vw, 56px); }
.work .head h2 { font-size: clamp(40px, 5.4vw, 80px); letter-spacing: -0.045em; }
.reel-wrap { overflow: hidden; }
.reel { display: flex; gap: clamp(14px, 1.6vw, 24px); padding: 0 var(--gutter) clamp(96px, 10vw, 140px); width: max-content; }
.panel {
  width: min(78vw, 560px); flex: none; display: flex; flex-direction: column;
  border-radius: 6px; overflow: hidden; text-decoration: none; color: var(--bone);
  background: var(--char);
}
.panel .media { position: relative; aspect-ratio: 4 / 3.2; overflow: hidden; background: var(--char); display: grid; place-items: center; }
.panel .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.panel:hover .media img { transform: scale(1.03); }
.panel .media.contain img { width: 52%; height: auto; object-fit: contain; border-radius: 22px; transform: none; }
.panel:hover .media.contain img { transform: scale(1.04); }
.panel .block { padding: clamp(20px, 2.4vw, 32px); display: grid; grid-template-columns: 1fr auto; gap: 18px 16px; align-items: end; min-height: 220px; }
.panel h3 { font-size: clamp(36px, 3.6vw, 56px); letter-spacing: -0.045em; grid-column: 1 / -1; }
.panel .desc { color: var(--bone); opacity: .82; max-width: 34ch; }
.panel .tags { grid-column: 1 / -1; display: flex; justify-content: space-between; color: var(--bone); opacity: .6; font-size: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.panel.slate .block { background: var(--block-slate); }
.panel.sage .block, .panel.sage .media { background: var(--block-sage); }
.panel.clay .block, .panel.clay .media { background: var(--block-clay); }
.panel.sage .media { background: #232821; }
.panel.clay .media { background: #2D221D; }
.nfc { width: 46%; color: var(--sand); opacity: .9; }
.panel .soon { position: absolute; left: 16px; bottom: 14px; }
.reel-end { width: min(60vw, 360px); flex: none; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; padding-bottom: 8px; color: var(--stone); }
.reel-end a { color: var(--bone); }
@media (max-width: 820px) {
  .reel { flex-direction: column; width: auto; }
  .panel { width: 100%; }
  .reel-end { width: auto; }
}

/* ---------- Skills: pinned 5 states ---------- */
.skills { position: relative; height: 100vh; height: 100svh; min-height: 620px; }
.skills .container { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.skills .frame { position: relative; aspect-ratio: 1; max-height: 64vh; width: 100%; justify-self: center; }
.skills .frame span { position: absolute; width: 28px; height: 28px; border: 0 solid var(--line-strong); }
.skills .frame .tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.skills .frame .tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.skills .frame .bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.skills .frame .br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.skills .frame .label { position: absolute; left: 0; bottom: -30px; }
.skill-list { position: relative; min-height: 360px; }
.skill { position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); pointer-events: none; }
.skill.on { opacity: 1; transform: none; pointer-events: auto; }
.skill h3 { font-size: clamp(40px, 4.6vw, 72px); letter-spacing: -0.045em; margin: 18px 0 20px; }
.skill p { color: var(--stone); font-size: 18px; max-width: 42ch; }
.skill .used { margin-top: 24px; font-size: 15px; color: var(--stone); }
.skill .used a { color: var(--bone); text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.skills .count { font-feature-settings: "tnum"; }
.static .skills, .no-js .skills { height: auto; }
.static .skill-list, .no-js .skill-list { min-height: 0; display: grid; gap: 56px; }
.static .skill, .no-js .skill { position: static; opacity: 1; transform: none; }
.static .skills .container, .no-js .skills .container { grid-template-columns: 1fr; padding-top: 96px; padding-bottom: 96px; }
.static .skills .frame, .no-js .skills .frame { display: none; }
@media (max-width: 820px) {
  .skills .container { grid-template-columns: 1fr; align-content: center; }
  .skills .frame { max-height: 38vh; width: auto; }
}

/* ---------- Process ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-strong); }
.steps li { padding: 28px 28px 0 0; }
.steps b { font-weight: 400; color: var(--stone); font-size: 15px; font-feature-settings: "tnum"; }
.steps h3 { font-size: 28px; margin: 18px 0 12px; letter-spacing: -0.03em; }
.steps p { color: var(--stone); font-size: 16px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; gap: 0 24px; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Experience list (LPAS updates style) ---------- */
.rows { border-top: 1px solid var(--line-strong); }
.row {
  display: grid; grid-template-columns: 120px minmax(0, 1.1fr) minmax(0, 1fr) 44px; gap: 12px 32px; align-items: center;
  padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--bone);
}
.row time { color: var(--stone); font-feature-settings: "tnum"; font-size: 15px; }
.row h3 { font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; }
.row .org { color: var(--stone); font-size: 15px; }
.row .circle { opacity: .55; }
a.row .circle { opacity: 1; }
@media (max-width: 760px) { .row { grid-template-columns: 1fr 44px; } .row time { grid-column: 1 / -1; } .row .org { grid-column: 1; } }

/* ---------- Channel ---------- */
.channel .container { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.channel h2 { font-size: clamp(48px, 7vw, 112px); letter-spacing: -0.055em; line-height: .92; }
.channel p { color: var(--stone); margin-top: 24px; max-width: 42ch; font-size: 18px; }
.channel .actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.screen { position: relative; border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--char); }
.screen img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transform: scale(1.03); transition: transform .4s ease-out; filter: saturate(.85); }
.screen .overlay { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(180deg, rgba(14,13,12,0) 30%, rgba(14,13,12,.75)); }
.screen .overlay div { text-align: center; }
.screen .play { width: 68px; height: 68px; border-radius: 50%; border: 1px solid rgba(236,230,220,.6); display: grid; place-items: center; margin: 0 auto 14px; background: rgba(14,13,12,.4); backdrop-filter: blur(6px); }
@media (max-width: 820px) { .channel .container { grid-template-columns: 1fr; } }

/* ---------- Closing + footer ---------- */
.closing { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; }
.closing blockquote { margin: 0; font-size: clamp(40px, 6vw, 96px); line-height: 1; letter-spacing: -0.05em; max-width: 14ch; }
.closing p { margin-top: 28px; color: var(--stone); max-width: 48ch; font-size: 18px; }
.closing .actions { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }

.site-footer { border-top: 1px solid var(--line); padding: 48px 0 0; overflow: hidden; background: var(--ink); }
.foot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.foot-grid h4 { font-size: 14px; color: var(--stone); letter-spacing: 0; margin-bottom: 12px; font-family: var(--body); }
.foot-grid a { display: block; text-decoration: none; padding: 6px 0; color: var(--bone); }
.foot-grid a:hover { color: var(--sand); }
.wordmark { font-family: var(--display); font-size: clamp(64px, 17vw, 300px); line-height: .78; letter-spacing: -0.065em; margin: clamp(48px, 7vw, 96px) 0 0; white-space: nowrap; color: var(--bone); transform: translateY(8%); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 0 24px; border-top: 1px solid var(--line); color: var(--stone); font-size: 14px; position: relative; background: var(--ink); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* =========================================================
   INNER PAGES (About, projects)
   ========================================================= */
.page-hero { padding: calc(var(--header-h) + clamp(48px, 8vw, 112px)) 0 clamp(48px, 6vw, 80px); position: relative; }
.breadcrumb { color: var(--stone); font-size: 15px; margin-bottom: 36px; }
.breadcrumb a { text-decoration: none; display: inline-block; padding: 10px 0; }
.breadcrumb a:hover { color: var(--bone); }
.page-hero h1 { font-size: clamp(64px, 11vw, 168px); letter-spacing: -0.06em; line-height: .88; }
.page-hero .lede { margin-top: 28px; font-size: clamp(19px, 1.8vw, 24px); max-width: 44ch; color: var(--bone); opacity: .85; }
.facts-row { margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-top: 1px solid var(--line-strong); }
.facts-row div { padding: 18px 20px 0 0; }
.facts-row dt { color: var(--stone); font-size: 14px; }
.facts-row dd { margin: 4px 0 0; }
.facts-row dd a { text-underline-offset: 4px; display: inline-block; padding: 4px 0; }
.facts-row dl { display: contents; }

.case { padding: clamp(56px, 8vw, 112px) 0; border-top: 1px solid var(--line); }
.case .ch { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 24px 64px; padding: clamp(40px, 5vw, 64px) 0; border-bottom: 1px solid var(--line); }
.case .ch:first-child { padding-top: 0; }
.case .ch h2 { font-size: clamp(26px, 2.6vw, 36px); letter-spacing: -0.03em; }
.prose { display: grid; gap: 18px; max-width: 66ch; }
.prose p, .prose li { color: #D8D2C8; font-size: 18px; }
.prose ul { display: grid; gap: 10px; padding-left: 20px; }
.prose strong { color: var(--bone); font-weight: 500; }
@media (max-width: 760px) { .case .ch { grid-template-columns: 1fr; } }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); max-width: 520px; }
.metric { padding: 16px 16px 0 0; }
.metric b { display: block; font-size: clamp(30px, 3.4vw, 44px); font-weight: 400; letter-spacing: -0.03em; font-feature-settings: "tnum"; }
.metric span { color: var(--stone); font-size: 14px; }

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.gallery figure { margin: 0; }
.gallery img, .gallery video { border-radius: 4px; width: 100%; }
.gallery .white img { background: #fff; }
.gallery figcaption { margin-top: 10px; font-size: 14px; color: var(--stone); }
.gallery .wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .gallery { grid-template-columns: 1fr; } }
.placeholder { display: grid; place-items: center; text-align: center; color: var(--stone); font-size: 15px; padding: 24px; aspect-ratio: 16 / 9; border-radius: 4px; border: 1px dashed var(--line-strong); }
.vertical-video { max-width: 380px; }
.vertical-video video { aspect-ratio: 9 / 16; object-fit: cover; background: var(--char); }

.next { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; padding: clamp(48px, 6vw, 80px) 0; text-decoration: none; }
.next span { color: var(--stone); font-size: 15px; display: block; margin-bottom: 8px; }
.next b { font-weight: 400; font-size: clamp(48px, 8vw, 120px); letter-spacing: -0.055em; line-height: .9; }
.next:hover b { color: var(--sand); }

/* About page */
.about-top { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.about-top figure { margin: 0; border-radius: 4px; overflow: hidden; }
.about-top img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 30% 20%; }
.about-top h1 { font-size: clamp(48px, 7vw, 104px); letter-spacing: -0.055em; line-height: .92; }
.about-top .prose { margin-top: 32px; }
@media (max-width: 860px) { .about-top { grid-template-columns: 1fr; } .about-top figure { max-width: 420px; } }
.mission-line { font-size: clamp(40px, 6vw, 92px); line-height: 1; letter-spacing: -0.05em; max-width: 14ch; margin: 0; }
.toolbox { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.toolbox li { border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 14px; font-size: 15px; color: #D8D2C8; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Fit the pinned work reel inside one screen on desktop */
@media (min-width: 821px) {
  .work { padding-top: calc(var(--header-h) + 28px); min-height: 100vh; }
  .work .head { margin-bottom: 28px; }
  .work .head h2 { font-size: clamp(36px, 4.4vw, 64px); }
  .panel .media { aspect-ratio: auto; height: min(31vh, 300px); }
  .panel .block { min-height: 0; }
  .reel { padding-bottom: 40px; }
}
.skills .frame .label { white-space: nowrap; }
@media (max-width: 820px) { .intro .meta span:last-child { display: none; } }
/* Keep the vertical SPAI video inside one screen */
.vertical-video { max-width: none; width: fit-content; }
.vertical-video video { height: min(calc(100vh - var(--header-h) - 96px), 640px); height: min(calc(100svh - var(--header-h) - 96px), 640px); width: auto; max-width: 100%; }
.gallery figure:not(.white):not(.wide) img { aspect-ratio: 4 / 3; object-fit: cover; }
