/* Public site styles (home, work, 404).
   Scales: space 4 8 12 16 24 32 48 64 96 128 · type 11 13 15 18 24 32 · radius 8 12 999. */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(assets/fonts/geist-var.woff2) format("woff2");
}

:root {
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --r1: 8px; --r2: 12px; --r3: 999px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: var(--s5); --max: 1200px; --section: var(--s10); --control: 40px;

  --bg: #09090a; --raise: #111113; --raise2: #1a1a1d;
  --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .16);
  --text: #f5f5f4; --sub: #a3a3a0; --dim: #8a8a86; --accent: #ff5b37;
  --shadow: 0 16px 48px rgba(0, 0, 0, .5);
  /* names youtube.css expects */
  --border: var(--line2); --background: var(--raise2); --foreground: var(--text); --muted: var(--raise2); --panel: #000;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f1ed; --raise: #faf9f7; --raise2: #ebe8e3;
  --line: rgba(20, 20, 18, .09); --line2: rgba(20, 20, 18, .2);
  --text: #141412; --sub: #5d5a53; --dim: #66635b; --accent: #b83615;
  --shadow: 0 16px 48px rgba(20, 20, 18, .12);
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.motion-paused { scroll-behavior: auto; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/24px var(--font); letter-spacing: -.01em; font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
h1, h2, h3, p, figure, blockquote, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
h1, h2, h3 { font: inherit; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
img, video, canvas, svg { display: block; max-width: 100%; }
svg { width: 16px; height: 16px; flex: none; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: var(--r1); }
[data-theme="light"] .night-only, [data-theme="dark"] .day-only { display: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: var(--s3); left: var(--s3); z-index: 100; padding: var(--s2) var(--s4); border-radius: var(--r1); background: var(--text); color: var(--bg); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.mono, .section-heading, .hero-role, .hero-place, .reel-tag, .project-card-meta, .gallery-home, .watch-feature-label, dt, .search-result small, .search-help, kbd {
  font: 500 11px/16px var(--mono); letter-spacing: .06em; text-transform: uppercase;
}
kbd { color: var(--dim); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: var(--control); padding: 0 var(--s4);
  border: 1px solid var(--line2); border-radius: var(--r3); font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), transform .15s var(--ease);
}
.button:hover { background: var(--raise2); }
.button:active { transform: scale(.97); }
.button-primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.button-primary:hover { background: var(--sub); border-color: var(--sub); }

.frame { position: relative; z-index: 1; padding: 0 var(--gutter); }
main { max-width: var(--max); margin: 0 auto; counter-reset: sec; }

/* ---------- dock ---------- */
.site-header { position: fixed; left: 0; right: 0; bottom: var(--s5); z-index: 50; display: flex; justify-content: center; pointer-events: none; padding: 0 var(--s4); }
.dock {
  position: relative; display: flex; align-items: center; padding: var(--s1); border: 1px solid var(--line2); border-radius: var(--r3);
  background: color-mix(in srgb, var(--raise) 78%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: var(--shadow); pointer-events: auto; font-size: 13px; line-height: 20px; font-weight: 500;
}
.dock-ind { position: absolute; top: var(--s1); left: 0; height: var(--control); border-radius: var(--r3); background: var(--raise2); box-shadow: inset 0 0 0 1px var(--line); opacity: 0; transition: transform .45s var(--ease), width .45s var(--ease), opacity .3s; }
.dock-home, .dock-link, .dock-button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: var(--control); border-radius: var(--r3); color: var(--sub); transition: color .3s var(--ease); }
.dock-home { width: var(--control); color: var(--text); }
.mark { width: auto; height: var(--s3); fill: currentColor; }
.mark circle { fill: var(--accent); }
.dock-link { padding: 0 var(--s4); }
.dock-link:hover, .dock-link.is-active, .dock-link[aria-current], .dock-button:hover { color: var(--text); }
.dock-rule { width: 1px; height: var(--s4); margin: 0 var(--s1); background: var(--line2); }
.dock-button { min-width: var(--control); padding: 0 var(--s3); }
.icon-button { padding: 0; }
#theme-toggle svg { opacity: 0; }
.fx-toggle { position: absolute; width: 26px; height: 26px; pointer-events: none; }
.fx-dissolve { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 200; pointer-events: none; }
.fx-cursor {
  position: fixed; top: 0; left: 0; z-index: 60; margin: var(--s4) 0 0 var(--s4); padding: var(--s1) var(--s3); border-radius: var(--r3);
  background: var(--text); color: var(--bg); font-size: 13px; line-height: 20px; font-weight: 500; white-space: nowrap; pointer-events: none;
  opacity: 0; scale: .6; transform-origin: 0 0; transition: opacity .2s var(--ease), scale .3s var(--ease);
}
.fx-cursor.on { opacity: 1; scale: 1; }

/* ---------- sky and welcome (ascii-sky.js) ---------- */
.sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
@keyframes intro-lift { to { opacity: 0; visibility: hidden; } }
html.intro body::before { content: ""; position: fixed; inset: 0; z-index: 300; background: var(--bg); transition: opacity .8s var(--ease); animation: intro-lift .5s 5s forwards; }
html.intro .sky { z-index: 301; }
html.intro-run body::before { animation: none; }
html.intro-out body::before { opacity: 0; }
html.intro-run:not(.intro-out) .hero > *, html.intro-run:not(.intro-out) .hero-intro > * { animation-play-state: paused; }
.intro-line { position: fixed; left: 0; right: 0; top: 62%; margin: 0; z-index: 302; padding: 0 var(--gutter); text-align: center; font-size: 24px; line-height: 32px; letter-spacing: -.02em; color: var(--text); text-wrap: balance; pointer-events: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }
html.intro-run .intro-line.is-out, html.intro-out .intro-line { opacity: 0; transform: translateY(-8px); }
@keyframes intro-line { from { opacity: 0; transform: translateY(8px); } }
.intro-line { animation: intro-line .6s var(--ease) both; }

/* ---------- hero ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes pulse { 50% { opacity: .3; } }
.hero { min-height: 100svh; display: flex; flex-direction: column; align-items: center; padding: var(--s5) 0 var(--s10); }
.hero > *, .hero-intro > * { animation: rise .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.hero-bar { align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: var(--s6); }
.hero-place { color: var(--sub); margin-left: auto; display: flex; gap: var(--s3); white-space: nowrap; }
.hero-place time { color: var(--dim); font-variant-numeric: tabular-nums; }
.watch-feature { display: inline-flex; align-items: center; height: var(--s6); border: 1px solid var(--line); border-radius: var(--r3); background: var(--raise); }
.watch-feature-link { display: inline-flex; align-items: center; gap: var(--s2); height: 100%; padding: 0 var(--s1) 0 var(--s3); font-size: 13px; line-height: 20px; color: var(--text); white-space: nowrap; }
.watch-feature-label { color: var(--accent); }
.watch-feature-arrow { color: var(--dim); transition: transform .3s var(--ease); }
.watch-feature-link:hover .watch-feature-arrow { transform: translate(2px, -2px); }
.watch-feature-close { width: var(--s6); height: var(--s6); margin-right: calc(var(--s1) * -1); border-radius: var(--r3); color: var(--dim); font-size: 15px; line-height: 1; }
.watch-feature-close:hover { color: var(--text); }

.reel { --i: 1; position: relative; display: block; width: min(100%, 760px, (100svh - 440px) * 16 / 9); min-width: min(100%, 320px); aspect-ratio: 16 / 9; margin-top: var(--s6); }
.reel::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .9;
  --c: var(--line2); --l: 12px;
  background:
    linear-gradient(var(--c) 0 0) 0 0 / var(--l) 1px, linear-gradient(var(--c) 0 0) 0 0 / 1px var(--l),
    linear-gradient(var(--c) 0 0) 100% 0 / var(--l) 1px, linear-gradient(var(--c) 0 0) 100% 0 / 1px var(--l),
    linear-gradient(var(--c) 0 0) 0 100% / var(--l) 1px, linear-gradient(var(--c) 0 0) 0 100% / 1px var(--l),
    linear-gradient(var(--c) 0 0) 100% 100% / var(--l) 1px, linear-gradient(var(--c) 0 0) 100% 100% / 1px var(--l);
  background-repeat: no-repeat;
}
.fx-reel { position: absolute; inset: 0; width: 100%; height: 100%; }
.reel-tag { position: absolute; display: inline-flex; align-items: center; gap: var(--s2); color: var(--sub); font-variant-numeric: tabular-nums; }
.reel-tag-time { top: var(--s3); left: var(--s4); }
.reel-tag-time i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
.reel-tag-title { top: var(--s3); right: var(--s4); }
.reel-tag-open { right: var(--s4); bottom: var(--s5); color: var(--text); opacity: 0; transform: translateY(4px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.reel:hover .reel-tag-open, .reel:focus-visible .reel-tag-open { opacity: 1; transform: none; }
.reel-track { position: absolute; left: var(--s4); right: var(--s4); bottom: 0; height: var(--s4); cursor: ew-resize; }
.reel-track::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line2); }
.reel-track b { position: absolute; bottom: 0; width: 1px; height: var(--s1); background: var(--dim); }
.reel-track i { position: absolute; left: -1px; bottom: 0; width: 2px; height: var(--s2); background: var(--accent); }

.hero-intro { display: flex; flex-direction: column; align-items: center; margin-top: var(--s6); text-align: center; animation: none; }
.hero-intro h1 { --i: 2; display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.hero-name { font-size: 32px; line-height: 40px; font-weight: 500; letter-spacing: -.035em; }
.hero-role { color: var(--sub); letter-spacing: .1em; }
.hero-description { --i: 3; max-width: 44ch; margin-top: var(--s4); font-size: 18px; line-height: 28px; color: var(--sub); text-wrap: balance; }
.hero-actions { --i: 4; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s3); margin-top: var(--s5); }
.hero-note { --i: 5; display: inline-flex; align-items: center; gap: var(--s2); margin-top: var(--s5); font-size: 13px; line-height: 20px; color: var(--sub); transition: color .3s var(--ease); }
.hero-note:hover { color: var(--text); }
.hero-note i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- sections ---------- */
.section { margin-top: var(--section); scroll-margin-top: var(--s7); counter-increment: sec; }
.featured-section { margin-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); padding-bottom: var(--s4); margin-bottom: var(--s6); border-bottom: 1px solid var(--line); }
.section-heading { color: var(--text); }
.section-heading::before { content: counter(sec, decimal-leading-zero); margin-right: var(--s3); color: var(--dim); }
.section-note { display: none; }
.view-all { display: inline-flex; align-items: center; gap: var(--s2); font-size: 13px; line-height: 16px; font-weight: 500; color: var(--sub); transition: color .3s var(--ease); }
.view-all span { transition: transform .3s var(--ease); }
.view-all:hover { color: var(--text); }
.view-all:hover span { transform: translateX(4px); }
.sample-note { font-size: 13px; line-height: 20px; color: var(--sub); }

/* ---------- featured film ---------- */
.featured-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s5); row-gap: var(--s6); align-items: start; }
#hero-project { grid-column: span 8; }
.hero-film-poster, .project-poster { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate; border-radius: var(--r2); background-color: var(--raise); }
.hero-film-poster::after, .project-poster::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; transition: box-shadow .3s var(--ease); }
.hero-film-poster img, .project-thumbnail { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.hero-film-poster:hover img, .project-card:hover .project-thumbnail { transform: scale(1.03); }
.hero-film-poster:hover::after, .project-card:hover .project-poster::after { box-shadow: inset 0 0 0 1px var(--line2); }
/* ASCII lens: a canvas the motion layer places over the cover under the pointer. */
.cover-reveal { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border-radius: inherit; pointer-events: none; }
.cv-wait img { opacity: 0; }
.cover-lens { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border-radius: inherit; pointer-events: none; }
.hero-play, .poster-play {
  position: absolute; left: var(--s3); bottom: var(--s3); z-index: 2; display: grid; place-items: center; width: var(--s6); height: var(--s6); padding-left: 2px;
  border-radius: 50%; background: rgba(9, 9, 10, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; font-size: 9px; line-height: 1;
}
.hero-film-caption { margin-top: var(--s4); font-weight: 500; }
.hero-film-credit { font-size: 13px; line-height: 20px; color: var(--sub); }
.award-eyebrow { grid-column: span 4; }
.award-eyebrow > div { display: flex; flex-direction: column; }
.award-eyebrow strong { padding-bottom: var(--s5); font-size: 24px; line-height: 32px; font-weight: 500; letter-spacing: -.025em; text-wrap: balance; }
.award-eyebrow > div > span, .award-eyebrow > div > a { padding: var(--s3) 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 20px; color: var(--sub); }
.award-eyebrow > div > a { display: flex; justify-content: space-between; gap: var(--s4); color: var(--text); transition: color .3s var(--ease); }
.award-eyebrow > div > a:hover { color: var(--accent); }
.hero-award-link { margin-top: var(--s4); }
.hero-award-link span { font-size: 9px; }

/* ---------- project cards ---------- */
.featured-list, .gallery-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s7) var(--s5); }
#websites-projects .featured-list, .gallery-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project-card { display: grid; gap: var(--s4); transition: opacity .3s var(--ease); }
.featured-list:has(.project-card:hover) .project-card:not(:hover), .gallery-list:has(.project-card:hover) .project-card:not(:hover) { opacity: .45; }
.project-card:focus-visible { outline: 0; }
.project-card:focus-visible .project-poster { outline: 2px solid var(--text); outline-offset: 2px; }
.project-poster-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: var(--s1); padding: var(--s4); opacity: 0; }
.project-poster:not(:has(img)) .project-poster-fallback { opacity: 1; }
.poster-format { font: 500 11px/16px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--sub); }
.poster-title { font-size: 18px; line-height: 28px; font-weight: 500; }
.project-card-content { display: contents; }
.project-card-copy { display: grid; gap: var(--s1); }
.project-card-title { font-weight: 500; }
.project-card-meta { color: var(--dim); }
.project-card-details { display: grid; gap: var(--s1); font-size: 13px; line-height: 20px; color: var(--sub); }
.project-card-description { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 56ch; }
.project-card-role { color: var(--dim); }
.project-card-role span { margin-right: var(--s1); }
.project-card-role span::after { content: " —"; }
.project-card-open { display: none; }

