:root {
  /* branded dark: neutrals tinted toward the accent blue, like a monitor in a dark room */
  --surface-base: #090b10;
  /* elevation by brightness: the closer a surface is to you, the lighter it gets */
  --surface-rest: #10141c;   /* resting: cards, code block */
  --surface-raised: #161b25; /* raised: hover, buttons */
  --surface-float: #1c2230; /* floating: tooltip, slideshow controls */
  --border: #212837;
  --text-primary: #e7e9ee;
  --text-body: #c6cbd6;  /* long-form body copy, a step softer than headings */
  --text-secondary: #8a93a6;
  --text-tertiary: #7b8396;     /* tertiary labels; still ≥ 4.5:1 for small text */
  /* blue has two jobs: bright = you can click it, steel = a label or code flavor */
  --action: #3d9bff;
  --action-dim: rgba(61, 155, 255, 0.14);
  --label: #6f94c0;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Google Sans Flex", "Helvetica Neue", Helvetica, Arial, sans-serif; /* body text */
  --display: "Google Sans Flex", "Helvetica Neue", Helvetica, Arial, sans-serif; /* headings (was Space Grotesk) */
  --radius: 4px;
  --max: 1240px;
  --footer-h: 96px;

  /* spacing scale: every gap, margin and padding is one of these (8px system, 4px half-steps) */
  --s4: 4px; --s8: 8px; --s12: 12px; --s16: 16px; --s24: 24px;
  --s32: 32px; --s48: 48px; --s64: 64px; --s96: 96px;

  /* type scale: each heading step is ~1.25× the one below */
  --fs-1: 22px; --fs-2: 28px; --fs-3: 36px; --fs-4: 44px; --fs-5: 56px; --fs-6: 112px;

  /* layout grid: 4 columns on phones, 8 on tablets, 12 on desktop */
  --cols: 4; --gutter: 16px; --margin: 16px;

  /* elevation: layered soft shadows in a deep navy (never pure black), light from above */
  --sh-c: 220 60% 2%;
  --sh-1: 0 1px 2px hsl(var(--sh-c) / .35), 0 4px 12px hsl(var(--sh-c) / .30);
  --sh-2: 0 2px 4px hsl(var(--sh-c) / .35), 0 8px 24px hsl(var(--sh-c) / .40), 0 24px 48px hsl(var(--sh-c) / .35);
  --sh-3: 0 4px 8px hsl(var(--sh-c) / .40), 0 16px 40px hsl(var(--sh-c) / .50), 0 40px 80px hsl(var(--sh-c) / .45);
  /* crisp top edge: a faint highlight where the light hits */
  --edge: inset 0 1px 0 rgba(255, 255, 255, .07);
  /* active things glow like a monitor */
  --glow: 0 0 12px rgba(61, 155, 255, .45), 0 0 40px rgba(61, 155, 255, .18);
  color-scheme: dark;
}
@media (min-width: 720px) { :root { --cols: 8; --gutter: 24px; --margin: 32px; } }
@media (min-width: 1024px) { :root { --cols: 12; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  overflow-x: clip; /* full-bleed elements reach 100vw without a sideways scrollbar */
  background: var(--surface-base);
  color: var(--text-primary);
  font-family: var(--sans);
  font-stretch: 92%; /* body text a touch condensed; headings reset to normal width below */
  font-size: 17px;
  line-height: 28px;
  -webkit-font-smoothing: antialiased;
  /* faint engineering grid */
  background-image:
    linear-gradient(to right, rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 48px 48px;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
::selection { background: var(--action); color: var(--surface-base); }
:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--margin); }
.muted { color: var(--text-tertiary); }
/* the shared column grid; children place themselves with grid-column */
.cols { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--gutter); }
.cols > * { grid-column: 1 / -1; min-width: 0; }

