/* =====================================================================
   Hubert Blog · 自定义样式（全局重构版）
   设计要点：
   1. 桌面端：左侧栏常驻（24rem），内容区占满剩余宽度，不再"两边空白"
   2. 移动端：侧栏变为抽屉，点击切换按钮呼出
   3. 文章页：卡片化排版 + 右侧悬浮可折叠目录 + 阅读进度条 + 配图
   4. 品牌：全局替换侧栏 logo；全站粒子连线动态背景
   ===================================================================== */

/* ---------- 基础色调 ---------- */
body {
  background-color: #f4f6fa;
  background-image: radial-gradient(ellipse at 20% -10%, rgba(59, 130, 246, 0.08), transparent 55%),
    radial-gradient(ellipse at 90% 110%, rgba(59, 130, 246, 0.06), transparent 50%);
  background-attachment: fixed;
}

/* LLM-as-a-Verifier 文章 */
.verifier-compare{display:grid;grid-template-columns:1fr 1fr;gap:1.4rem;margin:2.2rem 0}.verifier-lane{padding:1.7rem;border:1px solid #dbe4f0;border-radius:1.2rem;background:#fff}.verifier-lane h3{margin:.1rem 0 1rem!important;font-size:1.8rem!important}.verifier-lane h3::before{display:none!important}.verifier-lane--judge{border-top:.45rem solid #94a3b8}.verifier-lane--verifier{border-top:.45rem solid #6d28d9;background:linear-gradient(150deg,#fff,#f5f3ff)}.verifier-chip{display:inline-block;margin:.35rem .25rem .35rem 0;padding:.35rem .7rem;border-radius:99px;background:#eef2f7;color:#475569;font-size:1.2rem}.verifier-chip--active{background:#ede9fe;color:#5b21b6;font-weight:700}.score-bars{display:flex;align-items:flex-end;gap:.55rem;height:9.5rem;margin:1.4rem 0 .9rem;padding:.8rem;border-radius:.8rem;background:#f8fafc}.score-bar{position:relative;flex:1;min-width:2.2rem;border-radius:.45rem .45rem .15rem .15rem;background:#cbd5e1}.score-bar span{position:absolute;bottom:-2.25rem;left:50%;transform:translateX(-50%);font-size:1.15rem;color:#64748b}.score-bar b{position:absolute;top:-1.9rem;width:100%;text-align:center;font-size:1.1rem;color:#475569}.score-bar--accent{background:linear-gradient(#a78bfa,#6d28d9)}.compare-result{margin-top:2.8rem;padding:1rem 1.2rem;border-radius:.7rem;background:#f1f5f9;color:#334155;font-size:1.3rem}.compare-result strong{color:#4c1d95}.verification-axes{display:grid;grid-template-columns:repeat(3,1fr);gap:1.2rem;margin:2.1rem 0}.axis-card{position:relative;min-height:18rem;padding:1.5rem;border:1px solid #dbe4f0;border-radius:1.1rem;overflow:hidden;background:#fff}.axis-card::after{position:absolute;right:-1.5rem;bottom:-3rem;color:#eef2ff;font-size:11rem;font-weight:800;line-height:1;content:attr(data-axis)}.axis-card b,.axis-card p,.axis-card small{position:relative;z-index:1}.axis-card b{display:block;color:#312e81;font-size:1.65rem}.axis-card p{margin:.7rem 0;color:#475569;line-height:1.65}.axis-card small{display:block;color:#6d28d9;font-weight:700}.ppt-flow{display:grid;grid-template-columns:repeat(5,1fr);gap:.8rem;align-items:stretch;margin:2.2rem 0;padding:1.4rem;border:1px solid #dbe4f0;border-radius:1.2rem;background:linear-gradient(135deg,#f8fbff,#f5f3ff)}.ppt-step{display:flex;flex-direction:column;justify-content:center;min-height:11.5rem;padding:1rem;border-radius:.85rem;background:#fff;box-shadow:0 .25rem .9rem rgba(15,23,42,.07);font-size:1.25rem;line-height:1.55}.ppt-step b{display:block;margin-bottom:.5rem;color:#4c1d95;font-size:1.45rem}.ppt-step--accent{background:#4f46e5;color:#fff}.ppt-step--accent b{color:#fff}.progress-map{display:grid;grid-template-columns:1.05fr .9fr 1.05fr;gap:1.1rem;align-items:center;margin:2.2rem 0;padding:1.5rem;border:1px solid #c7d2fe;border-radius:1.2rem;background:#f8faff}.progress-map__track{height:14rem;padding:1rem;border-radius:.9rem;background:#fff}.progress-line{position:relative;height:100%;border-left:2px solid #cbd5e1;border-bottom:2px solid #cbd5e1}.progress-line svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.progress-input,.progress-output{display:grid;gap:.65rem}.progress-pill{padding:.8rem 1rem;border-radius:.65rem;background:#fff;border:1px solid #dbe4f0;color:#475569;font-size:1.25rem}.progress-pill--good{border-color:#86efac;background:#f0fdf4;color:#166534}.progress-pill--warn{border-color:#fde68a;background:#fffbeb;color:#92400e}.source-note{margin:1.2rem 0;padding:1rem 1.3rem;border-radius:.75rem;background:#f8fafc;color:#64748b;font-size:1.25rem;line-height:1.6}.article-entry .quote-conclusion{margin:2.4rem 0;padding:1.8rem;border-left:.45rem solid #7c3aed;border-radius:.8rem;background:linear-gradient(100deg,#f5f3ff,#eff6ff);color:#312e81;font-size:1.75rem;font-weight:700;line-height:1.65}.article-entry .quote-conclusion p{margin:0}.article-entry .number-strip{display:flex;gap:1rem;flex-wrap:wrap;margin:1.6rem 0}.number-strip div{flex:1;min-width:13rem;padding:1.1rem 1.2rem;border-radius:.85rem;background:#f8fafc;border:1px solid #dbe4f0}.number-strip b{display:block;color:#5b21b6;font-size:2rem}.number-strip span{display:block;margin-top:.2rem;color:#64748b;font-size:1.2rem;line-height:1.5}@media(max-width:899px){.verifier-compare,.verification-axes,.progress-map{grid-template-columns:1fr}.ppt-flow{grid-template-columns:1fr 1fr}.axis-card{min-height:auto}.progress-map__track{height:12rem}}@media(max-width:520px){.ppt-flow{grid-template-columns:1fr}.score-bars{margin-bottom:2.7rem}}body.darkmode .verifier-lane,body.darkmode .axis-card,body.darkmode .ppt-step,body.darkmode .progress-map__track,body.darkmode .progress-pill{background:#172033;border-color:#334155}body.darkmode .verifier-lane--verifier,body.darkmode .ppt-flow,body.darkmode .progress-map{background:#171334;border-color:#4338ca}body.darkmode .verifier-chip{background:#25334a;color:#cbd5e1}body.darkmode .verifier-chip--active{background:#4c1d95;color:#ede9fe}body.darkmode .score-bars,body.darkmode .compare-result,body.darkmode .source-note,body.darkmode .number-strip div{background:#0f172a;color:#cbd5e1}body.darkmode .axis-card p,body.darkmode .progress-pill{color:#cbd5e1}body.darkmode .progress-pill--good{background:#123323;color:#bbf7d0}.darkmode .progress-pill--warn{background:#3b2f14;color:#fde68a}body.darkmode .article-entry .quote-conclusion{background:#22143e;color:#ddd6fe}

/* 粒子画布（JS 动态创建） */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* 品牌 logo 全局替换 */
.logo img {
  content: url("/images/logo.svg");
  border-radius: 1.2rem;
}

/* ---------- 布局：桌面端侧栏常驻 ---------- */
@media (min-width: 900px) {
  .sidebar,
  .sidebar.on {
    left: 0;
    width: 24rem;
    background: #ffffff;
    border-right: 1px solid #e8edf4;
    box-shadow: 4px 0 24px rgba(30, 41, 59, 0.04);
    transition: none;
  }

  .content,
  .content.on {
    margin-left: 24rem !important;
    width: calc(100% - 24rem) !important;
    transform: none !important;
  }

  .navbar-toggle {
    display: none;
  }

  .outer,
  .wrap {
    width: auto !important;
    max-width: 120rem;
  }

  .search-form-wrap {
    left: 24rem;
    right: 2rem;
  }

  .float_btns {
    right: 2.5rem;
  }
}

/* ---------- 布局：移动端抽屉 ---------- */
@media (max-width: 899px) {
  .sidebar {
    left: 0;
    width: 24rem;
    background: #ffffff;
    border-right: 1px solid #e8edf4;
    transition: left 0.3s ease-in-out;
  }
  .sidebar.on {
    left: -24rem;
  }
  .content {
    transform: translateX(24rem);
    transition: transform 0.3s ease-in-out;
  }
  .content.on {
    transform: translateX(0);
  }
  .navbar-toggle {
    left: 1.4rem;
    top: 1.4rem;
    background-color: rgba(37, 99, 235, 0.9);
  }
  .outer,
  .wrap {
    padding-right: 1.2rem;
    padding-left: 1.2rem;
  }
}

/* 尊重系统的“减少动态效果”偏好，避免粒子和过渡影响可访问性。 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  #particle-canvas {
    display: none;
  }
}

/* ---------- 侧栏内部 ---------- */
.navbar {
  padding-top: 3.2rem;
}

.navbar .nav.nav-main {
  height: auto;
  overflow: visible;
  margin-top: 1.6rem;
  border-top: 1px solid #eef1f6;
  padding-top: 1rem;
}

.navbar .nav .nav-item-link {
  display: block;
  margin: 0.3rem 1.2rem;
  padding: 1.05rem 1.6rem;
  text-align: left;
  font-size: 1.5rem;
  color: #475569;
  border-radius: 0.9rem;
  text-decoration: none;
}

.navbar .nav .nav-item-link:hover {
  opacity: 1;
  background: #eef4ff;
  color: #2563eb;
}

.navbar-bottom {
  padding: 1rem 0 2.4rem;
  font-size: 1.8rem;
  border-top: 1px solid #eef1f6;
}

.navbar-bottom .nav .nav-item-link {
  text-align: center;
  color: #64748b;
  padding: 1rem;
  font-size: 1.9rem;
}

.navbar-bottom .nav .nav-item-link:hover {
  background: #eef4ff;
  color: #2563eb;
}

/* 侧栏底部小签名 */
.sidebar::after {
  content: "把复杂问题拆成可运行的系统";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9.2rem;
  padding: 0 2.4rem;
  font-size: 1.15rem;
  color: #a3aec0;
  text-align: center;
  line-height: 1.6;
}

/* 搜索面板（桌面端覆盖内容区） */
.local-search {
  background: #ffffff;
  box-shadow: 0 1.6rem 4rem rgba(30, 41, 59, 0.14);
  border-radius: 0 0 1.2rem 1.2rem;
}

/* ---------- 首页精选文章卡片 ---------- */
.featured-post {
  margin: 4rem 0 2rem;
}

.featured-post__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 3.4rem 3.6rem;
  border: 1px solid #dbe7fb;
  border-radius: 1.6rem;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 55%, #f4f8ff 100%);
  box-shadow: 0 1.4rem 3.4rem rgba(37, 99, 235, 0.1);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.featured-post__link:hover {
  transform: translateY(-0.4rem);
  box-shadow: 0 1.8rem 4rem rgba(37, 99, 235, 0.16);
}

.featured-post__eyebrow {
  margin: 0 0 0.8rem;
  color: #2563eb;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.featured-post__body h2 {
  margin: 0 0 1.2rem;
  color: #0f172a;
  font-size: 2.6rem;
  line-height: 1.35;
}

.featured-post__body p {
  max-width: 72rem;
  margin: 0;
  color: #475569;
  font-size: 1.5rem;
  line-height: 1.8;
}

.featured-post__more {
  display: inline-block;
  margin-top: 1.8rem;
  color: #2563eb;
  font-size: 1.4rem;
  font-weight: 600;
}

.featured-post__badge {
  flex: 0 0 auto;
  width: 8.6rem;
  height: 8.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2.2rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-size: 3.6rem;
  box-shadow: 0 1rem 2.4rem rgba(37, 99, 235, 0.35);
}

/* ---------- 阅读量 ---------- */
.featured-post,
.article-inner,
.archive-article-inner,
footer.footer .outer {
  position: relative;
}

.article-view-count,
.post-view-count,
.site-view-count {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #64748b;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.article-view-count i,
.post-view-count i,
.site-view-count i {
  color: #3b82f6;
  font-size: 1.35rem;
}

.article-inner > .article-view-count,
.archive-article-inner > .article-view-count,
.featured-post > .article-view-count {
  position: absolute;
  right: 1.8rem;
  bottom: 1.25rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(0.6rem);
}

.post-hero__meta .post-view-count,
.article-header .post-view-count {
  margin-left: 0.2rem;
}

.site-view-count {
  width: fit-content;
  margin: 1rem auto 0;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.62);
  color: #475569;
}

body.darkmode .article-view-count {
  border-color: #334155;
  background: rgba(15, 23, 42, 0.82);
  color: #cbd5e1;
}

body.darkmode .post-view-count,
body.darkmode .site-view-count {
  color: #cbd5e1;
}

body.darkmode .site-view-count {
  background: #172554;
}

@media (max-width: 768px) {
  .featured-post__link {
    flex-direction: column;
    align-items: flex-start;
    padding: 2.4rem;
  }
  .featured-post__badge {
    width: 6.4rem;
    height: 6.4rem;
    font-size: 2.8rem;
  }
  .featured-post__body h2 {
    font-size: 2.1rem;
  }
}

/* ---------- 文章页：卡片化 ---------- */
.article {
  padding: 2rem 0 3rem;
}

/* 旧文章页直接挂在 .outer 下，也套用卡片 */
@media (min-width: 900px) {
  .outer > .article {
    background: #ffffff;
    border: 1px solid #eef1f6;
    border-radius: 1.6rem;
    padding: 4.5rem 5rem;
    box-shadow: 0 1rem 3rem rgba(30, 41, 59, 0.05);
  }
}

/* 文章主体：全宽三栏（左侧栏 + 正文 + 右侧目录），正文左对齐填满、无左右留白 */
.post-layout {
  display: flex;
  align-items: flex-start;
}

/* 文章页去掉 .outer 的宽度上限，让正文铺满可用空间 */
.outer.post-layout {
  max-width: none !important;
}

.post-body {
  flex: 1 1 auto;
  min-width: 0;
}

.post-body .article {
  background: #ffffff;
  border: 1px solid #eef1f6;
  border-radius: 1.6rem;
  padding: 4.5rem 5rem;
  box-shadow: 0 1rem 3rem rgba(30, 41, 59, 0.05);
}

@media (max-width: 899px) {
  .post-body .article {
    padding: 2.6rem 2rem;
    border-radius: 1.2rem;
  }
}

/* 阅读进度条 */
.post-progress {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 3px;
  background: transparent;
}
.post-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

/* 文章 Hero */
.post-hero {
  margin-bottom: 2.5rem;
  padding: 3rem 3.4rem;
  border-radius: 1.4rem;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #e3edfc;
}

.post-hero__eyebrow {
  margin: 0 0 1rem;
  color: #2563eb;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.post-hero h1.article-title {
  margin: 0 0 1.4rem;
  padding: 0;
  border-left: none;
  font-size: 3.4rem;
  line-height: 1.32;
  color: #0f172a;
}

.post-hero__sub {
  max-width: 74rem;
  margin: 0;
  color: #64748b;
  font-size: 1.6rem;
  line-height: 1.85;
}

.post-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
  margin-top: 2rem;
  color: #94a3b8;
  font-size: 1.32rem;
}