/* ---------- about ---------- */
.about-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s5); row-gap: var(--s6); align-items: start; }
.portrait-frame { grid-column: span 3; position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r2); background: var(--raise); }
.portrait-frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; filter: grayscale(1); transition: filter .6s var(--ease); }
.portrait-frame:hover img { filter: none; }
.about-copy { grid-column: 5 / -1; display: grid; gap: var(--s5); }
.about-copy p { max-width: 60ch; color: var(--sub); }
.about-copy p:first-child { max-width: 30ch; font-size: 24px; line-height: 32px; letter-spacing: -.025em; color: var(--text); text-wrap: pretty; }
.about-copy a { text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 4px; transition: text-decoration-color .3s var(--ease); }
.about-copy a:hover { text-decoration-color: currentColor; }

/* ---------- socials ---------- */
#socials .section-head { margin-bottom: 0; }
.tile { display: grid; grid-template-columns: var(--s4) minmax(0, 1fr) auto; align-items: center; column-gap: var(--s4); height: var(--s8); border-bottom: 1px solid var(--line); color: var(--sub); transition: color .3s var(--ease), padding .3s var(--ease); }
.tile:hover { padding: 0 var(--s3); color: var(--text); }
.tile-text { display: flex; align-items: baseline; gap: var(--s4); min-width: 0; }
.tile-title { font-weight: 500; color: var(--text); }
.tile-caption { font-size: 13px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-arrow { rotate: -45deg; transition: rotate .3s var(--ease); }
.tile:hover .tile-arrow { rotate: 0deg; }

/* ---------- contact ---------- */
.contact-stage { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s5); align-items: center; }
.contact-stage .contact-copy { grid-column: span 6; }
.astronaut { display: none; grid-column: 7 / span 5; position: relative; aspect-ratio: 1 / 1.1; margin: calc(var(--s7) * -1) 0; cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.astronaut.is-live { display: block; }
.astronaut.is-held { cursor: grabbing; }
.astronaut canvas { position: absolute; left: -18%; top: -12%; width: 136%; height: 124%; max-width: none; pointer-events: none; }
.astronaut-hint { position: absolute; left: 50%; bottom: 0; translate: -50% 0; font: 500 11px/16px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); opacity: 0; transition: opacity .3s var(--ease); }
.astronaut:hover .astronaut-hint { opacity: 1; }
.astronaut.is-held .astronaut-hint { opacity: 0; }
.contact-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s6); }
.contact-copy p { max-width: 24em; font-size: 32px; line-height: 40px; font-weight: 500; letter-spacing: -.035em; text-wrap: balance; }
.contact-email-arrow { color: color-mix(in srgb, var(--bg) 60%, transparent); }

