/* base.css — structure, type, spacing. No color here: themes supply
   --bg --fg --dim --rule --accent --accent-fg. See theme-dark.css /
   theme-paper.css. */

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/GeistMono-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono",
    monospace;
  --mono-head: "Geist Mono", var(--mono);
  --measure: 46rem;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
}

main {
  flex: 1 0 auto;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  font-family: var(--mono-head);
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--accent);
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

h1 {
  font-size: 1.6rem;
}

h2 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1rem;
}

.dim {
  color: var(--dim);
}

.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 1.25rem 0;
}

/* ---------- header / nav ---------- */

header.site {
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0;
  margin-bottom: 2rem;
}

header.site .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.mark {
  font-family: var(--mono-head);
  font-weight: 700;
  color: var(--dim);
}

nav.site {
  display: flex;
  gap: 1.25rem;
}

nav.site a {
  color: var(--dim);
}

nav.site a[aria-current="page"] {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

nav.site a:hover,
nav.site a:focus-visible {
  color: var(--accent);
}

/* ---------- footer ---------- */

footer.site {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding: 1.25rem 0 3rem;
  color: var(--dim);
  font-size: 0.85rem;
}

footer.site a {
  color: var(--dim);
}

/* ---------- section label ---------- */

.label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--dim);
  text-transform: lowercase;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.4rem;
  margin: 2rem 0 1rem;
}

.label::before {
  content: "// ";
  color: var(--dim);
}

.label .more {
  color: var(--dim);
}

.label .more:hover {
  color: var(--accent);
}

/* ---------- hero ---------- */

.hero p {
  max-width: 38rem;
}

.hero .role {
  font-size: 0.95rem;
  color: var(--dim);
  margin-bottom: 1rem;
}

.links-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* rendered as a raster PNG (real pixels, no <text>/DOM string) so the
   address never appears as scrapeable text anywhere in the page source —
   see PLACEHOLDERS.md for why there's no mailto link here. One PNG per
   theme, baked in that theme's --fg color; only one is ever displayed,
   switched by whichever theme-*.css is linked (same mechanism
   switch-theme.sh already swaps) — no JS needed to pick the right one. */
.email-img {
  display: inline-flex;
  align-items: center;
}

.email-dark,
.email-paper {
  display: none;
}

/* ---------- listing rows (publications / notes) ---------- */

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

li.item,
li.pub {
  display: flex;
  gap: 1.25rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}

li.item:last-child,
li.pub:last-child {
  border-bottom: none;
}

.item-year,
.pub-year {
  flex: 0 0 3.2rem;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.item-body,
.pub-body {
  flex: 1;
  min-width: 0;
}

.item-title,
.pub-title {
  display: block;
  font-weight: 700;
}

.item-meta,
.pub-meta {
  color: var(--dim);
  font-size: 0.88rem;
  margin: 0.15rem 0 0;
}

.pub-meta .me {
  color: var(--fg);
  font-weight: 700;
}

.pub-links {
  font-size: 0.85rem;
  margin: 0.35rem 0 0;
  display: flex;
  gap: 0.75rem;
}

.pub-links a {
  color: var(--dim);
}

.pub-links a:hover,
.pub-links a:focus-visible {
  color: var(--accent);
}

/* reading & links list */

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

ul.reading li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}

ul.reading li:last-child {
  border-bottom: none;
}

ul.reading .rt-title {
  font-weight: 700;
}

ul.reading .rt-note {
  color: var(--dim);
  font-size: 0.88rem;
  margin: 0.2rem 0 0;
}

/* note page */

.note-meta {
  color: var(--dim);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

/* ---------- responsive ---------- */

@media (max-width: 52rem) {
  :root {
    font-size: 15px;
  }
}

@media (max-width: 34rem) {
  li.item,
  li.pub {
    flex-direction: column;
    gap: 0.15rem;
  }

  .item-year,
  .pub-year {
    flex: none;
  }

  header.site .row {
    flex-direction: column;
    align-items: flex-start;
  }

  nav.site {
    gap: 1rem;
  }
}