.post-hero__meta-item i {
  margin-right: 0.4rem;
  color: #2563eb;
}

.post-hero__tag {
  padding: 0.35rem 1.05rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d7e5fb;
  color: #2563eb;
  font-size: 1.25rem;
  font-weight: 600;
}

@media (max-width: 899px) {
  .post-hero {
    padding: 2.2rem 2rem;
  }
  .post-hero h1.article-title {
    font-size: 2.5rem;
  }
}

/* ---------- 正文排版 ---------- */
.article-entry {
  margin-top: 1rem;
  font-size: 1.6rem;
  line-height: 1.95;
  color: #334155;
}

.article-entry h2 {
  margin: 4.6rem 0 1.8rem;
  padding-bottom: 1.1rem;
  font-size: 2.35rem;
  color: #0f172a;
  border-bottom: 1px dashed #dce4f0;
}

.article-entry h3 {
  margin: 3.2rem 0 1.4rem;
  font-size: 1.85rem;
  color: #0f172a;
}

.article-entry h4 {
  font-size: 1.65rem;
  color: #0f172a;
}

.article-entry p {
  margin: 1.7rem 0;
}

.article-entry ul,
.article-entry ol {
  margin: 1.7rem 0;
  padding-left: 2.4rem;
}

.article-entry li {
  margin: 0.75rem 0;
}