/* ---------- footer ---------- */
.site-footer { margin-top: var(--section); border-top: 1px solid var(--line); font-size: 13px; line-height: 20px; color: var(--sub); }
.footer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s5); padding: var(--s6) 0; }
.footer-copy blockquote { max-width: 44ch; }
.footer-copy cite { display: block; margin-top: var(--s1); font-style: normal; color: var(--dim); }
.footer-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2); }
.footer-button { display: inline-flex; align-items: center; gap: var(--s2); height: var(--control); padding: 0 var(--s4); border: 1px solid var(--line); border-radius: var(--r3); font-weight: 500; color: var(--sub); transition: color .3s var(--ease), border-color .3s var(--ease); }
.footer-button:hover { color: var(--text); border-color: var(--line2); }
.footer-credit { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s5) 0 var(--s10); border-top: 1px solid var(--line); }
.legal-links { display: flex; gap: var(--s5); }
.legal-links a, .gallery-footer a { transition: color .3s var(--ease); }
.legal-links a:hover, .gallery-footer a:hover { color: var(--text); }
.ai-widget { position: relative; }
.ai-panel { position: absolute; right: 0; bottom: calc(100% + var(--s2)); z-index: 5; width: min(320px, calc(100vw - var(--s7))); padding: var(--s4); border: 1px solid var(--line2); border-radius: var(--r2); background: var(--raise); box-shadow: var(--shadow); color: var(--text); animation: rise .3s var(--ease); }
.ai-heading { display: flex; justify-content: space-between; gap: var(--s4); }
.ai-heading h2 { font-size: 15px; line-height: 24px; font-weight: 500; }
.ai-heading p { color: var(--sub); }
.panel-close, .close-button { display: grid; place-items: center; flex: none; width: var(--control); height: var(--control); border-radius: var(--r3); color: var(--sub); transition: background-color .3s var(--ease), color .3s var(--ease); }
.panel-close { margin: calc(var(--s2) * -1) calc(var(--s2) * -1) 0 0; }
.panel-close:hover, .close-button:hover { background: var(--raise2); color: var(--text); }
.providers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); margin: var(--s4) 0 var(--s2); }
.provider, .copy-prompt { display: flex; align-items: center; gap: var(--s2); height: var(--control); padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--r1); font-weight: 500; transition: background-color .3s var(--ease), border-color .3s var(--ease); }
.provider:hover, .copy-prompt:hover { background: var(--raise2); border-color: var(--line2); }
.provider-icon { width: var(--s4); height: var(--s4); background: currentColor; -webkit-mask: var(--provider-icon) center / contain no-repeat; mask: var(--provider-icon) center / contain no-repeat; }
.copy-prompt { width: 100%; justify-content: center; }
.prompt-details { margin-top: var(--s3); color: var(--sub); }
.prompt-details summary { cursor: pointer; }
.prompt-details textarea { display: block; width: 100%; height: var(--s10); margin-top: var(--s2); padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r1); background: var(--raise2); font: 400 11px/16px var(--mono); resize: vertical; }

