/* williamharris.xyz design system
 *
 * Direction (William's style guide, 2026-12-03): editorial gallery meets modern
 * precision. Classy, understated, confident, with subtle kinetic polish.
 * Asymmetric editorial grid, generous whitespace, hairline dividers.
 *
 * Type
 *   Erode (Fontshare, self-hosted)    display serif: statements, headings, project titles
 *   Tanker (Fontshare, self-hosted)   the name and the monogram only
 *   Plus Jakarta Sans (Google)        body and UI
 *   JetBrains Mono (Google)           metadata: dates, roles, stacks, tags
 *
 * Themes: Warm Obsidian (default dark) and Gallery Paper (light), switched by
 * [data-theme] on <html>. All color comes from the tokens below.
 */

@font-face { font-family: "Erode"; src: url("/fonts/erode/Erode-Regular.woff2") format("woff2"), url("/fonts/erode/Erode-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Tanker"; src: url("/fonts/tanker/Tanker-Regular.woff2") format("woff2"), url("/fonts/tanker/Tanker-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  /* Warm Obsidian & Alabaster (default) */
  --bg-primary: #0e0e10;
  --bg-surface: #16161a;
  --border-subtle: rgba(255, 255, 255, .08);
  --text-primary: #f4f1ea;
  --text-secondary: #9a9893;
  --accent-primary: #d4a373;
  --accent-secondary: #7f9c96;
  --noise-opacity: .03;
  color-scheme: dark;

  --f-display: "Erode", "Instrument Serif", Georgia, serif;
  --f-name: "Tanker", "Erode", Georgia, serif;
  --f-body: "Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --radius: 4px;

  --t-meta: .75rem;
  --t-sm: .875rem;
  --t-body: 1rem;
  --t-lead: clamp(1.1rem, 1rem + .35vw, 1.25rem);
  --t-h3: clamp(1.5rem, 1.15rem + 1.1vw, 2.1rem);
  --t-h2: clamp(2.2rem, 1.3rem + 3vw, 4rem);
  --t-hero: clamp(2.6rem, 1.2rem + 4.6vw, 6rem);

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1360px;
  --measure: 65ch;
  --pad-section: clamp(64px, 8vw, 100px);
  --s1: .5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2.5rem; --s5: 4rem;
}

/* Gallery Paper */
:root[data-theme="light"] {
  --bg-primary: #f7f5f0;
  --bg-surface: #efece6;
  --border-subtle: rgba(24, 24, 27, .1);
  --text-primary: #18181b;
  --text-secondary: #5c5b57;
  --accent-primary: #9e6240;
  --accent-secondary: #56736d;
  --noise-opacity: .045;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg-primary); color: var(--text-primary);
  font: 400 var(--t-body)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
/* film grain: fixed SVG fractal noise over everything */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, video, iframe { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: var(--border-subtle); transition: color .3s var(--ease), text-decoration-color .3s var(--ease); }
a:hover { color: var(--accent-primary); text-decoration-color: currentColor; }
:focus-visible { outline: 1px solid var(--accent-primary); outline-offset: 4px; border-radius: 2px; }
::selection { background: var(--accent-primary); color: var(--bg-primary); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: var(--s2); z-index: 120; background: var(--text-primary); color: var(--bg-primary); padding: .5em 1em; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- type roles ---------- */
.serif, .poster { font-family: var(--f-display); font-weight: 400; letter-spacing: -.03em; line-height: 1; text-transform: none; }
.h2 { font-size: var(--t-h2); }
.h3 { font-family: var(--f-display); font-weight: 400; font-size: var(--t-h3); letter-spacing: -.02em; line-height: 1.1; }
.lead { font-size: var(--t-lead); line-height: 1.55; max-width: 48ch; color: var(--text-primary); }
.dim { color: var(--text-secondary); }
.small { font-size: var(--t-sm); }
.meta, .tag, .crumbs, .facts dt, .when, .role, .presents {
  font-family: var(--f-mono); font-size: var(--t-meta); font-weight: 400;
  text-transform: uppercase; letter-spacing: .08em; line-height: 1.5;
}
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1em; }

/* ---------- entrance: staggered fade-up on first paint ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 60ms); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- navigation ---------- */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg-primary) 72%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-subtle); }
.site-head .wrap { display: flex; align-items: center; gap: var(--s3); min-height: 64px; }
.site-head .mark { font-family: var(--f-name); font-size: 1.35rem; letter-spacing: .01em; text-decoration: none; white-space: nowrap; line-height: 1; }
.site-head .mark:hover { color: var(--text-primary); }
.status { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); white-space: nowrap; }
.status { line-height: 1; --live: #39e27d; }
:root[data-theme="light"] .status { --live: #17b45a; }
.status::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.site-head nav { margin-left: auto; }
.site-head nav ul { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); font-size: var(--t-sm); }
.site-head nav a { position: relative; display: inline-block; padding-block: .35em; text-decoration: none; color: var(--text-secondary); }
/* Nav underline: draws in from the left on hover, exits to the right; stays drawn on the current page or section */
.site-head nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent-primary); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.site-head nav a:hover::after, .site-head nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.site-head nav a:hover, .site-head nav a[aria-current] { color: var(--text-primary); }
.site-head nav a[aria-current]::after { transform: scaleX(1); height: 2px; }
@media (prefers-reduced-motion: reduce) { .site-head nav a::after { transition: none; } }
.theme-toggle { all: unset; cursor: pointer; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--border-subtle); border-radius: 50%; color: var(--text-secondary); transition: color .3s var(--ease), border-color .3s var(--ease); }
.theme-toggle:hover { color: var(--text-primary); border-color: var(--text-secondary); }
.theme-toggle:focus-visible { outline: 1px solid var(--accent-primary); outline-offset: 3px; }
.theme-toggle svg { width: 15px; height: 15px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
/* Menu button: phones only. Two hairlines that cross into an X when open. */
.menu-btn { display: none; }
/* "Let's Collaborate" drops first so the nav fits on one line down to the phone layout */
@media (max-width: 860px) { .site-head .status { display: none; } }
@media (max-width: 760px) {
  .site-head nav { display: flex; }
  .menu-btn { all: unset; cursor: pointer; position: relative; width: 34px; height: 34px; display: block; border: 1px solid var(--border-subtle); border-radius: 50%; color: var(--text-primary); transition: border-color .3s var(--ease); }
  .menu-btn:hover { border-color: var(--text-secondary); }
  .menu-btn:focus-visible { outline: 1px solid var(--accent-primary); outline-offset: 3px; }
  .menu-btn span { position: absolute; left: 10px; right: 10px; top: 50%; height: 1px; background: currentColor; transition: transform .45s var(--ease); }
  .menu-btn span:first-child { transform: translateY(-3px); }
  .menu-btn span:last-child { transform: translateY(3px); }
  .menu-btn[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }

  /* The link list drops down under the header as a full-width panel. */
  .site-head nav ul { position: absolute; top: 100%; left: 0; right: 0; display: block; padding: var(--s1) var(--gutter) var(--s4); background: var(--bg-primary); border-bottom: 1px solid var(--border-subtle); visibility: hidden; transition: visibility 0s .45s; }
  .site-head.menu-open nav ul { visibility: visible; transition-delay: 0s; }
  .site-head nav li { border-bottom: 1px solid var(--border-subtle); opacity: 0; transform: translateY(8px); transition: opacity .35s var(--ease), transform .45s var(--ease); }
  .site-head.menu-open nav li { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 40ms); }
  .site-head nav li:nth-child(2) { --i: 1; }
  .site-head nav li:nth-child(3) { --i: 2; }
  .site-head nav li:nth-child(4) { --i: 3; }
  .site-head nav li:nth-child(5) { --i: 4; }
  .site-head nav li a { display: block; padding-block: .9rem; font-family: var(--f-display); font-size: 1.75rem; letter-spacing: -.02em; line-height: 1.1; color: var(--text-primary); }
  .site-head nav li a::after { display: none; }
  .site-head nav li a[aria-current] { color: var(--accent-primary); }
  /* Theme toggle stays in the bar, left of the menu button, menu open or not. */
  .site-head nav li:last-child { position: absolute; top: calc(-64px + 15px); right: calc(var(--gutter) + 34px + .6rem); border: 0; opacity: 1; transform: none; visibility: visible; }
}

