:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --border: #e5e5e5;
  --accent: #0066cc;
  --card: #fafafa;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181d;
    --text: #e6e6e6;
    --muted: #9a9a9a;
    --border: #2a2d33;
    --accent: #58a6ff;
    --card: #1f2229;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

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

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.site-title:hover { text-decoration: none; }
.site-nav a { margin-left: 16px; color: var(--muted); }

/* Intro */
.intro { padding: 48px 0 24px; }
.intro h1 { font-size: 28px; margin: 0 0 8px; }
.intro p { color: var(--muted); margin: 0; }

/* Post list */
.post-list { padding-bottom: 48px; }
.post-list h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.post-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.post-title { font-size: 18px; font-weight: 600; color: var(--text); }
.post-meta { font-size: 13px; color: var(--muted); margin: 4px 0 8px; }
.post-excerpt { margin: 0; color: var(--muted); }

.empty-hint { color: var(--muted); text-align: center; padding: 24px 0; }

/* Post page */
article.post { padding: 40px 0 48px; }
article.post h1 { font-size: 26px; margin: 0 0 8px; }
.post-date { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
article.post h2 { font-size: 20px; margin-top: 32px; }
article.post code {
  background: var(--card);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.9em;
}
article.post pre {
  background: var(--card);
  padding: 14px;
  border-radius: 6px;
  overflow-x: auto;
}
article.post pre code { background: none; padding: 0; }

.back-link { display: inline-block; margin-top: 32px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--muted);
  font-size: 14px;
}
.site-footer p { margin: 0; }
