:root {
  color-scheme: light dark;
  --page: #f5f2ea;
  --ink: #24221f;
  --muted: #716d65;
  --line: #ccc7bc;
  --link: #315f8b;
  --mark: #ebe5d8;
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  line-height: 1.65;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

.site {
  width: min(100% - 2rem, 66ch);
  margin: 0 auto;
  padding: clamp(2rem, 7vw, 5rem) 0 3rem;
}

.site-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--ink);
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.9rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a[aria-current="page"] { background: var(--mark); }

main { padding-top: 2rem; }

h1,
h2 { line-height: 1.3; }

h1 { font-size: 1.15rem; }

p { margin: 0 0 1rem; }

.intro { font-size: clamp(1rem, 2.2vw, 1.075rem); }

.recent {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.entry {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px dotted var(--line);
}

.entry-meta,
.post-header time {
  color: var(--muted);
  font-size: 0.8125rem;
}

.entry-meta a { color: inherit; }

.entry-body { min-width: 0; }

.entry-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.entry-summary {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.entry-summary p { margin: 0; }

.section-header,
.post-header { margin-bottom: 2rem; }

.post-header h1 { margin-bottom: 0.25rem; }

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

pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 0.75rem;
  border: 1px solid var(--line);
}

code { overflow-wrap: anywhere; }

footer {
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.75rem;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

@media (max-width: 32rem) {
  .site { width: min(100% - 1.5rem, 66ch); }

  .entry {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #1d1c1a;
    --ink: #e9e5dc;
    --muted: #aaa49a;
    --line: #4a4741;
    --link: #8dbce8;
    --mark: #39362f;
  }
}