/* ---------- homepage hero ---------- */
.hero { padding-block: clamp(40px, 5vh, 72px) clamp(80px, 10vw, 120px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s4) clamp(2rem, 5vw, 5rem); align-items: end; }
.hero .name { font-family: var(--f-name); font-weight: 400; font-size: clamp(3.2rem, min(1rem + 6.5vw, 14vh), 7.5rem); line-height: .9; letter-spacing: -.01em; }
.hero .presents { color: var(--accent-primary); margin-bottom: var(--s3); }
.hero .statement { font-family: var(--f-display); font-size: clamp(1.4rem, min(.8rem + 1.7vw, 4.4vh), 2.4rem); line-height: 1.14; letter-spacing: -.03em; margin-top: var(--s3); max-width: 28ch; }
.hero .statement .dim { color: var(--text-secondary); }
.hero aside { display: grid; gap: var(--s3); align-content: end; }
.hero aside img { width: 100%; justify-self: end; }
.hero aside p { color: var(--text-secondary); max-width: 34ch; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero aside img { justify-self: start; }
}

/* ---------- sections ---------- */
.section { padding-block: var(--pad-section); border-top: 1px solid var(--border-subtle); }
.section-head { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s2) clamp(2rem, 5vw, 5rem); align-items: end; margin-bottom: var(--s5); }
.section-head .meta { color: var(--text-secondary); }
.section-head .lead { color: var(--text-secondary); }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

/* ---------- project index: rows (inline thumbnails on phones) ---------- */
.index { border-top: 1px solid var(--border-subtle); position: relative; }
.index li { border-bottom: 1px solid var(--border-subtle); }
.index a {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 5fr) minmax(0, 2fr); gap: var(--s1) var(--s4);
  align-items: center; padding-block: clamp(1.25rem, 2.4vw, 2rem); text-decoration: none;
  transition: padding .5s var(--ease), color .4s var(--ease);
}
.index .t { font-family: var(--f-display); font-size: clamp(2rem, 1.2rem + 2.8vw, 3.75rem); line-height: 1; letter-spacing: -.03em; transition: color .4s var(--ease); }
.index .d { color: var(--text-secondary); max-width: 46ch; }
.index .y { text-align: right; color: var(--text-secondary); }
.index a:hover { padding-left: 1rem; color: var(--text-primary); }
.index a:hover .t { color: var(--accent-primary); }
.index .thumb { display: none; }
@media (hover: none), (max-width: 860px) {
  .index a { grid-template-columns: 1fr; }
  .index .y { text-align: left; order: -1; }
  /* text-only rows on phones, same as desktop (no inline screenshots) */
  .index a { gap: .35rem; padding-block: 1.25rem; }
  .index .t { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.4rem); }
  .index a:hover { padding-left: 0; }
}

/* ---------- project page ---------- */
.case-hero { padding-block: clamp(64px, 9vw, 120px) 0; }
.case-hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s4) clamp(2rem, 5vw, 5rem); align-items: end; }
.case-hero .crumbs { grid-column: 1 / -1; color: var(--text-secondary); }
.case-hero .crumbs a { text-decoration: none; }
.case-hero h1 { font-family: var(--f-display); font-weight: 400; font-size: var(--t-hero); letter-spacing: -.03em; line-height: .95; text-transform: none; }
.case-hero .lead { color: var(--text-secondary); }
.facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--s2) var(--s3); border-top: 1px solid var(--border-subtle); padding-top: var(--s3); margin-top: var(--s2); }
.facts dt { color: var(--text-secondary); margin-bottom: .25rem; }
.facts dd { font-size: var(--t-sm); }
@media (max-width: 860px) { .case-hero .wrap { grid-template-columns: 1fr; } }
/* Primary CTA in a case hero: a solid button out to the live project */
.case-hero .visit { grid-column: 2; }
.visit .btn { display: inline-flex; align-items: center; gap: .6em; text-decoration: none; }
.visit .btn:hover { color: var(--bg-primary); }
.visit .btn svg { width: 1.1em; height: 1.1em; transition: transform .3s var(--ease); }
.visit .btn:hover svg { transform: translate(2px, -2px); }
@media (max-width: 860px) { .case-hero .visit { grid-column: auto; } }

.hero-media { margin-top: var(--s5); }
.case-hero .wrap.hero-media { display: block; }
.hero-media img, .hero-media video { width: 100%; max-height: 82vh; object-fit: cover; border-radius: var(--radius); }

