:root {
  color-scheme: light dark;
  --paper: #f4f2ed;
  --surface: #faf9f6;
  --ink: #171714;
  --muted: #706c66;
  --line: color-mix(in srgb, var(--ink) 12%, transparent);
  --accent: #6b5fcb;
  --glow: #e2ddff;
  --soft: #ece9ff;
  --shadow: rgba(23, 23, 20, .05);
  --max: 760px;
}

/* An explicit data-theme is the visitor's own choice and always wins. */
[data-theme="dark"] {
  --paper: #10100f;
  --surface: #171715;
  --ink: #f3f1eb;
  --muted: #aaa69f;
  --accent: #7e73df;
  --glow: #24213d;
  --soft: #211f35;
  --shadow: rgba(0, 0, 0, .28);
}

/* With no choice recorded, the system decides — and keeps deciding, without
   JavaScript and while the page is open. Kept identical to the block above by
   the "never drift apart" test. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #10100f;
    --surface: #171715;
    --ink: #f3f1eb;
    --muted: #aaa69f;
    --accent: #7e73df;
    --glow: #24213d;
    --soft: #211f35;
    --shadow: rgba(0, 0, 0, .28);
  }

  :root:not([data-theme="light"]) .sun { display: block; }
  :root:not([data-theme="light"]) .moon { display: none; }
  :root:not([data-theme="light"]) .social img { filter: invert(1); }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
/* The prototype's `font: 16px/1.7` is the base every muted timeline line inherits. */
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 50% -15%, color-mix(in srgb, var(--glow) 30%, transparent), transparent 28rem), var(--paper); font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.7; text-rendering: optimizeLegibility; transition: color .22s, background-color .22s; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
.shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 70px; border-bottom: 1px solid var(--line); }
.brand { font-size: 12px; font-weight: 760; letter-spacing: 0.04em; }
.navright, .navlinks { display: flex; align-items: center; }
.navright { gap: 16px; }
.navlinks { gap: 20px; color: var(--muted); font-size: 13px; }
.brand, .navlinks a { transition: color .18s, transform .18s; }
.brand:hover, .brand:focus-visible, .navlinks a:hover, .navlinks a:focus-visible { color: var(--ink); transform: translateY(-1px); }
.theme-toggle { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: var(--surface); cursor: pointer; }
.theme-toggle:hover { color: var(--ink); }
.theme-icon { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sun { display: none; }
[data-theme="dark"] .sun { display: block; }
[data-theme="dark"] .moon { display: none; }
.socials, .filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters { margin-bottom: 52px; }
/* 13px keeps this secondary control under the 13px section heading rather than
   over it; the extra right padding offsets the leading icon's own whitespace. */
.filter { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; line-height: 1.7; padding: 7px 14px 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: transparent; cursor: pointer; }
.filter[aria-pressed="true"] { color: var(--paper); border-color: var(--ink); background: var(--ink); }
/* Both set a display below, which outranks the UA rule behind [hidden]; without
   these the filtered-out element keeps its box — a year group its heading. */
.timeline-item[hidden] { display: none; }
.timeline-year[hidden] { display: none; }
.profile { padding-block: 66px 62px; }
.identity { display: flex; align-items: center; gap: 16px; }
.avatar { width: 58px; height: 58px; border: 1px solid var(--line); border-radius: 50%; box-shadow: 0 8px 25px var(--shadow); transition: transform .16s ease-out, box-shadow .2s; will-change: transform; }
.name { display: flex; flex-direction: column; margin: 0; line-height: 1.35; }
.name strong { font-size: 18px; letter-spacing: -0.015em; }
.name span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.bio { max-width: 610px; margin: 20px 0 0; font-size: 16px; line-height: 1.8; letter-spacing: -0.008em; }
.socials { margin-top: 24px; }
.social { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; background: color-mix(in srgb, var(--surface) 68%, transparent); }
.social img { width: 16px; height: 16px; object-fit: contain; }
.social[data-social="spotify"] img { width: 21px; height: 21px; }
.social[data-social="newspicks"] img { width: 18px; height: 18px; }
[data-theme="dark"] .social img { filter: invert(1); }
.timeline { padding-block: 52px 110px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-heading h1 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.heading-icon { width: 15px; height: 15px; }
/* Matches the 13px label. Held smaller before, to copy the prototype's ratio,
   but that assumed a stroke the chip never drew: at 12px the 24-unit viewBox
   scaled the line to 0.9px and it washed out. */
.filter-icon { width: 13px; height: 13px; stroke-width: 2; }
.filter-icon * { vector-effect: non-scaling-stroke; }
.section-heading p { margin: 0; }
.section-heading p, .meta, .label { color: var(--muted); font-size: 12px; }
.timeline-year { display: grid; grid-template-columns: 84px 1fr; gap: 28px; }
.timeline-year h2 { position: sticky; top: 24px; align-self: start; margin: 0; font-size: 18px; }
.timeline-items { position: relative; }
.timeline-items::before { position: absolute; top: 17px; bottom: 17px; left: 16px; width: 1px; content: ''; background: var(--line); }
.timeline-item { position: relative; display: block; margin: 0 0 18px; padding: 0 0 22px 48px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); transition: opacity .22s, transform .22s; }
.timeline-item::before { content: none; }
/* Above the prototype's 14px/1.8: the kind icon is what the eye scans down the
   rail, and at that weight pen and microphone read as the same mark. The glyph
   is a 24-unit viewBox, so drawing it at 17px would scale the stroke to 1.417px
   and blur it across pixel boundaries — non-scaling-stroke pins it to 2px. */
.item-icon .icon { width: 17px; height: 17px; stroke-width: 2; }
.item-icon .icon * { vector-effect: non-scaling-stroke; }
.item-icon { position: absolute; top: 0; left: 0; z-index: 1; display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: var(--paper); transition: color .18s, border-color .18s, background-color .18s, box-shadow .18s, transform .18s; }
.timeline-item:hover .item-icon, .timeline-item:focus-within .item-icon { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--soft); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 8%, transparent); transform: scale(1.04); }
.timeline-item.update .item-icon { border-radius: 8px; color: var(--ink); transform: rotate(45deg); }
.timeline-item.update .item-icon .icon { transform: rotate(-45deg); }
/* Dropping rotate() is the interaction: the diamond swings back to a square and
   the counter-rotated icon follows, so the marker reads as a 45deg rotation. */
