:root {
  --ground: #eef0eb;
  --raise: #f8f9f6;
  --ink: #1b211e;
  --muted: #5e6862;
  --rule: #d3d8d1;
  --accent: #2d46c4;
  --marker: #f1dc5a;
  --marker-ink: #1b211e;
  --k-writing: #2d46c4;
  --k-project: #1f7a5a;
  --k-thing: #8a4fb0;
  --display: "Young Serif", Georgia, "Times New Roman", serif;
  --body: "Atkinson Hyperlegible", -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #141816;
    --raise: #1c211e;
    --ink: #e4e9e4;
    --muted: #97a39b;
    --rule: #2e3531;
    --accent: #93a3ff;
    --marker: #d9c23f;
    --marker-ink: #141816;
    --k-writing: #93a3ff;
    --k-project: #6fcfa6;
    --k-thing: #cf9cf0;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.6 var(--body);
}
.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding-inline: 20px;
  padding-block: 28px 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
main { flex: 1; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.mono { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.02em; }

/* header / footer */
header.site { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
header.site .name { font-family: var(--display); font-size: 1.15rem; color: var(--ink); text-decoration: none; }
header.site nav { display: flex; gap: 18px; font-size: 0.95rem; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover { color: var(--ink); }
.lock::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--marker); vertical-align: 2px; }
footer.site { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--rule); padding-top: 16px; }

/* intro */
.intro h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 8vw, 3.6rem); line-height: 1.05; margin: 0 0 12px; text-wrap: balance; }
.intro p { margin: 0; color: var(--muted); font-size: 1.1rem; max-width: 34rem; }
.badge { display: inline-block; background: var(--marker); color: var(--marker-ink); padding: 3px 8px; margin-bottom: 14px !important; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 8px; }
.filters button {
  font: 500 0.78rem var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 99px;
  padding: 6px 12px;
  cursor: pointer;
}
.filters button:hover { color: var(--ink); border-color: var(--muted); }
.filters button.on { background: var(--ink); color: var(--ground); border-color: var(--ink); }

/* the list */
.year { margin-top: 32px; }
.year h2 { color: var(--muted); font-weight: 400; margin: 0 0 4px; }
.shelf { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.shelf li { border-bottom: 1px solid var(--rule); }
.shelf a {
  display: grid;
  grid-template-columns: 7.5rem 5.5rem 1fr;
  column-gap: 12px;
  row-gap: 2px;
  padding: 14px 8px;
  margin-inline: -8px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 6px;
}
.shelf a:hover { background: var(--raise); }
.shelf a:hover .title { color: var(--accent); }
.shelf .date { color: var(--muted); padding-top: 3px; font-variant-numeric: tabular-nums; }
.shelf .kind { padding-top: 3px; }
.shelf .title { font-weight: 700; }
.shelf .arrow { color: var(--muted); font-weight: 400; }
.shelf .blurb { grid-column: 3; color: var(--muted); font-size: 0.95rem; }
.k-writing { color: var(--k-writing); }
.k-project { color: var(--k-project); }
.k-thing { color: var(--k-thing); }
.empty { color: var(--muted); margin-top: 32px; }

@media (max-width: 560px) {
  .shelf a { grid-template-columns: auto 1fr; }
  .shelf .title, .shelf .blurb { grid-column: 1 / -1; }
}

/* a single post */
.post .back { color: var(--muted); text-decoration: none; }
.post .back:hover { color: var(--ink); }
.post .meta { color: var(--muted); margin: 32px 0 8px; }
.post .lockword { background: var(--marker); color: var(--marker-ink); padding: 1px 6px; }
.post h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 6vw, 2.8rem); line-height: 1.1; margin: 0 0 28px; text-wrap: balance; }
.prose { max-width: 38rem; }
.prose h2, .prose h3 { font-family: var(--display); font-weight: 400; line-height: 1.2; margin: 2em 0 0.5em; }
.prose img { max-width: 100%; height: auto; border-radius: 4px; }
.prose blockquote { margin: 1.5em 0; padding-left: 16px; border-left: 3px solid var(--rule); color: var(--muted); }
.prose code { font-family: var(--mono); font-size: 0.88em; background: var(--raise); padding: 1px 5px; border-radius: 4px; }
.prose pre { background: var(--raise); padding: 16px; border-radius: 6px; overflow-x: auto; }
.prose pre code { padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* standalone pages (Career, ...) */
.page .prose > p:first-child { font-size: 1.15rem; }
.page .prose h2 { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 2.8em 0 0.2em; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.page .prose h3 { font-family: var(--body); font-weight: 700; font-size: 1.05rem; margin: 1.6em 0 0; }
.page .prose .when { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); margin: 2px 0 6px; font-variant-numeric: tabular-nums; }
.page .prose .when + p { margin-top: 0; }