.article-entry strong {
  color: #0f172a;
}

.article-entry a {
  color: #2563eb;
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.35);
}

.article-entry a:hover {
  border-bottom-color: #2563eb;
}

/* 配图 */
.article-entry figure {
  margin: 3.2rem 0;
  padding: 2.4rem;
  border: 1px solid #eef1f6;
  border-radius: 1.4rem;
  background: #ffffff;
}

.article-entry figure img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 1rem;
}

.article-entry figcaption {
  margin-top: 1.4rem;
  text-align: center;
  color: #94a3b8;
  font-size: 1.25rem;
}

/* 引用 / 提示框 */
.article-entry blockquote {
  border-left: 0.4rem solid #2563eb;
  background: #f8fafc;
  border-radius: 0 1rem 1rem 0;
  padding: 1.5rem 1.8rem;
  color: #475569;
}

.callout {
  padding: 1.6rem 1.9rem;
  border: 1px solid;
  border-radius: 1.1rem;
  margin: 2.2rem 0;
  font-size: 1.5rem;
  line-height: 1.85;
}

.callout-tip {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a8a;
}

.callout-warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #78350f;
}

.callout-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #7f1d1d;
}

.callout strong {
  color: inherit;
}

/* 表格 */
.article-entry table {
  width: 100%;
  max-width: 100%;
  margin: 2.6rem 0;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e2e8f0;
  border-radius: 1.1rem;
  overflow: hidden;
  font-size: 1.4rem;
}

