:root {
  --bg: #faf9f7;
  --bg-2: #f3f1eb;
  --surface: #ffffff;
  --ink: #0e0e0c;
  --ink-2: #2a2a26;
  --muted: #6b6b66;
  --line: #e6e3dc;
  --line-2: #d9d5cc;
  --accent: oklch(0.66 0.18 41);
  --accent-ink: oklch(0.42 0.16 41);
  --accent-soft: oklch(0.96 0.04 60);
  --shadow: 0 1px 0 rgba(20,18,12,0.04), 0 12px 32px -16px rgba(20,18,12,0.12);
  --shadow-lg: 0 1px 0 rgba(20,18,12,0.04), 0 24px 60px -24px rgba(20,18,12,0.22);
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.2,.7,.2,1);
}
[data-theme="dark"] {
  --bg: #0c0c0a;
  --bg-2: #131311;
  --surface: #171714;
  --ink: #f5f3ee;
  --ink-2: #d9d5cc;
  --muted: #8a8a82;
  --line: #232320;
  --line-2: #2f2f2b;
  --accent: oklch(0.72 0.17 45);
  --accent-ink: oklch(0.82 0.12 50);
  --accent-soft: oklch(0.26 0.06 50);
  --shadow: 0 1px 0 rgba(0,0,0,0.5), 0 12px 32px -16px rgba(0,0,0,0.6);
  --shadow-lg: 0 1px 0 rgba(0,0,0,0.5), 0 24px 60px -24px rgba(0,0,0,0.7);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  transition: background-color .35s var(--ease), color .35s var(--ease);
  line-height: 1.5;
}
.serif { font-family: "Instrument Serif", "Times New Roman", serif; font-weight: 400; letter-spacing: -0.01em; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 500; letter-spacing: 0; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

/* ---------- HEADER ---------- */
header.site {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-size: 19px; letter-spacing: -0.02em;
  font-weight: 600;
}
.brand .mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--ink); color: var(--bg);
  font-family: "Instrument Serif", serif; font-size: 19px; font-style: italic;
  transform: translateY(2px);
}
.brand .dot { color: var(--accent); }

nav.primary { display: flex; align-items: stretch; }
nav.primary > .item {
  position: relative;
  height: 68px; display: flex; align-items: center;
  padding: 0 18px;
  font-size: 14.5px; font-weight: 500;
  color: var(--ink-2);
  cursor: default;
}
nav.primary > .item:hover { color: var(--ink); }
nav.primary > a.item { text-decoration: none; cursor: pointer; }
nav.primary > .item .chev {
  margin-left: 6px; opacity: .5; transition: transform .25s var(--ease);
}
nav.primary > .item:hover .chev { transform: rotate(180deg); opacity: .9; }

/* mega menu */
.mega {
  position: absolute; top: calc(100% - 1px); left: 0;
  min-width: 320px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-6px) scale(.985);
  pointer-events: none;
  transition: opacity .18s var(--ease), transform .22s var(--ease);
  transform-origin: top left;
}
nav.primary > .item:hover .mega,
nav.primary > .item:focus-within .mega { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.mega .eyebrow {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); padding: 4px 10px 10px;
}
.mega a.topic {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--ink);
  font-size: 14.5px;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.mega a.topic:hover { background: var(--bg-2); }
.mega a.topic .arr {
  opacity: 0; transform: translateX(-4px);
  transition: opacity .15s var(--ease), transform .2s var(--ease);
  color: var(--accent);
}
.mega a.topic:hover .arr { opacity: 1; transform: translateX(0); }
.mega a.topic .meta { font-size: 11.5px; color: var(--muted); }

