/* Sebastian Molano - a portfolio at night.
   The page is a dark room and the work is what is lit in it: air over a wing,
   a machine drawn and then made, physics glowing out of the dark, a world of
   printed metal seen through a beam of light, the earlier works alive in their
   rooms, and the night sky. Motion is slow on purpose; everything that moves is transform or
   opacity, and nothing moves while it is out of sight. */

@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("../fonts/courier-prime.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("../fonts/courier-prime-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --night: #070B10;          /* the room */
  --night-2: #0A1018;
  --ink: #EFE8D9;            /* words: warm paper, lit */
  --ink-2: #C3BCAD;
  --muted: #8E887C;
  --line: rgba(239, 232, 217, 0.13);
  --lamp: #E3BC82;           /* lamplight */
  --moon: #A8C3CC;
  --leaf: #8DB57C;
  --serif: "Fraunces", "Iowan Old Style", "Palatino", Georgia, serif;
  --sans: "Jost", "Futura", "Avenir Next", "Century Gothic", sans-serif;
  --mono: "Courier Prime", "Courier New", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --slow: 1700ms;
  --gutter: clamp(20px, 5vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; background: var(--night); }
body {
  background: var(--night); color: var(--ink);
  font: 400 17px/1.65 var(--serif); font-variation-settings: "SOFT" 60, "opsz" 14;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
::selection { background: rgba(227, 188, 130, 0.35); }
:focus-visible { outline: 1px solid var(--lamp); outline-offset: 4px; }

.mono { font-family: var(--mono); font-size: 12.5px; line-height: 1.55; letter-spacing: 0.01em; color: var(--ink-2); }
.caps { font-family: var(--sans); font-weight: 500; font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase; }
.wrap { width: min(1240px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------------- header: two small lanterns of glass ---------------- */
.top { position: fixed; inset: 18px var(--gutter) auto; z-index: 50; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.top > * { pointer-events: auto; }
.pill {
  display: flex; align-items: center; gap: 22px; padding: 10px 20px; border-radius: 999px;
  background: rgba(9, 15, 22, 0.62); border: 1px solid rgba(239, 232, 217, 0.09);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.brand { gap: 0; font-family: var(--serif); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; text-decoration: none; font-variation-settings: "SOFT" 100, "opsz" 24; }
.brand b { color: var(--lamp); font-weight: 600; }
.nav a { font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none; color: var(--ink-2); transition: color 600ms var(--ease); }
.nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .nav a:not(:last-child) { display: none; } .pill { padding: 9px 16px; } }

/* ======================= cover: TAKTO, taken apart ======================= */
.cover { position: relative; height: 100svh; min-height: 620px; overflow: hidden; background: var(--night); }
/* the words sit in the dark below the wake, and the film sinks into the room below */
.cover::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(110% 80% at 0% 100%, rgba(3, 8, 12, 0.86) 0%, rgba(3, 8, 12, 0.5) 30%, rgba(3, 8, 12, 0) 58%),
    linear-gradient(180deg, rgba(3, 8, 12, 0.4) 0%, rgba(3, 8, 12, 0) 16%, rgba(3, 8, 12, 0) 76%, var(--night) 100%);
}
.cover-film, .cover-film video { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-film video { object-fit: cover; }
.cover-cap { position: absolute; right: var(--gutter); bottom: clamp(36px, 8svh, 96px); z-index: 2; color: #8E887C; font-size: 11.5px; }
@media (max-aspect-ratio: 4 / 5) { .cover-cap { display: none; } }
@keyframes glowbreath { from { opacity: 0.78; } to { opacity: 1; } }

.cover-text { position: absolute; left: var(--gutter); bottom: clamp(36px, 8svh, 96px); z-index: 2; max-width: 680px; }
.cover-meta { margin-bottom: 26px; color: #D3CCBC; font-size: 13px; }
.cover-meta span { display: block; }
.name {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.035em; line-height: 0.92; color: #F4EDDE;
  font-size: clamp(54px, 7.8vw, 122px); font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 144;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.45);
}
.cover-sub { margin-top: 18px; display: flex; gap: 18px; align-items: baseline; flex-wrap: wrap; }
.cover-sub .caps { color: var(--ink); }
.cover-sub .mono { color: #D3CCBC; }
.vertical {
  position: absolute; left: calc(var(--gutter) * 0.4); top: 50%; translate: 0 -50%; z-index: 2; white-space: nowrap;
  writing-mode: vertical-rl; rotate: 180deg; font-family: var(--sans); font-weight: 500; font-size: 11px;
  letter-spacing: 0.36em; text-transform: uppercase; color: rgba(239, 232, 217, 0.62);
}
@media (max-height: 760px), (max-aspect-ratio: 4 / 5) { .vertical { display: none; } }
.scroll-cue { margin-top: 28px; display: flex; align-items: center; gap: 12px; color: #B8B1A2; }
.scroll-cue i { width: 64px; height: 1px; background: var(--ink-2); transform-origin: left; animation: cue 3.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleX(0); opacity: 1; } 60% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@media (max-aspect-ratio: 4 / 5) { .cover-text { bottom: 8svh; max-width: 84vw; } .cover-meta { display: none; } }

/* ---------------- slow reveals, and rest out of sight ---------------- */
.rise { opacity: 0; transform: translateY(26px); transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); transition-delay: var(--t, 0ms); }
.rise.in { opacity: 1; transform: none; }
.asleep, .asleep *, .asleep *::before, .asleep *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise { opacity: 1; transform: none; }
}

/* ======================= prelude ======================= */
.prelude { padding: clamp(120px, 20vh, 230px) 0 clamp(60px, 9vh, 120px); text-align: center; }
.prelude-text { font-family: var(--serif); font-style: italic; font-weight: 360; font-size: clamp(30px, 4.4vw, 64px); line-height: 1.22;
  letter-spacing: -0.014em; max-width: 920px; margin-inline: auto; color: var(--ink); font-variation-settings: "SOFT" 100, "opsz" 72; }

/* ======================= the parts ======================= */
.part { position: relative; padding: clamp(90px, 14vh, 170px) 0; }
.part-no { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; color: var(--ink-2); }
.part-no .caps { font-size: 14px; letter-spacing: 0.02em; text-transform: none; font-weight: 600; }
.part-no b { font-family: var(--sans); font-weight: 500; font-size: clamp(58px, 6.6vw, 96px); line-height: 0.88; letter-spacing: -0.02em; color: var(--ink); }
.part-title { font-family: var(--serif); font-weight: 460; font-size: clamp(34px, 4vw, 58px); letter-spacing: -0.022em; line-height: 1.04;
  margin: 6px 0 12px; color: var(--ink); font-variation-settings: "SOFT" 60, "opsz" 72; }
.one { font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: 34ch; }
.links { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 20px; }
.links a { font-family: var(--sans); font-size: 12.5px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none;
  padding-bottom: 4px; border-bottom: 1px solid rgba(239, 232, 217, 0.45); transition: color 500ms var(--ease), border-color 500ms var(--ease); }
.links a:hover { color: var(--lamp); border-color: var(--lamp); }
.part-head { position: relative; z-index: 2; }
figure { margin: 0; }
figcaption.mono, .cap { color: var(--muted); font-size: 11.5px; }

/* ======================= Part 01: the hand ======================= */
/* the hand, as the product hero: both finishes afloat in the dark, the fingers and screens alive */
.part-hand { padding-top: clamp(40px, 8vh, 100px); }
.hand-hero { position: relative; margin: 0; }
.hand-film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--night);
  -webkit-mask-image: radial-gradient(ellipse 78% 80% at 50% 50%, #000 70%, transparent 100%); mask-image: radial-gradient(ellipse 78% 80% at 50% 50%, #000 70%, transparent 100%); }
.hand-hero .part-head { position: absolute; left: var(--gutter); top: clamp(12px, 3%, 56px); width: min(330px, 25vw); margin: 0; }
.hand-note { color: var(--muted); font-size: 11.5px; margin-top: 12px; max-width: 34ch; }
@media (max-aspect-ratio: 4/5) {
  .hand-film video { aspect-ratio: 9 / 16; }
  .hand-hero .part-head { position: static; width: auto; margin: 6px var(--gutter) 0; }
}

/* ======================= Part 02: the lab, its physics as paintings ======================= */
.part-lab { padding-bottom: clamp(60px, 9vh, 120px); }
.part-lab .part-head { margin-bottom: clamp(36px, 6vh, 70px); }
.sims { display: grid; gap: clamp(60px, 11vh, 140px); }
.sim { position: relative; }
.sim video, .sim img { width: 100%; height: auto; background: var(--night); }
.sim.full { width: 100vw; margin-left: calc(50% - 50vw); }
.sim.full video, .sim.full img { height: auto; object-fit: cover; max-height: 92svh; }
/* the art melts into the room: no frame, the edges fade to the page */
.sim .veil { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--night) 0%, rgba(7, 11, 16, 0) 14%, rgba(7, 11, 16, 0) 86%, var(--night) 100%),
              linear-gradient(90deg, var(--night) 0%, rgba(7, 11, 16, 0) 9%, rgba(7, 11, 16, 0) 91%, var(--night) 100%); }
.sim figcaption { position: relative; z-index: 1; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; margin-top: 12px; }
.sim.full figcaption { width: min(1240px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.sim figcaption b { font-family: var(--serif); font-weight: 460; font-size: 19px; color: var(--ink); letter-spacing: -0.01em; }
.sim-pair { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: end; }
.sim-pair.flip { grid-template-columns: 1fr 1.15fr; align-items: start; }
.sim-pair .sim:nth-child(2) { margin-top: clamp(40px, 12vh, 160px); }
.sim-pair.flip .sim:nth-child(2) { margin-top: 0; }
.sim-pair.flip .sim:nth-child(1) { margin-top: clamp(40px, 12vh, 160px); }
@media (max-width: 820px) { .sim-pair, .sim-pair.flip { grid-template-columns: 1fr; } .sim-pair .sim:nth-child(n) { margin-top: 0; } }

/* ======================= Part 03: printed with light ======================= */
.part-metal { padding-top: 0; }
/* the beam: a film of printing under the poster's light, its top and bottom sinking into the night */
.beam { position: relative; margin: 0; }
.beam-art { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--night); }
.beam-art video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-aspect-ratio: 4/5) { .beam-art { aspect-ratio: 9 / 16; } }
.beam-note { color: var(--muted); font-size: 11.5px; margin-top: 12px; max-width: 36ch; }
.beam .veil { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--night) 0%, rgba(7, 11, 16, 0) 9%, rgba(7, 11, 16, 0) 90%, var(--night) 100%); }
.beam .part-head { position: absolute; left: var(--gutter); top: clamp(56px, 11%, 170px); max-width: min(400px, 34vw); margin: 0; }
.metal-row { display: flex; gap: clamp(16px, 2.2vw, 30px); align-items: flex-start; margin-top: clamp(40px, 7vh, 90px); }
.metal-row figure { flex: var(--ar) 1 0; min-width: 0; margin: 0; }
.metal-row .frame { aspect-ratio: var(--ar); overflow: hidden; background: #0B1118; }
.metal-row .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.metal-row figcaption { margin-top: 12px; display: flex; gap: 14px; flex-wrap: wrap; align-items: baseline; }
.metal-row figcaption b, .work figcaption b { font-family: var(--serif); font-weight: 460; font-size: 19px; color: var(--ink); letter-spacing: -0.01em; }
@media (max-aspect-ratio: 4/5) {
  .beam .part-head { position: relative; left: auto; top: auto; max-width: none; margin: 18px var(--gutter) 0; }
}
@media (max-width: 820px) {
  .metal-row { flex-direction: column; }
  .metal-row figure { flex: none; width: 100%; }
}

/* ======================= Part 04: works, hung like paintings ======================= */
.part-works .part-head { margin-bottom: clamp(50px, 8vh, 100px); }
.salon { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(60px, 10vh, 130px) clamp(20px, 3vw, 48px); align-items: start; }
.work { position: relative; grid-column: var(--c, 1 / span 7); margin-top: var(--m, 0); }
/* each one under its own small light, as in a gallery after hours */
.work::before { content: ""; position: absolute; left: 50%; top: -14%; width: 120%; height: 70%; translate: -50% 0; pointer-events: none; z-index: -1;
  background: radial-gradient(50% 60% at 50% 0%, rgba(227, 188, 130, 0.10) 0%, rgba(227, 188, 130, 0.03) 50%, rgba(227, 188, 130, 0) 75%); }
.work .frame { position: relative; overflow: hidden; background: #0B1118; }
.work .frame img, .work .frame video { width: 100%; height: 100%; object-fit: cover; aspect-ratio: var(--ar, 16 / 10); }
.work figcaption { margin-top: 16px; display: grid; gap: 3px; }
.work figcaption .mono { color: var(--muted); font-size: 11.5px; }
.work figcaption span:last-child { color: var(--ink-2); font-size: 15.5px; line-height: 1.5; max-width: 46ch; }
@media (max-width: 820px) { .salon { grid-template-columns: 1fr; } .work { grid-column: 1 / -1; margin-top: 0; } }
/* rooms: the works that move, each in its own space */
.rooms { display: grid; gap: clamp(120px, 20vh, 240px); margin-bottom: clamp(120px, 20vh, 240px); }
.room { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 36px); align-items: center; }
.room::before { content: ""; position: absolute; inset: -12% -6%; z-index: -1; pointer-events: none;
  background: radial-gradient(46% 52% at 50% 46%, rgba(143, 180, 200, 0.06) 0%, rgba(143, 180, 200, 0.02) 50%, rgba(143, 180, 200, 0) 76%); }
.room-head { grid-column: 1 / -1; display: grid; grid-template-columns: 3.6em minmax(0, 1fr) minmax(0, 1fr); gap: 10px clamp(18px, 2.4vw, 36px); align-items: start;
  border-top: 1px solid rgba(239, 232, 217, 0.16); padding-top: clamp(18px, 2.4vh, 26px); margin-bottom: clamp(6px, 1.4vh, 16px); }
.room-head .room-no { color: var(--lamp); font-size: 12px; letter-spacing: 0.08em; padding-top: 0.55em; }
.room-head h3 { font-family: var(--serif); font-weight: 460; font-size: clamp(27px, 2.7vw, 38px); line-height: 1.1; letter-spacing: -0.01em; color: var(--ink); }
.room-head .room-meta { color: var(--muted); font-size: 11.5px; margin-top: 9px; }
.room-head .room-role { color: var(--ink); font-size: 16px; line-height: 1.55; max-width: 44ch; padding-top: 0.2em; }
.room-head .room-role .caps { display: block; color: var(--lamp); font-size: 11px; margin-bottom: 7px; }
.room-label > p:not(.links):not(.mono) { color: var(--ink-2); font-size: 15.5px; line-height: 1.62; max-width: 44ch; }
.room-label > .links { margin-top: 16px; }
@media (max-width: 900px) { .room-head { grid-template-columns: 1fr; gap: 6px; } .room-head .room-no { padding-top: 0; } .room-beam .room-head { order: -1; } }
.room-label h3 { font-family: var(--serif); font-weight: 460; font-size: clamp(24px, 2.3vw, 31px); line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
.room-label .mono { color: var(--muted); font-size: 11.5px; margin-top: 7px; }
.room-label p:last-child { color: var(--ink-2); font-size: 15.5px; line-height: 1.62; margin-top: 14px; max-width: 44ch; }
.room-grip .grip-photos { grid-column: 1 / span 3; display: grid; gap: clamp(12px, 1.4vw, 18px); }
.room-grip .grip-photos img { width: 100%; height: auto; display: block; }
.room-grip .grip-svg { grid-column: 4 / span 6; width: 100%; height: auto; aspect-ratio: 760 / 640; display: block; }
.room-grip .room-label { grid-column: 10 / span 3; align-self: end; padding-bottom: 6%; }
.grip-label { font: 13px var(--mono); fill: var(--muted); letter-spacing: 0.04em; }
.room-hsi .hsi-cube { grid-column: 1 / span 7; width: 100%; aspect-ratio: 1070 / 1052; display: block; }
.room-hsi .hsi-side { grid-column: 8 / span 5; }
.hsi-plot { width: 100%; height: auto; aspect-ratio: 560 / 300; display: block; margin-top: clamp(24px, 4vh, 44px); }
.hsi-tick, .hsi-name { font: 11px var(--mono); fill: var(--muted); }
.hsi-name { font-size: 12px; }
.hsi-bar { container-type: inline-size; position: relative; height: 12px; margin: 8px 0 0 6.07%; width: 78.57%; border-radius: 6px; cursor: ew-resize; touch-action: none; }
.hsi-bar i { position: absolute; left: 0; top: -5px; width: 2px; height: 22px; background: #FFF4DE; box-shadow: 0 0 8px rgba(255, 244, 222, 0.6); }
.hsi-read, .hsi-note { margin: 10px 0 0 6.07%; }
.hsi-read b { color: var(--ink); font-weight: 400; }
.hsi-note { color: var(--muted); font-size: 11.5px; margin-top: 16px; }
.room-cyc .cyc-films { grid-column: 1 / -1; display: flex; gap: clamp(14px, 1.8vw, 24px); align-items: flex-start; }
.room-cyc figure { flex: var(--ar) 1 0; min-width: 0; margin: 0; }
.room-cyc video { width: 100%; height: auto; aspect-ratio: var(--ar); object-fit: cover; display: block; background: var(--night);
  -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 58%, transparent 100%); mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 58%, transparent 100%); }
.room-cyc figcaption { margin-top: 10px; color: var(--muted); font-size: 11.5px; }
.room-cyc .room-label { grid-column: 1 / span 7; }
.room-house { align-items: start; row-gap: clamp(22px, 3vw, 40px); }
.room-house figure { margin: 0; }
.room-house img { width: 100%; height: auto; display: block; }
.room-house .house-hero { grid-column: 1 / -1; }
.room-house .house-hero video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--night); }
@media (max-aspect-ratio: 4/5) { .room-house .house-hero video { aspect-ratio: 4 / 5; } }
.room-house .house-roof { grid-column: 1 / span 7; }
.room-house .house-side { grid-column: 8 / span 5; display: grid; gap: clamp(26px, 4vh, 44px); }
.room-house .house-night figcaption { margin-top: 10px; color: var(--muted); font-size: 11.5px; }
.room-cart { align-items: start; row-gap: clamp(26px, 3.4vw, 46px); }
.room-cart figure { margin: 0; }
.room-cart img, .room-cart video { width: 100%; height: auto; display: block; }
.room-cart .cart-floor { grid-column: 1 / -1; }
.room-cart .cart-film { grid-column: 1 / span 7; }
.room-cart .cart-film video { aspect-ratio: 16 / 10; object-fit: cover; background: var(--night);
  -webkit-mask-image: radial-gradient(ellipse 74% 74% at 50% 50%, #000 60%, transparent 100%); mask-image: radial-gradient(ellipse 74% 74% at 50% 50%, #000 60%, transparent 100%); }
.room-cart .room-label { grid-column: 8 / span 5; align-self: center; }
.room-cart .cart-parts { grid-column: 1 / -1; }
.parts-art { position: relative; }
.parts-labels { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.parts-labels circle { fill: none; stroke: #F3E3BF; stroke-width: 3; }
.parts-labels path { fill: none; stroke: rgba(243, 227, 191, 0.8); stroke-width: 2; }
.parts-labels text { font: 27px var(--mono); fill: #EFE8D9; letter-spacing: 0.02em; paint-order: stroke; stroke: rgba(7, 11, 16, 0.78); stroke-width: 7px; stroke-linejoin: round; }
.cart-parts figcaption { display: none; margin-top: 12px; color: var(--muted); font-size: 11.5px; }
@media (max-aspect-ratio: 4/5) { .parts-labels { display: none; } .cart-parts figcaption { display: block; } }
@media (max-width: 900px) {
  .room > * { grid-column: 1 / -1 !important; }
  .room-grip .grip-photos { grid-template-columns: 1fr 1fr; order: 2; align-items: end; }
  .room-grip .room-label { order: 3; padding-bottom: 0; }
  .room-cyc .cyc-films { flex-direction: column; }
  .room-cyc figure { flex: none; width: 100%; }
}
/* the ball and beam: his PID loop, alive on a drawing of his own parts */
.room-beam { align-items: start; }
.room-beam .beam-film { grid-column: 1 / -1; margin: 0 0 clamp(8px, 2vh, 24px); }
.room-beam .beam-film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--night); }
.room-beam .beam-film figcaption { margin-top: 10px; color: var(--muted); font-size: 11.5px; }
@media (max-aspect-ratio: 4/5) { .room-beam .beam-film video { aspect-ratio: 4 / 5; } }
.room-beam .beam-stage { grid-column: 1 / span 8; display: grid; gap: clamp(26px, 4vh, 44px); }
.room-beam .beam-side { grid-column: 9 / span 4; display: grid; gap: clamp(24px, 3.6vh, 38px); align-content: start; }
.beam-svg { width: 100%; height: auto; aspect-ratio: 308 / 172; display: block; overflow: visible; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.beam-svg * { vector-effect: non-scaling-stroke; }
.beam-tag { font-family: var(--mono); font-size: 5px; letter-spacing: 0.02em; }
.beam-live { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(22px, 3.2vw, 48px); align-items: start; }
.beam-plot { width: 100%; height: auto; aspect-ratio: 420 / 200; display: block; }
.beam-read { margin-top: 6px; color: var(--ink-2); display: flex; flex-wrap: wrap; column-gap: 1.1em; }
.beam-read span { white-space: nowrap; }
.beam-read b { color: var(--ink); font-weight: 400; }
.beam-gains { display: grid; gap: 2px; }
.beam-gain { display: grid; grid-template-columns: 6.6em minmax(0, 1fr) 4.2em; align-items: center; gap: 10px; }
.beam-gain span, .beam-gain output { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.beam-gain output { color: var(--ink); text-align: right; }
.beam-cap { color: var(--muted); font-size: 11.5px; margin: -3px 0 9px calc(6.6em + 10px); }
.beam-note, .beam-about { color: var(--muted); font-size: 11.5px; max-width: 46ch; }
.beam-note { margin-top: 6px; }
.beam-hero { margin: 0; }
.beam-hero img, .beam-hero video { width: 100%; height: auto; display: block; }
.beam-hero figcaption { margin-top: 10px; color: var(--muted); font-size: 11.5px; }
/* the sliders: a hair of a track, lamp up to the value, and the spectrum's lit cursor */
.beam-gain input { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; margin: 0; background: transparent; cursor: ew-resize; --v: 50%; }
.beam-gain input::-webkit-slider-runnable-track { height: 1px; background: linear-gradient(90deg, rgba(227, 188, 130, 0.8) var(--v), rgba(239, 232, 217, 0.22) var(--v)); }
.beam-gain input::-moz-range-track { height: 1px; background: linear-gradient(90deg, rgba(227, 188, 130, 0.8) var(--v), rgba(239, 232, 217, 0.22) var(--v)); }
.beam-gain input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 22px; margin-top: -10.5px; border: 0; border-radius: 0;
  background: linear-gradient(90deg, transparent 3px, rgba(255, 244, 222, 0.22) 5px, #FFF4DE 6px, #FFF4DE 8px, rgba(255, 244, 222, 0.22) 9px, transparent 11px); }
.beam-gain input::-moz-range-thumb { width: 14px; height: 22px; border: 0; border-radius: 0;
  background: linear-gradient(90deg, transparent 3px, rgba(255, 244, 222, 0.22) 5px, #FFF4DE 6px, #FFF4DE 8px, rgba(255, 244, 222, 0.22) 9px, transparent 11px); }
.beam-gain input:focus-visible { outline: 1px solid var(--lamp); outline-offset: 2px; }
@media (max-width: 900px) {
  .room-beam .beam-stage, .room-beam .beam-side { display: contents; }
  .room-beam .beam-stage > *, .room-beam .beam-side > * { grid-column: 1 / -1; }
  .room-beam .beam-film { order: 0; }
  .room-beam .beam-hero { order: 1; }
  .room-beam .room-label { order: 2; }
  .room-beam .beam-svg { order: 3; }
  .room-beam .beam-live { order: 4; grid-template-columns: minmax(0, 1fr); }
  .room-beam .beam-about { order: 5; }
}
/* stills that breathe: a slow push in, so nothing on the page is quite still (transform only, asleep off screen) */
.breathe { overflow: hidden; }
.breathe img { animation: breathe-in 46s ease-in-out infinite alternate; transform-origin: 55% 50%; }
.breathe.b2 img { animation-duration: 38s; animation-direction: alternate-reverse; transform-origin: 40% 55%; }
@keyframes breathe-in { from { transform: scale(1.01); } to { transform: scale(1.085) translate(-1%, 0.6%); } }
/* the index: everything, by year, as a museum lists its holdings */
.index { margin-top: clamp(110px, 16vh, 190px); }
.index h3 { font-family: var(--sans); font-weight: 500; font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 22px; }
.index ol { list-style: none; columns: 2 380px; column-gap: clamp(30px, 5vw, 80px); }
.index li { display: grid; grid-template-columns: 74px 1fr; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); break-inside: avoid; }
.index li .mono { color: var(--muted); font-size: 12px; padding-top: 3px; }
.index li b { font-family: var(--serif); font-weight: 460; font-size: 17.5px; letter-spacing: -0.01em; color: var(--ink); }
.index li em { display: block; font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ======================= Part 05: why (the night sky) ======================= */
.part-why { min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding-bottom: clamp(220px, 30vh, 300px);
  background: linear-gradient(180deg, var(--night) 0%, #0A1320 22%, #0F1B2E 70%, #12213A 100%); }
/* the sky is drawn once, in three layers; turning, twinkling and falling stars are all the compositor's */
.sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sky canvas { position: absolute; left: -30%; top: -30%; width: 160%; height: 160%; transform-origin: 50% 8%;
  animation: skyturn 900s linear infinite alternate, twinkle var(--tw, 7s) ease-in-out infinite alternate; }
.sky canvas:nth-child(2) { --tw: 11s; animation-delay: -300s, -4s; }
.sky canvas:nth-child(3) { --tw: 17s; animation-delay: -600s, -9s; }
@keyframes skyturn { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
@keyframes twinkle { from { opacity: 0.5; } to { opacity: 1; } }
.meteor { position: absolute; left: 22%; top: 16%; width: 9vw; height: 1.5px; border-radius: 1px; opacity: 0;
  background: linear-gradient(90deg, rgba(255, 244, 220, 0), rgba(255, 244, 220, 0.9)); rotate: 30deg; animation: meteor 41s linear 9s infinite; }
.meteor.m2 { left: 64%; top: 9%; rotate: 38deg; animation-duration: 59s; animation-delay: 27s; }
@keyframes meteor { 0% { opacity: 0; transform: translateX(0); } 1% { opacity: 1; } 3.2% { opacity: 0; transform: translateX(16vw); } 100% { opacity: 0; transform: translateX(16vw); } }
.why-text { position: relative; z-index: 1; max-width: 800px; text-align: center; margin-inline: auto; }
.part-why .part-no { justify-content: center; margin-bottom: 26px; }
.why-text .why-line { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.5vw, 52px); line-height: 1.24; letter-spacing: -0.015em; color: #EFE8D9;
  margin: 0 auto 30px; max-width: 26ch; font-variation-settings: "SOFT" 100, "opsz" 72; }
.why-text .why-answer { font-size: clamp(19px, 1.9vw, 28px); line-height: 1.5; color: var(--ink-2); margin-top: 1.6em; max-width: 34em; margin-inline: auto; text-wrap: balance; }
.hill { position: absolute; left: 0; bottom: 0; width: 100%; height: 170px; }
.sitter { position: absolute; left: 63.4%; bottom: 92px; width: 40px; filter: drop-shadow(0 0 1px rgba(168, 195, 214, 0.35)); }
@media (max-width: 700px) { .sitter { width: 30px; bottom: 100px; } }

/* ======================= coda ======================= */
.coda { position: relative; padding: clamp(120px, 18vh, 200px) 0 34px; text-align: center; overflow: hidden; background: linear-gradient(180deg, #0A1018 0%, var(--night) 100%); }
.coda-title { font-family: var(--serif); font-weight: 460; font-size: clamp(36px, 5.2vw, 76px); line-height: 1.06; letter-spacing: -0.026em; color: var(--ink); font-variation-settings: "SOFT" 60, "opsz" 96; }
.coda-mail { margin-top: 30px; font-size: clamp(18px, 2vw, 24px); }
.coda-mail a { text-decoration-color: var(--lamp); text-decoration-thickness: 1.5px; }
.coda .links { justify-content: center; }
/* the end: the person from Part 03, in a small pool of light, still looking up */
.coda-light { position: relative; width: min(300px, 70vw); margin: 64px auto 0; }
.coda-light img { position: relative; z-index: 1; display: block; width: 100%; height: auto; }
.coda-light::before { content: ""; position: absolute; left: 50%; top: 62%; width: 140%; aspect-ratio: 2.4; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 228, 180, 0.14), rgba(255, 210, 150, 0.04) 55%, rgba(255, 200, 140, 0) 75%); animation: glowbreath 9s ease-in-out infinite alternate; }
.foot { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 70px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11.5px; text-align: left; }

/* ======================= narrow screens ======================= */
@media (max-width: 900px) {
}

/* the gripper and the arm that drives it, side by side in one frame */
.diptych { display: grid; grid-template-columns: 0.9fr 1fr; align-items: end; gap: 4%; padding: 6% 6% 0; background: radial-gradient(70% 60% at 50% 40%, #121B26 0%, #0B1118 70%); }
.work .diptych img { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; }
.diptych .d-grip { margin-bottom: 9%; }

/* phones: the films are cut tall, like the posters made for them */
@media (max-aspect-ratio: 4 / 5) {
  .sim.full video[data-poster-m], .sim.full img { aspect-ratio: 4 / 5; max-height: none; }
  .sim video[data-poster-m] { aspect-ratio: 4 / 5; object-fit: cover; }
}

/* the opening: the film comes up out of the dark, then the words, one by one.
   The dark is a veil lifting off the film, not the film fading in: it looks the same, but the
   cover's picture counts as painted from the first frame (search engines time that). */
.cover-film::after { content: ""; position: absolute; inset: 0; background: var(--night); opacity: 0; pointer-events: none; animation: dawn 3.4s var(--ease) both; }
@keyframes dawn { from { opacity: 1; } }
.cover-text > *, .cover .vertical { animation: arrive 2.2s var(--ease) both; }
.cover-meta { animation-delay: 0.9s !important; }

.cover .name { animation-delay: 1.3s !important; }
.cover-sub { animation-delay: 1.9s !important; }
.scroll-cue { animation-delay: 2.5s !important; }
.cover .vertical { animation-delay: 2.8s !important; }
@keyframes arrive { from { opacity: 0; transform: translateY(14px); } }

/* Part 03: the laser at work, between the beam and the metal it makes */
.part-metal .sims { margin-top: clamp(70px, 12vh, 150px); }
