/* joshburden.com
   A lit, layered scene. The ground has a light source behind the preview, surfaces sit at three
   heights (ground, raised, floating), and the floating preview picks up a glow from whatever
   project is on screen.
   Type: Archivo. Expanded width for names and headings, normal width for reading. */

/* ---------- Color: Midnight ---------- */

:root {
  color-scheme: dark;
  --bg: #050812;
  --bg-hi: #0a1122;
  --surface: #0d1426;
  --surface-hi: #162039;
  --line: rgba(176, 200, 255, 0.1);
  --line-hi: rgba(176, 200, 255, 0.2);
  --text: #eef2fb;
  --soft: #c4cde2;
  --muted: #8e9bba;
  --accent: #5b93ff;
  --accent-ink: #040a1c;
  --light: 91 147 255;
  --frame-a: #1c2743;
  --frame-b: #0b1121;
  --frame-text: #eef2fb;
  --frame-muted: #8e9bba;
  --inset: rgba(3, 6, 14, 0.7);
  --grain: 0.07;
  --glow: 0.6;
  --elev-1: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 32px -14px rgba(0, 0, 0, 0.7);
  --elev-2: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 60px 110px -36px rgba(0, 0, 0, 0.9),
    0 24px 48px -22px rgba(0, 0, 0, 0.75);

  /* Frosted glass: a tinted, see-through pane with a bright top edge and a sheen across one corner. */
  --glass: linear-gradient(118deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, rgba(150, 180, 255, 0.11), rgba(150, 180, 255, 0.04));
  --glass-on: linear-gradient(118deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 44%),
    linear-gradient(180deg, rgba(120, 160, 255, 0.28), rgba(120, 160, 255, 0.1));
  --glass-line: rgba(196, 214, 255, 0.16);
  --glass-line-on: rgba(196, 214, 255, 0.36);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -1px 0 rgba(0, 0, 0, 0.28),
    0 18px 40px -20px rgba(0, 0, 0, 0.8);
  --frost: blur(18px) saturate(1.7);
}

