/* 博客页（文章列表、文章正文），页面由 tools/gen-blog.js 生成。颜色用 site.css 里的变量。 */
.blog { padding: 48px 0 80px; min-height: calc(100vh - 64px - 300px); }
.nav-links a.on { color: var(--text); font-weight: 600; }

/* 文章列表 */
.blog-head { margin-bottom: 12px; }
.blog-head h1 { font-size: 34px; letter-spacing: -.5px; }
.blog-head p { margin-top: 8px; color: var(--muted); }
.blog-item { padding: 28px 0; border-top: 1px solid var(--border); }
.blog-item time, .post > time { font-size: 13px; color: var(--muted); }
.blog-item h2 { margin: 6px 0 8px; font-size: 22px; line-height: 1.4; }
.blog-item h2 a:hover { color: var(--primary-ink); }
.blog-item p { margin-bottom: 10px; color: var(--muted); }
.blog-item .text-link { font-size: 14px; }

/* 文章正文 */
.blog-crumb { margin-bottom: 20px; font-size: 14px; color: var(--muted); }
.blog-crumb a:hover { color: var(--primary-ink); }
.post h1 { font-size: 32px; line-height: 1.35; letter-spacing: -.5px; }
.post > time { display: block; margin: 12px 0 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.post h2 { margin: 40px 0 14px; font-size: 23px; line-height: 1.4; }
.post h3 { margin: 30px 0 10px; font-size: 18px; }
.post p, .post li { font-size: 16.5px; line-height: 1.85; }
.post p { margin: 16px 0; }
.post ul, .post ol { margin: 16px 0; padding-left: 26px; }
.post li + li { margin-top: 6px; }
.post a { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 3px; }
.post strong { font-weight: 700; }
.post code { padding: 2px 6px; border-radius: 6px; font-family: var(--mono); font-size: .88em; background: var(--bg-alt); border: 1px solid var(--border); }
.post pre { margin: 20px 0; padding: 18px 20px; border-radius: 12px; overflow-x: auto; background: var(--code-bg); border: 1px solid var(--code-border); }
.post pre code { padding: 0; border: 0; background: none; color: #d7deeb; font-size: 13.5px; line-height: 1.7; }
.post blockquote { margin: 20px 0; padding: 4px 18px; border-left: 3px solid var(--primary); background: var(--tint); border-radius: 0 10px 10px 0; }
.post blockquote p { color: var(--muted); }

/* 上一篇 / 下一篇 */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.post-nav a { font-weight: 600; line-height: 1.5; }
.post-nav a:hover { color: var(--primary-ink); }
.post-nav a span { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 400; color: var(--muted); }
.post-nav a:last-child { text-align: right; }

/* 配图和文章最后的关键词 */
.post figure { margin: 28px 0; }
.post figure img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); }
.post figcaption { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--muted); text-align: center; }
.post .post-tags { margin-top: 40px; font-size: 14px; color: var(--muted); }
.post-tags span { display: inline-block; margin: 0 8px 8px 0; padding: 3px 12px; border-radius: 999px; background: var(--tint); border: 1px solid var(--tint-border); color: var(--primary-ink); }

@media (max-width: 768px) {
  .blog { padding: 32px 0 56px; }
  .blog-head h1, .post h1 { font-size: 26px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav a:last-child { text-align: left; }
}