/* "What I owned" */
.numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: var(--s4); padding-block: var(--pad-section) 0; }
.numbers li { border-top: 1px solid var(--border-subtle); padding-top: var(--s3); }
.numbers .n { display: block; font-family: var(--f-display); font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.75rem); letter-spacing: -.03em; line-height: 1.05; color: var(--accent-primary); }
.numbers p { margin-top: .6rem; color: var(--text-secondary); max-width: 34ch; }

/* chapters: text beside media, asymmetric, alternating */
.chapter { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s4) clamp(2rem, 6vw, 6rem); align-items: start; padding-block: var(--pad-section) 0; }
.chapter.flip { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.chapter.flip > .copy { order: 2; }
.chapter .copy { display: grid; gap: var(--s2); align-content: start; position: sticky; top: 96px; }
.chapter .copy h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 1.3rem + 2.4vw, 3.4rem); letter-spacing: -.03em; line-height: 1.02; text-transform: none; }
.chapter .copy p { color: var(--text-secondary); max-width: var(--measure); }
.chapter .copy .tag-row { margin-top: var(--s1); }
.chapter .media { display: grid; gap: clamp(10px, 1.2vw, 16px); }
.chapter .media.two { grid-template-columns: 1fr 1fr; align-items: start; }
.chapter .media.three { grid-template-columns: repeat(3, 1fr); align-items: start; }
.chapter.full { grid-template-columns: 1fr; }
.chapter.full .copy { position: static; max-width: 60rem; }
.media figure { display: grid; gap: .6rem; }
.media figcaption { font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .06em; text-transform: uppercase; color: var(--text-secondary); }
.media img, .media video { width: 100%; border-radius: var(--radius); background: var(--bg-surface); }
.shot { border: 1px solid var(--border-subtle); }
.phone { max-width: 360px; justify-self: center; }
@media (max-width: 860px) {
  .chapter, .chapter.flip { grid-template-columns: 1fr; }
  .chapter.flip > .copy { order: 0; }
  .chapter .copy { position: static; }
  .chapter .media.three { grid-template-columns: 1fr 1fr; }
}

.tag-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { border: 1px solid var(--border-subtle); border-radius: 2px; padding: .3em .7em; color: var(--accent-secondary); }

.pending { display: grid; place-items: center; min-height: 16rem; border: 1px dashed var(--border-subtle); border-radius: var(--radius); color: var(--text-secondary); font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .08em; text-transform: uppercase; text-align: center; padding: var(--s3); }

