/* Lewis Beal — light is the material.
   Everything sits unlit on black and switches on when you reach for it. */

:root {
  --void: #000000;          /* the room with the lights off */
  --filament: #ECE5D3;      /* warm, incandescent white: primary text */
  --ash: #948E82;           /* secondary text */
  --dim: #5F5A52;           /* past, switched-off things */
  --wire: #2B2925;          /* rules and borders */
  --led: #FFB547;           /* indicator only: something is on, or about to be */

  --font: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(16px, 3.2vw, 44px);
  --measure: 34em;

  /* type scale, perfect fourth */
  --t-small: 0.8125rem;
  --t-body: 1.0625rem;
  --t-lead: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem);
  --t-h2: clamp(1.6rem, 1.2rem + 1.6vw, 2.6rem);
  --t-h1: clamp(2.6rem, 1.4rem + 5.4vw, 7.4rem);
  --t-giant: clamp(4.4rem, 1rem + 17vw, 22rem);

  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--filament);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.55;
  font-optical-sizing: auto;
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 1.5px solid var(--led); outline-offset: 4px; border-radius: 2px; }
::selection { background: var(--filament); color: var(--void); }

/* "switch on" glow used for hover/focus on text */
.lit, a:hover, a:focus-visible { text-shadow: 0 0 .5em rgba(255, 236, 200, .55), 0 0 1.6em rgba(255, 210, 140, .22); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 18px var(--gutter);
  background: linear-gradient(#000 40%, rgba(0,0,0,0));
}
.home .site-header { position: fixed; inset: 0 0 auto 0; background: none; }
.wordmark { font-size: 1.15rem; font-weight: 600; text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.nav { display: flex; gap: clamp(14px, 3.4vw, 52px); }
.nav a { text-decoration: none; color: var(--ash); transition: color .3s var(--ease), text-shadow .3s var(--ease); }
.nav a:hover, .nav a:focus-visible, .nav a[aria-current="page"] { color: var(--filament); }
.nav a[aria-current="page"] { text-shadow: 0 0 .6em rgba(255, 236, 200, .6); }

main { flex: 1; }
.page { padding: clamp(40px, 8vw, 120px) var(--gutter) 80px; }
.page-title {
  font-size: var(--t-h1); line-height: .92; font-weight: 300; letter-spacing: -.035em;
  font-variation-settings: 'wdth' 80; margin: 0 0 clamp(32px, 6vw, 80px);
}

/* ---------------- Footer ---------------- */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem;
  padding: 28px var(--gutter) 32px; color: var(--dim); font-size: var(--t-small);
  border-top: 1px solid var(--wire);
}
.site-footer a { color: var(--ash); text-decoration: none; }
.site-footer nav { display: flex; gap: 1.5rem; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .85em 1.3em; border: 1px solid var(--wire); border-radius: 999px;
  background: none; text-decoration: none; cursor: pointer; line-height: 1.1;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), color .3s var(--ease);
}
.btn:hover, .btn:focus-visible { border-color: var(--filament); box-shadow: 0 0 22px rgba(255, 225, 170, .18), inset 0 0 12px rgba(255, 225, 170, .08); text-shadow: none; }
.btn--primary { background: var(--filament); color: var(--void); border-color: var(--filament); font-weight: 600; }
.btn--primary:hover, .btn--primary:focus-visible { box-shadow: 0 0 30px rgba(255, 225, 170, .45); color: var(--void); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------------- HOME ---------------- */
.home { overflow: hidden; height: 100svh; }
.home main { position: fixed; inset: 0; }
.stage { position: absolute; inset: 0; touch-action: none; cursor: ns-resize; }
.stream {
  position: absolute; top: 0; left: 50%; height: 100%; width: auto; transform: translateX(-50%);
  mix-blend-mode: screen; opacity: 0; transition: opacity 2.4s var(--ease);
  pointer-events: none;
}
.stream.on { opacity: 1; }
.home-name {
  position: absolute; inset: 0; margin: 0; pointer-events: none;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  font-size: var(--t-giant); line-height: .8; font-weight: 300; letter-spacing: -.045em;
  color: var(--filament);
}
.home-name span { padding: 0 var(--gutter); transition: font-variation-settings .15s linear; will-change: font-variation-settings; }
.home-name span:first-child { justify-self: start; }
.home-name span:last-child { justify-self: end; padding-right: calc(var(--gutter) + 76px); }
.home-foot {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 22px;
  display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap;
  font-size: var(--t-small); color: var(--ash); pointer-events: none;
}
.home-foot a, .home-foot button { pointer-events: auto; }
.home-foot p { margin: 0; max-width: 22em; }
.next-show { color: var(--filament); text-decoration: none; display: inline-flex; gap: .55em; align-items: baseline; }
.dot { width: .5em; height: .5em; border-radius: 50%; background: var(--led); box-shadow: 0 0 8px var(--led), 0 0 18px rgba(255,181,71,.5); flex: none; transform: translateY(-.05em); }
.dot.blink { animation: blink 2.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; box-shadow: none; } }

