:root {
  --bg: #faf9f7;
  --fg: #2b2b2b;
  --muted: #8a8a8a;
  --accent: #4a6fa5;
  --border: #e5e1da;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1c;
    --fg: #d8d4cc;
    --muted: #7a7a7a;
    --accent: #8fb0dd;
    --border: #333336;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", sans-serif;
  font-size: 17px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.site-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--fg);
}
.site-title:hover { text-decoration: none; }

.site-header nav a {
  margin-left: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.site-header nav a:hover { color: var(--accent); }

.intro {
  color: var(--muted);
  margin: 2.5rem 0 2rem;
  font-size: 1.05rem;
}

.page-title {
  font-size: 1.6rem;
  margin: 2.5rem 0 1.5rem;
}

.post-item {
  display: flex;
  gap: 1.25rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.post-item time {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.post-item a {
  color: var(--fg);
  font-size: 1.05rem;
}
.post-item a:hover { color: var(--accent); }

.post-title {
  font-size: 1.7rem;
  line-height: 1.5;
  margin: 2.5rem 0 0.5rem;
}

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

.post-content { margin-top: 2rem; }
.post-content p { margin: 1.2em 0; }
.post-content h2 { font-size: 1.3rem; margin: 2em 0 1em; }
.post-content h3 { font-size: 1.15rem; margin: 1.8em 0 1em; }
.post-content blockquote {
  margin: 1.5em 0;
  padding-left: 1em;
  border-left: 3px solid var(--border);
  color: var(--muted);
}
.post-content code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--border);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.post-content pre {
  background: var(--border);
  padding: 1em 1.2em;
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.6;
}
.post-content pre code { background: none; padding: 0; }
.post-content img { max-width: 100%; border-radius: 8px; }

.site-footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}
