:root {
  --bg: #fbfbf9;
  --fg: #1d1f21;
  --muted: #5f6368;
  --rule: #e3e3de;
  --accent: #1f5f8b;
  --code-bg: #f1f1ec;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141516;
    --fg: #e6e6e3;
    --muted: #9aa0a6;
    --rule: #2c2e30;
    --accent: #7db8e0;
    --code-bg: #1e2022;
  }
}
* { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto;
  max-width: 44rem;
  padding: 0 1rem;
  background: var(--bg);
  color: var(--fg);
  font: 1rem/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
header.site {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: baseline;
  justify-content: space-between; padding: 1.5rem 0 1rem; border-bottom: 1px solid var(--rule);
}
header.site .name { font-weight: 650; color: var(--fg); text-decoration: none; font-size: 1.1rem; }
header.site nav { display: flex; gap: 1.2rem; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover { color: var(--accent); }
main { padding: 1.5rem 0 2rem; }
h1 { font-size: 1.9rem; line-height: 1.25; margin: .5rem 0 .75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.2rem; margin: 2.5rem 0 .75rem; padding-top: .25rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 .25rem; }
p, ul, ol { margin: 0 0 1rem; }
.lead { font-size: 1.1rem; }
.meta, .date, .small { color: var(--muted); font-size: .9rem; }
ul.projects, ul.posts { list-style: none; padding: 0; }
ul.projects li, ul.posts li { padding: .9rem 0; border-top: 1px solid var(--rule); }
ul.projects li:last-child, ul.posts li:last-child { border-bottom: 1px solid var(--rule); }
ul.projects p, ul.posts p { margin: .25rem 0 0; }
ul.posts .date { float: right; margin-left: 1rem; }
.stack { color: var(--muted); font-size: .85rem; }
img { max-width: 100%; height: auto; display: block; margin: 1rem auto; border-radius: 4px; }
figure { margin: 1.5rem 0; }
figcaption { color: var(--muted); font-size: .9rem; text-align: center; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
code { background: var(--code-bg); padding: .1em .3em; border-radius: 3px; }
pre { background: var(--code-bg); padding: .8rem 1rem; overflow-x: auto; border-radius: 4px; }
pre code { background: none; padding: 0; }
table { border-collapse: collapse; width: 100%; margin: 0 0 1rem; font-size: .92rem; }
th, td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--rule); }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: .25rem 0; }
article .date { margin-top: -.25rem; }
.back { margin-top: 2.5rem; }
footer.site { border-top: 1px solid var(--rule); padding: 1.25rem 0 2rem; }
footer.site p { margin: .25rem 0; }
@media (max-width: 480px) {
  html { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  ul.posts .date { float: none; display: block; margin: 0; }
}