.article-entry table th {
  padding: 1.2rem 1.4rem;
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
  text-align: center;
  white-space: normal;
  border: none;
  border-bottom: 1px solid #e2e8f0;
}

.article-entry table td {
  padding: 1.1rem 1.4rem;
  border: none;
  border-top: 1px solid #eef1f6;
  white-space: normal;
}

.article-entry table tr:nth-child(even) td {
  background: #fafbfd;
}

/* 代码 */
.article-entry code {
  background: #eef2f7;
  color: #b45309;
  border-radius: 0.4rem;
  padding: 0.15em 0.45em;
}

/* ---------- 右侧目录（展开占满右侧一栏） ---------- */
.post-toc-fab {
  position: fixed;
  right: 2rem;
  top: 38%;
  z-index: 90;
  width: 4.6rem;
  height: 4.6rem;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  font-size: 2.2rem;
  cursor: pointer;
  box-shadow: 0 1rem 2.4rem rgba(37, 99, 235, 0.35);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, opacity 0.25s ease;
}

.post-toc-fab:hover {
  transform: scale(1.08);
}

.post-toc-fab.open,
body.toc-open .post-toc-fab {
  opacity: 0;
  pointer-events: none;
}

/* 目录栏：折叠时宽 0，展开时占 26rem 全高，贴住右侧边 */
.post-toc {
  flex: 0 0 auto;
  width: 0;
  min-width: 0;
  margin-left: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: width 0.32s ease, margin-left 0.32s ease, opacity 0.22s ease, visibility 0.32s;
}

