/* ---------------------------------------------------------------- Fonts */

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Michroma";
  src: url("../fonts/michroma-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------- Tokens */

:root {
  --paper: #ffffff;
  --ink: #0a0a0a;
  --ink-soft: #5e5e5e;
  --rule: #e4e4e4;
  --night: #0a0a0a;
  --night-ink: #f3f3f3;
  --night-soft: #8c8c8c;
  --night-rule: #262626;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-wide: "Michroma", "Geist", ui-sans-serif, system-ui, sans-serif;

  --margin: clamp(16px, 2.5vw, 36px);
  --gutter: clamp(12px, 1.4vw, 20px);
  --section: clamp(96px, 13vw, 200px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Diagram screens, the contact card and body copy. */
  --screen: #0a0a0a;
  --screen-ink: #f3f3f3;
  --screen-rule: transparent;
  --ink-body: #2d2d2d;
  --card-a: #171717;
  --card-b: #0e0e0e;
  --card-shadow: rgba(0, 0, 0, 0.9);
  --sheen: rgba(255, 255, 255, 0.07);

  color-scheme: light;
}

/* Dark: the page goes to ink, and the contact section flips to paper. */
:root[data-theme="dark"] {
  --paper: #0b0b0b;
  --ink: #f2f2f2;
  --ink-soft: #9b9b9b;
  --rule: #232323;
  --night: #f3f3f1;
  --night-ink: #0a0a0a;
  --night-soft: #5c5c5c;
  --night-rule: #d9d9d6;

  --screen: #141414;
  --screen-ink: #f2f2f2;
  --screen-rule: #2a2a2a;
  --ink-body: #d4d4d4;
  --card-a: #ffffff;
  --card-b: #ecece9;
  --card-shadow: rgba(0, 0, 0, 0.22);
  --sheen: rgba(0, 0, 0, 0.05);

  color-scheme: dark;
}

::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

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

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
svg { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
ol, ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure { margin: 0; font-weight: inherit; }

::selection { background: var(--ink); color: var(--paper); }
.contact ::selection { background: var(--night-ink); color: var(--night); }

:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }
[tabindex="-1"]:focus { outline: none; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

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

.skip {
  position: fixed;
  left: var(--margin);
  top: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ----------------------------------------------------------------- Type */

.bracket { font-size: 15px; letter-spacing: -0.005em; white-space: nowrap; }

.idx,
.tag {
  font-family: var(--font-wide);
  font-size: 9.5px;
  line-height: 1.6;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.count {
  font-family: var(--font-wide);
  font-size: 0.28em;
  letter-spacing: 0.04em;
  vertical-align: top;
  margin-left: 0.25em;
  position: relative;
  top: 0.35em;
}

.title {
  font-size: clamp(40px, 5.2vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 500;
}

.arrow-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
  font-size: 15px;
  white-space: nowrap;
}
.arrow-link span:last-child {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease-out);
}
.arrow-link:hover span:last-child { background-size: 100% 1px; }

/* Masks for line reveals (SplitText adds these wrappers). */
.line-mask { overflow: hidden; overflow: clip; padding-bottom: 0.08em; margin-bottom: -0.08em; }

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

.intro {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  place-items: center;
  padding: 16px;
  background: var(--paper);
  cursor: pointer;
}
.js.is-intro .intro { display: grid; }

.intro__mark {
  width: min(1180px, 100%);
  height: auto;
  overflow: visible;
  -webkit-user-select: none;
  user-select: none;
}
.intro__mark .glyph { opacity: 0; }
.intro__mark .ink { visibility: hidden; }

.intro__skip {
  position: absolute;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  color: var(--ink-soft);
  opacity: 0;
  animation: fade-in 0.6s 1.6s forwards;
}

@keyframes fade-in { to { opacity: 1; } }
.intro.is-signed .intro__skip { color: var(--ink); animation: fade-in 0.4s forwards, pulse 1.2s 0.4s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 1; } to { opacity: 0.35; } }

/* ------------------------------------------------------------------ Nav */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px var(--margin);
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }

.nav__logo { justify-self: start; display: block; padding: 4px 0; }
.nav__logo svg { height: 34px; width: auto; overflow: visible; }

.nav__links { display: flex; gap: clamp(14px, 2vw, 26px); font-size: 15px; }
.nav__links a { display: inline-flex; align-items: flex-start; white-space: nowrap; }
.nav__links sup { font-family: var(--font-wide); font-size: 8px; margin-left: 3px; top: 0; line-height: 1.4; }

.nav__right { justify-self: end; display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); }
.nav__time { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nav__time span { opacity: 0.6; }

.theme-toggle { display: inline-grid; place-items: center; width: 22px; height: 22px; }
.theme-toggle__icon {
  width: 13px;
  height: 13px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  transition: transform 0.8s var(--ease-out);
}
[data-theme="dark"] .theme-toggle__icon { transform: rotate(180deg); }

.sound { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; white-space: nowrap; }
.sound__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.sound__bars i {
  display: block;
  width: 2px;
  height: 100%;
  background: currentColor;
  opacity: 0.55;
  transform: scaleY(var(--h, 0.5));
  transform-origin: 50% 100%;
  transition: transform 0.5s var(--ease-out), opacity 0.5s var(--ease-out);
}
.sound__bars i:nth-child(1) { --h: 0.45; }
.sound__bars i:nth-child(2) { --h: 0.85; }
.sound__bars i:nth-child(3) { --h: 0.6; }
.sound__bars i:nth-child(4) { --h: 0.3; }
.sound.is-on .sound__bars i { opacity: 1; }
.sound.is-playing .sound__bars i { animation: eq 0.9s ease-in-out infinite alternate; }
.sound.is-playing .sound__bars i:nth-child(2) { animation-duration: 0.7s; animation-delay: -0.3s; }
.sound.is-playing .sound__bars i:nth-child(3) { animation-duration: 1.1s; animation-delay: -0.6s; }
.sound.is-playing .sound__bars i:nth-child(4) { animation-duration: 0.8s; animation-delay: -0.2s; }

@keyframes eq { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }

.js.is-intro:not(.is-ready) .nav { visibility: hidden; }

/* ----------------------------------------------------------------- Hero */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 96px var(--margin) 28px;
}

.hero__center { align-self: center; text-align: center; }

.hero__name {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(66px, 16.6vw, 320px);
  line-height: 0.8;
  letter-spacing: -0.065em;
  font-weight: 500;
  white-space: nowrap;
}

.hero__word { display: inline-flex; overflow: hidden; overflow: clip; padding: 0.04em 0.02em 0.1em; margin: -0.04em 0 -0.1em; }
.hero__word .char { display: inline-block; }

.hero__inset {
  position: relative;
  flex: none;
  width: 1.04em;
  height: 0.62em;
  margin: 0.02em 0.07em 0 0.06em;
  border-radius: 0.05em;
  background: var(--screen);
  color: var(--screen-ink);
  box-shadow: inset 0 0 0 1px var(--screen-rule);
  overflow: hidden;
  clip-path: inset(var(--iris, 0%) round 0.05em);
  --dg-bg: var(--screen);
}
.hero__inset .slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 6%;
  visibility: hidden;
}
.hero__inset .slide.is-active { visibility: visible; }
.hero__inset .diagram { width: 100%; height: 100%; }