/* ── top bar ─────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--s16);
  height: 56px; padding: 0 var(--margin);
  font-family: var(--mono); font-size: 13px; line-height: 20px;
  background: rgba(9, 11, 16, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s;
}
.topbar.scrolled, .th-bar.scrolled { box-shadow: var(--sh-2); }
.logo { font-weight: 600; font-size: 15px; text-decoration: none; letter-spacing: .04em; }
.logo .caret { margin-left: 0.12em; }
.nav { display: flex; gap: var(--s4); margin-left: auto; }
.nav a {
  text-decoration: none; color: var(--text-secondary);
  padding: 6px var(--s12); border-radius: var(--radius);
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text-primary); background: var(--surface-raised); }
.nav .resume-link { color: var(--action); }
/* the section you're reading gets a blue underline that slides from word to word as you scroll */
.nav { position: relative; }
.nav a[aria-current] { color: var(--text-primary); }
.nav-ink {
  position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; border-radius: 1px;
  background: var(--action); box-shadow: 0 0 8px rgba(61, 155, 255, .6);
  opacity: 0; pointer-events: none;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), width .45s cubic-bezier(.2, .8, .2, 1), opacity .25s;
}
.nav-ink.on { opacity: 1; }
.tc {
  position: relative; display: none; align-items: center;
  color: var(--text-secondary); font-variant-numeric: tabular-nums; cursor: help;
  padding: 5px var(--s12); border: 1px solid var(--border); border-radius: var(--radius);
}
.tc:hover, .tc:focus-visible { color: var(--text-primary); border-color: var(--text-tertiary); }
.tc .tip {
  position: absolute; top: calc(100% + var(--s8)); right: 0; width: 248px;
  padding: var(--s8) var(--s12); border-radius: var(--radius);
  background: var(--surface-float); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 12px; line-height: 20px; font-weight: 500;
  box-shadow: var(--edge), var(--sh-3);
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity .15s, transform .15s;
}
.tc .tip b { color: var(--label); font-weight: 700; }
.tc:hover .tip, .tc:focus-visible .tip { opacity: 1; transform: none; }
@media (min-width: 860px) { .tc { display: flex; } }
@media (max-width: 520px) {
  .nav a:not(.resume-link):not([href="#work"]) { display: none; }
}

/* ── film grain: faint moving noise over the page background (behind all content, so videos stay clean) ── */
body::before {
  content: ""; position: fixed; inset: -50%; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .07;
  animation: grain .9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  17% { transform: translate(-3%, 2%); }
  33% { transform: translate(2%, -4%); }
  50% { transform: translate(-4%, -1%); }
  67% { transform: translate(3%, 3%); }
  83% { transform: translate(-1%, -3%); }
  100% { transform: translate(0, 0); }
}

