:root {
  --bg: #fff;
  --fg: #151515;
  --muted: #666;
  --line: #e5e5e5;
  --link: #0b5fcc;
}
[data-theme="dark"] {
  --bg: #0b0b0b;
  --fg: #e8e8e8;
  --muted: #9a9a9a;
  --line: #242424;
  --link: #8ab4f8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  max-width: 42rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { position: relative; }

h1 { margin: 0; font-size: 2.5rem; line-height: 1.15; letter-spacing: -.02em; }
.sub { margin: .75rem 0 0; max-width: 34rem; color: var(--muted); }
main > p { margin: 0; }

h2 {
  margin: 3rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--line);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

ul { margin: 0; padding: 0; list-style: none; }
li { margin: 0 0 1rem; }
li:last-child { margin-bottom: 0; }
main > ul:not(.rows):not(.inline) li { position: relative; padding-left: 1.25rem; }
main > ul:not(.rows):not(.inline) li::before { content: "–"; position: absolute; left: 0; color: var(--muted); }

/* date on the left, text on the right; stacks on phones */
.rows li { display: grid; grid-template-columns: 9rem 1fr; gap: 0 1rem; }
time { color: var(--muted); font-size: .9375rem; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .rows li { grid-template-columns: 1fr; }
}

/* links list reads as one line */
.inline { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.inline li { margin: 0; }

a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 2px; }

#theme {
  position: absolute;
  top: 0;
  right: 0;
  min-height: 36px;
  padding: 0 .875rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: none;
  color: var(--fg);
  font: inherit;
  font-size: .875rem;
  cursor: pointer;
}
#theme:hover { border-color: var(--muted); }

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