.hero__lede {
  max-width: 21ch;
  margin: clamp(22px, 3vw, 44px) auto 0;
  font-size: clamp(22px, 2.75vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.032em;
  font-weight: 450;
  text-wrap: balance;
}

.hero__meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 16px;
}
.hero__meta > p:last-child { justify-self: end; text-align: right; }

.hero__watch {
  width: clamp(92px, 8.6vw, 132px);
  aspect-ratio: 214 / 208;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.2));
  transition: transform 0.9s var(--ease-out);
}
.hero__watch:hover { transform: rotate(-6deg) scale(1.06); }
.watch { width: 100%; height: auto; overflow: visible; }
.watch__print { font-family: var(--font-wide); font-size: 3.8px; letter-spacing: 0.5px; fill: #a6a6a6; }
.watch__print--city { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; font-size: 4.6px; letter-spacing: 0.9px; fill: #d9d9d9; }
.watch__name { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif; font-size: 8.6px; font-weight: 600; letter-spacing: 1.3px; fill: #f4f4f4; }
.watch__date { font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; letter-spacing: -0.5px; fill: #111; }

.js:not(.is-ready) .hero [data-hero] { opacity: 0; }

/* ------------------------------------------------------------- Approach */

.approach {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  margin: 0 var(--margin);
  padding: 28px 0 var(--section);
  border-top: 1px solid var(--rule);
}
.approach > .bracket { grid-column: 1 / span 3; }

.approach__list { grid-column: 6 / span 6; display: grid; gap: clamp(28px, 3vw, 44px); }
.approach__item {
  --size: clamp(22px, 2.15vw, 32px);
  display: grid;
  grid-template-columns: 3.4em minmax(0, 1fr);
  align-items: start;
}
.approach__item .idx { padding-top: calc((var(--size) * 1.12 - 15px) / 2); }
.approach__item p {
  font-size: var(--size);
  line-height: 1.12;
  letter-spacing: -0.028em;
  font-weight: 450;
  text-wrap: balance;
}
.approach__item small {
  grid-column: 2;
  margin-top: 10px;
  font-size: 15px;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
}

.approach > .arrow-link { grid-column: 12; justify-self: end; align-self: start; }

/* ----------------------------------------------------------------- Work */

.work { position: relative; padding: 0 var(--margin) var(--section); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  padding-bottom: clamp(24px, 3vw, 40px);
}

.project { border-top: 1px solid var(--rule); }
.project:last-child { border-bottom: 1px solid var(--rule); }

.project__row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: center;
  padding: clamp(14px, 1.6vw, 22px) 0;
  transition: opacity 0.5s var(--ease-out);
}
.project__row .idx { grid-column: 1; align-self: start; padding-top: 0.9em; }
.project__name {
  grid-column: 2 / span 6;
  font-size: clamp(40px, 6.4vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.058em;
  font-weight: 500;
  transition: transform 0.7s var(--ease-out);
}
.project__kind { grid-column: 8 / span 4; font-size: 15px; color: var(--ink-soft); line-height: 1.3; }
.project__year { grid-column: 12; justify-self: end; white-space: nowrap; }

@media (hover: hover) and (pointer: fine) {
  .project__name { transition: transform 0.7s var(--ease-out), opacity 0.5s var(--ease-out); }
  .work__list:hover .project__row:not(:hover):not(:focus-visible) .project__name { opacity: 0.45; }
  .project__row:hover .project__name,
  .project__row:focus-visible .project__name { transform: translateX(0.16em); }
}

.project__detail { display: none; }
html:not(.js) .project__detail { display: block; padding: 0 0 28px; max-width: 60ch; }

.preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  width: clamp(260px, 24vw, 380px);
  aspect-ratio: 400 / 260;
  border-radius: 6px;
  background: var(--screen);
  color: var(--screen-ink);
  box-shadow: inset 0 0 0 1px var(--screen-rule);
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
  --dg-bg: var(--screen);
}
.preview .slide { position: absolute; inset: 0; padding: 6%; visibility: hidden; }
.preview .slide.is-active { visibility: visible; }
.preview .diagram { width: 100%; height: 100%; }

/* --------------------------------------------------------------- Record */

.record { padding: 0 var(--margin) var(--section); }

.record__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 64px;
}
.record__col > .bracket { display: block; margin-bottom: 18px; }
.record__col--exp { grid-column: 1 / span 6; }
.record__col--rec { grid-column: 7 / span 3; }
.record__col--edu { grid-column: 10 / span 3; }

.entry {
  display: grid;
  grid-template-columns: 8.2em minmax(0, 1fr);
  column-gap: 12px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--rule);
}
.record__col--rec .entry,
.record__col--edu .entry { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
.entry .idx { padding-top: 0.35em; color: var(--ink-soft); }
.entry__role { font-size: 18px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 500; }
.entry__org { font-size: 15px; line-height: 1.35; color: var(--ink-soft); }

/* -------------------------------------------------------------- Contact */

.contact {
  position: relative;
  background: var(--night);
  color: var(--night-ink);
  padding: var(--section) var(--margin) 24px;
  --dg-bg: var(--night);
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 40px;
}
.contact__grid > .bracket { grid-column: 1 / -1; color: var(--night-soft); }

.contact__lead { grid-column: 1 / span 7; display: grid; gap: 26px; align-content: start; justify-items: start; }

.contact__title {
  font-size: clamp(48px, 7.2vw, 132px);
  line-height: 0.9;
  letter-spacing: -0.062em;
  font-weight: 500;
  text-wrap: balance;
}

.contact__note { margin-top: 10px; font-size: 18px; color: var(--night-soft); letter-spacing: -0.01em; }
.contact__email {
  justify-self: start;
  font-size: clamp(22px, 2.5vw, 38px);
  letter-spacing: -0.035em;
  line-height: 1.1;
  padding-bottom: 4px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size 0.6s var(--ease-out);
  word-break: break-all;
}
.contact__email:hover { background-size: 0 1px; background-position: 100% 100%; }

.marquee {
  margin: calc(var(--section) * -1 + 28px) calc(var(--margin) * -1) var(--section);
  padding: 16px 0;
  border-bottom: 1px solid var(--night-rule);
  overflow: hidden;
  color: var(--night-soft);
}
.marquee__track { display: flex; width: max-content; }
.marquee__group { display: flex; flex: none; }
.marquee__group span {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-wide);
  font-size: clamp(10px, 0.85vw, 12px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee__group span::after {
  content: "";
  width: 5px;
  height: 5px;
  margin: 0 2.4em;
  border-radius: 50%;
  background: currentColor;
}

/* Contact card */

.card {
  position: relative;
  grid-column: 8 / span 5;
  align-self: end;
  padding: 22px 22px 18px;
  border: 1px solid var(--night-rule);
  border-radius: 18px;
  background: linear-gradient(160deg, var(--card-a), var(--card-b) 62%);
  box-shadow: 0 40px 90px -50px var(--card-shadow);
  overflow: hidden;
}
.card__sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), var(--sheen), transparent 65%);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}
.card:hover .card__sheen { opacity: 1; }