/* speed rail: shows where your hand sits between 1.5× and −1.5× */
.rail {
  position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%);
  height: 75vh; height: 75svh; width: 64px; pointer-events: none;
  font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums;
}
.rail::before { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 1px; background: var(--wire); }
.rail .tick { position: absolute; right: 8px; transform: translateY(-50%); white-space: nowrap; transition: opacity .2s; }
.rail .tick::after { content: ''; position: absolute; right: -8px; top: 50%; width: 5px; height: 1px; background: var(--dim); }
.rail .marker {
  position: absolute; right: -3px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--filament); box-shadow: 0 0 10px rgba(255,236,200,.8); transform: translateY(-50%);
}
.rail .readout { position: absolute; right: 14px; transform: translateY(-50%); color: var(--filament); font-size: 13px; white-space: nowrap; }
.hint { transition: opacity 1s var(--ease); }
.hint.gone { opacity: 0; }
.tilt-btn { background: none; border: 1px solid var(--wire); border-radius: 999px; padding: .5em .9em; color: var(--ash); font-size: var(--t-small); cursor: pointer; }
.tilt-btn[aria-pressed="true"] { color: var(--filament); border-color: var(--filament); }

/* ---------------- WORKS index ---------------- */
.work-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--wire); }
.work-row { border-bottom: 1px solid var(--wire); }
.work-row a, .archive-item {
  display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.2rem 2rem;
  padding: clamp(22px, 3vw, 36px) 0; text-decoration: none; text-shadow: none;
}
.work-row .yr { color: var(--ash); font-size: var(--t-small); padding-top: .55em; font-variant-numeric: tabular-nums; }
.work-row h2 {
  margin: 0 0 .35em; font-size: var(--t-h2); line-height: 1; font-weight: 400; letter-spacing: -.025em;
  color: var(--ash); transition: color .5s var(--ease), text-shadow .5s var(--ease), font-variation-settings .6s var(--ease);
  font-variation-settings: 'wdth' 82;
}
.work-row p { margin: 0; color: var(--dim); max-width: 26em; transition: color .5s var(--ease); }
.work-row .mat { margin-top: .7em; font-size: var(--t-small); }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-self: start; }
.thumbs img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #0a0a0a;
  filter: brightness(.38) saturate(.6); transition: filter .7s var(--ease);
}
.thumbs .pending {
  grid-column: 1 / -1; aspect-ratio: auto; padding: 1.1em 1.2em; border: 1px dashed var(--wire);
  color: var(--dim); font-size: var(--t-small);
}
/* switched on: hover on desktop, centre of screen on touch */
.work-row.on h2, .work-row a:hover h2, .work-row a:focus-visible h2 { color: var(--filament); text-shadow: 0 0 .5em rgba(255,236,200,.35); font-variation-settings: 'wdth' 100; }
.work-row.on p, .work-row a:hover p, .work-row a:focus-visible p { color: var(--ash); }
.work-row.on .thumbs img, .work-row a:hover .thumbs img, .work-row a:focus-visible .thumbs img { filter: brightness(1) saturate(1); }

