/* Adham Momen, portfolio.
   Dark site, one light passage (statement + signal), one accent: signal amber, the colour of a status light.
   Two modes: html.gl (WebGL canvas behind, home sections pinned and driven by scroll) and html.static (plain flowing pages). */
:root {
  --ink: #050607;
  --ink-2: #0b0e11;
  --fg: #eef1f3;
  --mute: #a9b2b9;
  --dim: #7d878e;
  --line: rgba(238, 241, 243, 0.14);
  --paper: #e6e3dc;
  --paper-ink: #0c0e10;
  --amber: #ffb43a;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --code: "Google Sans Code", "IBM Plex Mono", ui-monospace, monospace;
  --serif: "Libre Caslon Display", "Didot", Georgia, serif;

  --pad: clamp(16px, 3.2vw, 44px);
  --hd: 76px;
  --ease: cubic-bezier(.25, .46, .45, .94);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; scrollbar-width: none; }
/* no scrollbar at the side: the page still scrolls with wheel, trackpad, keys and touch */
html::-webkit-scrollbar { display: none; }
body {
  margin: 0; background: var(--ink); color: var(--fg);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, video, svg { display: block; max-width: 100%; }
picture { display: block; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
:focus-visible { outline: 1px solid var(--amber); outline-offset: 4px; }
::selection { background: var(--amber); color: var(--ink); }

.mono { font-family: var(--mono); }
.code { font-family: var(--code); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font: 500 12.5px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.arr { display: inline-block; transition: transform .3s var(--ease); }
a:hover .arr { transform: translate(2px, -2px); }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--fg); color: var(--ink); font: 500 14.5px var(--mono); }
.skip:focus { top: 12px; }

.mark { width: 1em; height: 1em; overflow: visible; }
.mark-body { fill: currentColor; }
.mark-bar { fill: var(--amber); }

.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 16px;
  border: 1px solid currentColor; border-radius: 999px; font: 400 13.5px/1 var(--mono); letter-spacing: .02em;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.pill:hover { background: var(--fg); color: var(--ink); border-color: var(--fg); }
.ring {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1px solid currentColor; border-radius: 50%;
  font: 400 13.5px/1 var(--mono); flex: none; transition: transform .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
a:hover .ring { background: var(--fg); color: var(--ink); transform: rotate(45deg); }

.status { display: inline-flex; align-items: center; gap: 7px; font: 400 13.5px/1 var(--code); letter-spacing: .02em; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.is-progress { color: var(--amber); }
.status.is-progress i { animation: blink 2s steps(1) infinite; box-shadow: 0 0 8px var(--amber); }
.status.is-shipped { color: #9fe0b5; }
@keyframes blink { 50% { opacity: .25; } }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font: 400 12.5px/1 var(--code); padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--mute); }

/* ---------- canvas, grain fallback ---------- */
.canvas-gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: none; }
html.gl .canvas-gl { display: block; }
html:not(.gl) body {
  background-image:
    linear-gradient(to right, rgba(238,241,243,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(238,241,243,.045) 1px, transparent 1px);
  background-size: 120px 120px;
}

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 60; background: var(--ink); display: none;
  place-items: center; grid-template-rows: 1fr auto auto; padding: 8vh var(--pad) 6vh;
}
html.js .loader { display: grid; }
html.js.loaded .loader { pointer-events: none; }
.loader-lines { width: min(64vh, 82vw); height: auto; align-self: center; overflow: visible; }
.loader-lines * { fill: none; vector-effect: non-scaling-stroke; }
.loader-lines .g { stroke: rgba(238,241,243,.32); stroke-width: 1; }
.loader-lines .d { stroke: rgba(238,241,243,.28); stroke-width: 1; stroke-dasharray: 2 4; }
.loader-lines .m { stroke: var(--fg); stroke-width: 1.4; }
.loader-lines .mb { stroke: var(--amber); stroke-width: 1.4; }
.loader-lines .fill { fill: var(--fg); stroke: none; opacity: 0; }
.loader-lines .fillbar { fill: var(--amber); stroke: none; opacity: 0; }
.loader-line { font-size: 13.5px; letter-spacing: .04em; color: var(--fg); min-height: 1.4em; }
.loader-caret { display: inline-block; width: .55em; height: 1em; margin-left: 2px; background: var(--amber); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
.loader-count { font-size: 12.5px; color: var(--mute); margin-top: 10px; font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
.hd {
  position: fixed; inset: 0 0 auto; z-index: 40; height: var(--hd);
  padding: env(safe-area-inset-top, 0px) max(var(--pad), env(safe-area-inset-right, 0px)) 0 max(var(--pad), env(safe-area-inset-left, 0px));
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  color: var(--fg); transition: color .5s var(--ease);
}
.hd-logo { display: inline-flex; align-items: center; gap: 10px; justify-self: start; }
.hd-mark { font-size: 22px; }
.hd-name { font: 600 14.5px/1 var(--display); font-stretch: 118%; letter-spacing: .08em; text-transform: uppercase; }
.hd-nav { display: flex; align-items: center; gap: 28px; font-size: 14.5px; letter-spacing: .06em; }
.hd-nav a { position: relative; padding: 4px 0; }
.hd-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.hd-nav a:hover::after, .hd-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.hd-lab { color: var(--mute); font-size: 13.5px; }
.hd-lab a { color: var(--fg); }
body.is-light .hd-lab a { color: var(--paper-ink); }
.hd-right { display: flex; align-items: center; gap: 16px; justify-self: end; }
.hd-sound { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; letter-spacing: .04em; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 2px; height: 3px; background: currentColor; transition: height .3s; }
.hd-sound[aria-pressed="true"] .eq i { animation: eq 1.1s ease-in-out infinite; background: var(--amber); }
.hd-sound[aria-pressed="true"] .eq i:nth-child(2) { animation-delay: -.3s; }
.hd-sound[aria-pressed="true"] .eq i:nth-child(3) { animation-delay: -.6s; }
.hd-sound[aria-pressed="true"] .eq i:nth-child(4) { animation-delay: -.9s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
.hd-menu { display: none; width: 34px; height: 34px; position: relative; }
.hd-menu i { position: absolute; left: 7px; right: 7px; height: 1px; background: currentColor; transition: transform .4s var(--ease); }
.hd-menu i:first-child { top: 13px; } .hd-menu i:last-child { top: 20px; }
.hd-menu[aria-expanded="true"] i:first-child { transform: translateY(3.5px) rotate(45deg); }
.hd-menu[aria-expanded="true"] i:last-child { transform: translateY(-3.5px) rotate(-45deg); }
body.is-light .hd { color: var(--paper-ink); }
body:not([data-page="home"]) .hd::before { content: ""; position: absolute; inset: 0 0 -24px; z-index: -1; background: linear-gradient(rgba(5,6,7,.86), rgba(5,6,7,0)); pointer-events: none; }

.menu { position: fixed; inset: 0; z-index: 35; background: rgba(5,6,7,.985); padding: calc(var(--hd) + 8vh) var(--pad) 8vh; display: grid; align-content: space-between; }
.menu[hidden] { display: none; }
.menu-nav { display: grid; gap: 4px; }
.menu-nav a { font: 600 clamp(40px, 12vw, 72px)/1.05 var(--display); font-stretch: 112%; }
.menu-lab { color: var(--mute); font-size: 14.5px; }
.menu-lab a { color: var(--fg); }

/* ---------- dock + dev panel (home, gl) ---------- */
/* the dock is the small A on the left: every floor you have read sits in it, and it jumps between floors */
.dock, .dev { display: none; }
html.gl body[data-page="home"] .dock { display: block; }
html.gl body[data-page="home"] .dev { display: block; }
.dock { position: fixed; z-index: 30; left: max(var(--pad), env(safe-area-inset-left, 0px)); top: 50%; width: 64px; height: 64px; margin-top: -32px; color: var(--fg); transition: color .5s var(--ease), opacity .6s var(--ease); opacity: var(--dock, 0); }
.dock-a { width: 100%; height: 100%; overflow: visible; }
.dk { fill: transparent; stroke: currentColor; stroke-opacity: .32; stroke-width: 1; vector-effect: non-scaling-stroke; transition: fill .35s var(--ease), stroke-opacity .35s var(--ease); }
.dk.is-read { fill: currentColor; stroke-opacity: 0; }
.dk.is-amber.is-read { fill: var(--amber); }
.dk.is-here { stroke: var(--amber); stroke-opacity: 1; }
.dock-list { position: absolute; inset: 0; }
.dock-list li { position: absolute; left: -10px; right: -10px; height: 15%; transform: translateY(-2%); }
.dock-list button { position: absolute; inset: 0; width: 100%; }
.dock-list .code, .dock-name { position: absolute; top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease); }
.dock-list .code { left: calc(100% + 6px); color: var(--amber); }
.dock-name { left: calc(100% + 34px); }
.dock-list button:hover .code, .dock-list button:hover .dock-name, .dock-list button:focus-visible .code, .dock-list button:focus-visible .dock-name { opacity: 1; transform: translate(4px, -50%); }
.dock:hover .dock-list li.is-here .code { opacity: 1; }
body.is-light .dock { color: var(--paper-ink); }
body.is-end .dock, body.is-end .dev { opacity: 0; pointer-events: none; }

.dev { position: fixed; top: calc(var(--hd) + 4px); right: max(var(--pad), env(safe-area-inset-right, 0px)); z-index: 30; width: 188px; font-size: 12px; color: rgba(238,241,243,.82); transition: color .5s var(--ease), opacity .5s; }
.dev-head { display: flex; justify-content: space-between; align-items: center; letter-spacing: .04em; }
.dev-fold { width: 18px; height: 18px; line-height: 1; }
.dev-body { display: grid; gap: 8px; margin-top: 8px; }
.dev-body[hidden] { display: none; }
.dev-q { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-variant-numeric: tabular-nums; }
.dev-q span { padding: 3px 0; text-align: center; border: 1px solid var(--line); border-radius: 3px; }
.dev-gizmo { width: 92px; height: 92px; justify-self: center; cursor: grab; touch-action: none; }
.dev-gizmo:active { cursor: grabbing; }
.dev-row { display: grid; grid-template-columns: 68px 1fr; align-items: center; gap: 8px; }
.dev-row input { width: 100%; accent-color: var(--amber); height: 14px; }
.dev-reset { justify-self: end; text-decoration: underline; text-underline-offset: 3px; letter-spacing: .03em; }
body.is-light .dev { color: rgba(12,14,16,.7); }
body.is-light .dev-q span { border-color: rgba(12,14,16,.2); }
html.gl body[data-page="home"]:not(.is-top) .dev { opacity: 0; pointer-events: none; }

/* ---------- main + sections (shared) ---------- */
main { position: relative; z-index: 2; }
.sec { position: relative; }
.pin { padding: calc(var(--hd) + 24px) max(var(--pad), env(safe-area-inset-right, 0px)) 48px max(var(--pad), env(safe-area-inset-left, 0px)); }

/* gl mode: each section is a stretch of scroll; its .pin is a fixed layer the director fades in and out */
html.gl body[data-page="home"] .sec { height: calc(var(--len, 1) * 100svh); }
html.gl body[data-page="home"] .pin { position: fixed; inset: 0; opacity: 0; visibility: hidden; pointer-events: none; }
html.gl body[data-page="home"] .pin.is-on { visibility: visible; }
html.gl body[data-page="home"] .pin.is-on a, html.gl body[data-page="home"] .pin.is-on button { pointer-events: auto; }
/* in gl mode the glass carries the pictures and videos; the elements stay in the page as sources */
html.gl .slot-pic, html.gl .cap-video { position: absolute; width: 2px; height: 2px; opacity: 0; pointer-events: none; overflow: hidden; }

/* static mode: sections flow like a long page */
html:not(.gl) .sec .pin { padding-block: 14vh 4vh; }
html:not(.gl) .sec-hero .pin { min-height: 92svh; display: grid; align-content: end; padding-bottom: 10vh; }
html:not(.gl) .fl-statement { background: var(--paper); color: var(--paper-ink); }

/* ---------- hero ---------- */
.sec-hero .pin { display: grid; align-content: end; }
.hero-a { position: absolute; width: 61svh; height: 61svh; top: calc(50% - 32.5svh); left: calc(50% - 4.5svh); pointer-events: none; }
.hero-mark { width: 100%; height: 100%; }
html.gl .hero-mark { display: none; }
html:not(.gl) .hero-a { position: static; width: min(42vw, 260px); height: auto; aspect-ratio: 1; margin-bottom: 6vh; }
.hero-copy { display: grid; gap: 18px; max-width: 760px; padding-bottom: 6vh; position: relative; }
html.gl .hero-copy { padding-left: clamp(0px, 11vw, 170px); }
/* the paragraphs keep clear of the bright posters passing behind: a dark halo around the letters and a small soft
   pool behind just the paragraph, ending well short of the glass A so its refraction stays untouched */
html.gl .hero-intro, html.gl .toc-text, html.gl .sec-hero .eyebrow, html.gl .sec-toc .eyebrow { text-shadow: 0 0 14px rgba(5,6,7,.9), 0 0 4px rgba(5,6,7,.75); }
html.gl .hero-intro, html.gl .toc-text { position: relative; }
html.gl .hero-intro::before, html.gl .toc-text::before { content: ""; position: absolute; inset: -28px -36px; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(5,6,7,.6), rgba(5,6,7,.45) 60%, rgba(5,6,7,0)); }
.hero-title { font: 600 clamp(36px, 5vw, 76px)/.98 var(--display); font-stretch: 112%; letter-spacing: -.012em; text-wrap: balance; }
.hero-title .ln { display: block; }
.hero-intro { max-width: 46ch; color: rgba(238,241,243,.88); font-size: 17px; line-height: 1.65; }
.hero-cue { position: absolute; right: max(var(--pad), env(safe-area-inset-right, 0px)); bottom: 40px; display: flex; align-items: center; gap: 12px; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.hero-cue i { width: 1px; height: 36px; background: linear-gradient(var(--fg), transparent); animation: cue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
html:not(.gl) .hero-cue { display: none; }

/* ---------- contents: the exploded A ---------- */
.sec-toc .pin { display: grid; align-items: center; }
.toc { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6vw; width: min(max(1180px, 62vw), 100%); margin: 0 auto; }
.toc-copy { display: grid; gap: 18px; max-width: 440px; padding-left: clamp(0px, 8vw, 120px); }
.toc-title { font: 600 clamp(28px, 3.1vw, 46px)/1.04 var(--display); font-stretch: 110%; letter-spacing: -.01em; text-wrap: balance; }
.toc-text { color: rgba(238,241,243,.88); font-size: 17px; }
.toc-a { position: relative; height: min(76svh, 760px); margin-right: 220px; }
.toc-slab { position: absolute; }
.toc-slab::before { content: ""; position: absolute; inset: calc(-7px - var(--sy, 0px)) calc(-7px - var(--sx, 0px)); border: 1px dashed rgba(238,241,243,.34); border-radius: 12px; }
.toc-slab.is-amber::before { border-color: rgba(255,180,58,.6); }
.toc-labels { position: absolute; inset: 0; pointer-events: none; }
.toc-labels li { position: absolute; left: calc(100% + 28px); transform: translateY(-50%); pointer-events: auto; }
.toc-labels li::before { content: ""; position: absolute; right: calc(100% + 8px); top: 50%; width: 16px; height: 1px; background: var(--line); }
.toc-labels button { display: inline-flex; gap: 12px; padding: 5px 10px 5px 8px; border-radius: 4px; background: rgba(5,6,7,.78); box-shadow: 0 0 0 1px rgba(238,241,243,.08); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); white-space: nowrap; transition: color .3s var(--ease); }
.toc-labels button { color: rgba(238,241,243,.86); }
.toc-labels button:hover, .toc-labels button:focus-visible { color: var(--fg); background: rgba(5,6,7,.92); }
.toc-labels .code { color: var(--amber); }

/* ---------- floors ---------- */
/* a floor section: its slabs sit exactly where they sit in the A, scaled up to the screen */
.fl .pin { display: grid; }
html.gl .fl .pin { padding-inline: calc(max(var(--pad), env(safe-area-inset-left, 0px)) + 84px); }
.fl-in { --hmax: 44svh; --pw: min(100%, calc(var(--hmax) * var(--ext) / 11)); display: grid; align-content: center; justify-items: center; gap: 22px; min-height: 100%; }
.fl-head, .plan, .plan-under, .fl-in > .st-sub, .sg-hl { width: var(--pw); }
.fl-head { display: flex; align-items: baseline; gap: 18px; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.fl-no { color: var(--amber); }
.fl-dim { margin-left: auto; letter-spacing: .04em; color: var(--mute); font-variant-numeric: tabular-nums; }
.plan { position: relative; aspect-ratio: var(--ext) / 11; }
.slot { position: absolute; top: 0; height: 100%; }
.slot-g { position: absolute; inset: -8px; border: 1px dashed rgba(238,241,243,.3); border-radius: 28px; opacity: var(--g, 0); clip-path: inset(0 calc((1 - var(--g, 0)) * 100%) 0 0); pointer-events: none; }
.slot-g b { position: absolute; width: 14px; height: 14px; }
.slot-g b::before, .slot-g b::after { content: ""; position: absolute; background: rgba(238,241,243,.6); }
.slot-g b::before { left: 50%; top: 0; bottom: 0; width: 1px; } .slot-g b::after { top: 50%; left: 0; right: 0; height: 1px; }
.slot-g b:nth-child(1) { left: -7px; top: -7px; } .slot-g b:nth-child(2) { right: -7px; top: -7px; } .slot-g b:nth-child(3) { left: -7px; bottom: -7px; } .slot-g b:nth-child(4) { right: -7px; bottom: -7px; }
.slot.is-ink::before, .slot-in, .slot-link { border-radius: 22px; }
.slot-in { position: absolute; inset: 0; display: grid; align-content: center; padding: 6% 7%; border-radius: inherit; }
.slot-link { position: absolute; inset: 0; border-radius: inherit; }
html:not(.gl) .slot-pic img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
html:not(.gl) .slot-pic { height: 100%; }
.plan-under { display: grid; }
.plan-under > .under { grid-area: 1 / 1; display: grid; gap: 8px; align-content: start; }

/* F1, statement: the floor is an ink block on paper */
.slot.is-ink::before { content: ""; position: absolute; inset: 0; border-radius: 22px; background: var(--paper-ink); transform-origin: left; transform: scaleX(var(--fill, 1)); }
.st-in { color: var(--paper); padding: 5% 8%; }
.st-in .hl { color: var(--paper); font-size: clamp(22px, 2.9vw, 46px); line-height: 1.22; }
.st-in .hl-line { padding: 0; color: inherit; }
.st-in .hl-line::before { display: none; }
.fl-statement .fl-head { color: rgba(12,14,16,.75); }
.fl-statement .fl-dim { color: rgba(12,14,16,.6); }
.fl-statement .slot-g { border-color: rgba(12,14,16,.4); }
.fl-statement .slot-g b::before, .fl-statement .slot-g b::after { background: rgba(12,14,16,.6); }
.hl { font: 600 clamp(26px, 3.3vw, 50px)/1.42 var(--display); font-stretch: 108%; letter-spacing: .005em; display: grid; justify-items: start; }
.hl-line { position: relative; display: inline-block; padding: 0 .28em; color: var(--paper); }
.hl-line::before { content: ""; position: absolute; inset: .08em 0; background: var(--paper-ink); transform-origin: left; transform: scaleX(var(--hl, 1)); }
.hl-line > span { position: relative; opacity: var(--hlt, 1); }
.st-sub { max-width: 52ch; font: 400 15px/1.7 var(--mono); color: rgba(12,14,16,.8); }
.fl-in > .st-sub { max-width: none; }
.fl-in > .st-sub { padding-right: calc(var(--pw) * .3); }

/* F2, capabilities: one wide floor, three loops */
html:not(.gl) .slot-vids { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2%; }
html:not(.gl) .slot-vids video { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.caps-under { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3%; }
.cap-item { display: grid; gap: 10px; align-content: start; }
.cap-count { font-size: 12.5px; color: var(--mute); }
.cap-title { font: 500 clamp(22px, 2.2vw, 34px)/1 var(--display); font-stretch: 108%; }
.cap-text { font-size: 15.5px; line-height: 1.6; color: rgba(238,241,243,.9); }
.cap-list { display: grid; gap: 4px; font-size: 13px; color: var(--mute); }
.cap-list li::before { content: "— "; color: var(--amber); }

/* F3 and F4: two projects, one per slab, the counter of the A between them */
.slot.is-project { cursor: pointer; }
.pr-meta { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--mute); }
.pr-title { font: 600 clamp(24px, 2.6vw, 40px)/1.02 var(--display); font-stretch: 110%; letter-spacing: -.01em; }
.pr-title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease); }
.pr-title a:hover, .is-hover .pr-title a { background-size: 100% 1px; }
.pr-line { font-size: 16px; color: rgba(238,241,243,.92); }
.pr-kind { font-size: 13px; color: var(--mute); }

/* F5, signal: the amber floor, loud */
.sg-hl { justify-items: start; line-height: 1.12; }
.sg-hl .hl-line { padding: 0; color: var(--fg); }
.sg-hl .hl-line::before { display: none; }
.sg-in { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: center; gap: 4px 24px; color: var(--ink); padding: 0 4%; }
.sg-avail { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-size: 13.5px; letter-spacing: .08em; text-transform: uppercase; }
.sg-avail i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); animation: blink 1.6s steps(1) infinite; }
.sg-mail { font: 700 clamp(22px, 3.4vw, 54px)/1 var(--display); font-stretch: 106%; letter-spacing: -.01em; overflow-wrap: anywhere; }
.sg-mail:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.sg-copy { align-self: center; font-size: 13.5px; padding: 10px 16px; border: 1px solid currentColor; border-radius: 999px; }
.sg-copy:hover { background: var(--ink); color: var(--amber); }
html:not(.gl) .slot.is-amber { background: var(--amber); }
.sg-sub { color: var(--mute); }

