/* ── tokens ─────────────────────────────────────────────── */
:root {
  /* neutral greys; the olive green (from the Love Letter project) is
     only used for a few accents: logo, main button, ball, hover states */
  --bg: #f7f7f6;
  --surface: #ffffff;
  --text: #1c1c1c;
  --muted: #5f5f5f;
  --faint: #8a8a8a;
  --line: #e4e4e2;
  --chip: rgba(0, 0, 0, 0.05);
  --accent: #5e6140;
  --accent-fill: #5e6140;
  --accent-fill-hover: #4c4e33;
  --accent-soft: rgba(94, 97, 64, 0.14);
  --on-accent: #fafaf6;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px -16px rgba(0, 0, 0, 0.16);

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1000px;
  --radius: 14px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #141414;
  --surface: #1c1c1c;
  --text: #ececec;
  --muted: #a3a3a3;
  --faint: #737373;
  --line: #2a2a2a;
  --chip: rgba(255, 255, 255, 0.06);
  --accent: #a3a875;          /* lifted so it reads on the dark background */
  --accent-fill: #5c6040;     /* fills stay deep so light text on them stays readable */
  --accent-fill-hover: #6a6e4a;
  --accent-soft: rgba(163, 168, 117, 0.16);
  --on-accent: #fafaf6;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -16px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s ease, color 0.25s ease;
}

main { overflow-x: clip; }

a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent-fill); color: var(--on-accent); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 32px; }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--accent-fill); color: var(--on-accent); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 8px; z-index: 100; }

/* ── header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.logo-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent-fill); color: var(--on-accent);
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0;
}

.nav { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; }
.nav a { color: var(--muted); padding: 6px 12px; border-radius: 8px; transition: color 0.15s, background-color 0.15s; }
.nav a:hover { color: var(--text); background: var(--chip); }

.theme-toggle {
  display: grid; place-items: center;
  width: 36px; height: 36px; margin-left: 8px; padding: 0;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--faint); }
.theme-toggle svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ── hero ───────────────────────────────────────────────── */
.hero { position: relative; padding-top: 112px; padding-bottom: 24px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 24px; padding: 5px 12px 5px 10px;
  font-family: var(--mono); font-size: 13px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 600;
}
h1 .muted { font-weight: 500; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 20px;
  font-size: 15px; font-weight: 500;
  border-radius: 10px;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-fill); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-fill-hover); }
.btn-ghost { border: 1px solid var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--faint); }

/* trajectory figure */
.trajectory { margin: 72px 0 0; }
.trajectory svg { display: block; width: 100%; height: auto; overflow: visible; }
.trajectory .ground { stroke: var(--line); stroke-width: 1.5; }
.trajectory .arc { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 1 8; stroke-linecap: round; opacity: 0.6; }
.trajectory .hoop path { fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; }
.trajectory .hoop .net { stroke-width: 1; opacity: 0.7; }
.trajectory .ball { fill: var(--accent); }
.trajectory figcaption { margin-top: 12px; font-family: var(--mono); font-size: 12px; color: var(--faint); text-align: right; }

/* ── sections ───────────────────────────────────────────── */
.section {
  display: grid; grid-template-columns: 200px 1fr; gap: 32px;
  padding-top: 96px;
}
.section-label {
  margin: 0; padding-top: 4px;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  color: var(--faint); letter-spacing: 0.06em; text-transform: uppercase;
}
.section-body { min-width: 0; }

.prose { max-width: 62ch; margin: 0; color: var(--muted); }
.prose p { margin: 0 0 16px; }
.big { font-size: 22px; line-height: 1.45; color: var(--text); letter-spacing: -0.015em; font-weight: 500; }
.prose .big { margin-bottom: 20px; }

.facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  margin: 36px 0 0;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.facts div { background: var(--surface); padding: 16px 18px; }
.facts dt { font-family: var(--mono); font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; }
.facts dd { margin: 4px 0 0; font-weight: 500; }

/* ── projects ───────────────────────────────────────────── */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }

.project {
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
a.project:hover { border-color: color-mix(in srgb, var(--text) 22%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow); }

.project-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status {
  flex-shrink: 0;
  padding: 2px 8px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  white-space: nowrap;
}
.project h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.project p { margin: 0; font-size: 14.5px; color: var(--muted); flex: 1; }

.arrow {
  width: 18px; height: 18px; flex-shrink: 0;
  fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke 0.2s, transform 0.2s;
}
a:hover > .arrow, a:hover .project-head .arrow { stroke: var(--accent); transform: translate(2px, -2px); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.tags li {
  padding: 2px 9px;
  font-family: var(--mono); font-size: 12px;
  color: var(--muted);
  background: var(--chip);
  border-radius: 6px;
}

/* ── contact ────────────────────────────────────────────── */
.contact-list { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.contact-list li { border-bottom: 1px solid var(--line); }
.contact-list a {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 4px;
  transition: padding 0.2s, color 0.2s;
}
.contact-list a:hover { padding-left: 10px; }
.contact-key { width: 110px; flex-shrink: 0; font-family: var(--mono); font-size: 13px; color: var(--faint); }
.contact-val { flex: 1; font-weight: 500; overflow-wrap: anywhere; }
.contact-list a:hover .contact-val { color: var(--accent); }

/* ── footer ─────────────────────────────────────────────── */
.site-footer { margin-top: 120px; border-top: 1px solid var(--line); }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding-top: 28px; padding-bottom: 36px;
  font-size: 13px; color: var(--faint);
}
.site-footer a:hover { color: var(--text); }

/* ── smaller screens ────────────────────────────────────── */
@media (max-width: 760px) {
  .section { grid-template-columns: 1fr; gap: 20px; padding-top: 72px; }
  .facts { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 16px; }
  .header-inner { height: 60px; }
  .logo > span:last-child { display: none; }
  .nav a { padding: 6px 9px; }
  .hero { padding-top: 64px; }
  .big { font-size: 19px; }
  .trajectory { margin-top: 48px; }
  .trajectory figcaption { text-align: left; }
  .contact-key { width: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
