/* ─── 全局 ─── */
:root {
  --brand: #2563eb;
  --brand-soft: #eff6ff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.75;
}

/* ─── 导航栏 ─── */
#mainNav {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
}
[data-bs-theme="dark"] #mainNav {
  background: rgba(30,30,30,.92);
}

/* ─── 首页 ─── */
.carousel-img {
  height: 420px;
  object-fit: cover;
}
.carousel-placeholder {
  height: 420px;
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
}
@media (max-width: 768px) {
  .carousel-img, .carousel-placeholder { height: 220px; }
}

.section-title { position: relative; padding-left: 14px; }
.section-bar {
  position: absolute;
  left: 0; top: 4px;
  width: 4px; height: 80%;
  background: var(--brand);
  border-radius: 2px;
}

/* ─── 文章卡片 ─── */
.article-card { transition: transform .2s, box-shadow .2s; }
.article-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1)!important; }

.article-thumb {
  height: 180px;
  object-fit: cover;
}
.article-thumb-placeholder {
  height: 180px;
  background: #f1f5f9;
}

/* ─── 列表页 ─── */
.article-list-card .card-img-top,
.article-list-card img {
  height: 100%;
  max-height: 120px;
  object-fit: cover;
}

/* ─── 文章详情页 ─── */
.article-cover {
  max-height: 400px;
  object-fit: cover;
}
.article-content {
  line-height: 1.9;
  font-size: 16px;
}
.article-content h1, .article-content h2, .article-content h3 {
  margin-top: 1.6em;
  font-weight: 700;
}
.article-content img { max-width: 100%; border-radius: 8px; margin: 1em 0; }
.article-content pre { background: #1e1e1e; color: #d4d4d4; padding: 1em; border-radius: 8px; overflow-x: auto; }
.article-content blockquote {
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  padding: .75em 1em;
  border-radius: 0 8px 8px 0;
  margin: 1em 0;
}
.article-content table { width:100%; border-collapse:collapse; }
.article-content th, .article-content td { border:1px solid #e2e8f0; padding:.5em .75em; }
.article-content th { background:#f8fafc; }

/* ─── 工具 ─── */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cursor-pointer { cursor: pointer; }
.object-fit-cover { object-fit: cover; }