:root {
  --pad: clamp(20px, 4.2vw, 64px);
  --max: 1416px;
  --gap: clamp(28px, 4vw, 64px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background: var(--bg);
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1150px 760px at 84% -6%, rgb(var(--light) / 0.24), transparent 62%),
    radial-gradient(820px 620px at -12% 26%, rgb(var(--light) / 0.1), transparent 60%),
    radial-gradient(900px 700px at 96% 78%, rgb(56 189 248 / 0.07), transparent 62%),
    linear-gradient(180deg, var(--bg-hi), var(--bg) 560px);
  background-color: var(--bg);
  background-repeat: no-repeat;
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Fine grain over the ground, under the content. It keeps the gradients from banding. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1,
h2 {
  font-stretch: 125%;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

/* Headlines are lit from above: full brightness at the top, a shade down at the bottom. */
h1,
.about h2 {
  background: linear-gradient(180deg, var(--text) 40%, color-mix(in oklab, var(--text) 72%, var(--bg)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.08em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

::selection {
  background: rgb(var(--light) / 0.4);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.vh,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 14px;
  border-radius: 8px;
}

/* ---------- Top bar: floats over the page as it scrolls ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}

.top-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.wordmark {
  font-stretch: 125%;
  font-weight: 800;
  font-size: 0.9375rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.top nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 28px);
}

.top nav a {
  text-decoration: none;
  font-weight: 500;
  color: var(--soft);
  transition: color 0.15s;
}

.top nav a:hover {
  color: var(--text);
}

.top nav a.nav-cta {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--text);
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-shadow);
}

.top nav a.nav-cta:hover {
  background: var(--glass-on);
  border-color: var(--glass-line-on);
}

.top nav a.nav-in,
.foot-in-link {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--soft);
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-shadow);
  transition: color 0.15s, border-color 0.15s;
}

.top nav a.nav-in:hover,
.foot-in-link:hover {
  color: #fff;
  background: var(--glass-on);
  border-color: var(--glass-line-on);
}

/* The glow and the stacked panes reach past the page edge; trim them there. */
main {
  overflow-x: clip;
}

/* ---------- Intro ---------- */

.intro {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(24px, 2.8vw, 40px) var(--pad) clamp(36px, 4.2vw, 60px);
}

/* The header panel: the same picture as the phone's opening card and the share thumbnail,
   drawn in the page so the headline is real text. Glass panes on the right, words on the left. */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 3vw, 44px);
  align-items: center;
  min-height: clamp(340px, 30vw, 420px);
  padding: clamp(32px, 3.6vw, 52px) clamp(28px, 3.8vw, 56px);
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(760px 520px at 86% 6%, rgb(var(--light) / 0.42), transparent 62%),
    radial-gradient(620px 460px at 100% 100%, rgb(56 189 248 / 0.2), transparent 62%),
    radial-gradient(520px 420px at -8% 30%, rgb(var(--light) / 0.14), transparent 60%),
    linear-gradient(180deg, #0a1122, #050812 70%);
  box-shadow: 0 0 0 1px var(--glass-line), var(--elev-2);
}

.hero-text {
  position: relative;
  z-index: 1;
}

.intro h1 {
  font-size: clamp(2.25rem, 3.9vw, 3.5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.intro p {
  max-width: 50ch;
  margin-top: clamp(16px, 1.6vw, 22px);
  font-size: clamp(1.0625rem, 1.2vw, 1.1875rem);
  color: var(--soft);
}

.hero-art {
  position: relative;
  align-self: stretch;
  min-height: 300px;
}

.hx-stage {
  position: absolute;
  left: 4%;
  top: 50%;
  width: clamp(420px, 37vw, 540px);
  height: clamp(280px, 25vw, 360px);
  transform: translateY(-44%);
  perspective: 1500px;
}

.hx-scene {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(5deg) rotateY(-18deg);
}

.hx-glow {
  position: absolute;
  left: -8%;
  top: 6%;
  width: 116%;
  height: 110%;
  border-radius: 40%;
  background: radial-gradient(closest-side, rgb(var(--light) / 0.55), transparent 72%);
  filter: blur(46px);
  transform: translateZ(-260px);
}

.hx-pane {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, rgba(140, 172, 255, 0.24), rgba(140, 172, 255, 0.08));
  box-shadow: 0 0 0 1px rgba(196, 214, 255, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.hx-b1 {
  transform: translate3d(40px, -34px, -110px);
  opacity: 0.85;
}

.hx-b2 {
  transform: translate3d(80px, -68px, -220px);
  opacity: 0.5;
}

.hx-front {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  padding: 0 11px 11px;
  background: linear-gradient(180deg, #1f2b4a, #0b1121);
  box-shadow: 0 0 0 1px rgba(176, 200, 255, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 60px 110px -40px rgba(0, 0, 0, 0.95);
}

.hx-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 11px;
}

.hx-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(196, 214, 255, 0.3);
}

.hx-bar b {
  margin-left: 9px;
  width: 32%;
  height: 11px;
  border-radius: 6px;
  background: rgba(196, 214, 255, 0.22);
}

.hx-screen {
  position: relative;
  flex: 1;
  display: grid;
  grid-auto-rows: 1fr;
  gap: 11px;
  padding: 18px;
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(380px 280px at 80% 0%, rgb(var(--light) / 0.34), transparent 70%), #070c1a;
}

.hx-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(112deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 36%);
}

.hx-row {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(150, 180, 255, 0.13), rgba(150, 180, 255, 0.05));
  border: 1px solid rgba(196, 214, 255, 0.17);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.hx-row s {
  height: 10px;
  border-radius: 6px;
  background: rgba(226, 234, 255, 0.5);
}

.hx-row em {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgb(var(--light) / 0.2), 0 0 12px rgb(var(--light) / 0.9);
}

.hx-row.hx-on {
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, rgba(120, 160, 255, 0.42), rgba(120, 160, 255, 0.16));
  border-color: rgba(196, 214, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 20px 44px -22px rgb(var(--light) / 0.95);
}

.hx-row.hx-on::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 22%;
  bottom: 22%;
  width: 4px;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: 0 0 18px 3px rgb(var(--light) / 0.8);
}

.hx-row.hx-on s {
  background: #fff;
}

/* A small filled button for the one action we want people to take. */
.btn {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 26px -12px rgb(var(--light) / 0.9);
  transition: transform 0.15s var(--ease), box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 16px 32px -12px rgb(var(--light) / 1);
}

.btn:active {
  transform: none;
}

/* Phones only: the site's card opens the page. See the narrow-screen rules. */
.intro-card {
  display: none;
}

.missing .intro {
  display: block;
}

.missing .intro p {
  margin-top: 24px;
}

/* ---------- Project index ---------- */

.work {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) clamp(80px, 10vw, 150px);
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--gap);
  align-items: start;
  padding-top: 18px;
}

.work-list {
  position: relative;
}

/* Soft light behind the list, so the frosted rows have something to blur. */
.work-list::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: -18%;
  right: -8%;
  top: -8%;
  bottom: 6%;
  background:
    radial-gradient(closest-side at 28% 36%, rgb(var(--light) / 0.4), transparent 72%),
    radial-gradient(closest-side at 80% 84%, rgb(56 189 248 / 0.22), transparent 70%);
  filter: blur(36px);
  pointer-events: none;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

/* Every project is a pane of frosted glass. The selected one catches the light. */
.row {
  position: relative;
  padding: 15px 18px 16px;
  border: 1px solid var(--glass-line);
  border-radius: 16px;
  background: var(--glass);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--frost);
  backdrop-filter: var(--frost);
  transition: border-color 0.2s, box-shadow 0.25s;
}

/* A highlight that follows the pointer across the glass. */
.row::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.13), transparent 62%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.row:hover::before {
  opacity: 1;
}

.row.is-on {
  background: var(--glass-on);
  border-color: var(--glass-line-on);
  box-shadow: var(--glass-shadow), 0 0 0 1px rgb(var(--light) / 0.22), 0 26px 60px -30px rgb(var(--light) / 0.85);
}

.row::after {
  content: '';
  position: absolute;
  left: -1px;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 18px 2px rgb(var(--light) / 0.7);
  opacity: 0;
  transform: scaleY(0.4);
  transition: opacity 0.2s, transform 0.25s var(--ease);
}

.row.is-on::after {
  opacity: 1;
  transform: none;
}

.row-link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  text-decoration: none;
}

