:root {
  --bg: #fdfcfa;
  --fg: #1f2328;
  --muted: #6b6f76;
  --accent: #b4441a;
  --rule: #e7e3dc;
  --code-bg: #f4f1ec;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171a;
    --fg: #e6e4df;
    --muted: #9a9ca1;
    --accent: #f08a5d;
    --rule: #2c2e33;
    --code-bg: #1f2125;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.7 var(--serif);
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 40rem; margin: 0 auto; padding: 0 1.25rem; }

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding: 2.75rem 0 1.75rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
}

.site-title {
  color: var(--fg);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.01em;
  text-decoration: none;
}

header.site nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
header.site nav a { color: var(--muted); font-size: .9rem; text-decoration: none; }
header.site nav a:hover, .site-title:hover { color: var(--accent); }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }

h1, h2, h3, h4 {
  font-family: var(--sans);
  line-height: 1.25;
  letter-spacing: -.015em;
  margin: 2.2em 0 .6em;
}

article > h1 { font-size: 2rem; margin: 0 0 .4rem; }
.content h2 { font-size: 1.35rem; }
.content h3 { font-size: 1.1rem; }

.meta { margin: 0 0 2.25rem; color: var(--muted); font: .85rem/1.4 var(--sans); }

.content img { display: block; max-width: 100%; height: auto; margin: 1.75rem auto; border-radius: 6px; }

blockquote {
  margin: 1.5rem 0;
  padding: .1rem 0 .1rem 1.1rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
}

code { font: .86em/1.5 var(--mono); background: var(--code-bg); padding: .12em .35em; border-radius: 4px; }
pre, .highlight pre.chroma {
  background: var(--code-bg);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border-radius: 8px;
  line-height: 1.5;
}
pre code { background: none; padding: 0; font-size: .82rem; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

table { width: 100%; border-collapse: collapse; font: .9rem/1.5 var(--sans); }
th, td { padding: .45rem .6rem; border-bottom: 1px solid var(--rule); text-align: left; }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--rule);
}
.post-list time { color: var(--muted); font: .82rem/1.95 var(--sans); font-variant-numeric: tabular-nums; }
.post-list a { color: var(--fg); text-decoration: none; }
.post-list a:hover { color: var(--accent); }

.empty { color: var(--muted); font-family: var(--sans); }

.list-title { margin: 0 0 .4rem; font-size: 1.6rem; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin: 2.5rem 0 0; font: .85rem var(--sans); }
.tags a { text-decoration: none; }

.tag-index { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; font-family: var(--sans); }
.tag-index a { text-decoration: none; }
.tag-index span { color: var(--muted); font-size: .8rem; }

.back { display: inline-block; margin-top: 3rem; font: .9rem var(--sans); text-decoration: none; }

footer.site {
  margin: 4.5rem 0 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font: .8rem var(--sans);
}
footer.site a { color: inherit; }

@media (max-width: 34rem) {
  html { font-size: 106.25%; }
  .post-list li { grid-template-columns: 1fr; gap: 0; }
  article > h1 { font-size: 1.7rem; }
}
