/* ============================================
   page / archive / category / tag 类
   header banner 修复 + 模糊化（与文章页视觉语言统一）

   实现：主题模板已注入 CSS 变量 --page-bg 到 header inline style
        （见 header/index.pug 改造）
        这里用 ::before 伪元素承载背景图 + filter:blur，
        nav 和标题 (z-index:1) 保持清晰。
   ============================================ */

header#page-header.not-home-page {
  position: relative;
  overflow: hidden;
}

header#page-header.not-home-page::before {
  content: '';
  position: absolute;
  /* 用 -20px 让 blur 边缘溢出区不露白边 */
  inset: -20px;
  background-image:
    linear-gradient(135deg, rgba(15, 37, 80, .55) 0%, rgba(0, 0, 0, .35) 100%),
    var(--page-bg, url('/images/banners/default.jpg'));
  background-size: cover;
  background-position: center 40%;
  filter: blur(10px) brightness(60%);
  z-index: 0;
  pointer-events: none;
}

/* 让 header 内部所有内容（nav、标题等）压在背景之上保持清晰 */
header#page-header.not-home-page > * {
  position: relative;
  z-index: 1;
}

/* ============================================
   about 页"我的照片"卡片：让图片靠上对齐
   ============================================ */
.author-content-item.myphoto img {
  object-position: center 25% !important;
}

/* ============================================
   about 页"实验数据"卡（zhheo 风深色大数字卡）
   通栏一行，4 个数据等宽
   ============================================ */
.author-content-item.experimentData {
  width: 100% !important;
  background: linear-gradient(135deg, #0e1421 0%, #1a2238 100%);
  color: #fff;
  min-height: 200px;
  position: relative;
  overflow: hidden;
}

.author-content-item.experimentData::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(83, 119, 198, 0.3) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(176, 79, 230, 0.25) 0%, transparent 40%);
  pointer-events: none;
}

.author-content-item.experimentData .card-content {
  padding: 28px 32px !important;
  position: relative;
  z-index: 1;
}

.author-content-item.experimentData .author-content-item-tips {
  color: rgba(255, 255, 255, 0.55) !important;
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.author-content-item.experimentData .author-content-item-title {
  color: #fff !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  margin-bottom: 28px !important;
  display: block;
}

.experiment-data-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: end;
}

.experiment-data-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
}

.experiment-data-number {
  font-size: 56px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 6px;
  font-feature-settings: "tnum"; /* 等宽数字 */
}

.experiment-data-unit {
  display: inline-block;
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  margin-left: 6px;
  margin-top: -32px; /* 让单位贴在数字旁边而不是下面 */
  position: relative;
  top: -22px;
  vertical-align: top;
}

.experiment-data-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* 单位放在数字右上的小写法（重写） */
.experiment-data-item {
  position: relative;
}

.experiment-data-item .experiment-data-number {
  display: inline-block;
}

.experiment-data-item .experiment-data-unit {
  display: inline-block;
  font-size: 14px;
  margin-left: 4px;
  position: static;
  top: 0;
  vertical-align: baseline;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  margin-top: 0;
}

/* 移动端响应：4 列变 2x2 */
@media screen and (max-width: 768px) {
  .experiment-data-group {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 16px;
  }
  .experiment-data-number {
    font-size: 40px;
  }
}

/* ============================================
   about 页"轨迹 / 从 0 到 BQ"时间线卡（zhheo 风）
   通栏一行，4 个节点等距，渐变连线
   ============================================ */
.author-content-item.timeline {
  width: 100% !important;
  background: var(--anzhiyu-card-bg);
  min-height: 220px;
}

.author-content-item.timeline .card-content {
  padding: 28px 32px !important;
}

.author-content-item.timeline .author-content-item-title {
  font-size: 28px !important;
  font-weight: 700 !important;
  margin-bottom: 24px !important;
  display: block;
}

.timeline-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 16px;
  padding: 28px 0 8px;
}

.timeline-line {
  position: absolute;
  top: 35px; /* 让线穿过圆点中心 */
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: linear-gradient(90deg, #357ef5 0%, #43a6c6 33%, #c69043 66%, #b04fe6 100%);
  opacity: 0.4;
}

.timeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--node-color);
  border: 4px solid var(--anzhiyu-card-bg);
  box-shadow: 0 0 0 2px var(--node-color), 0 4px 12px rgba(0,0,0,0.08);
  position: relative;
  z-index: 2;
}