/* ---------- work page ---------- */
.gallery-section { padding-top: var(--s9); }
.gallery-heading { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); }
.gallery-heading > div { display: grid; gap: var(--s2); }
.gallery-home { color: var(--sub); transition: color .3s var(--ease); }
.gallery-home:hover { color: var(--text); }
.gallery-heading h1, .notice h1 { font-size: 32px; line-height: 40px; font-weight: 500; letter-spacing: -.035em; }
#gallery-count { color: var(--dim); }
.gallery-intro { max-width: 44ch; margin-top: var(--s4); font-size: 18px; line-height: 28px; color: var(--sub); text-wrap: balance; }
.work-filters { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s6); padding-bottom: var(--s6); border-bottom: 1px solid var(--line); }
.work-filter { display: inline-flex; align-items: center; gap: var(--s2); height: var(--control); padding: 0 var(--s4); border: 1px solid var(--line); border-radius: var(--r3); font-size: 13px; line-height: 20px; font-weight: 500; color: var(--sub); transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease); }
.work-filter span { font: 500 11px/16px var(--mono); color: var(--dim); }
.work-filter:hover { color: var(--text); border-color: var(--line2); }
.work-filter[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.work-filter[aria-pressed="true"] span { color: inherit; opacity: .6; }
.mobile-work-filter { display: none; }
.gallery-list { margin-top: var(--s6); }
#gallery-note { margin-top: var(--s6); color: var(--sub); }
.work-link { text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 4px; }
.work-link:hover { text-decoration-color: currentColor; }
#gallery-more { display: flex; margin: var(--s7) auto 0; }
.gallery-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s5); margin-top: var(--section); padding: var(--s5) 0 var(--s10); border-top: 1px solid var(--line); font-size: 13px; line-height: 20px; color: var(--sub); }
.noscript-project { display: grid; gap: var(--s4); margin-top: var(--s6); padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r2); }
.noscript-project h2 { font-size: 24px; line-height: 32px; font-weight: 500; }

