:root {
  --bg: #f5f5f5;
  --text: #1e1e1e;
  --line: #cdcdcd;
  --muted: #757575;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1e1e;
    --text: #ebebeb;
    --line: #3c3c3c;
    --muted: #8f8f8f;
  }
}

body {
  margin: 0;
  max-inline-size: 66ch;
  padding: 2rem clamp(1rem, 4vw, 2rem) 4rem;
  font-family: system-ui, sans-serif;
  line-height: 1.65;
  text-wrap: pretty;
  background: var(--bg);
  color: var(--text);
}

h1,
h2,
h3 {
  font: inherit;
}

main h1,
h2,
h3 {
  font-weight: 600;
}

h2 {
  margin-block: 2.75rem 0.75rem;
}

h3 {
  margin-block: 1.75rem 0.5rem;
}

a {
  color: var(--text);
  text-decoration-color: var(--muted);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

blockquote {
  margin-inline: 0;
  padding-inline-start: 1rem;
  border-inline-start: 2px solid var(--line);
}

small {
  font-size: inherit;
}

.footnotes {
  margin-block-start: 3rem;
}

header {
  margin-block-end: 2.5rem;
}

header h1 {
  margin: 0;
}

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

.index li {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: baseline;
  column-gap: 1rem;
  margin-block: 0.35rem;
}

.index time {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.875em;
}

.image-gallery {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: 0.5rem;
}

.image-gallery a {
  text-decoration: none;
}

.image-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.image-gallery span {
  display: block;
  text-align: center;
}