.embed { position: relative; width: 100%; aspect-ratio: 16 / 11; border: 1px solid var(--border-subtle); border-radius: var(--radius); overflow: hidden; background: var(--bg-surface); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* next project */
.next { display: grid; gap: var(--s1); text-decoration: none; padding-block: var(--pad-section); border-top: 1px solid var(--border-subtle); margin-top: var(--pad-section); }
.next .dim { font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .08em; text-transform: uppercase; }
.next .poster { font-size: clamp(2.6rem, 1.2rem + 6vw, 7rem); transition: color .4s var(--ease), transform .6s var(--ease); }
.next:hover .poster { color: var(--accent-primary); transform: translateX(.6rem); }

/* ---------- resume ---------- */
.timeline { border-top: 1px solid var(--border-subtle); }
.timeline li { display: grid; grid-template-columns: 10rem minmax(0, 1fr) minmax(0, 1.6fr); gap: .25rem var(--s4); padding-block: var(--s3); border-bottom: 1px solid var(--border-subtle); align-items: baseline; }
.timeline .when { color: var(--text-secondary); }
.timeline .who { font-family: var(--f-display); font-size: 1.5rem; letter-spacing: -.02em; line-height: 1.15; }
.timeline .who a { text-decoration: none; }
.timeline .what { color: var(--text-secondary); }
@media (max-width: 760px) { .timeline li { grid-template-columns: 1fr; } }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--s4); margin-top: var(--s5); }
.cols h3 { font-family: var(--f-mono); font-size: var(--t-meta); font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-primary); margin-bottom: var(--s2); }
.cols p, .cols li { color: var(--text-secondary); }
.cols li + li { margin-top: .35em; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s5) clamp(2rem, 6vw, 6rem); }
.contact .h2 { font-size: clamp(2.6rem, 1.4rem + 4.4vw, 5.5rem); }
.links { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); }
.links a { font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--border-subtle); padding-bottom: .2em; }
.form { display: grid; gap: var(--s3); }
.field { display: grid; gap: .5rem; }
.field label { font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.field input, .field textarea { font: inherit; color: var(--text-primary); background: transparent; border: 0; border-bottom: 1px solid var(--border-subtle); border-radius: 0; padding: .6rem 0; transition: border-color .3s var(--ease); }
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent-primary); }
.btn { justify-self: start; font: 500 var(--t-sm)/1 var(--f-body); letter-spacing: .02em; background: var(--text-primary); color: var(--bg-primary); border: 0; border-radius: var(--radius); padding: 1rem 1.6rem; cursor: pointer; transition: background-color .3s var(--ease), transform .3s var(--ease); }
.btn:hover { background: var(--accent-primary); transform: translateY(-1px); }
.form-status { min-height: 1.5em; color: var(--text-secondary); }
.hp { position: absolute; left: -9999px; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

.site-foot { border-top: 1px solid var(--border-subtle); padding-block: var(--s4); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.foot-loc { display: inline-flex; flex-wrap: wrap; align-items: baseline; column-gap: .55em; }
.foot-place { display: inline-flex; align-items: baseline; gap: .45em; white-space: nowrap; }
.foot-place .ico { width: 1.65em; height: 1.55em; }

/* aliases for page-level styles written against the earlier tokens */
:root, :root[data-theme="light"] { --smoke: var(--text-secondary); --stage: var(--bg-surface); --line: var(--border-subtle); --white: var(--text-primary); }

/* small phones: header fits on one line */
@media (max-width: 480px) {
  .site-head .wrap { gap: .75rem; }
  .site-head .mark { font-size: 1.1rem; }
}

/* Turnstile check sits in the form flow */
.cf-turnstile { min-height: 65px; }
.btn:disabled { opacity: .5; cursor: wait; }

/* "during the day" / "After dark" in the hero switch the theme */
.mode-word {
  all: unset; cursor: pointer; color: inherit;
  text-decoration: underline; text-decoration-style: dotted; text-decoration-thickness: 1px;
  text-underline-offset: .18em; text-decoration-color: var(--accent-primary);
  transition: color .3s var(--ease);
}
.mode-word:hover, .mode-word[aria-pressed="true"] { color: var(--accent-primary); text-decoration-style: solid; }
.mode-word:focus-visible { outline: 1px solid var(--accent-primary); outline-offset: 3px; border-radius: 2px; }
/* sun and moon after each phrase, the same glyphs as the header theme toggle */
.mode-word .mw-ico { display: inline-block; width: .62em; height: .62em; margin-left: .22em; vertical-align: .02em; }

/* footer: links to LinkedIn and Instagram */
.foot-links { display: flex; flex-wrap: wrap; gap: var(--s3); }
.foot-links a { text-decoration: none; color: var(--text-secondary); }
.foot-links a:hover { color: var(--accent-primary); }

/* icons on social links */
.links a, .foot-links a { display: inline-flex; align-items: center; gap: .5em; }
.ico { width: 1.15em; height: 1.15em; flex: none; }
.ico-img { object-fit: contain; }
.links .ico { width: 1.35em; height: 1.35em; }

/* ---------- resume timeline: time runs UP ----------
 * 2010 at the bottom, Now near the top, and a dashed spine continuing up to
 * "Next" (the contact form). Each role is a span on the spine, positioned by
 * bottom/height in % of the 2010–2028 axis (set inline). Main career on the
 * right lane; side ventures (Paymency, CATEGORY) on the left. Cards sit at the
 * start of each span and the bar rises from there. Phones: a simple list,
 * newest on top, with the same spine. */
.vt { --yr: 76px; position: relative; display: grid; justify-items: center; }
.vt-canvas { position: relative; width: 100%; height: calc(var(--years) * var(--yr)); }
.vt-spine { position: absolute; left: 50%; top: 0; bottom: 0; width: 0; }
.vt-spine::before, .vt-spine::after { content: ""; position: absolute; left: -1px; width: 2px; }
.vt-spine::before { bottom: 0; height: var(--now); background: var(--border-subtle); }
.vt-spine::after { top: 0; bottom: var(--now); border-left: 2px dashed color-mix(in srgb, var(--accent-primary) 60%, transparent); background: none; width: 0; }
.vt-ticks { position: absolute; inset: 0; pointer-events: none; }
.vt-tick { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid color-mix(in srgb, var(--border-subtle) 60%, transparent); }
.vt-tick span { position: absolute; left: 0; bottom: .3rem; font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .06em; color: var(--text-secondary); }
.vt-tick.now { border-top: 1px dashed color-mix(in srgb, var(--accent-primary) 55%, transparent); }
.vt-tick.now span { color: var(--accent-primary); text-transform: uppercase; letter-spacing: .08em; }
.vt-items { list-style: none; position: absolute; inset: 0; }
.vt-item { position: absolute; width: 50%; }
.vt-item.lane-r { left: 50%; padding-left: 2rem; }
.vt-item.lane-l { right: 50%; padding-right: 2rem; text-align: right; }
.vt-bar { position: absolute; bottom: 0; top: 0; width: 6px; border-radius: 999px; background: color-mix(in srgb, var(--accent-primary) 55%, transparent); transition: background-color .3s var(--ease); }
.lane-r .vt-bar { left: -3px; }
.lane-l .vt-bar { right: 6px; }
.vt-item.live .vt-bar { background: linear-gradient(0deg, color-mix(in srgb, var(--accent-primary) 55%, transparent), var(--accent-primary)); }
.vt-bar::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--bg-primary); border: 2px solid var(--accent-primary); }
.vt-item:hover .vt-bar { background: var(--accent-primary); }
.vt-card { position: absolute; bottom: -.4rem; display: grid; gap: .15rem; max-width: 26rem; }
.lane-r .vt-card { left: 2rem; right: 0; }
.lane-l .vt-card { right: 2rem; left: auto; justify-items: end; }
.vt-card .when { font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-primary); }
.vt-card .who { font-family: var(--f-display); font-size: 1.4rem; letter-spacing: -.02em; line-height: 1.1; }
.vt-card .who a { text-decoration: none; }
.vt-card .who a:hover { color: var(--accent-primary); }
.vt-card .what { color: var(--text-secondary); font-size: var(--t-sm); line-height: 1.45; }
.vt-next { display: grid; justify-items: center; gap: .2rem; margin-bottom: .75rem; text-decoration: none; text-align: center; }
.vt-next .meta { color: var(--accent-primary); }
.vt-next-t { font-family: var(--f-display); font-size: 1.6rem; letter-spacing: -.02em; transition: color .3s var(--ease); }
.vt-next:hover .vt-next-t { color: var(--accent-primary); }
@media (max-width: 760px) {
  .vt { justify-items: start; }
  .vt-next { justify-items: start; text-align: left; padding-left: 2rem; position: relative; }
  .vt-canvas { height: auto; }
  .vt-ticks { display: none; }
  .vt-spine { left: 6px; }
  .vt-spine::before { height: 100%; }
  .vt-spine::after { display: none; }
  .vt-items { position: static; display: flex; flex-direction: column-reverse; gap: 1.75rem; }
  .vt-item, .vt-item.lane-r, .vt-item.lane-l { position: relative; inset: auto; width: auto; height: auto !important; bottom: auto !important; left: auto; right: auto; padding: 0 0 0 2rem; text-align: left; }
  .vt-bar, .lane-l .vt-bar, .lane-r .vt-bar { left: 3px; right: auto; top: .3rem; bottom: auto; height: 12px; width: 0; background: none !important; }
  .vt-bar::after { bottom: auto; top: 0; }
  .vt-card, .lane-r .vt-card, .lane-l .vt-card { position: static; justify-items: start; max-width: none; }
}

/* ---------- photo carousel (CATEGORY "The night") ----------
 * A horizontal scroll-snap strip: swipe, trackpad, keyboard (the track is
 * focusable) or the prev/next buttons. Photos keep their own aspect ratio at
 * a fixed height. */