/* ---------------- WORK detail ---------------- */
.work-hero { position: relative; margin: 0 calc(var(--gutter) * -1) clamp(28px, 5vw, 64px); }
.work-hero img { width: 100%; height: min(78vh, 900px); object-fit: cover; }
.work-hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, #000); pointer-events: none; }
.work-head { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: end; margin-bottom: clamp(36px, 6vw, 80px); }
.work-head h1 { margin: 0; font-size: var(--t-h1); line-height: .92; font-weight: 300; letter-spacing: -.035em; font-variation-settings: 'wdth' 80; }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .35rem 1.2rem; font-size: var(--t-small); color: var(--ash); }
.facts dt { color: var(--dim); }
.facts dd { margin: 0; color: var(--filament); }
.work-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--measure)); gap: 2rem 4rem; margin-bottom: clamp(48px, 8vw, 110px); }
.work-text .quote { margin: 0; font-size: var(--t-lead); line-height: 1.3; font-weight: 300; color: var(--filament); max-width: 18em; }
.work-text .copy p { margin: 0 0 1.1em; color: var(--ash); }
.work-text .copy p:first-child { color: var(--filament); }
.work-text h3 { font-size: var(--t-small); font-weight: 500; color: var(--dim); margin: 2em 0 .5em; }
.work-text ul { list-style: none; padding: 0; margin: 0; color: var(--ash); }

.sale {
  margin: 0 0 clamp(48px, 8vw, 110px); padding: clamp(22px, 4vw, 44px);
  border: 1px solid var(--wire); border-radius: 18px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.4rem 3rem; align-items: center;
}
.sale strong { display: block; font-size: var(--t-h2); font-weight: 400; letter-spacing: -.02em; line-height: 1.05; }
.sale p { margin: .6em 0 0; color: var(--ash); max-width: 30em; }