/* F6, the legs: about and contact */
.leg-in { gap: 6px; align-content: center; padding: 7% 9%; }
.leg-k { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.leg-text { font-size: clamp(13px, 1vw, 15.5px); line-height: 1.45; }
.leg-mail { font: 600 clamp(14px, 1.2vw, 19px)/1.2 var(--display); font-stretch: 104%; }
.leg-mail:hover { color: var(--amber); }
.leg-link { font-size: 13px; color: var(--mute); } .leg-link:hover { color: var(--fg); }
.leg-links { display: flex; flex-wrap: wrap; gap: 0 16px; }
html:not(.gl) .slot.is-leg { border: 1px solid var(--line); }
.base-mid { position: absolute; top: 50%; transform: translateY(-50%); text-align: center; font-size: 12.5px; line-height: 1.8; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }

/* ---------- outro ---------- */
.sec-outro .pin { display: grid; align-content: center; justify-items: center; gap: 4vh; text-align: center; }
.ot-word { display: flex; align-items: baseline; font: 700 clamp(26px, 9vw, 176px)/1 var(--display); font-stretch: 118%; letter-spacing: -.01em; white-space: nowrap; }
.ot-mark { width: .9em; height: .72em; flex: none; margin-right: -.04em; }
.ot-mark .mark-body, .ot-mark .mark-bar { transition: opacity .3s; }
html.gl .ot-mark { opacity: var(--ot-flat, 0); }
.ot-ground { position: fixed; left: 0; right: 0; top: calc(78svh + 10px); display: grid; justify-items: center; gap: 14px; opacity: 0; pointer-events: none; }
html:not(.gl) .ot-ground { display: none; }
.ot-ground i { width: min(560px, 70vw); height: 1px; background: linear-gradient(90deg, transparent, var(--fg) 30%, var(--fg) 70%, transparent); transform: scaleX(0); transition: transform 1.2s var(--ease); }
.ot-ground.is-on i { transform: scaleX(1); }
.ot-ground p { display: flex; flex-wrap: wrap; justify-content: center; max-width: 92vw; gap: 6px 20px; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.ot-ground span:first-child { color: var(--amber); }
.ot-hint { color: var(--fg); }
@media (pointer: coarse) { .ot-hint { display: none; } }
body.is-grab, body.is-grab * { cursor: grab; }
body.is-grabbing, body.is-grabbing * { cursor: grabbing; user-select: none; }
.ot-line { font: 400 15.5px/1.6 var(--mono); color: var(--mute); display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; }
.ot-cta { color: var(--fg); border-bottom: 1px solid var(--line); }
.ot-cta:hover { border-color: var(--amber); }

/* ---------- footer ---------- */
.ft { position: relative; z-index: 2; padding: 12vh max(var(--pad), env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(var(--pad), env(safe-area-inset-left, 0px)); display: grid; gap: 7vh; overflow: hidden; }
html.gl body[data-page="home"] .ft { background: linear-gradient(transparent, rgba(5,6,7,.7) 40%); }
.ft-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.ft-cols { display: flex; gap: clamp(28px, 6vw, 96px); font-size: 14.5px; }
.ft-cols ul { display: grid; gap: 8px; }
.ft-cols a { color: var(--mute); transition: color .3s var(--ease); } .ft-cols a:hover { color: var(--fg); }
.ft-cta { display: inline-flex; align-items: center; gap: 14px; font-size: 14px; }
.ft-cta .ring { width: 52px; height: 52px; font-size: 18px; }
.ft-word { display: flex; align-items: baseline; font: 700 clamp(26px, 8.8vw, 200px)/.8 var(--display); font-stretch: 118%; letter-spacing: -.015em; white-space: nowrap; margin-bottom: -.06em; color: var(--fg); }
.ft-mark { width: .9em; height: .72em; flex: none; margin-right: -.04em; }
body[data-page="home"] .ft-word { display: none; }
.ft-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--mute); letter-spacing: .03em; }

/* ---------- sound bar ---------- */
.soundbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px max(var(--pad), env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(var(--pad), env(safe-area-inset-left, 0px));
  background: rgba(5,6,7,.95); border-top: 1px solid var(--line); font-size: 14px;
  transform: translateY(100%); transition: transform .7s var(--ease);
}
.soundbar.is-in { transform: none; }
.soundbar[hidden] { display: none; }
.soundbar p { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.soundbar-tag { color: var(--amber); letter-spacing: .06em; }
.soundbar-actions { display: flex; gap: 20px; align-items: center; }
.soundbar .link { text-decoration: underline; text-underline-offset: 4px; color: var(--mute); font-size: 13.5px; }

/* ---------- inner pages ---------- */
.pg { position: relative; padding: calc(var(--hd) + 12vh) max(var(--pad), env(safe-area-inset-right, 0px)) 10vh max(var(--pad), env(safe-area-inset-left, 0px)); min-height: 80svh; }
.pg-head { display: grid; gap: 14px; margin-bottom: 9vh; }
.pg-title { font: 600 clamp(64px, 11vw, 170px)/.86 var(--display); font-stretch: 116%; letter-spacing: -.02em; }

.wx { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
.wx-filters { display: grid; align-content: start; gap: 6px; position: sticky; top: calc(var(--hd) + 24px); font-size: 14.5px; }
.wx-filters button { text-align: left; color: var(--mute); display: inline-flex; gap: 6px; padding: 4px 0; transition: color .3s var(--ease), padding-left .3s var(--ease); }
.wx-filters button sup { font-size: 10px; color: var(--dim); }
.wx-filters button[aria-pressed="true"] { color: var(--fg); padding-left: 14px; position: relative; }
.wx-filters button[aria-pressed="true"]::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--amber); }
.wx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 28px; }
.wx-card[hidden] { display: none; }
.wx-card a { display: grid; gap: 12px; }
.wx-pic { overflow: hidden; border: 1px solid var(--line); background: var(--ink-2); }
.wx-pic img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .9s var(--ease), filter .9s var(--ease); transform: skewY(var(--skew, 0deg)) scale(1.001); }
.wx-card a:hover .wx-pic img { transform: scale(1.04); }
.wx-meta { display: flex; gap: 16px; align-items: center; font-size: 13.5px; color: var(--mute); }
.wx-title { font: 600 clamp(22px, 2vw, 30px)/1.1 var(--display); font-stretch: 108%; }
.wx-kind { font-size: 13.5px; color: var(--mute); }