.cz { position: relative; }
.cz-track {
  list-style: none; display: flex; gap: clamp(8px, 1vw, 14px); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: .25rem;
  margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
}
.cz-track::-webkit-scrollbar { display: none; }
.cz-track:focus-visible { outline: 1px solid var(--accent-primary); outline-offset: 4px; }
.cz-slide { position: relative; flex: none; scroll-snap-align: start; }
.cz-slide img { height: clamp(340px, 62vh, 620px); width: auto; max-width: none; border-radius: var(--radius); background: var(--bg-surface); }
.cz-cap { position: absolute; left: .75rem; bottom: .75rem; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: #f4f1ea; background: rgb(14 14 16 / .6); backdrop-filter: blur(6px); padding: .3em .6em; border-radius: 2px; }
.cz-nav { display: flex; justify-content: flex-end; gap: .5rem; margin-top: var(--s2); }
.cz-btn { all: unset; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--border-subtle); border-radius: 50%; color: var(--text-secondary); transition: color .3s var(--ease), border-color .3s var(--ease); }
.cz-btn:hover { color: var(--text-primary); border-color: var(--text-secondary); }
.cz-btn:focus-visible { outline: 1px solid var(--accent-primary); outline-offset: 3px; }
.cz-btn:disabled { opacity: .3; cursor: default; }
.cz-btn svg { width: 18px; height: 18px; }
@media (max-width: 760px) { .cz-slide img { height: 58vh; max-height: 520px; } }
/* keep wide children (the carousel) from stretching a full-width chapter */
.chapter.full { grid-template-columns: minmax(0, 1fr); }
.cz { min-width: 0; }

/* hero illustration: one per theme. The day art shows in Gallery Paper (light);
 * a night version can be added as <img class="hero-art night"> for Warm Obsidian. */
.hero-art { display: none; width: 100%; max-width: 600px; height: auto; justify-self: end; margin-bottom: var(--s2); }
:root[data-theme="light"] .hero-art.day,
:root:not([data-theme="light"]) .hero-art.night { display: block; animation: rise .9s var(--ease) both; }
@media (max-width: 860px) { .hero-art { max-width: 340px; justify-self: start; } }

/* cactus illustration under "Let's talk." (both themes) */
.contact-art { display: block; width: 100%; max-width: 360px; height: auto; margin-top: var(--s4); }
@media (max-width: 860px) { .contact-art { max-width: 240px; } }

/* ---------- "My work has been featured in": a slow looping strip ----------
 * Two identical rows side by side scroll left by one row's width, so the loop
 * is seamless. The second row is aria-hidden. Pauses on hover; static (and
 * wrapping) when the visitor asks for reduced motion. */
.press { padding-block: clamp(40px, 6vw, 72px); border-top: 1px solid var(--border-subtle); overflow: hidden; }
.press .meta { color: var(--text-secondary); margin-bottom: var(--s3); }
.marquee { display: flex; width: max-content; }
.marquee-row { list-style: none; display: flex; align-items: center; flex: none; animation: marquee 70s linear infinite; }
.marquee:hover .marquee-row { animation-play-state: paused; }
.marquee-row li { font-family: var(--f-display); font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.75rem); letter-spacing: -.02em; white-space: nowrap; padding-inline: clamp(1.25rem, 3vw, 2.75rem); color: var(--text-primary); }
.marquee-row li::after { content: ""; display: inline-block; width: .32em; height: .32em; margin-left: clamp(2.5rem, 6vw, 5.5rem); border-radius: 50%; background: var(--accent-primary); vertical-align: middle; transform: translateY(-.1em); }
@keyframes marquee { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { width: auto; flex-wrap: wrap; padding-inline: var(--gutter); }
  .marquee-row { flex-wrap: wrap; animation: none; row-gap: .5rem; }
  .marquee-row[aria-hidden="true"] { display: none; }
  .marquee-row li { padding-inline: 0 1.5rem; font-size: 1.5rem; }
  .marquee-row li::after { margin-left: 1.5rem; }
}

/* press logos in the featured-in strip: one colour, matched to the theme */
.marquee-row li.logo { display: inline-flex; flex-direction: column; align-items: center; gap: .35rem; font-size: 1rem; }
.marquee-row li.logo::after { display: none; }
.marquee-row .logo img { height: 34px; width: auto; filter: brightness(0); opacity: .82; transition: opacity .3s var(--ease); }
:root:not([data-theme="light"]) .marquee-row .logo img { filter: brightness(0) invert(1); }
.marquee-row .logo:hover img { opacity: 1; }
.marquee-row .logo-imdb img { height: 40px; }
.marquee-row .logo-nyt img, .marquee-row .logo-robbreport img { height: 30px; }
.marquee-row .logo-sub { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.marquee-row li.logo { padding-inline: clamp(1.75rem, 4vw, 3.5rem); }

/* the strip shows through a window narrower than one set of logos, faded at
 * both edges, so no logo is ever on screen twice */
.marquee-viewport {
  overflow: hidden; max-width: min(var(--max), 100%); margin-inline: auto;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.marquee-row .logo-dola img { height: 44px; }
.marquee-row .logo-exron img { height: 46px; }
.marquee-row .logo-dublab img { height: 26px; }
.marquee-row .logo-mood img { height: 30px; }

/* ---------- press page ---------- */
.press-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); }
.press-head a { color: var(--text-secondary); text-decoration: none; }
.press-head a:hover { color: var(--accent-primary); }
.pr-quote { margin: var(--s5) 0 0; padding: clamp(2rem, 5vw, 4rem) 0; border-block: 1px solid var(--border-subtle); display: grid; gap: var(--s3); max-width: 62rem; }
.pr-quote-logo { height: 34px; width: auto; filter: brightness(0); }
:root:not([data-theme="light"]) .pr-quote-logo { filter: brightness(0) invert(1); }
.pr-quote blockquote { margin: 0; }
.pr-quote blockquote p { font-family: var(--f-display); font-size: clamp(1.5rem, 1rem + 1.8vw, 2.5rem); line-height: 1.25; letter-spacing: -.02em; }
.pr-quote figcaption { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.pr-quote figcaption a { color: var(--accent-primary); }
.pr-list { list-style: none; border-top: 1px solid var(--border-subtle); }
.pr-list li { border-bottom: 1px solid var(--border-subtle); }
.pr-row { display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; gap: var(--s2) var(--s4); align-items: center; padding-block: clamp(1.25rem, 2.2vw, 1.75rem); text-decoration: none; transition: padding .5s var(--ease); }
.pr-row:hover { padding-left: .75rem; }
.pr-logo img { height: 26px; width: auto; max-width: 150px; object-fit: contain; filter: brightness(0); opacity: .85; }
:root:not([data-theme="light"]) .pr-logo img { filter: brightness(0) invert(1); }
.pr-logo.logo-imdb img { height: 34px; }
.pr-logo.logo-exron img { height: 48px; }
.pr-logo.logo-dola img { height: 46px; }
.pr-logo.logo-dublab img { height: 18px; }
.pr-logo.logo-kcrw img { height: 40px; }
.pr-main { display: grid; gap: .3rem; }
.pr-title { font-family: var(--f-display); font-size: clamp(1.2rem, 1rem + .7vw, 1.55rem); line-height: 1.25; letter-spacing: -.015em; transition: color .3s var(--ease); }
.pr-row:hover .pr-title { color: var(--accent-primary); }
.pr-by { color: var(--text-secondary); font-size: var(--t-sm); }
.pr-side { display: grid; justify-items: end; gap: .4rem; text-align: right; }
.pr-date { color: var(--text-secondary); white-space: nowrap; }
@media (max-width: 760px) {
  .pr-row { grid-template-columns: 1fr; gap: .6rem; }
  .pr-side { justify-items: start; text-align: left; grid-auto-flow: column; justify-content: start; align-items: center; gap: .75rem; }
}

/* timeline, simplified (William, 2026-12-03): no bars, dots or hover lines.
 * Just the spine, the cards at their dates, faint year labels, and UC Berkeley
 * at the bottom where the spine begins. */
.vt-bar { display: none; }
.vt-tick { border-top: 0; }
.vt-tick.now { border-top: 1px dashed color-mix(in srgb, var(--accent-primary) 45%, transparent); }
.vt-spine::before { width: 1px; left: -.5px; background: var(--border-subtle); }
.vt-spine::after { border-left-width: 1px; }
.vt-item.lane-r { padding-left: 1.5rem; }
.vt-item.lane-l { padding-right: 1.5rem; }
.lane-r .vt-card { left: 1.5rem; }
.lane-l .vt-card { right: 1.5rem; }
.vt-start { display: grid; justify-items: center; gap: .15rem; margin-top: var(--s3); text-align: center; }
.vt-start .when { font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-primary); }
.vt-start .who { font-family: var(--f-display); font-size: 1.4rem; letter-spacing: -.02em; }
.vt-start .what { color: var(--text-secondary); font-size: var(--t-sm); }
@media (max-width: 760px) {
  .vt-start { justify-items: start; text-align: left; padding-left: 2rem; margin-top: 1.75rem; }
  .vt-item, .vt-item.lane-r, .vt-item.lane-l { padding-left: 2rem; }
}

