
:root {
  --bg: #f8f9fb; --text: #1a1a2e; --muted: #6b7280;
  --accent: #2563eb; --accent-light: #dbeafe;
  --card-bg: #fff; --border: #e5e7eb;
  --radius: 12px; --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg: 0 4px 16px rgba(0,0,0,.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.8; font-size: 16px;
}

/* 导航 */
header {
  background: var(--card-bg); border-bottom: 1px solid var(--border);
  padding: 0; position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(12px); background: rgba(255,255,255,.85);
}
header nav {
  max-width: 800px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; gap: 2rem; height: 56px; align-items: center;
}
header nav a {
  color: var(--muted); text-decoration: none; font-weight: 500;
  font-size: .95rem; transition: color .15s;
}
header nav a:hover { color: var(--accent); }
header nav a:first-child { color: var(--accent); font-weight: 700; font-size: 1.05rem; margin-right: auto; }

/* 布局 */
.container { max-width: 800px; margin: 0 auto; padding: 2rem 1.5rem; }

/* 首页文章卡片 */
.hero { text-align: center; padding: 3rem 1.5rem 2rem; }
.hero h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: .5rem; }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 500px; margin: 0 auto; }
.post-list { display: flex; flex-direction: column; gap: 1rem; }
.post-card {
  background: var(--card-bg); border-radius: var(--radius);
  padding: 1.5rem 1.75rem; box-shadow: var(--shadow);
  border: 1px solid var(--border); transition: box-shadow .2s, transform .2s;
}
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.post-card .cat-badge {
  display: inline-block; font-size: .75rem; font-weight: 600;
  padding: .15rem .6rem; border-radius: 20px; margin-bottom: .5rem;
  background: var(--accent-light); color: var(--accent);
}
.post-card h2 { font-size: 1.2rem; line-height: 1.4; margin-bottom: .35rem; }
.post-card h2 a { color: var(--text); text-decoration: none; }
.post-card h2 a:hover { color: var(--accent); }
.post-card .meta { color: var(--muted); font-size: .8rem; margin-bottom: .35rem; }
.post-card .excerpt { color: #555; font-size: .9rem; line-height: 1.6; }

/* 文章页 */
.article h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; margin-bottom: .75rem; }
.article .article-meta { color: var(--muted); font-size: .85rem; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.article .content { margin-top: 1.5rem; }
.article .content h1 { font-size: 1.5rem; margin: 2rem 0 .75rem; }
.article .content h2 { font-size: 1.25rem; margin: 1.75rem 0 .5rem; color: var(--accent); }
.article .content h3 { font-size: 1.05rem; margin: 1.25rem 0 .4rem; }
.article .content p { margin: .85rem 0; }
.article .content ul, .article .content ol { margin: .5rem 0 .5rem 1.5rem; }
.article .content li { margin: .3rem 0; }
.article .content blockquote {
  background: #f5f7fa; border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem; margin: 1.25rem 0; border-radius: 0 var(--radius) var(--radius) 0;
  color: #555; font-style: italic;
}
.article .content code { background: #f0f1f3; padding: .15rem .45rem; border-radius: 4px; font-size: .88rem; }
.article .content pre {
  background: #1e1e2e; color: #cdd6f4; padding: 1.25rem;
  border-radius: var(--radius); overflow-x: auto; font-size: .85rem; line-height: 1.7;
}
.article .content pre code { background: none; padding: 0; color: inherit; }
.article .content table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .9rem; }
.article .content th { background: #f5f7fa; font-weight: 600; text-align: left; }
.article .content td, .article .content th { border: 1px solid var(--border); padding: .55rem .75rem; }
.article .content img { max-width: 100%; border-radius: var(--radius); margin: 1rem 0; }
.article .content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.article .content strong { color: #1a1a2e; }
.post-nav {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 1rem;
}
.post-nav a { color: var(--accent); text-decoration: none; font-weight: 500; }

/* 归档页 */
.archive-list { list-style: none; display: flex; flex-direction: column; gap: .35rem; }
.archive-list li { display: flex; justify-content: space-between; align-items: baseline; }
.archive-list a { color: var(--accent); text-decoration: none; }
.archive-list small { color: var(--muted); font-size: .8rem; white-space: nowrap; margin-left: 1rem; }

/* 页脚 */
footer { text-align: center; padding: 2.5rem 1rem; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--border); }
footer p + p { margin-top: .4rem; }
.site-footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: .75rem; }
.site-footer-links a { color: var(--muted); text-decoration: none; font-size: .82rem; }

@media (max-width: 600px) {
  .container { padding: 1.2rem 1rem; }
  .hero h1 { font-size: 1.6rem; }
  .article h1 { font-size: 1.5rem; }
  .post-card { padding: 1.2rem; }
}
