:root {
  --bg: #f7f7f4;
  --ink: #17181d;
  --muted: #5b606c;
  --line: #e5e5e0;
  --sky-top: #5f9fe0;
  --sky-hor: #dfe9f0;
  --accent: #f2496b;
  --col: 640px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
:root[data-sky="dark"] { --accent: #ff7a95; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  font-feature-settings: "cv01", "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  transition: background-color 1.2s ease, color 1.2s ease;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
::selection { background: var(--accent); color: #fff; }
.col { width: min(var(--col), calc(100% - 48px)); margin-inline: auto; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.01em; }

/* header */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px clamp(20px, 4vw, 44px); font-size: 14px;
}
.top .name { font-weight: 600; letter-spacing: -0.01em; }
.top nav { display: flex; gap: 22px; }
.top nav a { color: var(--ink); opacity: 0.85; }
.top nav a:hover { opacity: 1; }

/* hero */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: linear-gradient(var(--sky-top), var(--sky-hor)); isolation: isolate; }
.hero-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; opacity: 0; transition: opacity 1.4s ease; cursor: grab; }
.hero.is-ready .hero-canvas { opacity: 1; }
.hero.is-dragging .hero-canvas { cursor: grabbing; }
.hero-poster { position: absolute; inset: 0; pointer-events: none; background: url("/assets/img/poster.jpg") center / cover no-repeat; opacity: 1; transition: opacity 1.6s ease; }
.hero.is-ready .hero-poster { opacity: 0; }
.hero-scrim { position: absolute; inset: 0 0 auto 0; height: 62%; pointer-events: none; background: linear-gradient(to bottom, color-mix(in srgb, var(--sky-top) 78%, transparent), transparent); }
:root[data-sky="dark"] .hero-scrim { background: linear-gradient(to bottom, rgba(5, 8, 18, 0.72), transparent); }
.hero-copy { position: absolute; left: clamp(20px, 4vw, 44px); right: clamp(20px, 4vw, 44px); top: clamp(96px, 15vh, 150px); z-index: 2; pointer-events: none; }
.hero-copy .col { width: auto; margin: 0; max-width: 620px; }
.hero-copy > * { pointer-events: auto; }
.hero-copy h1 {
  margin: 0 0 18px; font-size: clamp(30px, 4.6vw, 46px); line-height: 1.08; font-weight: 600; letter-spacing: -0.028em; max-width: 14ch;
  text-wrap: balance;
}
.hero-copy h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.hero-copy p { margin: 0; font-size: clamp(16px, 1.35vw, 18px); line-height: 1.5; max-width: 46ch; color: var(--ink); opacity: 0.92; text-wrap: pretty; text-shadow: 0 0 18px var(--sky-hor), 0 0 36px var(--sky-hor); }
:root[data-sky="dark"] .hero-copy p { text-shadow: 0 0 18px rgba(5,8,18,0.8); }
.hero-copy h1 { text-shadow: 0 0 28px var(--sky-hor); }
:root[data-sky="dark"] .hero-copy h1 { text-shadow: 0 0 28px rgba(5,8,18,0.8); }
.hero-bottom { position: absolute; inset: auto 0 0 0; height: 34%; pointer-events: none; background: linear-gradient(to top, rgba(8, 10, 16, 0.62), rgba(8, 10, 16, 0)); }
.hero-caption {
  position: absolute; left: 0; right: 0; bottom: clamp(22px, 4vh, 40px); z-index: 2; color: #f4f1ea;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding: 0 clamp(20px, 4vw, 44px); font-size: 13px; line-height: 1.45;
}
.hero-caption .what { max-width: 52ch; }
.hero-caption .what b { font-weight: 600; }
.hero-caption .light { font-family: var(--mono); font-size: 12px; opacity: 0.9; white-space: nowrap; }
.hero-caption .light .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff5f7e; margin-inline-end: 7px; vertical-align: 1px; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.hero-caption a { border-bottom: 1px solid currentColor; }
.hero-caption a:hover { text-decoration: none; color: #ffb3c2; }
.hero-hint { position: absolute; right: clamp(20px, 4vw, 44px); top: 50%; z-index: 2; font-size: 12px; color: var(--ink); opacity: 0; transform: translateY(-50%); transition: opacity 0.8s ease; font-family: var(--mono); pointer-events: none; }
.hero.is-ready .hero-hint { opacity: 0.6; }
.hero.is-dragging .hero-hint, .hero.was-dragged .hero-hint { opacity: 0; }
@media (max-width: 700px) {
  .hero-caption { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero-caption .light { white-space: normal; }
  .hero-hint { display: none; }
}

/* body sections */
main { padding: 72px 0 40px; }
section.block { padding: 34px 0; border-top: 1px solid var(--line); }
section.block:first-child { border-top: 0; padding-top: 0; }
section.block h2 { margin: 0 0 18px; font-size: 13px; font-weight: 500; letter-spacing: 0.02em; color: var(--muted); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; padding: 10px 0; align-items: baseline; }
.rows .t { font-weight: 500; }
.rows .d { grid-column: 1 / -1; color: var(--muted); font-size: 15px; margin-top: -4px; }
.rows .m { color: var(--muted); font-size: 13px; font-family: var(--mono); }
.rows li a.t:hover { color: var(--accent); text-decoration: none; }
.rows .t .arrow { display: inline-block; transition: transform 0.25s ease; margin-inline-start: 4px; }
.rows li a.t:hover .arrow { transform: translateX(3px); }
.prose p { margin: 0 0 14px; font-size: 17px; line-height: 1.6; max-width: 60ch; }
.prose p em { font-family: var(--serif); font-style: italic; font-size: 1.05em; }
.elsewhere { display: flex; gap: 26px; flex-wrap: wrap; }
.elsewhere button { all: unset; cursor: pointer; }
.elsewhere a, .elsewhere button { font-weight: 500; }
.elsewhere a:hover, .elsewhere button:hover { color: var(--accent); text-decoration: none; }
.copied { color: var(--accent) !important; }
footer { padding: 56px 0 64px; }
footer .sign { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.35; margin: 0 0 10px; }
footer .meta { color: var(--muted); font-size: 13px; }

@media (prefers-reduced-motion: reduce) { .hero-caption .light .dot { animation: none; } }

/* about-page hero: the sky */
.hero-sky { background: linear-gradient(var(--sky-top) 0%, var(--sky-hor) 62%, #2d6b9a 62%, #244f78 100%); }
.hero-sky .hero-canvas { opacity: 1; cursor: default; }
.hero-sky .hero-copy h1 { font-size: clamp(44px, 7.2vw, 88px); line-height: 1; letter-spacing: -0.035em; margin-bottom: 22px; max-width: none; }
.hero-sky .hero-copy .lead { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; max-width: 34em; }
.hero-sky .hero-copy .lead em { font-family: var(--serif); font-style: italic; font-size: 1.06em; }
.hero-sky .hero-scrim { height: 70%; }
.hero-sky .hero-caption { color: #f4f1ea; }
@media (max-width: 700px) { .hero-sky .hero-copy .lead { font-size: 16.5px; } }

/* guide rows with a thumbnail */
.rows.guides li { grid-template-columns: 148px 1fr; gap: 18px; align-items: start; }
.rows.guides .thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.rows.guides .body { display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; align-items: baseline; }
.rows.guides .body .d { grid-column: 1 / -1; }
.rows.guides .body .d a { text-decoration: underline; text-underline-offset: 0.16em; }
.more { font-size: 14px; margin: 10px 0 0; }
@media (max-width: 560px) { .rows.guides li { grid-template-columns: 1fr; } .rows.guides .thumb { max-width: 220px; } }

/* timeline */
.rows.timeline .m { white-space: nowrap; }