.post-toc.open {
  width: 26rem;
  margin-left: 3rem;
  opacity: 1;
  visibility: visible;
}

.post-toc__inner {
  width: 26rem;
  height: 100%;
  overflow-y: auto;
  padding: 2.4rem 2.2rem;
  background: #ffffff;
  border-left: 1px solid #eef1f6;
  box-shadow: -0.8rem 0 2.4rem rgba(30, 41, 59, 0.06);
}

.post-toc__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eef1f6;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
}

.post-toc__close {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.2rem;
  line-height: 1;
}

.post-toc__close:hover {
  color: #2563eb;
}

.post-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-toc li {
  margin: 0.95rem 0;
  line-height: 1.55;
}

.post-toc li.lvl-3 {
  padding-left: 1.5rem;
}

.post-toc a {
  display: block;
  color: #64748b;
  font-size: 1.32rem;
  text-decoration: none;
  border: none;
  border-left: 2px solid transparent;
  padding-left: 1rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.post-toc a:hover {
  color: #2563eb;
}

.post-toc li.lvl-2 > a {
  font-weight: 600;
  color: #334155;
}

.post-toc li.lvl-2 > a:hover {
  color: #2563eb;
}

.post-toc a.active,
.post-toc li.lvl-2 > a.active {
  color: #2563eb;
  border-left-color: #2563eb;
}

/* 文末导航 */
.post-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  margin: 4.5rem 0 1rem;
  padding-top: 2.4rem;
  border-top: 1px solid #eef1f6;
}

.post-nav a {
  color: #64748b;
  font-size: 1.42rem;
  text-decoration: none;
  border: none;
}

.post-nav a:hover {
  color: #2563eb;
}

.post-nav__next {
  margin-left: auto;
  text-align: right;
}

/* 侧栏暗色开关按钮（文章页） */
.post-dark {
  display: inline-block;
  width: 3.4rem;
  height: 3.4rem;
  line-height: 3.4rem;
  border-radius: 50%;
  background: #eef1f6;
  color: #64748b;
  font-size: 1.6rem;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.2s;
}
.post-dark:hover {
  opacity: 0.8;
}