/* The whole row opens the project; the address link sits above it. */
.row-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.row-name {
  font-stretch: 125%;
  font-weight: 650;
  font-size: clamp(1.25rem, 1.85vw, 1.6875rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: #f4f7ff;
  transition: color 0.2s, text-shadow 0.25s;
}

.row.is-on .row-name {
  color: #fff;
  text-shadow: 0 0 30px rgb(var(--light) / 0.55);
}

.row-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  white-space: nowrap;
  color: var(--soft);
}

.dot {
  flex: none;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgb(var(--light) / 0.16), 0 0 12px rgb(var(--light) / 0.8);
}

.dot.local {
  background: none;
  box-shadow: inset 0 0 0 1.5px var(--muted);
}

.row-meta {
  margin-top: 4px;
  font-size: 0.95rem;
  color: var(--muted);
}

.row-addr {
  position: relative;
  z-index: 1;
}

a.row-addr {
  text-decoration: underline;
  text-decoration-color: var(--line-hi);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

a.row-addr:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.row-shot {
  display: none;
}

.row-line {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin-top: 18px;
  padding: 0 18px;
  font-size: 0.875rem;
  color: var(--muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

/* ---------- The viewport: a screenshot floating in the scene ---------- */

.stage {
  position: sticky;
  top: 92px;
  display: grid;
  perspective: 1500px;
  --rx: 3deg;
  --ry: -10deg;
}

.pane {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s, visibility 0s 0.3s;
}

.pane.is-on {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s;
}

.stage.instant .pane {
  transition: none;
}

.scene {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.6s var(--ease);
  will-change: transform;
}

/* Point at the preview itself and it turns to face you. */
.scene:hover {
  --rx: 0deg;
  --ry: 0deg;
}

/* A blurred copy of the screenshot behind the frame: the project lights its own surroundings. */
.glow {
  position: absolute;
  left: -7%;
  top: 2%;
  width: 114%;
  height: 112%;
  object-fit: cover;
  filter: blur(80px) saturate(1.9);
  opacity: var(--glow);
  transform: translateZ(-220px);
  pointer-events: none;
}

/* Two more panes stacked behind the frame, each a step further back. */
.scene::before,
.scene::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, rgba(140, 172, 255, 0.2), rgba(140, 172, 255, 0.07));
  box-shadow: 0 0 0 1px rgba(196, 214, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.scene::before {
  transform: translate3d(30px, -26px, -90px);
  opacity: 0.85;
}

.scene::after {
  transform: translate3d(60px, -52px, -180px);
  opacity: 0.5;
}

.frame {
  position: relative;
  background: linear-gradient(180deg, var(--frame-a), var(--frame-b));
  border-radius: 16px;
  padding: 0 8px 8px;
  box-shadow: 0 0 0 1px var(--line-hi), var(--elev-2);
}

.frame-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  height: 44px;
  padding: 0 10px;
  font-size: 0.875rem;
}

.frame-addr {
  color: var(--frame-text);
  font-weight: 600;
}

a.frame-addr {
  text-underline-offset: 4px;
  text-decoration-color: var(--line-hi);
}

a.frame-addr:hover {
  text-decoration-color: currentColor;
}

.frame-note {
  color: var(--frame-muted);
}

.frame-shot {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 9px;
  background: #0b0e14;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.frame-shot img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity 0.5s;
}

.frame-shot img.on {
  opacity: 1;
}

.frame-shot img.phone {
  object-fit: contain;
  padding: 3% 0;
}

/* A soft sheen across the glass. */
.frame-shot::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 34%);
}

