:root {
  color-scheme: light dark;
  --text: light-dark(#1f1f1f, #e4e2de);
  --muted: light-dark(#6b6b6b, #9a9894);
  --rule: light-dark(#e2e0dc, #34332f);
  --background: light-dark(#fdfdfb, #191917);
  --code-background: light-dark(#f4f3f0, #22221f);
}

body {
  max-width: 36rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
  font: 1.125rem/1.6 Charter, "Bitstream Charter", "Sitka Text", Cambria, serif;
  color: var(--text);
  background: var(--background);
  overflow-wrap: break-word;
}

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

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

h2 {
  font-size: 1.375rem;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1.125rem;
  margin: 2rem 0 0.5rem;
}

p,
li {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-color: var(--muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-color: currentColor;
}

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

blockquote {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
}

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

img {
  max-width: 100%;
  height: auto;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85em;
}

:not(pre) > code {
  padding: 0.1em 0.3em;
  border-radius: 3px;
  background: var(--code-background);
}

sup {
  line-height: 0;
}

pre {
  padding: 1rem 1.25rem;
  line-height: 1.5;
  tab-size: 4;
  overflow-x: auto;
  border-radius: 4px;
  background: var(--code-background) !important;
}

body > header {
  margin-bottom: 3rem;
}

body > header a {
  font-weight: bold;
  text-decoration: none;
}

body > footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
}

body > footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

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

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

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

.essays li {
  margin-bottom: 1rem;
}

.essays time {
  display: block;
}

.footnotes {
  margin-top: 3rem;
  font-size: 0.9375rem;
  color: var(--muted);
}