/* ---------- 首页卡片微调 ---------- */
.github-showcase {
  position: relative;
  overflow: hidden;
  margin: 2.8rem 0 3.6rem;
  padding: 3.4rem;
  border: 1px solid #e1e8f2;
  border-radius: 1.8rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1.4rem 3.4rem rgba(30, 41, 59, 0.07);
  backdrop-filter: blur(1rem);
}

.github-showcase::before {
  position: absolute;
  top: -7rem;
  right: -4rem;
  width: 19rem;
  height: 19rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.18), rgba(96, 165, 250, 0));
  content: "";
  pointer-events: none;
}

.github-showcase__eyebrow,
.featured-post__eyebrow {
  margin: 0 0 0.8rem;
  color: #2563eb;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.github-showcase h2 {
  position: relative;
  margin: 0;
  color: #0f172a;
  font-size: clamp(2.5rem, 3.2vw, 3.5rem);
  line-height: 1.2;
}

.github-showcase__intro {
  position: relative;
  max-width: 72rem;
  margin: 1.5rem 0 0;
  color: #475569;
  font-size: 1.55rem;
  line-height: 1.85;
}

.github-showcase__meta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.github-showcase__meta span,
.github-project__stack {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 1.2rem;
  font-weight: 600;
}

.github-showcase__meta span {
  padding: 0.6rem 1rem;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
}

.github-showcase__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
  margin: 2.5rem 0 1.9rem;
}