.gallery { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(48px, 8vw, 110px); --row: 300px; }
.gallery button { all: unset; display: block; cursor: zoom-in; flex: var(--r, 1.5) var(--r, 1.5) calc(var(--r, 1.5) * var(--row)); min-width: 0; }
.gallery button:focus-visible { outline: 1.5px solid var(--led); outline-offset: 3px; }
.gallery img { width: 100%; height: auto; background: #0a0a0a; }
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 10px; margin-bottom: clamp(48px, 8vw, 110px); }
.videos figure, .yt { margin: 0; }
.videos video, .yt-frame { width: 100%; aspect-ratio: 16 / 9; background: #050505; object-fit: cover; }
.videos figcaption, .yt figcaption { font-size: var(--t-small); color: var(--dim); margin-top: .6em; }
.yt { margin-bottom: clamp(48px, 8vw, 110px); }
.yt-frame { position: relative; border: 0; display: grid; place-items: center; cursor: pointer; overflow: hidden; }
.yt-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.55); }
.yt-frame span { position: relative; }
.pending-note { color: var(--dim); border: 1px dashed var(--wire); border-radius: 14px; padding: 1.4em; margin-bottom: clamp(48px, 8vw, 110px); max-width: 34em; }
.pager { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--wire); padding-top: 24px; font-size: var(--t-small); }
.pager a { text-decoration: none; color: var(--ash); max-width: 45%; }
.pager a strong { display: block; color: var(--filament); font-size: var(--t-lead); font-weight: 400; line-height: 1.15; margin-top: .2em; }
.pager a:last-child { text-align: right; margin-left: auto; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: #000; display: none; touch-action: pan-y; }
.lightbox.open { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px var(--gutter); font-size: var(--t-small); color: var(--ash); }
.lb-stage { display: flex; min-height: 0; padding: 0 var(--gutter); }
.lb-nav { display: flex; justify-content: space-between; padding: 14px var(--gutter) 22px; }
.lb-btn { background: none; border: 1px solid var(--wire); color: var(--filament); border-radius: 999px; padding: .6em 1.1em; cursor: pointer; }
.lb-btn:hover, .lb-btn:focus-visible { border-color: var(--filament); }

/* ---------------- ONGOING ---------------- */
.events { list-style: none; margin: 0 0 clamp(60px, 10vw, 140px); padding: 0; border-top: 1px solid var(--wire); }
.event { display: grid; grid-template-columns: 12rem minmax(0, 1fr) auto; gap: .8rem 2.4rem; padding: clamp(20px, 3vw, 32px) 0; border-bottom: 1px solid var(--wire); align-items: start; }
.event .when { font-size: var(--t-small); color: var(--ash); font-variant-numeric: tabular-nums; padding-top: .45em; }
.event h2 { margin: 0; font-size: var(--t-h2); font-weight: 400; line-height: 1.02; letter-spacing: -.025em; font-variation-settings: 'wdth' 86; }
.event .where { margin: .5em 0 0; color: var(--ash); }
.event .meta { margin: .3em 0 0; color: var(--dim); font-size: var(--t-small); }
.event .links { display: flex; gap: 1.1rem; margin-top: .9em; font-size: var(--t-small); }
.event .links a { color: var(--ash); }
.event .poster { width: 92px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.countdown { display: flex; align-items: baseline; gap: .55em; margin-top: .9em; color: var(--filament); font-variant-numeric: tabular-nums; }
.countdown b { font-weight: 500; font-size: var(--t-lead); letter-spacing: -.01em; }
.event.past h2 { color: var(--dim); text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: var(--dim); }
.event.past .when, .event.past .where, .event.past .links a { color: var(--dim); }
.event.past .poster { filter: grayscale(1) brightness(.45); }
.event.now h2 { text-shadow: 0 0 .5em rgba(255,236,200,.4); }
.section-label { font-size: var(--t-small); color: var(--dim); margin: 0 0 1rem; font-weight: 400; }

.studio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: center; padding: clamp(28px, 5vw, 64px); border: 1px solid var(--wire); border-radius: 22px; }
.studio h2 { margin: 0 0 .4em; font-size: var(--t-h2); font-weight: 400; line-height: 1.05; letter-spacing: -.025em; }
.studio p { margin: 0 0 1.4em; color: var(--ash); max-width: 28em; }
.studio-ring {
  justify-self: center; width: min(260px, 60vw); aspect-ratio: 1; border-radius: 50%; padding: 5px;
  background: conic-gradient(from 210deg, #FFB547, #ECE5D3, #7ee08a, #FFB547);
  text-decoration: none; text-shadow: none; display: block;
}
.studio-ring span {
  display: grid; place-items: center; text-align: center; width: 100%; height: 100%; border-radius: 50%;
  background: radial-gradient(circle at 50% 60%, #102a12 0%, #000 62%); border: 5px solid #000;
  font-size: var(--t-small); color: var(--ash); padding: 1.5em; line-height: 1.35;
}
.studio-ring strong { display: block; color: var(--filament); font-size: 1.15rem; font-weight: 500; margin-top: .3em; }
.studio-ring:hover { box-shadow: 0 0 40px rgba(255, 210, 140, .25); }

/* ---------------- ABOUT ---------------- */
.about-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 2.5rem clamp(2rem, 6vw, 6rem); margin-bottom: clamp(70px, 12vw, 160px); }
.about-top figure { margin: 0; }
.about-top img { width: 100%; filter: grayscale(1) contrast(1.05); }
.about-top figcaption { font-size: var(--t-small); color: var(--dim); margin-top: .6em; }
.bio p { margin: 0 0 1.1em; color: var(--ash); max-width: var(--measure); }
.bio p:first-child { font-size: var(--t-lead); line-height: 1.32; color: var(--filament); font-weight: 300; max-width: 22em; }
.block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 1.5rem clamp(2rem, 6vw, 6rem); margin-bottom: clamp(70px, 12vw, 160px); }
.block > h2 { margin: 0; font-size: var(--t-h2); font-weight: 400; letter-spacing: -.025em; line-height: 1; font-variation-settings: 'wdth' 84; }
.cv-group { margin-bottom: 2.2rem; }
.cv-group h3 { font-size: var(--t-small); font-weight: 500; color: var(--dim); margin: 0 0 .6rem; }
.cv-group ol { list-style: none; margin: 0; padding: 0; }
.cv-group li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem; padding: .55em 0; border-bottom: 1px solid var(--wire); color: var(--ash); }
.cv-group li span:last-child { color: var(--dim); font-variant-numeric: tabular-nums; }
.thesis-title { font-size: var(--t-h1); font-weight: 300; line-height: .95; letter-spacing: -.035em; margin: 0 0 .3em; font-variation-settings: 'wdth' 78; max-width: 11em; }
.thesis-meta { color: var(--dim); font-size: var(--t-small); margin: 0 0 2rem; }
.thesis-summary p { color: var(--ash); max-width: var(--measure); margin: 0 0 1.1em; }
.practice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin: 3rem 0; padding: 0; list-style: none; counter-reset: lvl; }
.practice li { border-top: 1px solid var(--filament); padding-top: 1rem; }
.practice h3 { margin: 0 0 .5em; font-size: 1.15rem; font-weight: 500; }
.practice p { margin: 0; color: var(--ash); font-size: .98rem; }
.chapters { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; list-style: none; padding: 0; margin: 0 0 2.4rem; color: var(--dim); font-size: var(--t-small); }

