/* 一个人的快乐 — 个人博客样式
   中文排版优先，简洁阅读风格 */
:root {
  --bg: #faf9f7;
  --card: #ffffff;
  --text: #2b2b2b;
  --text-dim: #6b6b6b;
  --accent: #1a73e8;
  --border: #e8e5e0;
  --radius: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC",
    "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 头部 ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--card);
  padding: 28px 0 22px;
  text-align: center;
}

.site-title {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
}

.site-title a { color: var(--text); }
.site-title a:hover { text-decoration: none; }

.site-tagline {
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.site-nav {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 0.95rem;
}

.site-nav a { color: var(--text-dim); }
.site-nav a:hover { color: var(--accent); text-decoration: none; }

/* ---------- 主内容 ---------- */
main { padding: 36px 0 48px; }

.intro {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 32px;
  font-size: 0.98rem;
  color: var(--text-dim);
}

.section-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

/* 文章列表 */
.post-list { list-style: none; }

.post-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}

.post-item:hover { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }

.post-item h2 { font-size: 1.12rem; margin-bottom: 6px; }
.post-item h2 a { color: var(--text); }
.post-item h2 a:hover { color: var(--accent); text-decoration: none; }

.post-meta {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.post-excerpt { font-size: 0.92rem; color: var(--text-dim); }

/* ---------- 文章页 ---------- */
.article { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px 40px; }

.article h1 { font-size: 1.6rem; line-height: 1.5; margin-bottom: 10px; }

.article .post-meta { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }

.article h2 { font-size: 1.25rem; margin: 28px 0 12px; }
.article h3 { font-size: 1.08rem; margin: 22px 0 10px; }
.article p { margin-bottom: 14px; }
.article ul, .article ol { margin: 0 0 14px 24px; }
.article li { margin-bottom: 6px; }
.article blockquote {
  border-left: 4px solid var(--accent);
  background: #f5f7fb;
  padding: 10px 16px;
  margin: 16px 0;
  color: var(--text-dim);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article code {
  background: #f0efec;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.9em;
  font-family: "SF Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

.back-link { display: inline-block; margin: 28px 0 0; font-size: 0.9rem; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 0 30px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.site-footer p { margin-bottom: 4px; }
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--accent); }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .article { padding: 24px 20px; }
  .site-title { font-size: 1.6rem; }
}