/* ── hero ────────────────────────────────── */
/* key light: a soft blue glow from the top left, aimed at the name */
.hero { position: relative; isolation: isolate; padding-top: var(--s64); padding-bottom: var(--s32); }
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: -56px; bottom: 0; left: calc(50% - 50vw); width: 100vw;
  background: radial-gradient(ellipse 55% 75% at 22% 30%, rgba(61, 155, 255, .13), rgba(61, 155, 255, .04) 45%, transparent 75%);
}
.eyebrow { font-family: var(--mono); font-size: 13px; line-height: 20px; color: var(--label); margin: 0 0 var(--s12); letter-spacing: .02em; }
/* fluid type sizes, with line-heights snapped to the 4px baseline */
/* headings keep the display face; everything else reads in the body sans */
h1, h3, .featured-info h2, .th-info h2, .about-hi, .contact-line { font-family: var(--display); font-stretch: 100%; font-weight: 600; } /* Flex 600 matches Google Sans bold */
h1 {
  font-size: clamp(var(--fs-4), 9vw, var(--fs-6));
  line-height: .95; line-height: round(nearest, .95em, 4px);
  letter-spacing: -0.035em;
  margin: 0 0 var(--s32);
}
.lede {
  max-width: 620px; color: var(--text-secondary); font-size: clamp(17px, 2vw, 20px);
  line-height: 1.6; line-height: round(nearest, 1.6em, 4px); margin: 0 0 var(--s24);
}
/* SMPTE bars step out of the grid: a full-width divider between the intro and the reel */
.bars {
  display: grid; grid-template-columns: repeat(7, 1fr); height: 4px; opacity: .85;
  width: 100vw; margin-left: calc(50% - 50vw);
}
.bars i:nth-child(1) { background: #c0c0c0; }
.bars i:nth-child(2) { background: #c0c000; }
.bars i:nth-child(3) { background: #00c0c0; }
.bars i:nth-child(4) { background: #00c000; }
.bars i:nth-child(5) { background: #c000c0; }
.bars i:nth-child(6) { background: #c00000; }
.bars i:nth-child(7) { background: #0000c0; }

/* ── players ─────────────────────────────── */
.player {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  background: #000; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-btn {
  position: absolute; inset: 0; width: 100%; padding: 0; border: 0;
  background: #000; cursor: pointer;
}
.player-btn img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .25s, transform .5s; }
.player-btn:hover img { opacity: 1; transform: scale(1.02); }
/* sits in the lower third so it doesn't cover title text baked into thumbnails */
.play-chip {
  position: absolute; left: 50%; top: 83%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: var(--s8);
  font-family: var(--mono); font-size: 13px; line-height: 20px; font-weight: 500; letter-spacing: .08em;
  padding: var(--s8) var(--s16); border-radius: var(--radius);
  background: rgba(9, 11, 16, .78); border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(6px); box-shadow: var(--sh-1);
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.play-chip::before { content: ""; border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.player-btn:hover .play-chip { background: var(--action); color: var(--surface-base); border-color: var(--action); box-shadow: var(--glow); }
/* viewfinder corner marks */
.player-btn::before, .player-btn::after {
  content: ""; position: absolute; inset: var(--s16); pointer-events: none;
  border: 0 solid rgba(255,255,255,.7); opacity: 0; transition: opacity .25s, inset .25s;
  -webkit-mask: linear-gradient(#000 0 0) top left / 24px 24px no-repeat,
                linear-gradient(#000 0 0) top right / 24px 24px no-repeat,
                linear-gradient(#000 0 0) bottom left / 24px 24px no-repeat,
                linear-gradient(#000 0 0) bottom right / 24px 24px no-repeat;
          mask: linear-gradient(#000 0 0) top left / 24px 24px no-repeat,
                linear-gradient(#000 0 0) top right / 24px 24px no-repeat,
                linear-gradient(#000 0 0) bottom left / 24px 24px no-repeat,
                linear-gradient(#000 0 0) bottom right / 24px 24px no-repeat;
  border-width: 2px;
}
.player-btn::after { display: none; }
.player.playing { border-color: var(--action); box-shadow: var(--glow); }
.featured .player.playing { box-shadow: 0 0 0 100vw #000; }
.player-btn:hover::before { opacity: 1; inset: var(--s8); }

/* ambient glow: a blurred copy of the thumbnail spills its colors onto the page */
.media { position: relative; isolation: isolate; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.media::before {
  content: ""; position: absolute; inset: 6% 4% -4%; z-index: -1; pointer-events: none;
  background: var(--thumb) center / cover; border-radius: var(--s16);
  filter: blur(36px) saturate(1.6); opacity: .22; transform: translateY(6%);
  transition: opacity .35s, transform .35s;
}
.card .player { box-shadow: var(--sh-1); transition: box-shadow .35s, border-color .15s; }
.card:hover .media { transform: translateY(-4px); }
.card:hover .media::before { opacity: .5; transform: translateY(10%); }
.card:hover .player { box-shadow: var(--sh-2); }
/* the featured band glows above and below; brighter while the reel plays */
.featured .media::before { inset: -8% 0; opacity: .32; transform: none; filter: blur(64px) saturate(1.6); }
.featured .media:has(.playing)::before { opacity: .5; }

/* ── featured ────────────────────────────── */
/* the reel opens the work section: // work above it, the filters and the grid below */
.featured { padding-bottom: var(--s96); }
.work > .filters { margin-bottom: var(--s32); }
.meta-row {
  display: flex; justify-content: space-between; gap: var(--s12);
  font-family: var(--mono); font-size: 12px; line-height: 20px; color: var(--text-secondary);
  margin-bottom: var(--s8); text-transform: uppercase; letter-spacing: .08em;
}
.meta-row .tag-live { color: var(--label); }
/* the reel breaks out of the grid: an edge-to-edge black band, video as large as the screen height allows */
.featured .player {
  --fw: min(100vw, calc((100svh - 160px) * 16 / 9));
  width: var(--fw); margin-left: calc(50% - var(--fw) / 2);
  border-radius: 0; border-width: 1px 0;
  box-shadow: 0 0 0 100vw #000; clip-path: inset(0 -100vw);
}
/* title + role on the left 5 columns, description from column 7; tops line up.
   Positioned so it paints above the reel's glow, which spills down past the video. */
.featured-info { position: relative; row-gap: var(--s24); margin-top: var(--s32); align-items: start; }
@media (min-width: 1024px) {
  .featured-info > :first-child { grid-column: 1 / span 5; }
  .featured-info > :last-child { grid-column: 7 / -1; }
}
.featured-info h2 { font-size: clamp(var(--fs-2), 3vw, var(--fs-3)); line-height: 1.15; line-height: round(nearest, 1.15em, 4px); margin: 0 0 var(--s8); letter-spacing: -0.02em; }
.featured-info .role { margin: 0; }
.featured-info p { margin: 0 0 var(--s16); color: var(--text-body); }
.featured-info p:last-child { margin-bottom: 0; }
.card-body { position: relative; } /* same: text above the thumbnail glow */
.role { font-family: var(--mono); font-size: 12px; line-height: 20px; color: var(--label); letter-spacing: .02em; }

/* ── sections ────────────────────────────── */
section.work, section.about, section.contact { padding-top: var(--s48); padding-bottom: var(--s64); border-top: 1px solid var(--border); }
section.work { border-top: 0; } /* the color bars above already divide it from the intro */
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s16); margin-bottom: var(--s32); }
.section-head h2 { font-family: var(--mono); font-size: 15px; line-height: 24px; font-weight: 500; margin: 0; color: var(--text-primary); }
.prompt { color: var(--label); margin-right: var(--s8); }
/* hanging alignment: the // markers and the description's quote bar sit in the margin,
   so the words themselves line up with the grid edge. Phones' 16px margin is too narrow for it. */
@media (min-width: 720px) {
  :is(.section-head h2, .eyebrow) { position: relative; }
  :is(.section-head h2, .eyebrow) > .prompt { position: absolute; right: 100%; }
  .th-desc { margin-left: calc(-1 * (var(--s16) + 2px)); }
}
/* even out headline line lengths; keep single words from dangling on a paragraph's last line */
:is(h1, h2, h3, .contact-line, .about-hi, .lede) { text-wrap: balance; }
p { text-wrap: pretty; }

.filters { display: flex; flex-wrap: wrap; gap: var(--s8); }
.filter {
  font-family: var(--mono); font-size: 12px; line-height: 20px;
  padding: 5px var(--s12); border-radius: var(--radius);
  background: transparent; border: 1px solid var(--border); color: var(--text-secondary);
  cursor: pointer; transition: all .15s;
}
.filter:hover { color: var(--text-primary); border-color: var(--text-tertiary); background: var(--surface-raised); }
.filter { box-shadow: var(--edge); }
.filter[aria-pressed="true"] { color: var(--surface-base); background: var(--action); border-color: var(--action); box-shadow: 0 0 12px rgba(61, 155, 255, .35); }
.filter .n { opacity: .6; margin-left: var(--s4); font-variant-numeric: tabular-nums; }

/* ── grid + cards ────────────────────────── */
.grid { row-gap: var(--s48); align-items: start; }
.grid > .card { grid-column: span 4; }
@media (min-width: 1024px) { .grid > .card { grid-column: span 6; } }

.card { min-width: 0; display: block; text-decoration: none; color: inherit; }
.card[hidden] { display: none; }
.card:hover h3 { color: var(--action); }
.card:hover .player-btn img { opacity: 1; transform: scale(1.02); }
.card:hover .play-chip { background: var(--action); color: var(--surface-base); border-color: var(--action); box-shadow: var(--glow); }
.card:hover .player-btn::before { opacity: 1; inset: var(--s8); }
.card-body { margin-top: var(--s16); }
.card-top { display: flex; gap: var(--s12); align-items: baseline; justify-content: space-between; }
/* the project number sits right, like a timestamp, so the title lines up with the image and tagline */
.idx { order: 2; font-family: var(--mono); font-size: 12px; line-height: 20px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.card h3 { font-size: var(--fs-1); line-height: 28px; letter-spacing: -0.015em; margin: 0; transition: color .15s; }
.tagline { margin: var(--s4) 0 var(--s8); color: var(--text-secondary); font-size: 16px; line-height: 24px; }
/* the first paragraph of the description only shows beside the big cards */
.card-desc { display: none; }
/* lead card: video on 8 columns, details beside it on 4, reading top to bottom:
   title, tagline, the opening of the description, and the role pinned to the video's bottom edge */
@media (min-width: 720px) { .grid > .card:is(.wide, .fill) { grid-column: 1 / -1; } }
@media (min-width: 1024px) {
  .card:is(.wide, .fill) { display: grid; grid-template-columns: subgrid; align-items: stretch; }
  .card:is(.wide, .fill) .media { grid-column: span 8; }
  .card:is(.wide, .fill) .card-body { grid-column: span 4; margin-top: 0; display: flex; flex-direction: column; }
  .card:is(.wide, .fill) h3 { font-size: var(--fs-2); line-height: 32px; }
  .card:is(.wide, .fill) .tagline { margin-top: var(--s8); }
  .card:is(.wide, .fill) .card-desc {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden;
    margin: var(--s8) 0 var(--s16); font-size: 16px; line-height: 24px; color: var(--text-body);
  }
  .card:is(.wide, .fill) .role { margin-top: auto; margin-bottom: 0; }
}

/* ── watch page (theater) ────────────────── */
body.theater-open { overflow: hidden; }
.theater {
  position: fixed; inset: 0; z-index: 50; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface-base);
}
.theater[hidden] { display: none; }
.th-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: var(--s16); height: 56px; padding: 0 var(--margin);
  font-family: var(--mono); font-size: 13px; line-height: 20px;
  background: rgba(9, 11, 16, 0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.th-close {
  font-family: var(--mono); font-size: 13px; line-height: 20px; font-weight: 600;
  background: var(--surface-rest); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 5px var(--s12); cursor: pointer; transition: all .15s;
}
.th-close { box-shadow: var(--edge), var(--sh-1); }
.th-close:hover { color: var(--action); border-color: var(--action); background: var(--surface-raised); }
.th-path { color: var(--text-secondary); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-esc { margin-left: auto; color: var(--text-tertiary); font-weight: 600; border: 1px solid var(--border); border-radius: 3px; padding: 0 6px; font-size: 11px; line-height: 16px; }
@media (hover: none) { .th-esc { display: none; } }

/* black band; video as large as the screen allows while keeping 16:9 */
.th-stage { background: #000; border-bottom: 1px solid var(--border); }
.th-player {
  position: relative; margin: 0 auto; aspect-ratio: 16 / 9;
  width: min(100%, calc((100vh - 56px - 64px) * 16 / 9));
  background: #000;
}
.th-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.th-body { max-width: var(--max); margin: 0 auto; padding: var(--s32) var(--margin) var(--s96); row-gap: var(--s48); }
@media (min-width: 1024px) {
  .th-info { grid-column: span 8; }
  .th-side { grid-column: span 4; }
}
.th-info h2 { font-size: clamp(var(--fs-2), 4vw, var(--fs-4)); line-height: 1.1; line-height: round(nearest, 1.1em, 4px); letter-spacing: -0.025em; margin: 0 0 var(--s8); }
.th-info .tagline { font-size: 17px; line-height: 28px; margin-bottom: var(--s8); }
.th-desc { margin-top: var(--s24); padding-left: var(--s16); border-left: 2px solid var(--action); }
.th-desc p { margin: 0 0 var(--s16); color: var(--text-body); font-size: 17px; line-height: 28px; max-width: 680px; }
.th-desc p:last-child { margin-bottom: 0; }

.th-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); }
.row {
  display: grid; grid-template-columns: 160px 1fr; gap: var(--s12); align-items: start;
  padding: var(--s8); margin: 0 calc(-1 * var(--s8)); border-radius: var(--radius);
  text-decoration: none; color: inherit; transition: background .15s;
}
.row:hover { background: var(--surface-raised); box-shadow: var(--edge), var(--sh-1); }
.row-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 3px; border: 1px solid var(--border); background: #000; }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .15s; }
.row:hover .row-thumb img { opacity: 1; }
.row-text { display: grid; gap: var(--s4); min-width: 0; }
.row-title { font-size: 15px; font-weight: 500; line-height: 20px; }
.row:hover .row-title { color: var(--action); }
.row-role { font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--text-secondary); line-height: 16px; }

::view-transition-group(watch) { animation-duration: .38s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }

.gallery { margin-top: var(--s32); }
.gallery-label { font-family: var(--mono); font-size: 12px; line-height: 20px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 var(--s8); }
.strip { display: flex; gap: var(--s8); overflow-x: auto; padding-bottom: var(--s8); scroll-snap-type: x proximity; }
.strip::-webkit-scrollbar { height: 6px; }
.strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.thumb { flex: 0 0 auto; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface-rest); cursor: zoom-in; scroll-snap-align: start; }
.thumb img { height: 120px; width: auto; transition: opacity .2s; opacity: .85; }
.thumb:hover img { opacity: 1; }
/* photo mosaic: uniform 4:3 tiles with a couple of double-size leads */
.mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s8); grid-auto-flow: dense; }
@media (min-width: 720px) { .mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mosaic .thumb { display: block; aspect-ratio: 4 / 3; }
.mosaic .thumb.big { grid-column: span 2; grid-row: span 2; }
.mosaic .thumb img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s, transform .5s; }
.mosaic .thumb:hover img { transform: scale(1.03); }

/* single cover image that opens the slideshow; offset layers hint at a stack of slides */
.thumb.cover {
  position: relative; display: block; width: 100%; max-width: 760px; overflow: visible;
  margin: 0 var(--s12) var(--s12) 0; border-radius: var(--radius);
  isolation: isolate; background: transparent;
}
.thumb.cover::before, .thumb.cover::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-rest);
  transition: transform .2s;
}
.thumb.cover::before { transform: translate(6px, 6px); }
.thumb.cover::after { transform: translate(12px, 12px); z-index: -2; background: var(--surface-raised); box-shadow: var(--sh-2); }
.thumb.cover:hover::before { transform: translate(8px, 8px); }
.thumb.cover:hover::after { transform: translate(16px, 16px); }
.thumb.cover img { width: 100%; height: auto; border-radius: var(--radius); opacity: .92; box-shadow: var(--sh-1); }
.cover-chip {
  position: absolute; left: var(--s16); bottom: var(--s16);
  display: inline-flex; gap: var(--s8); align-items: center;
  font-family: var(--mono); font-size: 12px; line-height: 20px; font-weight: 600;
  padding: var(--s8) var(--s12); border-radius: var(--radius);
  background: rgba(9, 11, 16, .82); border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px); transition: all .15s;
}
.cover-chip .n { color: var(--text-secondary); }
.thumb.cover:hover .cover-chip { background: var(--action); color: var(--surface-base); border-color: var(--action); box-shadow: var(--glow); }
.thumb.cover:hover .cover-chip .n { color: var(--surface-base); }

/* ── about ───────────────────────────────── */
/* phone: stacked · tablet: photo 3 cols + text 5, toolkit panes 4 + 4 + 8 below
   desktop: photo 4 cols, one empty column, text 7; toolkit panes 4 + 4 + 4 below.
   Every block starts and ends on a column edge, so the rows line up with each other. */
.about-body { row-gap: var(--s48); align-items: start; }
.toolkit { display: grid; gap: var(--gutter); align-items: stretch; }
@media (min-width: 720px) {
  .portrait { grid-column: 1 / span 3; }
  .about-text { grid-column: 4 / -1; }
  .toolkit { grid-template-columns: subgrid; }
  .toolkit .spec { grid-column: span 4; }
  .toolkit .spec:last-child { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .portrait { grid-column: 1 / span 4; }
  .about-text { grid-column: 6 / -1; }
  .toolkit .spec:last-child { grid-column: span 4; }
}

/* headshot in a viewfinder-style frame */
.portrait { margin: 0; }
.portrait-frame { position: relative; }
.portrait img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--sh-2); }
.portrait-frame::before {
  content: ""; position: absolute; inset: var(--s8); pointer-events: none;
  border: 2px solid rgba(255, 255, 255, .55);
  -webkit-mask: linear-gradient(#000 0 0) top left / 16px 16px no-repeat,
                linear-gradient(#000 0 0) top right / 16px 16px no-repeat,
                linear-gradient(#000 0 0) bottom left / 16px 16px no-repeat,
                linear-gradient(#000 0 0) bottom right / 16px 16px no-repeat;
          mask: linear-gradient(#000 0 0) top left / 16px 16px no-repeat,
                linear-gradient(#000 0 0) top right / 16px 16px no-repeat,
                linear-gradient(#000 0 0) bottom left / 16px 16px no-repeat,
                linear-gradient(#000 0 0) bottom right / 16px 16px no-repeat;
}
.portrait-frame::before { z-index: 3; }

/* code-outline intro: photo hidden behind a traced outline, then scanned in top to bottom */
.ascii-pending { background: var(--surface-rest); box-shadow: inset 0 0 0 1px var(--border); border-radius: var(--radius); }
.ascii-pending img { clip-path: inset(0 0 100% 0); }
.ascii { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; clip-path: inset(0 0 0 0); }
.scanline {
  position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 2; opacity: 0; pointer-events: none;
  background: var(--action); box-shadow: 0 0 12px 2px rgba(61, 155, 255, .55);
}
/* hover: the pointer scratches the photo away to show the outline underneath */
.scratch { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; border-radius: var(--radius); }
@media (hover: hover) { .anim .portrait-frame { cursor: crosshair; } }
.ascii-pending.revealing img { clip-path: inset(0 0 0 0); transition: clip-path 1.1s cubic-bezier(.55, 0, .25, 1); }
.ascii-pending.revealing .ascii { clip-path: inset(100% 0 0 0); transition: clip-path 1.1s cubic-bezier(.55, 0, .25, 1); }
.ascii-pending.revealing .scanline { animation: scan-down 1.1s cubic-bezier(.55, 0, .25, 1) both; }
@keyframes scan-down {
  0% { top: 0; opacity: 1; }
  90% { opacity: 1; }
  100% { top: calc(100% - 2px); opacity: 0; }
}

.portrait figcaption .fc-ratio { margin-left: auto; }
/* replay button for the photo intro; only shown when motion is on */
.replay {
  display: none; align-items: center; justify-content: center;
  width: 24px; height: 24px; padding: 0; margin-left: var(--s8);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; /* press-and-hold */
  font-size: 14px; line-height: 1; color: var(--text-secondary);
  background: none; border: 1px solid var(--border); border-radius: 3px; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.anim .replay { display: inline-flex; }
.replay:hover { color: var(--action); border-color: var(--action); }
.replay span { display: block; }
.replay.spinning { color: var(--action); border-color: var(--action); cursor: default; }
.replay.spinning span { animation: replay-spin .9s linear infinite; }
@keyframes replay-spin { to { transform: rotate(360deg); } }
.portrait figcaption {
  display: flex; align-items: center; margin-top: var(--s8);
  font-family: var(--mono); font-size: 12px; line-height: 24px; font-weight: 600; color: var(--text-secondary);
}
@media (max-width: 719px) { .portrait { max-width: 240px; } }
.about-text p { margin: 0 0 var(--s16); font-size: 19px; line-height: 32px; color: var(--text-body); max-width: 680px; }
.about-text p:last-child { margin-bottom: 0; }
.about-text .about-hi {
  font-size: clamp(var(--fs-2), 3.4vw, var(--fs-3)); line-height: 1.15; line-height: round(nearest, 1.15em, 4px);
  letter-spacing: -0.025em; color: var(--text-primary); margin-bottom: var(--s24);
}
.spec {
  margin: 0; padding: var(--s24); overflow-x: auto;
  background: var(--surface-rest); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--edge), var(--sh-2);
  font-family: var(--mono); font-size: 13px; line-height: 24px; color: var(--text-secondary);
}
.spec .k { color: #b39ad6; }
.spec .s { color: var(--text-primary); }
.spec .v { color: var(--label); }

/* ── contact ─────────────────────────────── */
/* contact + footer fill the screen, so the "let's work together" links land with the section at the top
   (screen − top bar's scroll offset − footer); the content stays up top, the space falls below it */
section.contact { min-height: calc(100svh - 64px - var(--footer-h)); }
.contact-line {
  font-size: clamp(var(--fs-3), 5vw, var(--fs-5)); line-height: 1.05; line-height: round(nearest, 1.05em, 4px);
  letter-spacing: -0.03em; margin: 0 0 var(--s48); max-width: 800px;
}
.contact-links { display: flex; flex-wrap: wrap; gap: var(--s12); }
.contact-note { margin: var(--s16) 0 0; font-family: var(--mono); font-size: 13px; line-height: 20px; font-weight: 500; color: var(--text-secondary); }
.btn {
  display: inline-flex; align-items: center; gap: var(--s8); min-height: 48px;
  font-family: var(--mono); font-size: 14px; line-height: 20px; text-decoration: none;
  padding: 0 var(--s16); border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface-rest); transition: all .15s;
  box-shadow: var(--edge), var(--sh-1);
}
.btn:hover { border-color: var(--action); color: var(--action); background: var(--surface-raised); }
.btn.primary { background: var(--action); color: var(--surface-base); border-color: var(--action); box-shadow: var(--glow); }
.btn.primary:hover { filter: brightness(1.1); color: var(--surface-base); }
/* outlined like the other buttons until the heading above it finishes typing,
   then it switches on like a bulb: the fill comes up first and the glow warms in over 2s */
.btn.primary.dim {
  background: var(--surface-rest); color: var(--action);
  box-shadow: 0 0 4px rgba(61, 155, 255, 0), 0 0 8px rgba(61, 155, 255, 0); /* the glow's layers, switched off, so it can warm in */
}
.btn.primary.warming {
  transition: background-color 1s cubic-bezier(.5, 0, .2, 1), color .6s ease-out, box-shadow 2s cubic-bezier(.6, 0, .25, 1);
}
/* contact buttons read as links: blue outline and text, filling in on hover */
.contact-links .btn:not(.primary) { border-color: var(--action); color: var(--action); }
.contact-links .btn:hover { background: var(--action); color: var(--surface-base); box-shadow: var(--glow); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn .hint { font-size: 12px; color: var(--text-secondary); transition: color .15s; }
.btn:hover .hint { color: inherit; opacity: .7; }

/* arrows nudge toward where the link goes */
.arrow { display: inline-block; transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
a:hover > .arrow { transform: translateX(4px); }
a:hover > .arrow.up { transform: translate(3px, -3px); }
a:hover > .arrow.up-only { transform: translateY(-4px); }

/* inline text calls to action: in the hero and after each video's description */
.text-cta {
  display: inline-flex; align-items: center; gap: var(--s8); min-height: 48px;
  font-family: var(--mono); font-size: 14px; line-height: 20px; font-weight: 600;
  color: var(--action); text-decoration: none;
}
.text-cta:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-cta { margin-bottom: var(--s32); } /* the hero's one solid action, same as the contact section's main button */
.th-cta { margin-top: var(--s16); }

.footer { display: flex; justify-content: space-between; align-items: center; height: var(--footer-h); padding-bottom: var(--s24); /* fixed height: the contact section subtracts it */ border-top: 1px solid var(--border); font-family: var(--mono); font-size: 12px; line-height: 20px; color: var(--text-secondary); }

.to-top { display: inline-flex; align-items: center; gap: var(--s8); min-height: 48px; color: var(--action); text-decoration: none; }
.to-top:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ── lightbox ────────────────────────────── */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(5, 6, 8, .97); }
.lightbox[open] { display: block; overflow: hidden; }
.lb-viewport { position: absolute; inset: 0; display: flex; align-items: center; overflow: hidden; }
.lb-track {
  display: flex; align-items: center; gap: var(--s24); height: 100%;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}
/* slides are capped narrower than the screen so the next one shows at the edge */
.lb-slide {
  flex: 0 0 auto; width: auto; height: auto;
  max-width: min(78vw, 1300px); max-height: 78vh;
  border-radius: var(--radius); user-select: none; -webkit-user-drag: none;
  opacity: .4; cursor: pointer; transition: opacity .3s;
}
.lb-slide:hover { opacity: .65; }
.lb-slide.active { opacity: 1; cursor: default; box-shadow: var(--sh-3); }
@media (max-width: 720px) {
  .lb-track { gap: var(--s12); }
  .lb-slide { max-width: 84vw; }
}
.lb-close { position: fixed; top: var(--s16); right: var(--s16); z-index: 2; font-family: var(--mono); font-size: 13px; line-height: 20px; background: var(--surface-float); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s8) var(--s12); cursor: pointer; box-shadow: var(--edge), var(--sh-2); }
.lb-nav { position: fixed; z-index: 2; top: 50%; transform: translateY(-50%); font-size: 32px; line-height: 1; width: 48px; height: 64px; background: var(--surface-float); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: opacity .2s; box-shadow: var(--edge), var(--sh-2); }
.lb-nav:disabled { opacity: 0; pointer-events: none; }
.lb-nav:hover, .lb-close:hover { color: var(--action); border-color: var(--action); }
@media (hover: none) { .lb-nav { display: none; } }
.lb-prev { left: var(--s16); } .lb-next { right: var(--s16); }
.lb-count { position: fixed; bottom: var(--s16); left: 0; right: 0; text-align: center; font-family: var(--mono); font-size: 12px; line-height: 20px; color: var(--text-secondary); margin: 0; }

/* ── monospace weight: heavier so small labels don't look thin ── */
.nav a, .tc, .filter, .btn, .spec, .section-head h2 { font-weight: 500; }
.eyebrow, .meta-row, .role, .idx, .gallery-label, .footer, .lb-count, .play-chip { font-weight: 600; }
.idx { color: var(--text-secondary); }

/* ── grid overlay: press G to see the columns and the 8px rhythm ── */
.grid-overlay { position: fixed; inset: 0; z-index: 90; pointer-events: none; display: none; }
.grid-overlay.on { display: block; }
.grid-overlay::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(61, 155, 255, .10) 0 1px, transparent 1px 8px);
}
.grid-overlay .cols { height: 100%; }
.grid-overlay .cols > i { grid-column: auto; background: rgba(61, 155, 255, .07); box-shadow: inset 1px 0 rgba(61, 155, 255, .35), inset -1px 0 rgba(61, 155, 255, .35); }
@media (max-width: 719px) { .grid-overlay .cols > i:nth-child(n+5) { display: none; } }
@media (max-width: 1023px) { .grid-overlay .cols > i:nth-child(n+9) { display: none; } }
.grid-overlay .label {
  position: absolute; left: var(--s16); bottom: var(--s16);
  font-family: var(--mono); font-size: 12px; line-height: 20px; font-weight: 600; color: var(--action);
  background: rgba(9, 11, 16, .85); border: 1px solid var(--action); border-radius: var(--radius); padding: var(--s4) var(--s8);
}

/* ── entrance motion (only added by JS when motion is allowed) ── */
/* scrambled characters waiting to be typed: thin mono in the accent blue */
.glyph { color: var(--label); font-family: var(--mono); font-weight: 200; letter-spacing: 0; line-height: 0; } /* zero line-height: the mono's taller metrics can't stretch the line while it scrambles */

/* typing caret: a solid blue terminal block at the insertion point, steady while typing, blinking when resting */
.caret, .card:hover h3::after, .row:hover .row-title::after {
  display: inline-block; width: 0.55em; height: 0.9em; margin-left: 0.08em;
  vertical-align: -0.08em; background: var(--action);
  box-shadow: 0 0 10px rgba(61, 155, 255, .55); /* phosphor bloom */
}
.caret.blink, .card:hover h3::after, .row:hover .row-title::after { animation: caret-blink 1.06s steps(1) infinite; }
.card:hover h3::after, .row:hover .row-title::after { content: ""; margin-left: 0.12em; }
@keyframes caret-blink { 50% { opacity: 0; } }
/* mono is wider than the heading font; shrink it there so lines wrap the same as the final text */
:is(h1, h3, .featured-info h2, .th-info h2, .contact-line, .about-hi) .glyph { font-size: .82em; }
.anim .card, .anim .about-body > *, .anim .contact-links {
  opacity: 0; transform: translateY(16px);
  transition: opacity .6s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.anim .card.in, .anim .about-body > .in, .anim .contact-links.in { opacity: 1; transform: none; }
/* the featured player fades in */
.anim .featured .player { animation: fade-in .45s ease .5s both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
