:root {
  color-scheme: light dark;

  --bg: #fbfbfa;
  --surface: #ffffff;
  --ink: #16181d;
  --ink-soft: #4b5563;
  --ink-faint: #8b93a1;
  --rule: #e6e6e3;
  --accent: #0f4c81;
  --chip-bg: #f1f3f5;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --gold: #8a6712;
  --gold-strong: #6b4f08;
  --max: 660px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101114;
    --surface: #16181c;
    --ink: #e9eaec;
    --ink-soft: #a3a8b3;
    --ink-faint: #6e747f;
    --rule: #26282e;
    --accent: #7fb2e5;
    --chip-bg: #1d2026;
    --gold: #d8b25e;
    --gold-strong: #f0d18d;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

#ambient,
#ambient-far,
#ambient-galaxies,
#ambient-glow {
  position: fixed;
  z-index: 0;
  pointer-events: none;
}

#ambient { inset: 0; }

/* the static layers are painted once and parallaxed with a compositor-only
   transform, so they cost nothing per frame; the inset gives the transform
   room to move without exposing an edge */
#ambient-far,
#ambient-galaxies {
  inset: -70px;
  will-change: transform;
}

/* the glow is one soft sprite that only ever moves, so it is painted once at
   half resolution and translated; blitting it full size every frame was four
   fifths of the frame budget at retina scale */
#ambient-glow {
  top: 0;
  left: 0;
  will-change: transform;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(var(--max), 90vw);
  margin: 0 auto;
  padding: 0 0 96px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 0 0;
}

.mark { display: flex; align-items: center; }
.mark img { height: 34px; width: auto; }

@media (prefers-color-scheme: dark) {
  /* the wordmark is dark navy on transparent; render it as a white
     silhouette so it stays legible on the dark background */
  .mark img { filter: brightness(0) invert(1); opacity: 0.9; }
}

.top nav {
  display: flex;
  gap: 18px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.top nav a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.15s ease;
}

.top nav a:hover,
.top nav a:focus-visible { color: var(--gold-strong); }

.hero { padding: 68px 0 12px; }

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.7rem, 7.5vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: -0.012em;
  margin: 0 0 20px;
  font-weight: 400;
}

.lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
  margin: 0 0 14px;
  max-width: 56ch;
}

.lede strong { color: var(--ink); font-weight: 600; }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.links a {
  backdrop-filter: blur(2px);
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 7px 12px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-soft);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.links a:hover { color: var(--ink); border-color: var(--ink-faint); }

section { padding: 46px 0 0; }

.label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.item { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.item:last-child { border-bottom: none; }

.item-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.item-head h3 {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.item-head h3 a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.item-head h3 a:hover { border-bottom-color: var(--accent); color: var(--accent); }

.chip {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: var(--chip-bg);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

.item p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

.role {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.role:last-child { border-bottom: none; }

.role .who { font-size: 0.97rem; }
.role .who strong { font-weight: 600; }
.role .who span { color: var(--ink-soft); }

.role .when {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

.prose p { color: var(--ink-soft); margin: 0 0 14px; }
.prose p:last-child { margin-bottom: 0; }

footer {
  border-top: 1px solid var(--rule);
  margin-top: 64px;
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.83rem;
  color: var(--ink-faint);
}

footer a { color: var(--ink-faint); text-decoration: none; border-bottom: 1px solid var(--rule); }
footer a:hover { color: var(--ink); }

@media (max-width: 560px) {
  .role { grid-template-columns: 1fr; }
  .role .when { order: -1; }
}