/* contact links: one per line */
.links-stack { list-style: none; display: grid; gap: .7rem; justify-items: start; padding: 0; }

/* featured-on strip, bigger (William, 2026-12-03): back to the presence the
 * text names had. Logos that are coloured in their original form (IMDb) keep
 * their colour; black or white wordmarks stay matched to the theme. */
.marquee-row .logo img { height: 52px; opacity: .9; }
.marquee-row .logo-nyt img, .marquee-row .logo-robbreport img { height: 44px; }
.marquee-row .logo-imdb img { height: 54px; }
.marquee-row .logo-dola img { height: 64px; }
.marquee-row .logo-exron img { height: 76px; }
.marquee-row .logo-dublab img { height: 38px; }
.marquee-row .logo-mood img { height: 44px; }
.marquee-row .logo-sub { font-size: .7rem; }
.marquee-row li.logo { padding-inline: clamp(2rem, 4.5vw, 4rem); }
.marquee-row .logo-color img, :root:not([data-theme="light"]) .marquee-row .logo-color img,
.pr-logo.logo-color img, :root:not([data-theme="light"]) .pr-logo.logo-color img { filter: none; opacity: 1; }
.marquee-row .logo-modernismweek img { height: 46px; }
.marquee-row { animation-duration: 90s; }
a.status { text-decoration: none; }
a.status:hover { color: var(--text-primary); }

/* hero art: lower and larger (William, 2026-12-03) */
@media (min-width: 861px) { .hero .wrap { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); } }
.hero aside { align-self: end; }
.hero-art { max-width: 640px; margin-bottom: calc(clamp(80px, 10vw, 120px) * -0.55); }
/* both arts are 4:5: cap width by viewport height so the whole art (dog included)
 * sits above the fold on a laptop. 150px = header + hero top padding + a margin. */
@media (min-width: 861px) {
  /* .hero aside prefix: must outrank `.hero aside img { width: 100% }` */
  .hero aside .hero-art { width: min(100%, calc((100vh - 150px) * .8)); width: min(100%, calc((100svh - 150px) * .8)); }
}
@media (max-width: 860px) { .hero-art { max-width: 380px; margin-bottom: 0; } }

/* UC Berkeley at the base of the timeline */
.vt-base { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: var(--s3); margin-top: var(--s3); }
.vt-base .vt-start { grid-column: 2; margin-top: 0; }
@media (max-width: 760px) {
  .vt-base { grid-template-columns: 1fr; }
  .vt-base .vt-start { grid-column: 1; }
}


/* Wristband illustration: homepage work heading. Guest List hero art: the
   edges fade out so the illustration's black ground melts into the page. */
.sh-side { display: grid; gap: var(--s2); justify-items: start; }
.work-art { width: 100%; max-width: 360px; height: auto; border-radius: 6px; }
/* desk by day, same desk at night for Warm Obsidian */
:root[data-theme="light"] .work-art.night,
:root:not([data-theme="light"]) .work-art.day { display: none; }
@media (min-width: 861px) { #work .section-head { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.case-art { grid-column: 2; grid-row: 2 / span 2; justify-self: end; align-self: center; width: 100%; max-width: 440px; height: auto;
  --fade: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: var(--fade); -webkit-mask-composite: source-in; mask-image: var(--fade); mask-composite: intersect; }
/* transparent cutout art needs no edge fade */
.case-art.cutout { -webkit-mask-image: none; mask-image: none; max-width: 400px; }
@media (max-width: 860px) {
  .work-art { max-width: 240px; }
  .case-art { grid-column: auto; grid-row: auto; justify-self: start; max-width: 260px; }
  .case-art.cutout { max-width: 280px; }
}

/* Contact art: cactus by day, cactus with fireflies after dark */
:root[data-theme="light"] .contact-art.night,
:root:not([data-theme="light"]) .contact-art.day { display: none; }
/* The night art has no panel: cacti sit straight on the page and a few fireflies
 * drift out past them. The file is 1080 wide (750 of cacti + 165 a side), so it is
 * drawn 1.44x wider and pulled left by the side margin to keep the cacti in place. */
.contact-art.night { max-width: none; width: min(518px, 144%); margin-left: calc(min(518px, 144%) * -.1528); }
@media (max-width: 860px) {
  .contact-art.night { width: min(346px, calc(100% + 16px)); margin-left: -16px; }
}

