/* ============================================
   Blog — 只处理博客页特有的排版（列表卡、文章正文、RSS/元信息）
   颜色与字体全部复用 style.css 的 :root 变量，不硬编码色值。
   站点浅色主题（2026-09-23 定）：无深色模式、无切换按钮。
   ============================================ */

.blog-hero {
  padding: 56px 0 32px;
}
.blog-hero h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.blog-hero p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 62ch;
}
.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 18px;
}
.blog-back:hover { color: var(--text-primary); }

/* ---------- 文章列表 ---------- */
.post-list {
  display: grid;
  gap: 20px;
  padding-bottom: 72px;
}
.post-card {
  display: block;
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.post-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.post-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.post-card p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.post-meta .dot { color: var(--text-faint); }
.tag {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-inset);
}

/* ---------- 文章页 ---------- */
.post-header {
  padding: 48px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
.post-header h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.4rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 16px;
  max-width: 30ch;
}
.post {
  max-width: 74ch;
  padding-bottom: 40px;
}
.post-body { font-size: 1.0625rem; line-height: 1.78; color: var(--text-secondary); }
.post-body > * + * { margin-top: 1.1em; }
.post-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-top: 2.2em;
  margin-bottom: 0.5em;
}
.post-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 1.8em;
  margin-bottom: 0.4em;
}
.post-body strong { color: var(--text-primary); font-weight: 650; }
.post-body a { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }
.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-body li { margin-top: 0.45em; }
.post-body li::marker { color: var(--text-faint); }
.post-body blockquote {
  border-left: 3px solid var(--border-strong);
  padding: 4px 0 4px 18px;
  color: var(--text-secondary);
  font-style: italic;
}
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}
.post-body pre {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
}
.post-body pre code { background: none; border: 0; padding: 0; }
.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.post-body th, .post-body td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}
.post-body th {
  background: var(--bg-inset);
  color: var(--text-primary);
  font-weight: 650;
}
.post-body img { max-width: 100%; height: auto; border-radius: 10px; }
.post-body hr { border: 0; border-top: 1px solid var(--border); margin: 2.4em 0; }

/* ---------- 文末：上下篇 + CTA ---------- */
.post-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  padding: 28px 0 8px;
  border-top: 1px solid var(--border);
  margin-top: 44px;
}
.post-nav a {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  background: var(--bg-card);
}
.post-nav a:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.post-nav .label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
.post-nav .title { font-size: 0.9375rem; font-weight: 650; color: var(--text-primary); }

.post-cta {
  margin: 40px 0 72px;
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
}
.post-cta p { margin-bottom: 14px; color: var(--text-secondary); }

@media (max-width: 640px) {
  .post-card { padding: 22px 20px; }
  .post-header { padding: 34px 0 22px; }
}
