/* ============================================================
   Tank Workshop Model — 博客（列表 / 文章）
   中英双版同时存在于 HTML，按 <html lang> 切换显示（爬虫两版都能读到）
   ============================================================ */

html:not([lang^="zh"]) .bi-zh { display: none; }
html[lang^="zh"] .bi-en { display: none; }

/* ---------- 列表 ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .1), 0 14px 32px rgba(0, 0, 0, .1);
}

.blog-card-media { display: block; aspect-ratio: 16 / 10; background: var(--line); overflow: hidden; }
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; }

.blog-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }

.blog-card-date {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.blog-card-body h2 {
  font-size: 19px;
  line-height: 1.35;
  margin-bottom: 10px;
}
.blog-card-body h2 a { color: var(--ink); }
.blog-card-body h2 a:hover { color: var(--accent-dark); }

.blog-card-excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.blog-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.blog-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: rgba(138, 116, 68, .1);
  border: 1px solid rgba(138, 116, 68, .22);
  border-radius: 999px;
  padding: 2px 9px;
}

.blog-card-more { margin-top: auto; font-size: 13px; font-weight: 600; }
.blog-card-more a { color: var(--accent-dark); }

.blog-empty { color: var(--muted); padding: 18px 0 40px; }

/* ---------- 文章 ---------- */
.post-section { padding: 40px 0 60px; }

.post {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 44px 48px 40px;
}

.post-head { margin-bottom: 26px; }
.post-meta {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.post-head h1 {
  font-size: 30px;
  line-height: 1.28;
  color: var(--ink);
}
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.post-cover { margin: 0 0 28px; }
.post-cover img { width: 100%; border-radius: var(--radius); }

.post-content { font-size: 16.5px; line-height: 1.75; color: var(--ink); }
.post-content p { margin: 0 0 18px; }
.post-content h2 { font-size: 23px; line-height: 1.35; margin: 32px 0 14px; }
.post-content h3 { font-size: 19px; line-height: 1.4; margin: 26px 0 12px; }
.post-content h4 { font-size: 17px; line-height: 1.4; margin: 22px 0 10px; }
.post-content ul,
.post-content ol { margin: 0 0 18px 22px; }
.post-content li { margin-bottom: 7px; }
.post-content blockquote {
  margin: 0 0 18px;
  padding: 12px 18px;
  border-left: 3px solid var(--accent);
  background: rgba(138, 116, 68, .06);
  color: var(--muted);
}
.post-content blockquote p { margin: 0; }
.post-content hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.post-content img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 6px 0 18px; }
/* 草稿预览提示（只有带 preview 签名的人会看到） */
.post-preview-note {
  margin: 0 0 18px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: #fff4d6;
  border: 1px solid #e8d39a;
  color: #6b5320;
  font-size: 14px;
}
.post-figure { margin: 0 0 18px; }
.post-figure img { margin-bottom: 0; }
/* 正文内嵌视频（Markdown 里 ![](/media/xxx.mp4)），与其他块一样留白、圆角 */
.post-content video,
.post-video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 6px 0 18px;
  border-radius: var(--radius);
  background: #000;
}
.post-figure .post-video { margin-bottom: 0; }
.post-content a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 2px; }
.post-content code {
  font-family: Consolas, "Courier New", monospace;
  font-size: .92em;
  background: #f0ede4;
  border-radius: 3px;
  padding: 1px 5px;
}

.post-foot {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}

@media (max-width: 700px) {
  .blog-grid { grid-template-columns: 1fr; }
  .post { padding: 28px 22px 26px; }
  .post-head h1 { font-size: 24px; }
  .post-content { font-size: 16px; }
  .post-content h2 { font-size: 20px; }
}
