:root {
  --paper: #f2f0ea;
  --ink: #1b1b1f;
  --body: #3a3a3f;
  --muted: #6b6a66;
  --grid: #d9d5ca;
  --rule: #d9d5cb;
  --accent: #b5452a;
  --drawing: rgba(27, 27, 31, 0.78);
  --walker: rgba(27, 27, 31, 0.22);

  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: clamp(20px, 5vw, 64px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17171a;
    --ink: #e8e4da;
    --body: #c9c5bb;
    --muted: #8d8a83;
    --grid: #2a2a2f;
    --rule: #2c2c31;
    --accent: #e0805f;
    --drawing: rgba(232, 228, 218, 0.72);
    --walker: rgba(232, 228, 218, 0.22);
  }
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 6px 12px;
  background: var(--paper);
}
.skip:focus { top: 12px; }

/* Hero: drafting paper with a drawing grown live from the name (see grow.js) */

.hero {
  position: relative;
  height: clamp(560px, 88svh, 880px);
  overflow: hidden;
  background-image: radial-gradient(var(--grid) 1px, transparent 1.3px);
  background-size: 9px 9px;
}

.board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  transition: opacity 1.5s ease;
}

.intro {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(28px, 6vh, 64px);
  pointer-events: none;
}
.intro a { pointer-events: auto; }

.intro h1 {
  margin: 0 0 14px;
  font-weight: 300;
  font-size: clamp(3.2rem, 9.5vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.role {
  margin: 0 0 14px;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.links {
  display: flex;
  gap: 22px;
  width: max-content;
}

.fig {
  position: absolute;
  top: clamp(20px, 4vh, 40px);
  right: var(--gutter);
  max-width: 260px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  font-style: italic;
  line-height: 1.5;
}

.toggle {
  display: inline;
  margin-left: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-style: normal;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.toggle[hidden] { display: none; }

/* Content */

.section {
  display: grid;
  grid-template-columns: minmax(120px, 200px) minmax(0, 1fr);
  gap: 20px 48px;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) var(--gutter) 0;
}

.section > h2 {
  margin: 0;
  color: var(--muted);
  font: 400 0.8125rem/1.9 var(--mono);
}

.prose { max-width: 62ch; }
.prose p { margin: 0 0 1em; color: var(--body); }
.prose p:first-child { color: var(--ink); font-size: 1.3rem; font-weight: 300; line-height: 1.45; }

.projects {
  list-style: none;
  margin: 0;
  padding: 0;
}

.project {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: 8px 28px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}
.project:last-child { border-bottom: 1px solid var(--rule); }

.meta {
  display: grid;
  align-content: start;
  gap: 2px;
  padding-top: 4px;
  color: var(--muted);
  font: 0.75rem/1.55 var(--mono);
}

.project h3 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.3;
}
.project h3 a { color: inherit; text-decoration-color: var(--accent); }
.project h3 a:hover { color: var(--accent); }

.project p {
  max-width: 62ch;
  margin: 0;
  color: var(--body);
  font-size: 0.975rem;
  line-height: 1.6;
}

.footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) var(--gutter) 40px;
}
.footer p { margin: 0 0 6px; }
.footer .small { color: var(--muted); font-size: 0.8125rem; }

@media (max-width: 680px) {
  .fig { left: var(--gutter); max-width: none; }
  .section,
  .project { grid-template-columns: 1fr; }
  .section { gap: 8px; }
  .meta { padding-top: 0; }
}
