* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1rem;
  color: #1a1a1a;
  background: #fff;
  color-scheme: light dark;
}

header {
  margin-bottom: 3rem;
}

header nav a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

footer {
  margin-top: 4rem;
  color: #666;
  font-size: 0.85rem;
}

h1 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: #1a1a1a;
}

/* Blog post list */
.post-list {
  list-style: none;
}

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.4rem 0;
}

.post-list time {
  color: #666;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Code */
pre {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

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

:not(pre) > code {
  background: #f5f5f5;
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

/* Syntax highlighting (eleventy-plugin-syntaxhighlight / Prism) */
.token.comment,
.token.prolog,
.token.cdata { color: #6a737d; }

.token.punctuation { color: #24292e; }

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted { color: #d73a49; }

.token.selector,
.token.string,
.token.char,
.token.builtin,
.token.attr-value,
.token.inserted { color: #22863a; }

.token.operator,
.token.entity,
.token.url { color: #6f42c1; }

.token.atrule,
.token.keyword { color: #d73a49; }

.token.function,
.token.class-name { color: #6f42c1; }

.token.regex,
.token.important,
.token.variable { color: #e36209; }

/* Dark mode */
@media (prefers-color-scheme: dark) {
  body {
    color: #e0e0e0;
    background: #1a1a1a;
  }

  a { color: #e0e0e0; }

  footer,
  .post-list time { color: #999; }

  pre {
    background: #2a2a2a;
    border-color: #3a3a3a;
  }

  :not(pre) > code { background: #2a2a2a; }

  /* Syntax highlighting — dark */
  .token.comment,
  .token.prolog,
  .token.cdata { color: #8b949e; }

  .token.punctuation { color: #c9d1d9; }

  .token.property,
  .token.tag,
  .token.boolean,
  .token.number,
  .token.constant,
  .token.symbol,
  .token.deleted { color: #ff7b72; }

  .token.selector,
  .token.string,
  .token.char,
  .token.builtin,
  .token.attr-value,
  .token.inserted { color: #7ee787; }

  .token.operator,
  .token.entity,
  .token.url { color: #d2a8ff; }

  .token.atrule,
  .token.keyword { color: #ff7b72; }

  .token.function,
  .token.class-name { color: #d2a8ff; }

  .token.regex,
  .token.important,
  .token.variable { color: #ffa657; }
}