.dt-ghost { position: absolute; left: 0; right: 0; top: calc(var(--hd) + 2vh); font: 400 clamp(120px, 24vw, 400px)/.9 var(--serif); letter-spacing: .02em; color: rgba(238,241,243,.055); white-space: nowrap; overflow: hidden; pointer-events: none; padding-left: var(--pad); user-select: none; }
.dt-head { position: relative; display: grid; gap: 22px; max-width: 980px; margin-bottom: 7vh; }
.dt-back { font-size: 14.5px; color: var(--mute); justify-self: start; } .dt-back:hover { color: var(--fg); }
.dt-title { font: 600 clamp(52px, 8.4vw, 132px)/.9 var(--display); font-stretch: 116%; letter-spacing: -.02em; }
.dt-lead { font: 300 clamp(18px, 1.7vw, 24px)/1.5 var(--sans); max-width: 40ch; }
.dt-spec { display: flex; flex-wrap: wrap; gap: 12px 40px; font-size: 13.5px; }
.dt-spec dt { color: var(--mute); margin-bottom: 4px; }
.dt-links { display: flex; flex-wrap: wrap; gap: 28px; }
.dt-link { display: inline-flex; align-items: center; gap: 12px; font-size: 14.5px; }
.dt-body { position: relative; display: grid; gap: 10vh; }
.dt-fig img { width: 100%; height: auto; border: 1px solid var(--line); }
.dt-text { display: grid; gap: 1.2em; max-width: 62ch; margin-left: auto; font-size: 18px; line-height: 1.75; color: rgba(238,241,243,.92); }
.dt-next { display: grid; gap: 10px; margin-top: 14vh; padding-top: 6vh; border-top: 1px solid var(--line); }
.dt-next .mono { font-size: 13.5px; color: var(--mute); }
.dt-next-title { font: 600 clamp(40px, 6vw, 96px)/1 var(--display); font-stretch: 114%; transition: color .4s var(--ease); }
.dt-next:hover .dt-next-title { color: var(--amber); }