.timeline-info {
  text-align: center;
  margin-top: 16px;
  padding: 0 8px;
}

.timeline-date {
  font-size: 13px;
  color: var(--anzhiyu-fontcolor);
  opacity: 0.55;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.timeline-label {
  font-size: 17px;
  font-weight: 700;
  margin-top: 6px;
  color: var(--anzhiyu-fontcolor);
}

.timeline-sub {
  font-size: 12px;
  color: var(--anzhiyu-secondtext);
  margin-top: 4px;
  opacity: 0.7;
}

/* 移动端：横线变竖排 */
@media screen and (max-width: 768px) {
  .timeline-track {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 16px 0;
  }
  .timeline-line {
    display: none;
  }
  .timeline-node {
    flex-direction: row;
    align-items: center;
    text-align: left;
  }
  .timeline-info {
    text-align: left;
    margin-top: 0;
    margin-left: 16px;
    flex: 1;
  }
}

/* ============================================
   about 页"装备卡"（zhheo 风大背景图卡）
   左右各一，背景图 + 暗蒙版 + 白字压上
   ============================================ */
.author-content-item.gear-card {
  min-height: 240px;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  color: #fff;
  cursor: default;
}

/* 没图时用渐变 fallback（用 yml 的 color 字段） */
.author-content-item.gear-card.gear-no-bg {
  background-image: linear-gradient(135deg, var(--gear-color, #357ef5) 0%, #1a2238 100%);
}

/* 图片暗蒙版（用伪元素，让背景图统一变深，文字可读） */
.author-content-item.gear-card.gear-with-bg .gear-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.65) 100%);
  z-index: 1;
}
.author-content-item.gear-card.gear-no-bg .gear-overlay {
  display: none;
}

.author-content-item.gear-card .card-content {
  position: relative;
  z-index: 2;
  padding: 24px 28px !important;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: flex-end;
}

.gear-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  letter-spacing: 1px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 4px 12px;
  border-radius: 999px;
  color: #fff;
  margin-bottom: 12px;
}

.gear-name {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.gear-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.3px;
}

/* 移动端：上下堆叠 */
@media screen and (max-width: 768px) {
  .author-content-item.gear-card {
    min-height: 180px;
  }
  .gear-name {
    font-size: 26px;
  }
}

/* ============================================
   about 页"心路历程·为什么叫熵减实验室"长文卡
   位置 2 收尾大段。视觉 B：浅色微渐变 + 大字克制。
   ============================================ */
.author-content-item.manifesto {
  width: 100% !important;
  background: linear-gradient(135deg,
    var(--anzhiyu-card-bg) 0%,
    rgba(53, 126, 245, 0.04) 50%,
    var(--anzhiyu-card-bg) 100%);
  min-height: auto;
  padding: 0;
}

/* 关键修复：anzhiyu 主题把 .card-content 设为 position:absolute,
   导致 manifesto 卡父容器高度坍缩成 0（只显示一条横线）。
   这里改回 position:relative 让内容撑开父容器。 */
.author-content-item.manifesto .card-content {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  padding: 56px 48px !important;
  max-width: 760px;
  margin: 0 auto;
  box-sizing: border-box;
}

.author-content-item.manifesto .author-content-item-tips {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--anzhiyu-secondtext);
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0.7;
}

.manifesto-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--anzhiyu-fontcolor);
  margin: 0 0 32px 0 !important;
  line-height: 1.3;
  border: none !important;
  padding: 0 !important;
}

.manifesto-body {
  font-size: 16px;
  line-height: 1.85;
  color: var(--anzhiyu-fontcolor);
}

.manifesto-p {
  margin: 0 0 18px 0 !important;
}

.manifesto-p strong {
  font-weight: 700;
  color: var(--anzhiyu-theme, #357ef5);
}

.manifesto-quote {
  margin: 24px 0 !important;
  padding: 18px 22px !important;
  border-left: 3px solid var(--anzhiyu-theme, #357ef5);
  background: rgba(53, 126, 245, 0.06);
  border-radius: 0 8px 8px 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--anzhiyu-secondtext);
}

.manifesto-quote strong {
  color: var(--anzhiyu-fontcolor);
  font-weight: 700;
}

/* 移动端 */
@media screen and (max-width: 768px) {
  .author-content-item.manifesto .card-content {
    padding: 36px 24px !important;
  }
  .manifesto-title {
    font-size: 28px;
  }
  .manifesto-body {
    font-size: 15px;
  }
}
