:root {
  --bg: #fafafa;
  --text: #2c2c2c;
  --accent: #1a1a2e;
  --muted: #6b7280;
  --border: #e5e7eb;
  --code-bg: #f3f4f6;
  --max-width: 720px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 16px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-bottom: 3rem;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}

nav a:hover { color: var(--text); }

/* Main */
main { min-height: 60vh; padding-bottom: 4rem; }

h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 1rem; }
h2 { font-size: 1.35rem; font-weight: 600; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }

p { margin-bottom: 1rem; }

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

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

.post-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.post-item:last-child { border-bottom: none; }

.post-item a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 1.05rem;
}

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

.post-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.post-summary {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Single article */
.article-header { margin-bottom: 2rem; }
.article-header h1 { margin-bottom: 0.5rem; }
.article-content { line-height: 1.9; }
.article-content img { max-width: 100%; border-radius: 4px; margin: 1rem 0; }
.article-content blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  color: var(--muted);
  margin: 1.5rem 0;
}
.article-content code {
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}
.article-content pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.article-content pre code { background: none; padding: 0; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Homepage hero */
.hero {
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
  header .container { flex-direction: column; gap: 0.75rem; }
  nav a { margin-left: 0; margin-right: 1rem; }
  .hero h1 { font-size: 1.5rem; }
}