.github-project {
  display: flex;
  min-height: 20rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.2rem;
  border: 1px solid #e2e8f0;
  border-radius: 1.3rem;
  background: #fff;
  color: #475569;
  text-decoration: none;
  box-shadow: 0 0.8rem 1.8rem rgba(30, 41, 59, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.github-project:hover {
  transform: translateY(-0.35rem);
  border-color: #93c5fd;
  box-shadow: 0 1.4rem 2.6rem rgba(37, 99, 235, 0.12);
}

.github-project h3 {
  margin: 0;
  color: #0f172a;
  font-size: 2.2rem;
  line-height: 1.25;
}

.github-project h3::after {
  margin-left: 0.7rem;
  color: #2563eb;
  content: "↗";
  font-size: 1.5rem;
  vertical-align: 0.1em;
}

.github-project p {
  margin: 1.1rem 0 2rem;
  font-size: 1.4rem;
  line-height: 1.75;
}

.github-project__stack {
  width: fit-content;
  max-width: 100%;
  padding: 0.6rem 1rem;
  background: #f1f5f9;
  color: #475569;
  line-height: 1.45;
}

.github-showcase__more {
  position: relative;
  color: #1d4ed8;
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
}

.github-showcase__more:hover {
  color: #1e40af;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .github-showcase {
    margin: 2rem 0 2.8rem;
    padding: 2.4rem 2rem;
    border-radius: 1.4rem;
  }

  .github-showcase__grid {
    grid-template-columns: 1fr;
    margin-top: 2rem;
  }

  .github-project {
    min-height: 0;
    padding: 1.9rem;
  }
}

.articles .article-entry {
  border: none;
  padding: 0;
  background: transparent;
}

.articles .article-title {
  font-size: 2.2rem;
}

/* ---------- 404 页面 ---------- */
.notfound-card {
  margin: 8rem auto;
  max-width: 56rem;
  padding: 6rem 4rem;
  text-align: center;
  background: #ffffff;
  border: 1px solid #eef1f6;
  border-radius: 1.6rem;
  box-shadow: 0 1rem 3rem rgba(30, 41, 59, 0.06);
}

.notfound-card__code {
  margin: 0;
  font-size: 8rem;
  font-weight: 800;
  line-height: 1;
  color: #2563eb;
}

.notfound-card__title {
  margin: 1.6rem 0 1rem;
  font-size: 2.6rem;
  color: #0f172a;
}

.notfound-card__desc {
  margin: 0 0 2.6rem;
  color: #64748b;
  font-size: 1.5rem;
}

.notfound-card__btn {
  display: inline-block;
  padding: 1.1rem 2.4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  font-size: 1.5rem;
  text-decoration: none;
  box-shadow: 0 0.8rem 2rem rgba(37, 99, 235, 0.3);
  transition: transform 0.2s ease;
}

.notfound-card__btn:hover {
  transform: translateY(-0.2rem);
}

body.darkmode .notfound-card {
  background: #111a2c;
  border-color: #1e293b;
  box-shadow: none;
}

body.darkmode .notfound-card__title {
  color: #f1f5f9;
}

body.darkmode .notfound-card__desc {
  color: #94a3b8;
}

/* ---------- 深色模式适配 ---------- */
body.darkmode {
  background: #0b1220;
}

body.darkmode .sidebar {
  background: #111a2c;
  border-right-color: #1e293b;
  box-shadow: none;
}

body.darkmode .navbar .nav .nav-item-link,
body.darkmode .navbar-bottom .nav .nav-item-link {
  color: #cbd5e1;
}

body.darkmode .navbar .nav .nav-item-link:hover,
body.darkmode .navbar-bottom .nav .nav-item-link:hover {
  background: #1e293b;
  color: #60a5fa;
}

body.darkmode .sidebar::after {
  color: #64748b;
}

body.darkmode .post-body .article,
body.darkmode .outer > .article,
body.darkmode .post-toc__inner,
body.darkmode .article-entry figure,
body.darkmode .featured-post__link,
body.darkmode .github-showcase {
  background: #111a2c;
  border-color: #1e293b;
  box-shadow: none;
}

body.darkmode .github-showcase h2,
body.darkmode .github-project h3 {
  color: #f1f5f9;
}

body.darkmode .github-showcase__intro,
body.darkmode .github-project,
body.darkmode .github-project__stack {
  color: #cbd5e1;
}

body.darkmode .github-showcase__meta span {
  border-color: #1e3a5f;
  background: #10233f;
  color: #93c5fd;
}

body.darkmode .github-project {
  border-color: #26364d;
  background: #172033;
  box-shadow: none;
}

body.darkmode .github-project__stack {
  background: #243247;
}

body.darkmode .post-hero {
  background: linear-gradient(135deg, #14213d 0%, #111a2c 100%);
  border-color: #1e293b;
}

body.darkmode .post-hero h1.article-title,
body.darkmode .post-toc__title,
body.darkmode .article-entry h2,
body.darkmode .article-entry h3,
body.darkmode .article-entry h4,
body.darkmode .article-entry strong {
  color: #f1f5f9;
}

body.darkmode .article-entry {
  color: #cbd5e1;
}

body.darkmode .post-hero__sub {
  color: #94a3b8;
}

body.darkmode .article-entry table th {
  background: #1e293b;
  color: #f1f5f9;
  border-bottom-color: #334155;
}

body.darkmode .article-entry table td {
  border-top-color: #1e293b;
}

body.darkmode .article-entry table tr:nth-child(even) td {
  background: #0f172a;
}

body.darkmode .article-entry table {
  border-color: #334155;
}

body.darkmode .article-entry code {
  background: #1e293b;
  color: #fbbf24;
}

body.darkmode .article-entry blockquote {
  background: #0f172a;
  color: #cbd5e1;
}

body.darkmode .callout-tip {
  background: #14213d;
  border-color: #1e3a8a;
  color: #bfdbfe;
}

body.darkmode .callout-warn {
  background: #2b2118;
  border-color: #78350f;
  color: #fde68a;
}

body.darkmode .callout-danger {
  background: #2b1517;
  border-color: #7f1d1d;
  color: #fecaca;
}

body.darkmode .post-nav a {
  color: #94a3b8;
}

body.darkmode .post-nav a:hover {
  color: #60a5fa;
}

body.darkmode .post-toc a {
  color: #94a3b8;
}

body.darkmode .post-toc a:hover,
body.darkmode .post-toc a.active,
body.darkmode .post-toc li.lvl-2 > a.active {
  color: #60a5fa;
  border-left-color: #60a5fa;
}

body.darkmode .post-toc li.lvl-2 > a {
  color: #cbd5e1;
}

body.darkmode .post-toc__close {
  color: #64748b;
}

/* 后训练能力整合文章 */
.post-visual{margin:0 0 2.6rem}.post-visual img{border-radius:1.2rem;box-shadow:0 1.4rem 3.6rem rgba(15,23,42,.18)}.post-visual figcaption,.post-diagram figcaption{margin-top:.8rem;color:#64748b;text-align:center;font-size:1.3rem}.post-callout{margin:2rem 0;padding:1.5rem 1.8rem;border-left:.4rem solid #6d28d9;border-radius:.8rem;background:#f5f3ff;color:#312e81}.integration-map{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;margin:2rem 0}.integration-map>div{padding:1.2rem;border:1px solid #dbe4f0;border-radius:.8rem;background:#fff}.integration-map b,.integration-map span{display:block}.integration-map span{margin-top:.4rem;color:#64748b;font-size:1.25rem;line-height:1.5}.integration-map__accent{border-color:#8b5cf6!important;background:#faf5ff!important}.post-diagram{padding:1.8rem;margin:2.2rem 0;border:1px solid #dbe4f0;border-radius:1.2rem;background:linear-gradient(135deg,#f8fbff,#f5f3ff)}.diagram-row{display:flex;align-items:center;justify-content:center;gap:.8rem;flex-wrap:wrap;text-align:center}.diagram-row span,.diagram-row b,.diagram-row strong{padding:1rem;border-radius:.7rem;background:#fff;box-shadow:0 .2rem .8rem rgba(15,23,42,.08)}.diagram-row strong{background:#ede9fe;color:#4c1d95}.diagram-row i{font-style:normal;font-size:2rem;color:#7c3aed}.table-scroll{margin:1.8rem 0;overflow-x:auto}.table-scroll table{min-width:680px;border-collapse:collapse}.table-scroll th{background:#312e81;color:#fff}.table-scroll th,.table-scroll td{padding:1rem;border:1px solid #dbe4f0;text-align:left;vertical-align:top}.table-scroll tr:nth-child(even){background:#fafaff}.interview{margin:2rem 0;padding:1.4rem 1.7rem;border-radius:1rem;background:#eff6ff;border:1px solid #bfdbfe}.interview p{margin:.4rem 0}.post-references{font-size:1.35rem;word-break:break-word}.inline-formula{display:inline-block;padding:.1rem .55rem;border-radius:.45rem;background:#eef2ff;color:#3730a3;font-family:"SFMono-Regular",Consolas,monospace;font-size:.9em}.route-detail{margin:1.8rem 0;padding:1.4rem 1.7rem;border:1px solid #dbe4f0;border-radius:1rem;background:#f8fafc}.route-detail b{color:#1e3a8a}.route-detail ul{margin:.7rem 0 0 1.7rem}.route-detail li{margin:.55rem 0;line-height:1.65}.process-list{margin:1.7rem 0;padding:1.7rem 1.8rem 1.7rem 4.1rem;border:1px solid #ddd6fe;border-radius:1rem;background:#faf5ff;counter-reset:process}.process-list li{padding-left:.4rem;margin:.95rem 0;line-height:1.7}.process-list li::marker{color:#6d28d9;font-weight:800} @media(max-width:899px){.integration-map{grid-template-columns:repeat(2,1fr)}}body.darkmode .post-callout{background:#2e1065;color:#ede9fe}body.darkmode .integration-map>div,body.darkmode .post-diagram,body.darkmode .route-detail{background:#172033;border-color:#334155}body.darkmode .integration-map span,body.darkmode .post-visual figcaption,body.darkmode .post-diagram figcaption{color:#94a3b8}body.darkmode .diagram-row span,body.darkmode .diagram-row b{background:#1e293b}body.darkmode .interview{background:#172554;border-color:#1d4ed8}body.darkmode .inline-formula{background:#312e81;color:#ddd6fe}body.darkmode .process-list{border-color:#5b21b6;background:#22143e}.post-body .article-entry h3{margin-top:2.8rem;color:#312e81;font-size:2rem}.post-body .article-entry h3::before{content:"";display:inline-block;width:.45rem;height:1.4em;margin-right:.8rem;border-radius:99px;background:#8b5cf6;vertical-align:-.26em}body.darkmode .post-body .article-entry h3{color:#c4b5fd}

body.darkmode .featured-post__body h2 {
  color: #f1f5f9;
}

body.darkmode .featured-post__body p {
  color: #cbd5e1;
}

body.darkmode .local-search {
  background: #111a2c;
}

/* SVG 配图在深色模式下反色显示 */
body.darkmode .article-entry figure img[src$=".svg"],
body.darkmode .featured-post__badge {
  filter: invert(0.9) hue-rotate(180deg);
}

/* ---------- 移动端：目录变为全高右侧抽屉（覆盖式） ---------- */
@media (max-width: 899px) {
  .post-layout {
    display: block;
  }
  .post-toc-fab {
    right: 1.4rem;
    top: auto;
    bottom: 7.5rem;
    width: 4.2rem;
    height: 4.2rem;
    font-size: 2rem;
  }
  .post-toc,
  .post-toc.open {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: min(30rem, 88vw);
    height: 100vh;
    margin-left: 0;
    max-width: none;
    z-index: 96;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
  }
  .post-toc.open {
    transform: translateX(0);
  }
  .post-toc__inner {
    width: 100%;
    height: 100%;
  }
}