.pane-line {
  margin-top: 30px;
  max-width: 56ch;
  color: var(--soft);
}

.pane.is-on .frame,
.proj-stage .frame {
  view-transition-name: shot-frame;
}

/* ---------- About ---------- */

.about {
  position: relative;
  border-block: 1px solid var(--line);
  background:
    radial-gradient(900px 520px at 12% 0%, rgb(var(--light) / 0.12), transparent 65%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 85%, transparent), color-mix(in srgb, var(--surface) 30%, transparent));
}

.about-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 9.5vw, 140px) var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--gap);
}

.about h2 {
  font-size: clamp(1.75rem, 3.4vw, 3.125rem);
  letter-spacing: -0.03em;
  max-width: 12em;
}

.about-body p {
  max-width: 56ch;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--soft);
}

.about-body p + p {
  margin-top: 1.1em;
}

/* ---------- Footer: one compact bar ---------- */

.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(44px, 5.5vw, 76px) var(--pad) 26px;
}

.foot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 40px;
  padding: 20px 24px;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--frost);
  backdrop-filter: var(--frost);
}

.foot h2 {
  font-size: clamp(1.0625rem, 1.45vw, 1.25rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.foot-text p {
  margin-top: 5px;
  font-size: 0.95rem;
  color: var(--muted);
}

.notify {
  flex: 0 1 30rem;
  min-width: min(100%, 17rem);
}

.foot-text {
  flex: 1 1 22rem;
  max-width: 34rem;
}

.notify-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.notify .need {
  grid-column: 1 / -1;
}

.notify input[type='email'],
.notify .need {
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  font: inherit;
  color: var(--text);
  background: var(--inset);
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.notify input[type='email']:focus-visible,
.notify .need:focus-visible {
  outline-offset: 1px;
}

.notify input::placeholder {
  color: var(--muted);
}

.notify .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
}

.notify button {
  height: 46px;
  padding: 0 20px;
  font: inherit;
  font-weight: 650;
  white-space: nowrap;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 26px -10px rgb(var(--light) / 0.9);
  transition: transform 0.15s var(--ease), box-shadow 0.15s;
}

.notify button:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 16px 32px -10px rgb(var(--light) / 1);
}

.notify button:active {
  transform: translateY(0);
}

.notify button:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.notify-note {
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--soft);
}