.card__head { position: relative; display: flex; justify-content: space-between; align-items: flex-start; }
.card__logo { height: 42px; width: auto; overflow: visible; }
.card__head .tag { color: var(--night-soft); }

.card__name { position: relative; margin-top: 34px; font-size: clamp(26px, 2.3vw, 34px); line-height: 1; letter-spacing: -0.045em; font-weight: 500; }
.card__role { position: relative; margin-top: 8px; font-size: 15px; color: var(--night-soft); }

.card__rows { position: relative; margin-top: 26px; }
.card__rows a {
  display: grid;
  grid-template-columns: 6.4em minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  padding: 12px 2px;
  border-top: 1px solid var(--night-rule);
  font-size: 15px;
  transition: padding 0.5s var(--ease-out);
}
.card__rows li:last-child a { border-bottom: 1px solid var(--night-rule); }
.card__key { color: var(--night-soft); }
.card__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__go { transition: transform 0.5s var(--ease-out); }
.card__rows a:hover { padding-left: 10px; }
.card__rows a:hover .card__go { transform: translate(3px, -3px); }

.card__actions { position: relative; display: flex; gap: 10px; margin-top: 18px; }
.card__btn {
  flex: 1;
  display: inline-flex;
  justify-content: center;
  padding: 12px 14px;
  border: 1px solid var(--night-rule);
  border-radius: 999px;
  font-size: 14px;
  transition: background-color 0.35s, color 0.35s, border-color 0.35s;
}
.card__btn:hover { background: var(--night-ink); border-color: var(--night-ink); color: var(--night); }