/* ---------- privacy and credits ---------- */
.notice { max-width: 640px; padding-top: var(--s9); }
.notice h1 { margin-top: var(--s2); }
.notice-meta { margin-top: var(--s2); font: 500 11px/16px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.notice-meta + p { margin-top: var(--s6); }
.notice > p, .notice details p { margin-top: var(--s4); color: var(--sub); }
.notice h2 { margin-top: var(--s7); font-weight: 500; }
.notice h2 + p { margin-top: var(--s2); }
.notice p a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 4px; transition: text-decoration-color .3s var(--ease); }
.notice p a:hover { text-decoration-color: currentColor; }
.notice details { border-bottom: 1px solid var(--line); }
.notice details:first-of-type { margin-top: var(--s7); border-top: 1px solid var(--line); }
.notice summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); height: var(--s8); font-weight: 500; cursor: pointer; list-style: none; }
.notice summary::-webkit-details-marker { display: none; }
.notice summary::after { content: "+"; font: 400 15px/24px var(--mono); color: var(--dim); }
.notice details[open] summary::after { content: "−"; }
.notice details p { margin-top: 0; padding-bottom: var(--s5); }

/* ---------- dialogs ---------- */
dialog {
  padding: 0; border: 1px solid var(--line2); border-radius: var(--r2); background: var(--raise); color: var(--text); box-shadow: var(--shadow);
  max-height: calc(100dvh - var(--s7)); overflow: auto; overscroll-behavior: contain;
  opacity: 1; transform: none; transition: opacity .3s var(--ease), transform .3s var(--ease), overlay .3s allow-discrete, display .3s allow-discrete;
}
dialog:not([open]) { opacity: 0; transform: translateY(8px) scale(.98); }
@starting-style { dialog[open] { opacity: 0; transform: translateY(8px) scale(.98); } }
dialog::backdrop { background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s2) var(--s2) var(--s2) var(--s5); border-bottom: 1px solid var(--line); background: var(--raise); }
#project-kicker { color: var(--sub); }
.project-dialog { width: min(880px, calc(100vw - var(--s6))); }
#project-art { padding: var(--s5) var(--s5) 0; }
.work-media { display: grid; gap: var(--s4); }
.work-media img, .work-media video { width: 100%; max-height: 70vh; object-fit: contain; border-radius: var(--r1); background: #000; }
.youtube-frame { border-radius: var(--r1); background: #000; }
.video-start { height: var(--control); min-height: 0; padding: 0 var(--s4); border: 1px solid var(--text); border-radius: var(--r3); background: var(--text); color: var(--bg); font: 500 15px/24px var(--font); }
.youtube-actions > a { min-height: 0; height: var(--control); padding: 0 var(--s4); border: 1px solid var(--line2); border-radius: var(--r3); font: 500 15px/24px var(--font); color: var(--text); transition: background-color .3s var(--ease); }
.youtube-actions > a:hover { background: var(--raise2); }
.youtube-fallback a { font-size: 13px; line-height: 20px; color: var(--sub); }
.project-body { padding: var(--s5); }
.project-body h2 { font-size: 24px; line-height: 32px; font-weight: 500; letter-spacing: -.025em; }
#project-description, .work-prose { white-space: pre-wrap; overflow-wrap: anywhere; }
#project-description { max-width: 68ch; margin-top: var(--s3); color: var(--sub); }
.project-body dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--line); }
dt { margin-bottom: var(--s1); color: var(--dim); }
.project-body dd { font-size: 13px; line-height: 20px; }
#project-extras { font-size: 13px; line-height: 20px; color: var(--sub); }
#project-extras > * { margin-top: var(--s5); }
#project-extras h3 { margin-bottom: calc(var(--s4) * -1); font: 500 11px/16px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
#project-extras a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 4px; }
#project-extras a:hover { text-decoration-color: currentColor; }
.project-downloads summary { cursor: pointer; color: var(--text); }
.project-downloads li { padding-top: var(--s2); }
.project-downloads small { display: block; color: var(--dim); overflow-wrap: anywhere; }
.supporting-images > div { display: grid; gap: var(--s4); margin-top: var(--s4); }
.supporting-images img { width: 100%; height: auto; border-radius: var(--r1); }
.project-browse { display: flex; justify-content: space-between; gap: var(--s4); margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--line); }
.project-browse button { max-width: 48%; height: var(--control); padding: 0 var(--s3); border-radius: var(--r1); font-size: 13px; line-height: 20px; font-weight: 500; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background-color .3s var(--ease), color .3s var(--ease); }
.project-browse button:not(:disabled):hover { background: var(--raise2); color: var(--text); }
.project-browse button:disabled { opacity: .4; cursor: default; }

