:root {
  color-scheme: light dark;

  --max-width: 40rem;
  --fg: #222;
  --muted: #666;
  --accent: #00a336;
  --accent-2: #008228;
  --bg: #f4f4f2;
  --border: #ddd;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #b8b8b8;
    --muted: #999;
    --accent: #2ee063;
    --accent-2: #00a748;
    --bg: #1a1b1e;
    --border: #333;
  }
}

* {
  box-sizing: border-box;
}

body {
  max-width: var(--max-width);
  margin: 3rem auto;
  padding: 0 1rem;
  font:
    14px/1.6 system-ui,
    sans-serif;
  color: var(--fg);
  background: var(--bg);
}

a {
  color: inherit;
}

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

li::marker {
  color: var(--accent-2);
}

header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.site-name {
  font-weight: 600;
  font-size: 1.35rem;
  margin-right: 1rem;
  color: var(--accent-2);
}

header nav {
  display: inline;
}

header nav a {
  margin-right: 1rem;
  text-decoration: none;
  color: var(--muted);
}

header nav a:hover {
  text-decoration: underline;
}

h1 {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
}

h2 {
  font-size: 1.15rem;
  margin-top: 2rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

img {
  display: block;
  margin-inline: auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

pre {
  overflow-x: auto;
}

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

.posts li {
  display: flex;
  gap: 0.75rem;
  padding: 0.35rem 0;
}

.posts time {
  flex: none;
  width: 6rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.posts a {
  text-decoration: none;
}

.posts a:hover {
  text-decoration: underline;
}

.post-date {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.star {
  color: var(--accent);
}

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