.contact__mark {
  width: min(1180px, 100%);
  height: auto;
  margin: clamp(80px, 12vw, 180px) auto 0;
  overflow: visible;
  -webkit-user-select: none;
  user-select: none;
}

.contact__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: clamp(60px, 8vw, 120px);
  padding-top: 18px;
  border-top: 1px solid var(--night-rule);
  font-size: 13px;
  color: var(--night-soft);
}
.contact__base a:hover { color: var(--night-ink); }

/* --------------------------------------------------------------- Drawer */

.drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.drawer.is-open { visibility: visible; }

.drawer__scrim { position: absolute; inset: 0; background: rgba(10, 10, 10, 0.4); opacity: 0; }

.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(680px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer__bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--margin);
  background: var(--paper);
}

.drawer__visual {
  margin: 0 var(--margin);
  aspect-ratio: 400 / 260;
  border-radius: 6px;
  background: var(--screen);
  color: var(--screen-ink);
  box-shadow: inset 0 0 0 1px var(--screen-rule);
  padding: 5%;
  --dg-bg: var(--screen);
}
.drawer__visual .diagram { width: 100%; height: 100%; }

.drawer__body { padding: 28px var(--margin) 40px; display: grid; gap: 20px; }
.drawer__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-soft); }
.drawer__title { font-size: clamp(44px, 6vw, 84px); line-height: 0.92; letter-spacing: -0.058em; font-weight: 500; }
.drawer__kind { font-size: 20px; letter-spacing: -0.02em; }
.drawer__text { font-size: 17px; line-height: 1.5; color: var(--ink-body); max-width: 52ch; }
.facts a { border-bottom: 1px solid var(--rule); transition: border-color 0.3s; }
.facts a:hover { border-color: currentColor; }

.facts { display: grid; margin-top: 8px; }
.facts div { display: grid; grid-template-columns: 9em 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; }

