:root {
  color-scheme: light dark;
  --bg: #fdfcf9;
  --fg: #1f1f1f;
  --muted: #6b6862;
  --accent: #1d5a9e;
  --code-bg: #f1efe9;
  --rule: #e2ded5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171717;
    --fg: #e4e2dc;
    --muted: #9b978f;
    --accent: #8db6ec;
    --code-bg: #232323;
    --rule: #353535;
  }
}

body {
  max-width: 65ch;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
  background: var(--bg);
  color: var(--fg);
  font: 1.15rem/1.6 Charter, "Bitstream Charter", "Iowan Old Style", "Sitka Text", Cambria, Georgia, serif;
  -webkit-text-size-adjust: 100%;
}

header {
  margin-bottom: 3.5rem;
}

header a {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

header img {
  width: 1.75rem;
  height: 1.75rem;
}

h1, h2, h3 {
  line-height: 1.25;
}

h1 {
  font-size: 2rem;
  margin: 0 0 .4rem;
}

h2 {
  font-size: 1.35rem;
  margin: 2.75rem 0 .75rem;
}

p, ul, ol, pre, blockquote, details {
  margin: 0 0 1.15rem;
}

a {
  color: var(--accent);
  text-underline-offset: .15em;
}

time {
  color: var(--muted);
  font-size: .9rem;
}

article > time {
  display: block;
  margin-bottom: 2.5rem;
}

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", monospace;
  font-size: .85em;
}

code {
  background: var(--code-bg);
  padding: .1em .3em;
  border-radius: 3px;
}

pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 4px;
  line-height: 1.45;
  overflow-x: auto;
}

pre code {
  font-size: 1em;
  background: none;
  padding: 0;
}

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

details {
  padding: .75rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

details[open] summary {
  margin-bottom: 1rem;
}

img {
  max-width: 100%;
}

footer {
  display: flex;
  gap: 1.25rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

footer a {
  color: var(--muted);
}

footer a:hover {
  color: var(--accent);
}

footer svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.posts {
  list-style: none;
  padding: 0;
}

.posts li {
  margin-bottom: 1.25rem;
}

.posts a {
  font-size: 1.25rem;
  text-decoration: none;
}

.posts time {
  display: block;
}
