:root {
  --bg: #f5f0e6;
  --bg-warm: rgba(255, 235, 200, 0.55);
  --fg: #1f1c18;
  --muted: #6b6760;
  --rule: #e2dccf;
  --accent: #c8311f;
  --grain-opacity: 0.06;
}

html {
  color-scheme: light;
  background: var(--bg);
}

body {
  font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, ui-serif, serif;
  font-size: 18px;
  line-height: 1.7;
  margin: 0;
  min-height: 100vh;
  color: var(--fg);
  background-image:
    radial-gradient(ellipse 50% 45% at 92% 6%, rgba(218, 165, 32, 0.22), transparent 70%),
    radial-gradient(ellipse 45% 40% at 8% 94%, rgba(200, 49, 31, 0.13), transparent 70%),
    radial-gradient(ellipse 80% 60% at 50% 0%, var(--bg-warm), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  max-width: 36rem;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    url("data:image/svg+xml;utf8,<svg width='400' height='400' xmlns='http://www.w3.org/2000/svg'><circle cx='270' cy='150' r='115' fill='none' stroke='%23c8311f' stroke-width='1.4' opacity='0.45'/><circle cx='270' cy='150' r='5' fill='%23c8311f' opacity='0.7'/><circle cx='340' cy='80' r='3.5' fill='%23c8311f' opacity='0.6'/><circle cx='190' cy='60' r='3' fill='%23c8311f' opacity='0.55'/><circle cx='360' cy='240' r='3.5' fill='%23c8311f' opacity='0.5'/><circle cx='150' cy='220' r='2.5' fill='%23c8311f' opacity='0.45'/></svg>"),
    url("data:image/svg+xml;utf8,<svg width='420' height='360' xmlns='http://www.w3.org/2000/svg'><circle cx='70' cy='200' r='4' fill='%23b8881f' opacity='0.7'/><circle cx='150' cy='160' r='3.5' fill='%23b8881f' opacity='0.65'/><circle cx='220' cy='240' r='4' fill='%23b8881f' opacity='0.7'/><circle cx='130' cy='290' r='3' fill='%23b8881f' opacity='0.6'/><circle cx='280' cy='310' r='3.5' fill='%23b8881f' opacity='0.6'/><line x1='70' y1='200' x2='150' y2='160' stroke='%23b8881f' stroke-width='1.1' opacity='0.45'/><line x1='150' y1='160' x2='220' y2='240' stroke='%23b8881f' stroke-width='1.1' opacity='0.45'/><line x1='220' y1='240' x2='130' y2='290' stroke='%23b8881f' stroke-width='1.1' opacity='0.45'/><line x1='130' y1='290' x2='280' y2='310' stroke='%23b8881f' stroke-width='1.1' opacity='0.4'/></svg>"),
    url("data:image/svg+xml;utf8,<svg width='260' height='260' xmlns='http://www.w3.org/2000/svg'><circle cx='130' cy='130' r='80' fill='none' stroke='%23c8311f' stroke-width='1' opacity='0.35'/><circle cx='130' cy='130' r='28' fill='none' stroke='%23c8311f' stroke-width='1' opacity='0.45'/><circle cx='130' cy='130' r='4' fill='%23c8311f' opacity='0.7'/></svg>"),
    url("data:image/svg+xml;utf8,<svg width='320' height='160' xmlns='http://www.w3.org/2000/svg'><path d='M 14 110 Q 160 14 306 110' fill='none' stroke='%231f1c18' stroke-width='1.4' opacity='0.3'/><circle cx='14' cy='110' r='3' fill='%231f1c18' opacity='0.45'/><circle cx='306' cy='110' r='3' fill='%231f1c18' opacity='0.45'/><circle cx='160' cy='44' r='2.5' fill='%231f1c18' opacity='0.4'/></svg>"),
    url("data:image/svg+xml;utf8,<svg width='240' height='240' xmlns='http://www.w3.org/2000/svg'><circle cx='170' cy='90' r='38' fill='none' stroke='%23c8311f' stroke-width='1' opacity='0.38'/><circle cx='170' cy='90' r='3.5' fill='%23c8311f' opacity='0.6'/><path d='M 60 150 Q 110 110 160 150' fill='none' stroke='%231f1c18' stroke-width='1' opacity='0.22'/><circle cx='70' cy='180' r='2.5' fill='%23b8881f' opacity='0.6'/><circle cx='110' cy='200' r='2' fill='%23b8881f' opacity='0.5'/><line x1='70' y1='180' x2='110' y2='200' stroke='%23b8881f' stroke-width='0.8' opacity='0.4'/></svg>");
  background-position:
    top left,
    top left,
    top left,
    top left,
    right 1.5rem bottom 1.5rem;
  background-repeat: no-repeat;
}

@media (max-width: 720px) {
  body::after { display: none; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  main { padding: 3rem 1.25rem; }
  h1 { font-size: 1.5rem; }
  .entries .entry-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .entries .when {
    font-size: 0.88rem;
  }
}

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.25rem;
}

h1::after {
  content: ".";
  color: var(--accent);
}

h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 3rem 0 0.85rem;
}

.tagline {
  color: var(--muted);
  margin-bottom: 2rem;
}

p {
  margin: 0 0 1rem;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.entries li {
  padding: 0.4rem 0 0.9rem;
}

.entries .entry-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.entries .entry-desc {
  margin: 0.3rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.55;
}

main strong {
  color: var(--accent);
  font-weight: inherit;
}

.entries .when {
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.links li {
  margin-bottom: 0.35rem;
}

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 120ms ease, text-decoration-color 120ms ease;
}

a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

::selection {
  background: var(--accent);
  color: #fff;
}