.search-dialog { width: min(560px, calc(100vw - var(--s6))); margin-top: min(20vh, 160px); }
.search-head { display: flex; align-items: center; gap: var(--s3); height: 56px; padding: 0 var(--s2) 0 var(--s4); border-bottom: 1px solid var(--line); color: var(--dim); }
.search-head input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); }
.search-head input::placeholder { color: var(--dim); }
.search-head input::-webkit-search-cancel-button { display: none; }
.search-head .close-button { width: auto; padding: 0 var(--s2); }
.search-head kbd { padding: var(--s1) var(--s2); border: 1px solid var(--line); border-radius: var(--s1); }
.search-results { max-height: 360px; padding: var(--s2); overflow: auto; }
.search-result { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); width: 100%; height: var(--control); padding: 0 var(--s3); border-radius: var(--r1); font-size: 13px; line-height: 20px; color: var(--sub); text-align: left; }
.search-result:hover, .search-result.active { background: var(--raise2); color: var(--text); }
.search-result small { color: var(--dim); }
.empty-search { padding: var(--s4) var(--s3); font-size: 13px; line-height: 20px; color: var(--sub); }
.search-help { display: flex; justify-content: space-between; padding: var(--s3) var(--s4); border-top: 1px solid var(--line); color: var(--dim); }