.timeline-item.update:hover .item-icon, .timeline-item.update:focus-within .item-icon { transform: scale(1.04); }
.meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 5px; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.kind { color: var(--accent); font-weight: 720; }
.label { margin: 0 0 2px; font-size: 13px; }
.title { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; font-weight: 620; line-height: 1.45; letter-spacing: -0.012em; }
.item-arrow { color: var(--accent); opacity: 0; transform: translate(-5px, 3px); transition: opacity .18s, transform .18s; }
.timeline-item:hover .item-arrow, .timeline-item:focus-within .item-arrow { opacity: 1; transform: none; }
.timeline-item.filtering { opacity: 0; transform: translateY(5px); }
.social, .filter, .theme-toggle, .timeline-item .title { transition: color .18s, background-color .18s, border-color .18s, transform .18s; }
.social:hover, .social:focus-visible { background: var(--surface); border-color: var(--muted); transform: translateY(-2px); }
.filter:hover, .filter:focus-visible { border-color: var(--muted); transform: translateY(-1px); }
.theme-toggle:hover, .theme-toggle:focus-visible { border-color: var(--muted); transform: rotate(8deg); }
.timeline-item:hover .title, .timeline-item:focus-within .title { color: var(--accent); transform: translateX(3px); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
footer { padding-block: 28px 44px; border-top: 1px solid var(--line); text-align: right; color: var(--muted); font-size: 11px; }
footer p { margin: 0; }

@media (max-width: 640px) {
  .shell { width: min(calc(100% - 28px), var(--max)); }
  .nav { min-height: 62px; }
  .navright { gap: 10px; }
  .navlinks { gap: 12px; }
  .profile { padding-block: 48px 46px; }
  .bio { font-size: 15px; }
  .timeline { padding-block: 42px 80px; }
  .section-heading { align-items: start; flex-direction: column; gap: 5px; }
  .filters { margin-bottom: 40px; }
  .timeline-year { grid-template-columns: 1fr; gap: 16px; }
  .timeline-year h2 { position: static; }
  .timeline-item { padding-left: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
  .brand, .navlinks a, .theme-toggle, .theme-icon, .social, .filter, .avatar, .timeline-item, .timeline-item .title, .item-arrow, .timeline-item:not(.update) .item-icon { transform: none !important; }
  .timeline-item.update .item-icon { transform: rotate(45deg) !important; }
  .timeline-item.update .item-icon .icon { transform: rotate(-45deg) !important; }
}
