:root {
  --bg: oklch(0.985 0.006 80);
  --ink: oklch(0.22 0.012 80);
  --ink-soft: oklch(0.45 0.012 80);
  --ink-faint: oklch(0.72 0.010 80);
  --rule: oklch(0.90 0.008 80);
  --accent: oklch(0.58 0.14 45);
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page {
  width: 100%;
  max-width: 764px;
  margin: 0 auto;
  padding: 56px 32px 40px;
  flex: 1;
}

/* ---- Header + nav ---- */
header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 48px;
}

.wordmark {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.wordmark .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 1px;
  margin-right: 8px;
  transform: translateY(0);
}

.nav-links {
  display: flex;
  gap: 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.nav-links a {
  color: var(--ink-faint);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color 120ms ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--accent);
}

/* ---- Hero (homepage) ---- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.hero { padding: 28px 0 6px; }
.hero .eyebrow { margin: 0; }
.hero .lead {
  font-size: 40px;
  line-height: 1.16;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 16px 0 0;
  max-width: 17ch;
  text-wrap: balance;
  color: var(--ink);
}
.hero .lead .ac { color: var(--accent); }
.hero .sub {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 20px 0 0;
  max-width: 52ch;
  text-wrap: pretty;
}
.hero .cta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 30px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.hero .cta a {
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 8px 14px;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}
.hero .cta a:hover { border-color: var(--accent); color: var(--accent); }
.hero .cta a.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.hero .cta a.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.hero .cta a.bare { border: none; padding: 8px 2px; color: var(--ink-soft); }
.hero .cta a.bare:hover { color: var(--accent); }
.hero .cta .sep { color: var(--ink-faint); }

/* ---- Shared section bits ---- */
.intro h1 {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0 0 10px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.intro p {
  font-size: 19px;
  line-height: 1.5;
  margin: 0 0 8px;
  color: var(--ink);
  max-width: 56ch;
  text-wrap: pretty;
}
.intro p .accent { color: var(--accent); font-weight: 500; }
.intro p.sub {
  color: var(--ink-soft);
  font-size: 16px;
}

/* ---- Index rows (home hub, writing, project list) ---- */
.index {
  list-style: none;
  padding: 0;
  margin: 0;
}
.index li + li { border-top: 1px dashed var(--rule); }
.index a.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: baseline;
  padding: 16px 0;
  text-decoration: none;
  color: inherit;
}
.index a.row:hover .row-title { color: var(--accent); }
.index a.row:hover .arrow { color: var(--accent); transform: translateX(2px); }
.row-main { min-width: 0; }
.row-title {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  transition: color 120ms ease;
}
.row-desc {
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 3px;
  text-wrap: pretty;
}
.row-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 12px;
}
.arrow {
  display: inline-block;
  color: var(--ink-faint);
  transition: color 120ms ease, transform 120ms ease;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 56px 0 4px;
}
.section-head:first-of-type { margin-top: 48px; }
.section-head h2 {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.section-head .count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
}

/* ---- Game embed ---- */
.game-section { margin-top: 32px; }
.game-stage { margin: 0 auto; }
.game-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.game-label .title { color: var(--ink); font-weight: 500; }
.game-label .tag {
  color: var(--accent);
  border: 1px solid currentColor;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 11px;
}
.game-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 7 / 4;
  background: #000;
  border: 1px solid var(--rule);
  overflow: hidden;
}
.game-frame iframe,
.game-frame .placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.game-frame iframe { border: 0; display: block; }
.placeholder {
  background-image:
    repeating-linear-gradient(45deg, transparent 0 14px, oklch(0.95 0.008 80) 14px 15px);
  background-color: oklch(0.97 0.008 80);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 120ms ease;
}
.placeholder:hover { background-color: oklch(0.96 0.01 80); }
.placeholder .play {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  transition: transform 120ms ease, background 120ms ease;
}
.placeholder:hover .play { background: var(--accent); transform: scale(1.05); }
.placeholder .play svg { display: block; }
.placeholder .caption { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; }

.game-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 10px;
  letter-spacing: 0.02em;
}
.game-caption a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color 120ms ease, border-color 120ms ease;
}
.game-caption a:hover { color: var(--accent); border-color: var(--accent); }

/* ---- Prose ---- */
.prose p {
  font-size: 16px;
  color: var(--ink);
  max-width: 60ch;
  margin: 0 0 18px;
  text-wrap: pretty;
}
.prose p .accent { color: var(--accent); font-weight: 500; }
.prose a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color 120ms ease, border-color 120ms ease;
}
.prose a:hover { color: var(--accent); border-color: var(--accent); }

/* ---- Key/value facts grid ---- */
.facts {
  list-style: none;
  padding: 0;
  margin: 0;
}
.facts li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  padding: 11px 0;
  font-size: 15px;
  align-items: baseline;
}
.facts li + li { border-top: 1px dashed var(--rule); }
.facts .key {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.facts .val { color: var(--ink); }
.facts .val a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color 120ms ease, border-color 120ms ease;
}
.facts .val a:hover { color: var(--accent); border-color: var(--accent); }

/* ---- Experience list ---- */
.exp { list-style: none; padding: 0; margin: 0; }
.exp > li { padding: 22px 0; }
.exp > li + li { border-top: 1px solid var(--rule); }
.exp .eh {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
}
.exp .role { font-size: 17px; font-weight: 500; color: var(--ink); }
.exp .yr {
  font-family: var(--mono); font-size: 12px; color: var(--ink-faint);
  white-space: nowrap; letter-spacing: 0.02em;
}
.exp .org {
  font-family: var(--mono); font-size: 12px; color: var(--ink-soft);
  margin-top: 3px; letter-spacing: 0.02em;
}
.exp ul { list-style: none; padding: 0; margin: 13px 0 0; }
.exp ul li {
  position: relative; padding-left: 18px; font-size: 14px;
  color: var(--ink-soft); margin-top: 8px; text-wrap: pretty; line-height: 1.5;
}
.exp ul li::before {
  content: ""; position: absolute; left: 2px; top: 8px;
  width: 5px; height: 5px; background: var(--accent); border-radius: 1px;
}
.exp ul li b { color: var(--ink); font-weight: 500; }

/* ---- Footer ---- */
footer {
  width: 100%;
  max-width: 764px;
  margin: 0 auto;
  padding: 24px 32px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
footer .links { display: flex; gap: 18px; }
footer a { color: var(--ink-soft); text-decoration: none; transition: color 120ms ease; }
footer a:hover { color: var(--accent); }

@media (max-width: 560px) {
  .page { padding: 36px 20px 24px; }
  footer { padding: 20px 20px 32px; flex-direction: column; gap: 10px; align-items: flex-start; }
  header { margin-bottom: 32px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .intro p { font-size: 17px; }
  .index a.row { grid-template-columns: 1fr; gap: 6px; }
  .facts li { grid-template-columns: 90px 1fr; gap: 16px; }
}