.contact-dialog { width: min(400px, calc(100vw - var(--s6))); }
.contact-dialog h2 { font-size: 15px; line-height: 24px; font-weight: 500; }
.contact-dialog .close-button { font-size: 18px; line-height: 1; }
.contact-dialog-body { padding: var(--s5); }
.contact-dialog label { display: block; margin-bottom: var(--s2); font: 500 11px/16px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.contact-dialog input { display: block; width: 100%; height: var(--s7); padding: 0 var(--s4); border: 1px solid var(--line); border-radius: var(--r1); background: var(--raise2); font: 400 13px/20px var(--mono); letter-spacing: 0; }
.contact-options { display: grid; gap: var(--s2); margin-top: var(--s4); }
.contact-options a, .contact-options button { display: flex; align-items: center; justify-content: center; gap: var(--s2); height: var(--s7); border: 1px solid var(--line2); border-radius: var(--r1); font-weight: 500; transition: background-color .3s var(--ease), border-color .3s var(--ease); }
.contact-options a:hover, .contact-options button:hover { background: var(--raise2); }
.contact-options .contact-gmail { background: var(--text); border-color: var(--text); color: var(--bg); }
.contact-options .contact-gmail:hover { background: var(--sub); border-color: var(--sub); }
.contact-status { min-height: 20px; margin-top: var(--s4); font-size: 13px; line-height: 20px; color: var(--sub); }

/* ---------- 404 ---------- */
.not-found { display: flex; flex-direction: column; justify-content: center; gap: var(--s4); max-width: 560px; min-height: 100svh; margin: 0 auto; padding: var(--s5); }
.not-found-brand { font-weight: 500; }
.not-found .mono { color: var(--dim); }
.not-found h1 { font-size: 32px; line-height: 40px; font-weight: 500; letter-spacing: -.035em; }
.not-found p { color: var(--sub); }
.not-found > div { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s5); margin-top: var(--s4); }

/* ---------- scroll reveal (class added by fx.js) ---------- */
.rv { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--rv-d, 0ms); }
.rv.rv-in { opacity: 1; transform: none; }

