:root {
  --bg: #dce0e2;
  --surface: #ffffff;
  --text: #161616;
  --muted: #4a5357;
  --line: #b9c0c3;
  --accent: #3f6e6b;
  --accent-ink: #ffffff;
  --focus: #1b4f9c;
  --live: #2f8f5b;
  --concept: #3f6e6b;
  --experimental: #8a6a1f;
  --finished: #4d5f9a;
  --archived: #798589;
  --shadow: 0 1px 2px rgba(22, 22, 22, 0.08), 0 6px 18px rgba(22, 22, 22, 0.06);
}

:root[data-theme="dark"] {
  --bg: #161616;
  --surface: #202222;
  --text: #dce0e2;
  --muted: #a7adaa;
  --line: #3a3f40;
  --accent: #75a3a0;
  --accent-ink: #161616;
  --focus: #9cc4ff;
  --live: #6fcf97;
  --concept: #75a3a0;
  --experimental: #d9b25a;
  --finished: #93a4e0;
  --archived: #798589;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161616;
    --surface: #202222;
    --text: #dce0e2;
    --muted: #a7adaa;
    --line: #3a3f40;
    --accent: #75a3a0;
    --accent-ink: #161616;
    --focus: #9cc4ff;
    --live: #6fcf97;
    --concept: #75a3a0;
    --experimental: #d9b25a;
    --finished: #93a4e0;
    --archived: #798589;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 14px;
  border-radius: 6px;
  z-index: 10;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.hero { padding: 56px 0 32px; text-align: center; }
.eyebrow {
  margin: 0 0 8px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 8vw, 3.6rem);
  line-height: 1.1;
}
.hero .lede {
  margin: 0 auto 24px;
  max-width: 34rem;
  font-size: 1.1rem;
  color: var(--muted);
}

.cta {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 1.05rem;
  transition: transform 0.15s ease;
}
.cta:hover { transform: translateY(-2px); }

.legend {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  font-size: 0.9rem;
  color: var(--muted);
}
.legend li { display: flex; align-items: center; gap: 8px; }

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c, var(--archived));
  flex: none;
}

/* Timeline */
.timeline { position: relative; padding: 16px 0 40px; }

.spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  margin-left: -1.5px;
  background: var(--line);
  border-radius: 2px;
}
.spine-fill {
  position: absolute;
  inset: 0;
  background: var(--accent);
  border-radius: 2px;
  transform-origin: top;
  transform: scaleY(1);
}
.js .spine-fill { transform: scaleY(0); }

.stage { position: relative; margin: 0 0 24px; }

.stage-head {
  position: relative;
  z-index: 1;
  text-align: center;
  margin: 24px 0 28px;
}
.stage-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 20px;
  background: var(--bg);
  border: 2px solid var(--c);
  border-radius: 999px;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stage[data-stage="live"] { --c: var(--live); }
.stage[data-stage="concept"] { --c: var(--concept); }
.stage[data-stage="experimental"] { --c: var(--experimental); }
.stage[data-stage="finished"] { --c: var(--finished); }
.stage[data-stage="archived"] { --c: var(--archived); }

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

.node {
  position: relative;
  width: 50%;
  padding: 0 40px 28px 0;
}
.node.right {
  margin-left: 50%;
  padding: 0 0 28px 40px;
}

.node::before {
  content: "";
  position: absolute;
  top: 28px;
  width: 24px;
  height: 2px;
  background: var(--line);
}
.node.left::before { right: 16px; }
.node.right::before { left: 16px; }

.node::after {
  content: "";
  position: absolute;
  top: 20px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c);
  border: 4px solid var(--bg);
  box-shadow: 0 0 0 2px var(--c);
}
.node.left::after { right: -9px; }
.node.right::after { left: -9px; }

.card {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--c);
}

.card h3 { margin: 0 0 8px; font-size: 1.35rem; line-height: 1.25; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.tags {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tags li {
  font-size: 0.78rem;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.card p { margin: 0 0 12px; }

.meta {
  margin: 0 0 12px;
  font-size: 0.92rem;
  color: var(--muted);
}
.meta strong { color: var(--text); }

blockquote {
  margin: 0;
  padding: 4px 0 4px 14px;
  border-left: 3px solid var(--c);
  font-style: italic;
}
.lesson-label {
  display: block;
  margin-bottom: 2px;
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Footer */
.closing { text-align: center; padding: 24px 0 64px; }
.closing h2 { margin: 0 0 16px; font-size: 1.5rem; }

/* Scroll reveal */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.in { opacity: 1; transform: none; }

/* Mobile: single column */
@media (max-width: 760px) {
  .spine { left: 14px; margin-left: 0; }
  .stage-head { text-align: left; padding-left: 0; }
  .stage-head h2 { font-size: 0.95rem; }
  .node,
  .node.right {
    width: 100%;
    margin-left: 0;
    padding: 0 0 24px 40px;
  }
  .node.left::before,
  .node.right::before { left: 14px; right: auto; width: 20px; }
  .node.left::after,
  .node.right::after { left: 5px; right: auto; }
  .card { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .spine-fill { transform: scaleY(1); }
  .cta { transition: none; }
  .cta:hover { transform: none; }
}

/* Project images */
.shot { margin: -20px -22px 16px; overflow: hidden; border-radius: 8px 8px 0 0; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: cover;
  object-position: top;
  background: var(--line);
}
@media (max-width: 760px) { .shot { margin: -18px -18px 14px; } }