.drawer__next {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 22px var(--margin);
  border-top: 1px solid var(--rule);
  font-size: 15px;
}
.drawer__next strong { font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -0.05em; font-weight: 500; }

/* ------------------------------------------------------------- Diagrams */

.diagram { overflow: visible; stroke-width: 1; }
.diagram.is-paused,
.diagram.is-paused * { animation-play-state: paused !important; }
.diagram * { vector-effect: non-scaling-stroke; }
.diagram .dg-dot { fill: currentColor; stroke: none; }
.diagram .dg-token { stroke-width: 2.2; stroke-linecap: round; }
.diagram .dg-core { animation: dg-core 2.4s var(--d, 0s) ease-in-out infinite; }
@keyframes dg-core { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.diagram .dg-ln { font-size: 5.5px; opacity: 0.4; }
.diagram .dg-fill-bg { fill: var(--dg-bg, var(--screen)); }
.diagram .dg-dash { stroke-dasharray: 3 4; }
.diagram .dg-label,
.diagram .dg-atom {
  fill: currentColor;
  stroke: none;
  font-family: var(--font-wide);
  font-size: 7px;
  letter-spacing: 0.06em;
}
.diagram .dg-label { opacity: 0.7; }
.diagram .dg-atom { font-size: 11px; letter-spacing: 0; font-family: var(--font-sans); font-weight: 500; }
.diagram .dg-atom--small { font-size: 8px; }

.diagram .dg-scan { opacity: 0.45; animation: dg-scan 5s linear infinite; }
.diagram .dg-call { animation: dg-blink 5s var(--d, 0s) linear infinite; opacity: 0; }
.diagram .dg-spin { transform-origin: 200px 130px; animation: dg-spin 90s linear infinite; }
.diagram .dg-pulse { stroke-dasharray: 2 5; animation: dg-dash 1.2s var(--d, 0s) linear infinite; }

@keyframes dg-scan { from { transform: translateX(0); } to { transform: translateX(400px); } }
@keyframes dg-blink { 0%, 8% { opacity: 0; } 12%, 70% { opacity: 1; } 78%, 100% { opacity: 0; } }
@keyframes dg-spin { to { transform: rotate(360deg); } }
@keyframes dg-dash { to { stroke-dashoffset: -14; } }

/* --------------------------------------------------------------- Mobile */

@media (max-width: 1023px) {
  .approach > .bracket { grid-column: 1 / span 12; margin-bottom: 28px; }
  .approach__list { grid-column: 1 / span 11; }
  .approach > .arrow-link { grid-column: 1 / span 12; justify-self: start; margin-top: 40px; }

  .project__name { grid-column: 2 / span 11; }
  .project__kind { grid-column: 2 / span 10; margin-top: 8px; }
  .project__year { grid-column: 12; grid-row: 1; align-self: start; padding-top: 0.9em; }

  .record__col--exp { grid-column: 1 / span 12; }
  .record__col--rec { grid-column: 1 / span 6; }
  .record__col--edu { grid-column: 7 / span 6; }

  .contact__lead { grid-column: 1 / span 12; }
  .card { grid-column: 1 / span 8; margin-top: 24px; }
}

@media (max-width: 639px) {
  .nav__time { display: none; }
  .nav { grid-template-columns: auto 1fr auto; column-gap: 14px; }
  .nav__links { gap: 12px; }
  .nav__right { gap: 10px; }
  .nav__links { justify-self: end; }
  .nav__logo svg { height: 30px; }
  .sound__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sound { padding: 8px 0 8px 4px; }

  .hero { padding-top: 88px; }
  .hero__name { font-size: 19vw; }
  .bracket { white-space: normal; }
  .hero__meta { grid-template-columns: 1fr auto; grid-template-areas: "city watch" "role watch"; row-gap: 6px; }
  .hero__meta > p:first-child { grid-area: city; }
  .hero__meta > p:last-child { grid-area: role; justify-self: start; text-align: left; }
  .hero__watch { grid-area: watch; width: 84px; }

  .approach__list { grid-column: 1 / span 12; }
  .project__row .idx { padding-top: 0.6em; }
  .project__name { font-size: clamp(38px, 12vw, 64px); }

  .record__col--rec,
  .record__col--edu { grid-column: 1 / span 12; }
  .entry { grid-template-columns: 6.6em minmax(0, 1fr); }

  .card { grid-column: 1 / span 12; padding: 18px 16px 14px; }
  .card__rows a { grid-template-columns: 5.6em minmax(0, 1fr) auto; }

  .facts div { grid-template-columns: 7em 1fr; }
}

/* ------------------------------------------------------- Reduced motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  .diagram .dg-call { animation: none !important; opacity: 1; }
  .diagram .dg-scan { display: none; }
  .sound.is-playing .sound__bars i { animation: none; transform: scaleY(0.75); }
}

/* Brand names that are lowercase by design keep their case in tags. */
.tag--brand { text-transform: none; }

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

.about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  margin: 0 var(--margin);
  padding: 28px 0 var(--section);
  border-top: 1px solid var(--rule);
}
.about > .bracket { grid-column: 1 / span 3; }
.about__text {
  grid-column: 4 / span 9;
  font-size: clamp(28px, 3.4vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.038em;
  font-weight: 450;
  text-wrap: pretty;
}

/* Small live screens set inline with the words they illustrate. */
.chip {
  display: inline-block;
  width: 1.5em;
  height: 0.94em;
  margin: 0 0.04em;
  padding: 0.06em;
  vertical-align: -0.12em;
  border-radius: 0.12em;
  background: var(--screen);
  color: var(--screen-ink);
  box-shadow: inset 0 0 0 1px var(--screen-rule);
  overflow: hidden;
  --dg-bg: var(--screen);
}
.chip .diagram { width: 100%; height: 100%; }

/* -------------------------------------------------------------- Numbers */

.numbers { margin: 0 var(--margin); padding-bottom: var(--section); }
.numbers > .bracket { display: block; margin-bottom: clamp(28px, 3vw, 44px); }
.numbers__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gutter); }
.stat { padding-top: 16px; border-top: 1px solid var(--rule); }
.stat .idx { display: block; margin-bottom: clamp(24px, 3vw, 48px); color: var(--ink-soft); }
.stat__num {
  font-size: clamp(56px, 6.2vw, 120px);
  line-height: 0.88;
  letter-spacing: -0.065em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat__text { margin-top: 16px; max-width: 22ch; font-size: 15px; line-height: 1.35; color: var(--ink-soft); }

@media (max-width: 1023px) {
  .about > .bracket { grid-column: 1 / -1; margin-bottom: 24px; }
  .about__text { grid-column: 1 / -1; }
  .numbers__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
}

/* The inset grows over the parting name on scroll. */
.hero__inset { z-index: 1; }
.hero__watch { width: clamp(104px, 9.4vw, 150px); }

/* ---------------------------------------------------------- Ink + sound */

.ink-trail { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }

.sound__track {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  font-size: 13px;
  transition: max-width 0.7s var(--ease-out), opacity 0.5s var(--ease-out);
}
.sound.is-playing:hover .sound__track,
.sound.is-playing:focus-visible .sound__track,
.sound.is-announcing .sound__track { max-width: 220px; opacity: 0.65; }

/* Watch lume glows in the dark. */
.watch__glow { flood-color: #9dffd9; flood-opacity: 0; }
[data-theme="dark"] .watch__glow { flood-opacity: 0.85; }

@media (max-width: 639px) {
  .sound__track { display: none; }
}
[data-theme="dark"] .watch__lume { fill: #ecfff7; }

/* ------------------------------------------------------------ Signature */

/* The handwritten signature is drawn in grey; the wordmark stays in ink.
   The nav logo sits in a difference-blended bar, so its colour is chosen
   to land on the same grey as the intro mark it takes over from. */
:root { --signature: #8f8f8f; }
.signature,
.card__logo { color: var(--signature); }
.nav__logo { color: #707070; }
[data-theme="dark"] .nav__logo { color: #9a9a9a; }

/* ------------------------------------------------------------- Lifetime */

.about { position: relative; }
.age { border-bottom: 1px dotted currentColor; cursor: help; border-radius: 2px; }

.lifetime {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  padding: 14px 18px 15px;
  border-radius: 12px;
  background: var(--screen);
  color: var(--screen-ink);
  box-shadow: inset 0 0 0 1px var(--screen-rule), 0 24px 60px -30px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease-out), transform 0.5s var(--ease-out), visibility 0s 0.35s;
}
.lifetime.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.lifetime .tag { opacity: 0.6; }
.lifetime__main { margin-top: 8px; font-size: clamp(18px, 1.7vw, 24px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 500; font-variant-numeric: tabular-nums; }
.lifetime__total { margin-top: 5px; font-size: 13px; opacity: 0.7; font-variant-numeric: tabular-nums; }

/* The parting name slides past the hero's edges on scroll; keep it inside. */
.hero { overflow: hidden; overflow: clip; }