.ab-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 7vh 40px; max-width: 1180px; }
.ab-label { font-size: 13.5px; font-weight: 400; color: var(--mute); padding-top: .5em; letter-spacing: .04em; }
.ab-lead { display: grid; gap: 1em; font: 300 clamp(22px, 2.3vw, 34px)/1.42 var(--sans); }
.ab-lead p { max-width: 34ch; }
.ab-quiet { color: var(--mute); }
.ab-caps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.ab-caps h3 { font: 500 24px/1.2 var(--display); font-stretch: 108%; margin-bottom: 10px; }
.ab-caps p { font-size: 16px; color: rgba(238,241,243,.9); margin-bottom: 14px; }
.ab-caps ul { display: grid; gap: 4px; font-size: 13.5px; color: var(--mute); }
.ab-now { display: grid; }
.ab-now a, .ab-now .ab-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 24px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.ab-now li:last-child a, .ab-now li:last-child .ab-row { border-bottom: 1px solid var(--line); }
.ab-now-t { font: 600 clamp(22px, 2.4vw, 34px)/1.1 var(--display); font-stretch: 110%; transition: color .3s var(--ease); }
.ab-now a:hover .ab-now-t { color: var(--amber); }
.ab-now .code { font-size: 13.5px; color: var(--mute); }
.ab-now-l { display: block; max-width: 62ch; margin-top: 6px; font-size: 16px; line-height: 1.5; color: var(--mute); }
.ab-exp .ab-row { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
/* upstream work, under the project grid: the label sits in the filters' column */
.wx-contrib { margin-top: 14vh; }
.wx-contrib-k { font-size: 14.5px; font-weight: 400; display: inline-flex; gap: 6px; align-self: start; padding-top: 18px; }
.wx-contrib-k sup { font-size: 10px; color: var(--dim); }
.ab-colophon { display: grid; gap: 1em; max-width: 62ch; color: rgba(238,241,243,.9); font-size: 16px; }

.ct-lead { font: 300 clamp(22px, 2.4vw, 34px)/1.4 var(--sans); max-width: 30ch; margin-bottom: 9vh; }
.ct-rows { display: grid; max-width: 1080px; }
.ct-rows li { display: flex; align-items: center; gap: 20px; border-top: 1px solid var(--line); }
.ct-rows li:last-child { border-bottom: 1px solid var(--line); }
.ct-row { flex: 1; min-width: 0; display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 26px 0; }
.ct-k { font-size: 13.5px; color: var(--mute); }
.ct-v { font: 500 clamp(17px, 3vw, 44px)/1.1 var(--display); font-stretch: 106%; overflow-wrap: anywhere; transition: color .3s var(--ease); }
.ct-row:hover .ct-v { color: var(--amber); }
.ct-copy { font-size: 13.5px; color: var(--mute); padding: 8px 0; }
.ct-copy:hover { color: var(--fg); }

/* ---------- 404 ---------- */
.nf { display: grid; align-content: center; }
.nf-mark { width: clamp(120px, 16vw, 200px); height: auto; margin-bottom: 6vh; overflow: visible; }
.nf-mark .mark-body { fill: var(--fg); } .nf-mark .mark-bar { fill: var(--amber); }
.nf-gone { fill: none; stroke: var(--amber); stroke-width: 1; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; animation: blink 1.4s steps(1) infinite; }
.nf-title { font-size: clamp(48px, 8vw, 128px); }
.nf .ct-lead { margin-bottom: 6vh; }
.nf-links { display: flex; flex-wrap: wrap; gap: 14px 36px; font-size: 14.5px; }
.nf-links a { border-bottom: 1px solid var(--line); padding-bottom: 4px; } .nf-links a:hover { border-color: var(--amber); color: var(--amber); }

/* ---------- letters (split text) ---------- */
.ch { display: inline-block; will-change: transform, opacity; }
.wd { display: inline-block; white-space: nowrap; }

/* ---------- page transitions ---------- */
main, .ft { transition: opacity .5s var(--ease); }
body[data-phase="out"] main, body[data-phase="out"] .ft { opacity: 0; }

/* ---------- phones ---------- */
@media (max-width: 820px) {
  :root { --hd: 64px; }
  .hd { grid-template-columns: 1fr auto; }
  .hd-nav, .hd-right .pill { display: none; }
  .hd-menu { display: block; }
  .hd-sound-label { display: none; }
  html.gl body[data-page="home"] .dev { display: none; }
  html.gl .hero-copy { padding-left: 0; }
  .wx { grid-template-columns: 1fr; }
  .wx-filters { position: static; display: flex; flex-wrap: wrap; gap: 6px 18px; }
  .wx-grid { grid-template-columns: 1fr; }
  .ab-grid { grid-template-columns: 1fr; gap: 2vh; }
  .ab-label { padding-top: 5vh; }
  .ab-caps { grid-template-columns: 1fr; }
  .ab-now a { grid-template-columns: 1fr auto; }
  .ab-now .code { display: none; }
  .ab-exp .code, .wx-contrib .ab-now .code { display: block; grid-row: 2; grid-column: 1; }
  .wx-contrib .ab-now a { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; }
  .wx-contrib-k { padding-top: 0; }
  .ct-row { grid-template-columns: 1fr auto; }
  .ct-k { grid-column: 1 / -1; }
  /* the label sits on its own line here: line Copy up with the address and its arrow, not the middle of the row */
  .ct-rows li { align-items: flex-end; }
  .ct-copy { padding: 0; line-height: 26px; margin-bottom: 26px; }
}

/* ---------- phones: the same floors, stacked ---------- */
@media (max-width: 820px) {
  .hero-a { width: min(80vw, 40svh); height: min(80vw, 40svh); top: calc(var(--hd) + 2svh); left: 50%; transform: translateX(-50%); }
  .hero-cue { display: none; }
  .toc { grid-template-columns: 1fr; gap: 3svh; align-content: center; }
  .toc-copy { padding-left: 0; gap: 10px; }
  .toc-title { font-size: 26px; }
  .toc-text { font-size: 15px; }
  .toc-a { height: min(44svh, 380px); margin-right: 132px; justify-self: start; }
  .toc-labels li { left: calc(100% + 18px); }
  .toc-labels button { font-size: 9.5px; gap: 8px; letter-spacing: .08em; }
  .dock { top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); margin-top: 0; width: 40px; height: 40px; }
  .dock-list .code, .dock-name { display: none; }
  html.gl .fl .pin { padding-inline: max(var(--pad), env(safe-area-inset-left, 0px)); padding-bottom: 72px; }
  .fl-in { gap: 14px; }
  /* split floors: slab, its words, next slab, its words */
  .fl-projects .plan, .fl-projects .plan-under, .fl-base .plan { display: contents; }
  .fl-projects .slot, .fl-base .slot { position: relative; left: auto !important; width: var(--pw) !important; height: auto; aspect-ratio: 18.9 / 11; }
  .fl-projects .under { grid-area: auto; width: var(--pw) !important; margin-left: 0 !important; gap: 4px; }
  .fl-projects .slot, .fl-projects .under, .fl-projects .fl-head { width: min(var(--pw), calc(22svh * 18.9 / 11)) !important; }
  .fl-in > .st-sub { padding-right: 0; }
  .fl-projects .slot[data-k="0"] { order: 1; } .fl-projects .under[data-k="0"] { order: 2; }
  .fl-projects .slot[data-k="1"] { order: 3; } .fl-projects .under[data-k="1"] { order: 4; }
  .fl-head { order: 0; }
  .pr-kind, .cap-list, .base-mid, .sg-avail, .sg-copy { display: none; }
  .pr-title { font-size: 24px; }
  .pr-line { font-size: 14.5px; }
  .st-in .hl { font-size: clamp(15px, 4.6vw, 22px); }
  .st-in { padding: 4% 6%; }
  .caps-under { grid-template-columns: 1fr; gap: 14px; }
  .cap-title { font-size: 20px; }
  .cap-text { font-size: 14.5px; }
  .sg-in { padding: 0 5%; grid-template-columns: 1fr; }
  .sg-mail { font-size: clamp(15px, 4.6vw, 22px); }
  .sg-hl { font-size: 26px; }
  .leg-in { padding: 6% 8%; }
  .leg-text, .leg-mail { font-size: 14px; }
}
/* tablets held upright get the stacked floors too: centre the contents, keep the split floors card-sized and
   let the words grow a little into the wider panes */
@media (max-width: 820px) and (min-width: 600px) {
  .toc-a, .toc-copy { justify-self: center; }
  .fl-base .slot, .fl-base .fl-head { width: min(var(--pw), calc(22svh * 18.9 / 11)) !important; }
  .st-in .hl { font-size: clamp(22px, 3.6vw, 34px); }
  .sg-hl { font-size: clamp(26px, 4vw, 36px); }
  .sg-mail { font-size: clamp(22px, 4vw, 34px); }
  .leg-text, .leg-mail { font-size: 15px; }
}

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