/* ---------- interior design page: press logo row ---------- */
.ip-press { padding-block: var(--s5) 0; display: grid; gap: var(--s3); }
.ip-press .meta { color: var(--text-secondary); }
.ip-row { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) clamp(2rem, 5vw, 4rem); }
.ip-logo { display: inline-flex; align-items: center; text-decoration: none; }
.ip-logo img { height: 40px; width: auto; filter: brightness(0); opacity: .85; transition: opacity .3s var(--ease); }
:root:not([data-theme="light"]) .ip-logo img { filter: brightness(0) invert(1); }
.ip-logo:hover img { opacity: 1; }
.ip-word { font-family: var(--f-display); font-size: 1.7rem; letter-spacing: .08em; color: var(--text-primary); }
.ip-word:hover { color: var(--accent-primary); }

/* CATEGORY hero: three party photos side by side */
.hero-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.5rem, 1.2vw, 1rem); }
.hero-media .hero-trio img { aspect-ratio: 3 / 4; height: auto; max-height: 70vh; }

/* education card at the base of the timeline (William, 2026-12-04):
 * the UC Berkeley illustration in a framed card, warm glow, slow drift on hover. */
.vt-base .vt-edu { grid-column: 2; justify-self: center; }
.vt-edu { position: relative; width: min(340px, 100%); margin: 0; padding: .6rem .6rem 1.1rem; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--accent-primary) 45%, transparent); rotate: -1.5deg; transition: rotate .8s var(--ease), translate .8s var(--ease), box-shadow .8s var(--ease); }
.vt-base { position: relative; }
.vt-base::before { content: ""; position: absolute; left: 50%; top: calc(-1 * var(--s3)); width: 1px; height: calc(var(--s3) + 1rem); margin-left: -.5px; background: var(--border-subtle); }
.vt-edu { z-index: 1; }
.vt-edu:hover { rotate: 0deg; translate: 0 -4px; box-shadow: 0 40px 80px -30px color-mix(in srgb, var(--accent-primary) 65%, transparent); }
.vt-edu-art { position: relative; overflow: hidden; border-radius: 2px; aspect-ratio: 700 / 810; }
.vt-edu-art img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 2.4s var(--ease), filter .8s var(--ease); }
.vt-edu-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--accent-primary) 22%, transparent)); mix-blend-mode: soft-light; pointer-events: none; }
.vt-edu:hover .vt-edu-art img { transform: scale(1.08); filter: saturate(1.12); }
.vt-edu-cap { display: grid; justify-items: center; gap: .15rem; margin-top: .9rem; text-align: center; }
.vt-edu-cap .when { font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-primary); }
.vt-edu-cap .who { font-family: var(--f-display); font-size: 1.4rem; letter-spacing: -.02em; line-height: 1.1; }
.vt-edu-cap .what { color: var(--text-secondary); font-size: var(--t-sm); }
@media (max-width: 760px) {
  .vt-base .vt-edu { grid-column: 1; justify-self: start; margin-left: 2rem; width: min(300px, calc(100% - 2rem)); }
  .vt-base::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .vt-edu, .vt-edu:hover { rotate: 0deg; translate: none; }
  .vt-edu-art img, .vt-edu:hover .vt-edu-art img { transition: none; transform: none; }
}
/* The Bishop's School (2006): stacked just behind Berkeley's left edge, a
 * little overlap. Hover lifts it to the front. Caption centres in the part
 * that shows. */
.vt-base .vt-edu { grid-row: 1; }
.vt-base .vt-edu-hs { grid-row: 1; grid-column: 2; z-index: 0; rotate: -4deg; translate: -88% .75rem; }
.vt-base .vt-edu-hs:hover { z-index: 2; rotate: -1deg; translate: -88% -4px; }
.vt-edu-hs .vt-edu-cap { padding-right: 12%; }
/* the fan spans ~2.8 card widths, so cards shrink on narrower desktops */
@media (min-width: 761px) { .vt-base .vt-edu { width: min(340px, calc(30vw - 2rem)); } }
/* La Sorbonne (2018): the mirror of Bishop's, behind Berkeley's right edge. */
.vt-base .vt-edu-pa { grid-row: 1; grid-column: 2; z-index: 0; rotate: 4deg; translate: 88% .75rem; }
.vt-base .vt-edu-pa:hover { z-index: 2; rotate: 1deg; translate: 88% -4px; }
.vt-edu-pa .vt-edu-cap { padding-left: 12%; }
@media (max-width: 760px) {
  /* phones: newest on top, like the timeline above (2018, 2010, 2006) */
  .vt-base .vt-edu { grid-row: 2; }
  .vt-base .vt-edu-hs, .vt-base .vt-edu-hs:hover { grid-row: 3; grid-column: 1; rotate: 1.5deg; translate: none; }
  .vt-base .vt-edu-pa, .vt-base .vt-edu-pa:hover { grid-row: 1; grid-column: 1; rotate: -1.5deg; translate: none; }
  .vt-edu-hs .vt-edu-cap { padding-right: 0; }
  .vt-edu-pa .vt-edu-cap { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .vt-base .vt-edu-hs, .vt-base .vt-edu-hs:hover { rotate: -4deg; }
  .vt-base .vt-edu-pa, .vt-base .vt-edu-pa:hover { rotate: 4deg; }
}
:root[data-theme="light"] .vt-edu-art img.night,
:root:not([data-theme="light"]) .vt-edu-art img.day { display: none; }

/* where William lived, down the left edge of the timeline (William, 2026-12-04).
 * Each city is a hairline segment from move-in to move-out, label at its start. */
.vt-places { list-style: none; position: absolute; inset: 0; margin: 0; padding: 0; pointer-events: none; }
.vt-place { position: absolute; left: 4.25rem; border-left: 1px solid color-mix(in srgb, var(--accent-secondary) 55%, transparent); }
.vt-place::before { content: ""; position: absolute; left: -4px; bottom: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--bg-primary); border: 1px solid var(--accent-secondary); }
.vt-place.live { border-left-color: var(--accent-secondary); }
.vt-place.live::before { background: var(--accent-secondary); }
.vt-place-n { position: absolute; left: .7rem; bottom: -.45rem; white-space: nowrap; font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-secondary); }
.vt-place-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 760px) { .vt-places { display: none; } }