.notify-note:empty {
  display: none;
}

.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 0 6px;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- Project page ---------- */

.proj-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 56px) var(--pad) clamp(28px, 3.5vw, 48px);
}

.crumb {
  font-size: 0.95rem;
  margin-bottom: clamp(18px, 2.5vw, 30px);
  color: var(--muted);
}

.crumb a {
  text-underline-offset: 4px;
  text-decoration-color: var(--line-hi);
}

.crumb a:hover {
  color: var(--text);
}

.proj-head h1 {
  font-size: clamp(2.5rem, 6.6vw, 5.75rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

/* Same arrangement as the home page: a list on the left, the viewport on the right. */
.proj-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--gap);
  align-items: start;
}

.proj-pitch {
  max-width: 50ch;
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  color: var(--soft);
}

.facts {
  margin: clamp(22px, 2.6vw, 32px) 0 0;
  border-bottom: 1px solid var(--line);
}

.facts div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-weight: 600;
}

.facts a {
  text-underline-offset: 4px;
  text-decoration-color: var(--line-hi);
}

.facts a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.shots-h {
  margin-top: clamp(28px, 3.4vw, 44px);
  margin-bottom: 10px;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.shots .row {
  padding: 11px 18px 12px;
  border-radius: 13px;
}

.shots .row::after {
  top: 11px;
  bottom: 11px;
}

.shot-name {
  font-weight: 500;
  color: #e9eefb;
}

.shots .row.is-on .shot-name {
  color: #fff;
}

.rows.shots {
  gap: 7px;
}

.proj-stage {
  position: sticky;
  top: 92px;
  perspective: 1500px;
  --rx: 3deg;
  --ry: -10deg;
}

/* The flow is a real sequence: three steps, joined left to right. */

.flow {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 10vw, 150px) var(--pad) 0;
}

.flow {
  position: relative;
}

.flow::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 8%;
  right: 8%;
  top: 34%;
  bottom: -12%;
  background:
    radial-gradient(closest-side at 22% 50%, rgb(var(--light) / 0.3), transparent 72%),
    radial-gradient(closest-side at 80% 60%, rgb(56 189 248 / 0.18), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.flow h2 {
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
}

.flow ol {
  list-style: none;
  margin: clamp(24px, 3vw, 40px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.flow li {
  position: relative;
  padding: 24px 26px 30px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--frost);
  backdrop-filter: var(--frost);
}

/* The join between two steps: a lit node carrying an arrow. */
.flow li + li::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -24px;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--bg), 0 0 22px rgb(var(--light) / 0.8);
}

.flow li + li::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -15px;
  margin-top: -5px;
  border-left: 8px solid var(--accent-ink);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.flow-label {
  font-weight: 600;
  color: var(--accent);
}

.flow li p {
  margin-top: 10px;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.4;
}

.sect {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 7vw, 100px) var(--pad) 0;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--gap);
}

.sect h2 {
  font-size: clamp(1.375rem, 2.1vw, 1.9375rem);
}

.does {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 3vw, 48px);
}

.does div {
  border-top: 1px solid var(--line);
  padding: 15px 0 22px;
}

.does dt {
  font-weight: 650;
}

.does dd {
  margin: 4px 0 0;
  color: var(--soft);
}

.overview p {
  max-width: 64ch;
  font-size: 1.125rem;
  line-height: 1.62;
  color: var(--soft);
}

.overview p + p {
  margin-top: 1.1em;
}

.stands {
  max-width: 40ch;
  font-size: clamp(1.1875rem, 1.75vw, 1.5rem);
  line-height: 1.36;
}

.next {
  max-width: var(--max);
  margin: clamp(72px, 9vw, 130px) auto 0;
  padding: 0 var(--pad);
}

.next a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 26px 28px 30px;
  border-radius: 22px;
  text-decoration: none;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--frost);
  backdrop-filter: var(--frost);
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.25s var(--ease);
}