/* ---------- ASCII banners (banner.js): the name and section titles, one mono character per point ---------- */
.banner { position: relative; display: block; width: max-content; font: 500 8px/.66 var(--mono); letter-spacing: -.05em; text-transform: none; white-space: pre; color: var(--text); user-select: none; }
.banner::before { content: attr(data-ink); display: block; text-shadow: 0 0 12px rgba(150, 180, 255, .4), -1px 0 rgba(111, 155, 255, .32), 1px 0 rgba(255, 106, 69, .32); }
[data-theme="light"] .banner::before, [data-theme="light"] .hero-name .banner::before { text-shadow: -1px 0 rgba(60, 100, 220, .18), 1px 0 rgba(220, 80, 40, .18); }
.banner::after { content: attr(data-edge); position: absolute; inset: 0; color: var(--accent); }
.hero-name .banner { font-size: 11px; }
.hero-name .banner::before { text-shadow: 0 0 12px rgba(150, 180, 255, .4), -1px 0 rgba(111, 155, 255, .55), 1px 0 rgba(255, 106, 69, .55); }
[data-theme="light"] .banner { color: #15182b; }
.section-heading.has-banner { display: flex; align-items: flex-start; }
.section-head:has(.has-banner) { padding-bottom: var(--s5); }
.section-heading.has-banner::before { margin-right: var(--s4); }
.hero-name.has-banner { display: block; padding-bottom: var(--s2); }
#gallery-title.has-banner { padding: var(--s3) 0 var(--s2); }

/* ---------- sign-off gap (ascii-sky.js writes in it) ---------- */
.outro { display: none; }
.sky-on .outro { display: block; height: calc(var(--s10) * 2); margin-top: var(--s10); }
.sky-on .outro + .site-footer, .sky-on .outro + .gallery-footer { margin-top: var(--s9); }

/* ---------- scroll-linked hero exit ---------- */
@keyframes hero-leave { to { opacity: .15; transform: translateY(-32px); } }
@supports (animation-timeline: scroll()) {
  body:not(.motion-paused) .hero-intro { animation: hero-leave linear both; animation-timeline: scroll(root); animation-range: 8vh 70vh; }
}

/* ---------- responsive ---------- */
@media (pointer: coarse) { :root { --control: 44px; } }
@media (max-width: 1023px) {
  :root { --section: var(--s9); }
  #hero-project, .award-eyebrow, .contact-stage .contact-copy { grid-column: 1 / -1; }
  .astronaut { grid-column: 1 / -1; width: min(100%, 420px); margin: var(--s5) auto 0; }
  .astronaut canvas { left: calc(var(--gutter) * -1); width: calc(100% + var(--gutter) * 2); }
  .astronaut-hint { opacity: 1; }
  #websites-projects .featured-list, .gallery-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portrait-frame { grid-column: span 4; }
  .about-copy { grid-column: 5 / -1; }
}
@media (max-width: 639px) {
  :root { --gutter: var(--s4); --section: var(--s8); }
  .hero { min-height: 0; padding-bottom: var(--s7); }
  .hero-name .banner { font-size: 8px; }
  .section-head { flex-wrap: wrap; }
  .section-heading.has-banner { flex: 1 0 100%; }
  .hero-name, .gallery-heading h1, .notice h1 { font-size: 24px; line-height: 32px; letter-spacing: -.025em; }
  .hero-description, .gallery-intro { font-size: 15px; line-height: 24px; }
  .reel-tag-title, .hero-place time { display: none; }
  .reel-tag-open { opacity: 1; transform: none; }
  .dock-link { padding: 0 var(--s3); }
  .dock kbd { display: none; }
  .featured-list, #websites-projects .featured-list, .gallery-list { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .portrait-frame { grid-column: span 6; }
  .about-copy { grid-column: 1 / -1; }
  .about-copy p:first-child { font-size: 18px; line-height: 28px; letter-spacing: -.015em; }
  .contact-copy p { font-size: 24px; line-height: 32px; letter-spacing: -.025em; }
  .tile-caption { display: none; }
  .footer-top { flex-direction: column; }
  .sky-on .outro { height: calc(var(--s9) * 2); }
  .footer-tools { justify-content: flex-start; }
  .work-filters { display: none; }
  .mobile-work-filter { display: grid; gap: var(--s2); margin-top: var(--s5); padding-bottom: var(--s5); border-bottom: 1px solid var(--line); font: 500 11px/16px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
  .mobile-work-filter select { height: var(--s7); padding: 0 var(--s4); border: 1px solid var(--line2); border-radius: var(--r1); background: var(--raise); font: 400 15px/24px var(--font); letter-spacing: -.01em; text-transform: none; color: var(--text); }
  .project-body dl { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .rv { opacity: 1; transform: none; }
  .hero-intro { animation: none !important; }
}