/* Press: Featured / Date sort control above the coverage list. */
.pr-sort { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; margin-bottom: var(--s2); }
.pr-sort .meta { color: var(--text-secondary); margin-right: .4rem; }
.pr-sort-btn { font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .08em; text-transform: uppercase; background: none; color: var(--text-secondary); border: 1px solid var(--border-subtle); border-radius: 2px; padding: .45em .9em; cursor: pointer; transition: color .3s var(--ease), border-color .3s var(--ease); }
.pr-sort-btn:hover { color: var(--text-primary); }
.pr-sort-btn[aria-pressed="true"] { color: var(--accent-primary); border-color: currentColor; }

/* Disco-ball sparkle: one flare on the ball's upper-right glint, fired by
 * site.js 2 seconds after a switch from light to dark. The ball sits at
 * (615, 225) r 76 in the 960x1200 art; the glint is at 68% / 15.6%. */
.hero-art.night { position: relative; }
.hero-art.night img { display: block; width: 100%; height: auto; }
.flare { position: absolute; left: 68%; top: 15.6%; width: 13%; aspect-ratio: 1; translate: -50% -50%; fill: #fffaf0; pointer-events: none; opacity: 0; filter: drop-shadow(0 0 6px rgba(255, 246, 220, .95)) drop-shadow(0 0 18px rgba(255, 230, 180, .6)); }
.flare.on { animation: flare 1.1s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes flare {
  0%   { opacity: 0; transform: scale(.1) rotate(-30deg); }
  30%  { opacity: 1; transform: scale(1.1) rotate(10deg); }
  100% { opacity: 0; transform: scale(.2) rotate(45deg); }
}

/* three phone screenshots side by side (Weedmaps iOS and Android) */
.phone-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.75rem, 2vw, 1.5rem); align-items: center; max-width: 64rem; margin-inline: auto; }
.phone-trio .phone { max-width: 100%; width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--border-subtle); }

/* 2006-2010 (school years) continue the city rail below 2010, left of the
 * education cards (William, 2026-12-04). Same 76px/year scale as the canvas;
 * the region starts at the canvas bottom (2010) and runs down to 2006. */
.vt-pre { position: absolute; left: 0; right: 0; top: calc(-1 * var(--s3)); height: calc(4 * var(--yr)); pointer-events: none; z-index: 0; }
@media (min-width: 761px) {
  /* the left column always clears the rail labels plus Bishop's overhang,
   * so the fan only shifts right when the screen is too narrow to centre it */
  .vt-base { --edu-w: min(340px, calc(26vw - 2rem)); grid-template-columns: minmax(calc(12.5rem + .88 * var(--edu-w)), 1fr) auto minmax(calc(.88 * var(--edu-w)), 1fr); }
  .vt-base .vt-edu { width: var(--edu-w); }
}
@media (max-width: 760px) { .vt-pre { display: none; } }

/* breeze block (the favicon) beside the name in the footer (William, 2026-12-04).
 * Inline fills default to the light-theme pair; the dark theme swaps them. */
:root:not([data-theme="light"]) .foot-bb { --bb-face: #E6D9BF; --bb-shade: #B79F78; }

/* Work heading desk art, mounted like the education cards (William, 2026-12-04):
 * paper mount, hairline border, slight tilt, accent shadow. On desktop it hugs
 * the headline (right edge of its column) and centres on it, so it reads as part
 * of the heading instead of a thumbnail dropped in the gutter. */
.work-art { box-sizing: border-box; padding: .6rem; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--accent-primary) 45%, transparent); rotate: -1.5deg; }
@media (min-width: 861px) {
  #work .section-head { align-items: center; }
  #work .sh-side { justify-items: end; }
  #work .work-art { max-width: 380px; }
}

/* Experience band (William, 2026-12-04): the resume section sits on a slightly
 * deeper tone so the long scroll reads as chapters. The tokens are redefined
 * here, not just the background, so the timeline dots (filled with
 * --bg-primary) match the band and the education cards (--bg-surface) stay
 * a step lighter than it. */
#resume { --bg-primary: #141418; --bg-surface: #1c1c21; background: var(--bg-primary); transition: background-color .5s var(--ease); }
:root[data-theme="light"] #resume { --bg-primary: #eeeae2; --bg-surface: #faf8f4; }

/* ---------- lightbox: project images open full screen, pinch to zoom ---------- */
img.zoomable { cursor: zoom-in; }
img.zoomable:focus-visible { outline: 1px solid var(--accent-primary); outline-offset: 4px; }
html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg-primary); color: var(--text-primary); overflow: hidden; }
.lb:focus { outline: none; }
.lb::backdrop { background: transparent; }
.lb[open] { animation: lb-in .35s var(--ease); }
@keyframes lb-in { from { opacity: 0; } }
.lb-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 64px clamp(16px, 7vw, 96px); touch-action: none; user-select: none; -webkit-user-select: none; }
.lb-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: var(--radius); transform-origin: center; will-change: transform; -webkit-user-drag: none; pointer-events: auto; }
.lb.zoomed .lb-stage { cursor: grab; }
.lb.zoomed .lb-stage:active { cursor: grabbing; }
.lb-bar { position: absolute; top: 12px; right: 12px; left: 12px; display: flex; align-items: center; justify-content: flex-end; gap: var(--s2); pointer-events: none; }
.lb-bar > * { pointer-events: auto; }
.lb-count { color: var(--text-secondary); }
.lb-btn { all: unset; cursor: pointer; box-sizing: border-box; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border-subtle); border-radius: 50%; background: var(--bg-primary); color: var(--text-primary); transition: border-color .3s var(--ease), opacity .3s var(--ease); }
.lb-btn:hover { border-color: var(--text-secondary); }
.lb-btn:focus-visible { outline: 1px solid var(--accent-primary); outline-offset: 3px; }
.lb-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.lb-prev, .lb-next { position: absolute; top: 50%; translate: 0 -50%; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb.zoomed .lb-prev, .lb.zoomed .lb-next, .lb.zoomed .lb-cap { opacity: 0; pointer-events: none; }
.lb-cap { position: absolute; left: 50%; bottom: 16px; translate: -50% 0; width: max-content; max-width: min(60ch, calc(100% - 32px)); text-align: center; font-size: var(--t-sm); color: var(--text-secondary); transition: opacity .3s var(--ease); pointer-events: none; }
/* Phones: swipe between images instead of arrow buttons; the image gets the width. */
@media (max-width: 760px) {
  .lb-prev, .lb-next { display: none; }
  .lb-stage { padding: 64px 8px; }
}