.next a:hover,
.next a:focus-visible {
  background: var(--glass-on);
  border-color: var(--glass-line-on);
  box-shadow: var(--glass-shadow), 0 0 0 1px rgb(var(--light) / 0.25), 0 30px 70px -30px rgb(var(--light) / 0.7);
  transform: translateY(-2px);
}

.next small {
  font-size: 0.95rem;
  color: var(--muted);
}

.next span {
  font-stretch: 125%;
  font-weight: 700;
  font-size: clamp(1.75rem, 4.4vw, 3.75rem);
  letter-spacing: -0.035em;
  line-height: 1;
}

/* ---------- Page-to-page transition: the frame travels with you ---------- */

@view-transition {
  navigation: auto;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 959px) {
  .intro,
  .work-grid,
  .proj-grid,
  .about-in,
  .foot-in,
  .sect {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .hero-art {
    display: none;
  }

  .intro p {
    max-width: 54ch;
  }

  .stage {
    display: none;
  }

  .proj-stage {
    position: static;
    --rx: 0deg;
    --ry: 0deg;
  }

  .scene::before,
  .scene::after {
    display: none;
  }

  .work-grid {
    padding-top: 0;
  }

  /* On a phone every project is its own raised card with its screenshot on top. */
  .work .rows {
    display: grid;
    gap: 18px;
  }

  .work .row,
  .work .row.is-on {
    display: flex;
    flex-direction: column;
    padding: 10px 10px 18px;
    border-radius: 20px;
    background: var(--glass);
    border: 1px solid var(--glass-line);
    box-shadow: var(--glass-shadow);
  }

  .work .row.is-on .row-name {
    text-shadow: none;
  }

  .foot-in {
    padding: 18px;
  }

  .work .row::before,
  .work .row::after,
  .work-list::before {
    display: none;
  }

  .work .row-name {
    color: var(--text);
  }

  .row-shot {
    order: -1;
    display: block;
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--line-hi);
  }

  .row-shot img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top center;
  }

  .work .row-link,
  .work .row-meta,
  .work .row-line {
    padding: 0 8px;
  }

  .row-link {
    flex-wrap: wrap;
    gap: 4px 16px;
  }

  .row-line {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    margin-top: 10px;
    color: var(--soft);
  }

  .legend {
    padding: 0 4px;
  }

  .pane-line {
    margin-top: 18px;
  }

  .flow ol {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .flow li + li::before {
    top: -26px;
    left: 50%;
    margin: 0 0 0 -13px;
  }

  .flow li + li::after {
    top: -17px;
    left: 50%;
    margin: 0 0 0 -5px;
    border-top: 8px solid var(--accent-ink);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 0;
  }
}

@media (max-width: 620px) {
  /* On a phone the card is the opening picture. It carries the headline, so the text
     headline stays in the page for screen readers and search engines but is not drawn twice. */
  .home .intro {
    padding-top: 18px;
    padding-bottom: 28px;
  }

  .home .hero {
    display: block;
    margin-top: 22px;
    padding: 0;
    border-radius: 0;
    overflow: visible;
    background: none;
    box-shadow: none;
  }

  .home .intro p {
    margin-top: 0;
  }

  /* Plain wrapping here: the tidier wrapping used elsewhere leaves short lines on a narrow screen. */
  .home .intro p {
    text-wrap: wrap;
  }

  .home .intro-card {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 800 / 840;
    border-radius: 22px;
    box-shadow: 0 0 0 1px var(--glass-line), var(--elev-2);
  }

  .home .intro h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .does {
    grid-template-columns: minmax(0, 1fr);
  }

  .notify-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .notify button {
    order: 3;
  }

  /* The LinkedIn icon stays in the footer; the top bar has no room for it on a phone. */
  .top nav a.nav-in {
    display: none;
  }

  .frame {
    border-radius: 14px;
    padding: 0 6px 6px;
  }

  .frame-bar {
    height: 38px;
    padding: 0 8px;
  }

  .top nav a:not(.nav-cta) {
    font-size: 0.95rem;
  }

  .top nav a.nav-cta {
    padding: 7px 14px;
  }

  /* The page opens on the work, so the Work link is the one to drop when space is tight. */
  .top nav a[href='/#work'] {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
