:root {
  --bg: #fbfaf7; --fg: #1d1c1a; --muted: #6b675f; --accent: #8a3b12;
  --line: #e4e0d8; --th: #f1eee7; --code: #f3f0ea; --max: 46rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17171a; --fg: #e8e5df; --muted: #9a958c; --accent: #e08a52;
    --line: #2e2e33; --th: #202024; --code: #1f1f23;
  }
}
:root[data-theme="dark"] {
  --bg: #17171a; --fg: #e8e5df; --muted: #9a958c; --accent: #e08a52;
  --line: #2e2e33; --th: #202024; --code: #1f1f23;
}
* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: Georgia, "Times New Roman", "PT Serif", serif;
  line-height: 1.55;
}
header.top, main, footer { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
header.top {
  display: flex; align-items: baseline; gap: 1rem 1.25rem; flex-wrap: wrap;
  padding-top: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: .92rem;
}
.brand { font-weight: 700; letter-spacing: .02em; color: var(--fg); text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: .25rem .9rem; flex: 1; }
nav a, .lang { color: var(--muted); text-decoration: none; }
nav a.current { color: var(--accent); border-bottom: 2px solid var(--accent); }
nav a:hover, .lang:hover { color: var(--accent); }
.lang { margin-left: auto; border: 1px solid var(--line); border-radius: 999px; padding: .1rem .7rem; }
main { padding-top: 1.5rem; padding-bottom: 3rem; }
h1 { font-size: 2rem; line-height: 1.15; margin: .5rem 0 1.25rem; font-weight: 600; }
h2 { font-size: 1.35rem; margin: 2.2rem 0 .8rem; font-weight: 600; }
h3 { font-size: 1.1rem; margin: 1.6rem 0 .5rem; font-weight: 600; }
p, li { max-width: 40rem; }
a { color: var(--accent); }
a.term { color: inherit; text-decoration: underline dotted var(--muted); text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: help; }
a.term:hover { text-decoration-color: var(--accent); }
:target { background: var(--th); }
blockquote {
  margin: 1rem 0; padding: .6rem 1rem; background: var(--code); border-left: 3px solid var(--accent);
  font-family: "Cambria Math", "STIX Two Math", Georgia, serif;
}
blockquote p { margin: 0; }
.tbl { overflow-x: auto; margin: 1rem 0 1.5rem; }
table { border-collapse: collapse; width: 100%; min-width: 38rem; font-size: .9rem; }
th, td { text-align: left; vertical-align: top; padding: .45rem .6rem; border-bottom: 1px solid var(--line); }
th { background: var(--th); font-family: system-ui, sans-serif; font-weight: 600; font-size: .82rem; }
td:last-child { width: 38%; }
sup, sub { line-height: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
footer {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-top: 1rem; padding-bottom: 2rem; border-top: 1px solid var(--line);
  color: var(--muted); font-family: system-ui, sans-serif; font-size: .85rem;
}
footer a { color: var(--muted); }
@media (max-width: 600px) {
  html { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  .lang { margin-left: 0; }
}
footer .projects { flex-basis: 100%; margin: 0 0 .6rem; line-height: 1.7; }