.header-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.icon-btn:hover { background: var(--bg-2); border-color: var(--line-2); }
.icon-btn svg { width: 16px; height: 16px; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 160px 0 150px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
#hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
  pointer-events: none;
  mask-image: radial-gradient(80% 100% at 50% 50%, #000 45%, transparent 100%);
  -webkit-mask-image: radial-gradient(80% 100% at 50% 50%, #000 45%, transparent 100%);
}
#hero-bg canvas {
  position: absolute; top: 0; left: 0;
  width: 100% !important; height: 100% !important;
  display: block;
}

.hero-inner {
  position: relative; z-index: 2;
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 32px;
}

h1.display {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(56px, 9.6vw, 144px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  margin: 0 0 32px;
  color: var(--ink);
}
h1.display em { font-style: italic; color: var(--accent-ink); }

.lede {
  max-width: 54ch;
  margin: 0 auto 40px;
  font-size: 18px;
  color: var(--ink-2);
  line-height: 1.55;
  text-wrap: pretty;
}
.cta-row { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.btn-ghost {
  height: 46px; padding: 0 20px; border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14.5px; font-weight: 500;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.btn-ghost:hover { background: var(--bg-2); border-color: var(--line-2); }
.btn-solid {
  height: 46px; padding: 0 24px; border-radius: 12px;
  background: var(--ink); color: var(--bg);
  font-size: 14.5px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px;
  white-space: nowrap;
  transition: transform .15s var(--ease);
}
.btn-solid:hover { transform: translateY(-1px); }
.btn-solid .ar { display: inline-block; transition: transform .25s var(--ease); }
.btn-solid:hover .ar { transform: translateX(4px); }

/* ---------- PATHS ---------- */
section.paths { padding: 120px 0 100px; }
.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  margin-bottom: 56px;
}
.section-head .label {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 18px;
}
.section-head h2 {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(40px, 4.6vw, 60px);
  line-height: 1;
  letter-spacing: -0.015em;
  margin: 0;
  max-width: 16ch;
}
.section-head h2 em { font-style: italic; color: var(--accent-ink); }
.section-head p {
  max-width: 36ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  margin: 0;
}

.paths-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.path {
  position: relative;
  grid-column: span 4;
  padding: 28px 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 320px;
  display: flex; flex-direction: column;
  transition: transform .4s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  overflow: hidden;
}
.path:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.path.lg { grid-column: span 6; }
.path.md { grid-column: span 6; }

.path::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.path:hover::before { transform: scaleX(1); }

.path .idx {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px; color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 22px;
  display: flex; align-items: center; justify-content: space-between;
}
.path .idx .count { color: var(--ink-2); }
.path h3 {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 38px; line-height: 1;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  color: var(--ink);
}
.path .desc {
  color: var(--muted);
  font-size: 14.5px; line-height: 1.55;
  margin: 0 0 22px;
  max-width: 36ch;
}
.path .chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: auto;
  margin-bottom: 22px;
}
.path .chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 12.5px;
  color: var(--ink-2);
  font-family: "JetBrains Mono", monospace;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.path .chip:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.path .open {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500;
  color: var(--ink);
}
.path .open .ar { transition: transform .25s var(--ease); color: var(--accent); }
.path:hover .open .ar { transform: translateX(6px); }

/* ---------- ABOUT (page) ---------- */
section.about-prose {
  padding: 90px 0 30px;
}
.prose-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  max-width: 64ch;
  margin: 24px 0 0;
}
.prose-body p {
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
}
.prose-body p:first-child {
  font-size: 22px;
  color: var(--ink);
  line-height: 1.5;
}

section.about {
  padding: 100px 0 120px;
}

/* ---------- THE NAME (about page) ---------- */
section.name {
  border-top: 1px solid var(--line);
  padding: 100px 0 120px;
}
.name-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 24px;
}
.name-col {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.name-col .word {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(48px, 5.2vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 24px;
}
.name-col .word .dot { color: var(--accent); }
.name-col:nth-child(2) .word {
  font-style: italic;
  color: var(--accent-ink);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 24px;
}
.about-col {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.ac-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 28px;
}
.ac-intro {
  color: var(--muted);
  font-size: 16px; line-height: 1.55;
  margin: 0 0 14px;
  max-width: 38ch;
}
.ac-list {
  list-style: none; padding: 0; margin: 0;
  counter-reset: li-count;
}
.ac-list li {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  padding: 16px 0;
  border-bottom: 1px dashed var(--line);
  display: grid; grid-template-columns: 36px 1fr; align-items: baseline; gap: 12px;
}
.ac-list li::before {
  content: counter(li-count, decimal-leading-zero);
  counter-increment: li-count;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.ac-list--alt li b {
  font-style: italic; font-weight: 400; color: var(--accent-ink);
}
.section-head .lede-mono {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9em; letter-spacing: 0.02em;
  color: var(--ink);
}
.section-head .pull {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  color: var(--accent-ink);
}

/* ---------- FOOTER ---------- */
footer.site {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  background: var(--bg-2);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(6, 1fr);
  gap: 36px;
  margin-bottom: 56px;
}
.foot-col h4 {
  font-size: 12px; letter-spacing: 0.08em;
  font-family: "JetBrains Mono", monospace;
  color: var(--muted);
  margin: 0 0 16px;
  text-transform: uppercase;
  font-weight: 500;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { font-size: 14px; color: var(--ink-2); transition: color .2s var(--ease); }
.foot-col a:hover { color: var(--accent-ink); }
.foot-tag {
  font-family: "Instrument Serif", serif; font-style: italic;
  font-size: 32px; line-height: 1;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.foot-tag-sub { color: var(--muted); font-size: 14px; max-width: 28ch; line-height: 1.5; margin: 0; }
.foot-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.04em;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .path, .path.lg, .path.md { grid-column: span 6; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .name-grid { grid-template-columns: 1fr; gap: 24px; }
  .foot-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  nav.primary { display: none; }
  .section-head { grid-template-columns: 1fr; }
  .path, .path.lg, .path.md { grid-column: span 12; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  h1.display { font-size: 64px; }
}