/* ---------------- CONTACT ---------------- */
.contact-big { font-size: clamp(2rem, .8rem + 5.6vw, 6.4rem); line-height: 1; font-weight: 300; letter-spacing: -.035em; margin: 0 0 .3em; word-break: break-word; }
.contact-big a { text-decoration: none; }
.contact-lead { color: var(--ash); font-size: var(--t-lead); max-width: 24em; margin: 0 0 2rem; line-height: 1.35; }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: clamp(60px, 10vw, 120px); border-top: 1px solid var(--wire); padding-top: 2rem; }
.contact-grid h2 { font-size: var(--t-small); font-weight: 500; color: var(--dim); margin: 0 0 .6em; }
.contact-grid p { margin: 0 0 1em; color: var(--ash); }

/* ---------------- Mobile ---------------- */
@media (max-width: 860px) {
  .work-row a, .archive-item { grid-template-columns: 1fr; gap: .7rem; }
  .work-row .yr { padding: 0; }
  .work-head, .work-text, .about-top, .block, .studio, .sale { grid-template-columns: 1fr; }
  .practice, .contact-grid { grid-template-columns: 1fr; }
  .event { grid-template-columns: 1fr auto; }
  .event .when { grid-column: 1 / -1; padding: 0; }
  .event .poster { grid-row: 2; grid-column: 2; width: 70px; }
  .gallery { --row: 150px; gap: 6px; }
  .work-hero img { height: 62vh; }
}
@media (max-width: 640px) {
  :root { --t-body: 1rem; }
  .site-header { padding-top: 14px; padding-bottom: 18px; flex-wrap: wrap; row-gap: 6px; background: linear-gradient(#000 78%, rgba(0,0,0,0)); }
  .nav { gap: 16px; font-size: .95rem; }
  .home-name { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; align-items: center; font-size: clamp(5rem, 31vw, 9rem); }
  .home-name span:first-child { align-self: end; padding-bottom: 6vh; }
  .home-name span:last-child { align-self: start; padding-top: 6vh; padding-right: calc(var(--gutter) + 52px); }
  .rail { right: 10px; width: 52px; }
  .home-foot { bottom: max(16px, env(safe-area-inset-bottom)); }
  .work-hero { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); }
  .thumbs img { aspect-ratio: 1; }
  .btn-row .btn { flex: 1 1 100%; justify-content: center; }
  .pager a strong { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
