/* ============================================================
   青朗先锋 · 设计系统
   结构色：藏青 #1C2E54（警服蓝）
   强调色：印章红 #A63A2B（仅用于奖项级别、关键强调，克制使用）
   底色：纸白 #FAFAF8 · 墨色 #1C1B18
   圆角体系：面板 12px / 图卡内芯 6px / 交互元素全圆角（pill）
   ============================================================ */

:root {
  --paper: #fafaf8;
  --paper-2: #f3f2ed;
  --mat: #ffffff;
  --ink: #1c1b18;
  --ink-2: #57544c;
  /* 原值 #8a867b 在纸白底上只有 3.48:1，未达 WCAG AA（4.5:1）；加深到 5.2:1 */
  --ink-3: #6d6960;
  --navy: #1c2e54;
  --navy-deep: #13203c;
  --navy-soft: #4a5b82;
  --seal: #a63a2b;
  --seal-deep: #8c2f22;
  --hairline: rgba(28, 27, 24, 0.14);
  --hairline-soft: rgba(28, 27, 24, 0.08);
  --shadow-mat: 0 1px 2px rgba(28, 27, 24, 0.04), 0 10px 30px rgba(28, 27, 24, 0.07);
  --shadow-lift: 0 2px 4px rgba(28, 27, 24, 0.05), 0 18px 44px rgba(28, 27, 24, 0.12);
  /* 图卡外壳的内高光，让卡片像一块有厚度的托板，而不是贴在背景上的纸片 */
  --shadow-bezel: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --r-panel: 14px;
  --r-inner: 8px;
  --r-bezel: 6px;   /* 外壳内边距：14 − 6 = 8，与内芯圆角同心 */
  /* 标题衬线：站点自托管 Noto Serif SC 子集（assets/css/fonts.css）。
     后面几个是拿不到时逐级回落的系统宋体：思源宋体 → 华文中宋 → 宋体。
     中文都是全角等宽，换字体不会造成排版位移，所以可以放心用 font-display: swap。 */
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", "STZhongsong", "SimSun", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(166, 58, 43, 0.16); }

/* 等宽数字（统计、年份、证书编号更整齐） */
body { font-variant-numeric: tabular-nums; }

/* 大标题避免孤字换行 */
.hero-title, .section-title, .masthead-name { text-wrap: balance; }

/* 跳转正文链接（键盘可达） */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 80;
  background: var(--navy);
  color: var(--paper);
  padding: 10px 18px;
  border-radius: 0 0 8px 0;
  font-size: 14px;
}
.skip-link:focus { left: 0; top: 0; }

/* 年级筛选 */
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: 999px;
  /* 10px 内边距 + 44px 最小高度：触屏上刚好达到推荐的可点尺寸 */
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--hairline);
  transition: transform 160ms ease-out, background 200ms ease-out, color 200ms ease-out, box-shadow 200ms ease-out;
}
.filter-chip:active { transform: scale(0.96); }
.filter-chip:hover { color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy-soft); }
.filter-chip.active { background: var(--navy); color: var(--paper); box-shadow: inset 0 0 0 1px var(--navy); }
.filter-chip .chip-count {
  margin-left: 8px;
  font-size: 11.5px;
  font-weight: 600;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}
.filter-chip.active .chip-count { opacity: 0.8; }

/* 纸张颗粒（固定层，不参与滚动重绘） */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; }

/* 图片解码完成后淡入，避免生硬地"啪"一下跳出来 */
img.img-fade { opacity: 0; }
img.img-fade.img-in { opacity: 1; transition: opacity 0.55s var(--ease-out); }

a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

/* 焦点环：在印章红外面再衬一圈纸白，任何背景（含首屏深藏青）上都看得清。
   注意别在这里写 border-radius —— 它的特异性与 .filter-chip / .cert-item / .btn 相同，
   写在后面会把这些胶囊控件的圆角改成 2px，聚焦时出现一次圆角跳变。 */
:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 3px;
  box-shadow: 0 0 0 1px rgba(250, 250, 248, 0.9);
}

.wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

/* ---------- 启动占位 ---------- */
.boot-splash {
  min-height: 60vh;
  display: grid;
  place-items: center;
}
.boot-seal {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--seal);
  border: 2px solid var(--seal);
  border-radius: 8px;
  padding: 10px 14px;
  letter-spacing: 0.2em;
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 250, 248, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline-soft);
  transition: box-shadow 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
/* 滚过首屏后导航浮起来，和内容分层 */
body.scrolled .nav {
  border-bottom-color: transparent;
  box-shadow: 0 10px 34px rgba(19, 32, 60, 0.1);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 6px;
}
.nav-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--mat);
  border: 1px solid var(--hairline-soft);
  flex: none;
}
/* 徽标素材本身已是居中的正方形，这里只管铺满，不再用手工百分比偏移 */
.nav-mark img { width: 100%; height: 100%; object-fit: contain; }
.nav-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.12em;
  color: var(--navy);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14.5px;
  color: var(--ink-2);
}
/* padding 把点击热区撑到 45px 高（原来只有 23px，低于 WCAG 2.5.8 的 24px 下限）；
   导航栏本身高度固定，这点内边距不会改变外观，只是让手指/鼠标更好点 */
.nav-links a {
  position: relative;
  padding-block: 11px;
  transition: color 0.25s var(--ease-out);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s var(--ease-out);
}
.nav-links a:hover { color: var(--seal); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links .nav-strong { color: var(--navy); font-weight: 600; }
/* 滚动到对应区块时，导航链接保持高亮（scroll-spy） */
.nav-links a.current { color: var(--seal); }
.nav-links a.current::after { transform: scaleX(1); }
@media (max-width: 640px) {
  .nav-links { gap: 18px; font-size: 13.5px; }
}

/* ---------- 藏青刊头（年鉴封面） ---------- */
.hero-dark {
  background:
    radial-gradient(1100px 480px at 88% -12%, rgba(94, 116, 165, 0.32), transparent 62%),
    linear-gradient(180deg, var(--navy-deep) 0%, #17274a 74%, #1b2c50 100%);
  color: var(--paper);
  position: relative;
}
/* 刊头上的测绘坐标网格：极淡的十字线，只作质感、不抢信息。
   上下用 mask 淡出，避免与导航底边、刊头下缘硬切。 */
.hero-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(250, 250, 248, 0.028) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(90deg, rgba(250, 250, 248, 0.028) 0 1px, transparent 1px 72px);
  mask-image: linear-gradient(180deg, transparent 0, #000 72px, #000 calc(100% - 96px), transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 72px, #000 calc(100% - 96px), transparent 100%);
}
.hero-dark > .wrap { position: relative; }
.hero-dark .hero-eyebrow { color: rgba(250, 250, 248, 0.58); }
.hero-dark .hero-title { color: var(--paper); text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25); }
.hero-dark .hero-tagline { color: rgba(250, 250, 248, 0.76); }
.hero-dark .btn-primary {
  background: var(--paper);
  color: var(--navy-deep);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
}
.hero-dark .btn-primary:hover { background: #ffffff; transform: translateY(-2px); }
.hero-dark .btn-ghost {
  color: rgba(250, 250, 248, 0.92);
  box-shadow: inset 0 0 0 1px rgba(250, 250, 248, 0.38);
}
.hero-dark .btn-ghost:hover { box-shadow: inset 0 0 0 1px rgba(250, 250, 248, 0.75); transform: translateY(-2px); }
.hero-dark .hero-photo {
  background: rgba(250, 250, 248, 0.07);
  border-color: rgba(250, 250, 248, 0.16);
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(250, 250, 248, 0.14);
}
.hero-dark .stats { border-top-color: rgba(250, 250, 248, 0.16); }
.hero-dark .stat-num { color: var(--paper); }
.hero-dark .stat-label { color: rgba(250, 250, 248, 0.58); }

/* 印章 */
.hero-seal-row { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.hero-seal-row .hero-eyebrow { margin-bottom: 0; }
.hero-seal {
  width: 56px;
  height: 56px;
  flex: none;
  border: 2px solid var(--seal);
  border-radius: 8px;
  padding: 3px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  /* 四字两行两列：字号从 19px 收到 17px，字与边框之间才有一口气 */
  font-size: 17px;
  line-height: 1;
  color: var(--seal);
  background: rgba(166, 58, 43, 0.07);
  transform: rotate(-3.5deg);
  box-shadow: 0 4px 14px rgba(166, 58, 43, 0.25), inset 0 0 0 1px rgba(166, 58, 43, 0.18);
}
.hero-seal span { display: block; }
.hero-dark .hero-seal {
  color: #d0674f;
  border-color: #d0674f;
  background: rgba(208, 103, 79, 0.1);
}

/* ---------- 首屏开场编排（仅首页渲染时） ---------- */
.anim-home .hero-seal {
  animation: seal-stamp 0.55s cubic-bezier(0.23, 1, 0.32, 1) 0.08s both;
}
.anim-home .hero-title {
  animation: hero-rise 0.6s var(--ease-out) 0.28s both;
}
.anim-home .hero-tagline {
  animation: hero-rise 0.6s var(--ease-out) 0.4s both;
}
.anim-home .hero-cta {
  animation: hero-rise 0.6s var(--ease-out) 0.52s both;
}
.anim-home .hero-photo {
  animation: photo-reveal 0.9s var(--ease-out) 0.42s both;
}
@keyframes seal-stamp {
  0% { opacity: 0; transform: rotate(-18deg) scale(1.35); }
  55% { opacity: 1; }
  100% { opacity: 1; transform: rotate(-3.5deg) scale(1); }
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
@keyframes photo-reveal {
  from { clip-path: inset(100% 0 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* ---------- 首页：首屏 ---------- */
.hero {
  padding-block: clamp(56px, 8vw, 110px) clamp(40px, 5vw, 72px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.32em;
  color: var(--navy-soft);
  margin-bottom: 22px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(52px, 7.5vw, 92px);
  line-height: 1.08;
  letter-spacing: 0.06em;
  color: var(--navy);
  margin-bottom: 26px;
}
.hero-tagline {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--ink-2);
  max-width: 22em;
  margin-bottom: 36px;
  text-wrap: pretty;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 13px 30px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--navy);
  color: var(--paper);
  box-shadow: 0 10px 26px rgba(28, 46, 84, 0.28);
}
.btn-primary:hover { background: var(--navy-deep); transform: translateY(-2px); }
.btn-ghost {
  color: var(--navy);
  box-shadow: inset 0 0 0 1px var(--hairline);
  background: transparent;
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--navy-soft); transform: translateY(-2px); }

.hero-photo {
  background: var(--paper-2);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-panel);
  padding: var(--r-bezel);
  box-shadow: var(--shadow-mat), var(--shadow-bezel);
  cursor: zoom-in;
  transition: transform 0.24s var(--ease-out), box-shadow 0.24s var(--ease-out);
}
.hero-photo:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-inner);
}
/* 合照题字：装裱托板上的铭文行，和奖状画廊的图注同一套做法 */
.hero-photo-cap {
  padding: 11px 6px 3px;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-align: center;
  color: var(--ink-3);
}
.hero-dark .hero-photo-cap { color: rgba(250, 250, 248, 0.62); }

/* 数据条 */
.stats {
  border-top: 1px solid var(--hairline-soft);
  margin-top: clamp(36px, 5vw, 64px);
  padding-top: clamp(28px, 4vw, 44px);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
/* 数据之间用极细分隔线，读起来更像年鉴数据条 */
.hero-dark .stat + .stat {
  border-left: 1px solid rgba(250, 250, 248, 0.14);
  padding-left: clamp(18px, 2.4vw, 30px);
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(30px, 3.4vw, 44px);
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.stat-label {
  font-size: 13.5px;
  color: var(--ink-2);
  margin-top: 6px;
  /* 窄屏两列时避免"（人次）"被拆行：让多行尽量均匀 */
  text-wrap: balance;
}

/* 锚点定位时避开吸顶导航 */
.member-section, .section, .stats { scroll-margin-top: 84px; }

/* ---------- 通用区块 ---------- */
.section { padding-block: clamp(76px, 10vw, 148px); }
.section-tint { background: var(--paper-2); }
.section-head { margin-bottom: clamp(32px, 4vw, 56px); }
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(27px, 3vw, 38px);
  letter-spacing: 0.04em;
  color: var(--navy);
  line-height: 1.25;
}
.section-title::after {
  content: "";
  display: block;
  width: 38px;
  height: 3px;
  border-radius: 2px;
  background: var(--seal);
  margin-top: 16px;
}
.section-sub {
  margin-top: 14px;
  color: var(--ink-2);
  max-width: 42em;
  font-size: 15.5px;
}

/* ---------- 研究方向（编辑式章节行） ---------- */
.theme-row {
  display: grid;
  /* 第一列要给"网络空间安全与取证"这种 9 字标题留够位置，
     否则会在"取/证"之间断行、末行只剩一个字（text-wrap: balance 也救不了）。
     第三列（配图）随视口在 200–268px 之间伸缩：宽屏放大一点图版才有存在感，
     窄屏收到下限，避免把中间的说明列挤扁。 */
  grid-template-columns: minmax(180px, 3.2fr) 5.4fr clamp(200px, 21vw, 268px);
  gap: clamp(20px, 3.4vw, 48px);
  padding-block: clamp(28px, 3.4vw, 44px);
  border-top: 1px solid var(--hairline);
  align-items: center;
  transition: background-color 0.35s var(--ease-out);
}
/* 整行是一个 hover 单元：极淡的藏青染色，像表格里被挑中的那一行档案 */
.theme-row:hover { background-color: rgba(28, 46, 84, 0.028); }
.theme-row:last-child { border-bottom: 1px solid var(--hairline); }
/* 章节序号：年鉴式的编辑感锚点 */
.theme-lead { display: flex; align-items: baseline; gap: 14px; }
.theme-index {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--seal);
  font-variant-numeric: tabular-nums;
}
.theme-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2vw, 25px);
  color: var(--ink);
  text-wrap: balance;
  transition: color 0.3s var(--ease-out);
}
.theme-row:hover .theme-name { color: var(--seal); }
.theme-desc {
  color: var(--ink-2);
  font-size: 15.5px;
  max-width: 46em;
}
.theme-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
/* 配图托板：和首屏合照、奖状画廊同一套"装裱"语言（外壳 + 内芯同心圆角） */
.theme-plate {
  margin: 0;
  background: var(--mat);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-panel);
  padding: var(--r-bezel);
  box-shadow: var(--shadow-mat), var(--shadow-bezel);
  cursor: zoom-in;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.theme-row:hover .theme-plate { transform: translateY(-3px); box-shadow: var(--shadow-lift), var(--shadow-bezel); }
.theme-plate:focus-visible { outline-offset: 3px; }
.theme-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  /* object-position 默认 50% 50%：竖长的作品海报会被裁到正中间那一段，
     什么都看不出来。竖版海报在 data.js 里标 pos:"top"，从顶部（标题区）开始显示。 */
  object-position: center;
  border-radius: var(--r-inner);
  background: var(--paper-2);
  display: block;
  transition: transform 0.5s var(--ease-out);
}
.theme-img.is-top { object-position: top center; }
.theme-plate:hover .theme-img { transform: scale(1.03); }
.tag {
  font-size: 12.5px;
  color: var(--navy);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px 13px;
  background: var(--mat);
}
@media (max-width: 800px) {
  .theme-row { grid-template-columns: 1fr; gap: 12px; }
  .theme-plate { max-width: 420px; }
}

/* ---------- 成员目录 ---------- */
.cohort { margin-bottom: clamp(40px, 5vw, 64px); }
.cohort:last-child { margin-bottom: 0; }
.cohort-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 22px;
  position: relative;
  z-index: 0;
}
/* 年鉴式章节水印：右侧超大年份数字，淡到只作层次，不抢信息 */
.cohort-head::after {
  content: attr(data-year);
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-56%);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 7vw, 96px);
  line-height: 1;
  color: var(--navy);
  opacity: 0.055;
  pointer-events: none;
  user-select: none;
  z-index: -1;
}
.cohort-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  color: var(--navy);
  letter-spacing: 0.08em;
}
.cohort-count { font-size: 13px; color: var(--ink-3); }
.cohort-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 22px;
}
.member-card {
  display: block;
  border-radius: var(--r-panel);
  transition: transform 0.24s var(--ease-out);
}
.member-card:hover { transform: translateY(-5px); }
.member-card .ph {
  position: relative;
  border-radius: var(--r-panel);
  overflow: hidden;
  border: 1px solid var(--hairline-soft);
  background: var(--paper-2);
  box-shadow: var(--shadow-mat);
  transition: box-shadow 0.24s var(--ease-out), border-color 0.24s var(--ease-out);
}
/* 档案色罩：28 张肖像来自完全不同的场合（白底证件照、蓝底证件照、夜景、玻璃反光……），
   静置时统一罩一层极淡的藏青，整片卡片墙才像同一套档案；悬停时褪去、恢复彩色。
   只压 5%–13%，肉眼看不出"加了滤镜"，但底色差异会明显收敛。 */
.member-card .ph::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(19, 32, 60, 0.05) 0%, rgba(19, 32, 60, 0.13) 100%);
  pointer-events: none;
  transition: opacity 0.45s var(--ease-out);
}
.member-card:hover .ph::after { opacity: 0; }
.member-card:hover .ph { box-shadow: var(--shadow-lift); border-color: rgba(28, 46, 84, 0.3); }
.member-card .ph img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: saturate(0.75) contrast(1.02);
  transition: transform 0.5s var(--ease-out), filter 0.5s var(--ease-out);
}
.member-card:hover .ph img { transform: scale(1.035); filter: saturate(1.05) contrast(1); }
.member-card .ph .ph-fallback {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  color: var(--navy-soft);
  background: linear-gradient(160deg, var(--paper-2), #e7e5de);
}
.member-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17.5px;
  margin-top: 12px;
  color: var(--ink);
}
/* 悬停时名字下长出一道印章红短线，作为可点击的微提示 */
.member-name::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--seal);
  margin-top: 8px;
  transition: width 0.32s var(--ease-out);
}
.member-card:hover .member-name::after,
.member-card:focus-visible .member-name::after { width: 26px; }
.member-meta { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
/* 荣誉行：国家级用印章红、省级用藏青，和奖状徽章的配色语义一致 */
.member-honor {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 6px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 5px;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.member-honor .h-n { color: var(--seal); }
.member-honor .h-p { color: var(--navy-soft); }
.member-honor .h-sep { color: var(--hairline); font-weight: 400; }
.member-honor .h-unit { color: var(--ink-3); font-weight: 500; }

/* ---------- 团队照片横带 ---------- */
.strip {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--hairline) transparent;
}
.strip-item {
  flex: none;
  width: 300px;
  scroll-snap-align: start;
  cursor: zoom-in;
}
.strip-item img {
  width: 300px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--r-panel);
  border: 1px solid var(--hairline-soft);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.strip-item:hover img { transform: translateY(-4px); box-shadow: var(--shadow-mat); }
.strip-item figcaption { font-size: 12.5px; color: var(--ink-3); margin-top: 9px; }

/* ---------- 页脚 ---------- */
.footer {
  background: var(--navy-deep);
  color: rgba(250, 250, 248, 0.82);
  margin-top: clamp(48px, 6vw, 80px);
}
/* 页脚三栏：品牌 / 站内导航 / 数据说明。以前是 space-between 的两块，
   宽屏上中间空出 600px 左右，看起来像没排完版。 */
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto auto;
  align-items: start;
  gap: 40px clamp(32px, 5vw, 80px);
  padding-block: clamp(44px, 5vw, 64px) 36px;
}
/* 页脚右侧的水印版名：填充三栏之间的空旷区，和年级水印同一套语言 */
.footer-grid::after {
  content: "青朗先锋";
  grid-column: 1 / -1;
  justify-self: end;
  margin-top: -10px;
  margin-bottom: -34px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(72px, 12vw, 168px);
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--paper);
  opacity: 0.045;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .footer-grid::after { justify-self: start; font-size: clamp(64px, 16vw, 120px); margin-bottom: -22px; }
}
.footer-brand { display: flex; gap: 16px; align-items: center; }
.footer-logo {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background: var(--mat);
  padding: 5px;
  flex: none;
  object-fit: contain;
}
.footer-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.14em;
  color: var(--paper);
}
.footer-line { font-size: 13.5px; margin-top: 6px; color: rgba(250, 250, 248, 0.6); }
.footer-col { font-size: 14px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
/* 页脚链接给 8px 内边距，触屏热区到 40px；列间距相应收小，视觉节奏基本不变 */
.footer-col a { color: rgba(250, 250, 248, 0.78); padding-block: 8px; transition: color 0.25s; }
.footer-col a:hover { color: var(--paper); }
.footer-col .footer-head {
  color: rgba(250, 250, 248, 0.58);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  margin-bottom: 2px;
}
.footer-meta span { color: rgba(250, 250, 248, 0.68); font-size: 13.5px; }
.footer-base {
  border-top: 1px solid rgba(250, 250, 248, 0.12);
  padding-block: 20px;
  font-size: 12.5px;
  color: rgba(250, 250, 248, 0.58);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- 成员页 ---------- */
.crumb {
  padding-block: 26px 0;
  font-size: 14px;
}
.crumb a { color: var(--ink-3); transition: color 0.25s; }
.crumb a:hover { color: var(--seal); }

.masthead { padding-block: clamp(36px, 5vw, 64px) clamp(40px, 5vw, 72px); }
.masthead-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.masthead-photo {
  background: var(--mat);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-panel);
  padding: var(--r-bezel);
  box-shadow: var(--shadow-mat), var(--shadow-bezel);
  cursor: zoom-in;
  transition: transform 0.24s var(--ease-out), box-shadow 0.24s var(--ease-out);
}
.masthead-photo:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.masthead-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.5s var(--ease-out);
}
.masthead-photo:hover img { transform: scale(1.03); }
.masthead-surname {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-left: 20px;
  vertical-align: 0.18em;
  border: 2.5px solid var(--seal);
  border-radius: 8px;
  color: var(--seal);
  background: rgba(166, 58, 43, 0.06);
  font-size: 23px;
  font-weight: 700;
  transform: rotate(-5deg);
  box-shadow: 0 4px 12px rgba(166, 58, 43, 0.2);
}
/* 成员档案编号：年鉴式 eyebrow，按 MEMBERS 顺序编号 */
.masthead-no {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--seal);
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.masthead-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(42px, 5.5vw, 68px);
  letter-spacing: 0.1em;
  color: var(--navy);
  line-height: 1.15;
}
.masthead-tagline {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--seal);
  border-left: 3px solid var(--seal);
  padding-left: 14px;
  margin-top: 18px;
}
.masthead-meta {
  margin-top: 22px;
  color: var(--ink-2);
  font-size: 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.masthead-meta .meta-primary { color: var(--ink); font-weight: 600; }
.masthead-cta { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }

/* 成员页区块 */
.member-section { padding-block: clamp(48px, 6vw, 78px); border-top: 1px solid var(--hairline-soft); }

/* 成员页小节编号（01/02/03…）：成员页最多六节、很长，
   给每节一个序号，和首页研究方向的 .theme-index 用同一套年鉴语言，
   纯 CSS 计数器，不动任何 HTML 结构。 */
main { counter-reset: sec; }
.member-section { counter-increment: sec; }
.member-section .section-title::before {
  content: counter(sec, decimal-leading-zero);
  display: inline-block;
  font-size: 0.5em;
  letter-spacing: 0.18em;
  color: var(--seal);
  opacity: 0.75;
  margin-right: 0.7em;
  vertical-align: 0.3em;
  font-variant-numeric: tabular-nums;
}

.bio-text { max-width: 68ch; }
.bio-text p { color: var(--ink-2); font-size: 15.8px; margin-bottom: 14px; }
.bio-text p:last-child { margin-bottom: 0; }

.research-card {
  background: var(--mat);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-panel);
  padding: clamp(24px, 3.4vw, 40px);
  box-shadow: var(--shadow-mat), var(--shadow-bezel);
  max-width: 820px;
}
.research-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.2vw, 25px);
  color: var(--navy);
  margin-bottom: 14px;
}
.research-desc { color: var(--ink-2); font-size: 15.5px; max-width: 56em; }

/* 奖状画廊（瀑布流） */
.gallery { columns: 3; column-gap: 22px; }
.gallery-item {
  break-inside: avoid;
  margin-bottom: 22px;
  cursor: zoom-in;
  background: var(--mat);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-panel);
  padding: var(--r-bezel);
  box-shadow: var(--shadow-mat), var(--shadow-bezel);
  transition: transform 0.24s var(--ease-out), box-shadow 0.24s var(--ease-out);
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift), var(--shadow-bezel); }
/* 内芯图片单独缩放，外框托板保持不动，层次更像"装裱" */
.gallery-item img { width: 100%; border-radius: var(--r-inner); transition: transform 0.5s var(--ease-out); }
.gallery-item:hover img { transform: scale(1.035); }
.gallery-cap { padding: 12px 8px 5px; }
/* 级别徽章 + 赛事系列标签：一行"索引"，让"同系列聚在一起"看得出来 */
.cap-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 999px;
  padding: 3px 11px;
}
.badge-national { background: var(--seal); color: #fdf7f4; }
.badge-provincial { background: var(--navy); color: #f2f4f9; }
.badge-school { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--hairline); }
.series-chip {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--hairline-soft);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 系列的第一张卡：标签加重，并跟上这一组的项数——相当于给这一组竖个小标题 */
.cap-tags.group-start .series-chip {
  color: var(--navy);
  background: var(--mat);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--navy-soft);
}
.series-count {
  font-size: 11px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.gallery-name { font-size: 14px; line-height: 1.55; color: var(--ink); }
.gallery-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.award-textcard {
  break-inside: avoid;
  margin-bottom: 22px;
  background: var(--mat);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-panel);
  padding: 22px 20px;
  box-shadow: var(--shadow-mat), var(--shadow-bezel);
}
.award-textcard .gallery-name { margin-top: 2px; }

/* 证书文件卡（PDF） */
.file-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--mat);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-panel);
  padding: 18px 20px;
  margin-bottom: 14px;
  max-width: 640px;
  box-shadow: var(--shadow-mat), var(--shadow-bezel);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.file-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift), var(--shadow-bezel); }
.file-chip {
  flex: none;
  width: 44px;
  height: 52px;
  border-radius: 6px;
  background: var(--navy);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.file-name { font-size: 14.5px; color: var(--ink); line-height: 1.5; }
.file-action { margin-left: auto; font-size: 13px; color: var(--seal); flex: none; }

/* 论文与软著 */
.paper-row {
  display: flex;
  gap: 18px;
  align-items: center;
  padding-block: 20px;
  border-top: 1px solid var(--hairline);
  max-width: 820px;
}
.paper-row:first-of-type { border-top: none; padding-top: 0; }
.paper-thumb {
  flex: none;
  width: 96px;
  cursor: zoom-in;
  border-radius: var(--r-inner);
  border: 1px solid var(--hairline-soft);
}
.paper-type {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  border-radius: 999px;
  padding: 3px 11px;
}
.paper-type-lunwen { color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy-soft); }
.paper-type-ruanzhu { color: var(--seal); box-shadow: inset 0 0 0 1px rgba(166, 58, 43, 0.4); }
.paper-title { font-size: 15.5px; color: var(--ink); line-height: 1.55; }
.paper-sub { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.paper-link { margin-left: auto; flex: none; font-size: 13px; color: var(--seal); }
.paper-link:hover, .file-action:hover, .cert-link:hover { text-decoration: underline; }

/* 考级考证 */
.cert-list { display: flex; flex-wrap: wrap; gap: 10px; }
.cert-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13.5px;
  color: var(--ink-2);
  background: var(--mat);
  transition: border-color 0.25s, color 0.25s;
}
.cert-item:hover { border-color: var(--seal); color: var(--seal); }

/* 作品与实践 */
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  max-width: 980px;
}
.work-card {
  background: var(--mat);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-panel);
  padding: var(--r-bezel);
  box-shadow: var(--shadow-mat), var(--shadow-bezel);
  transition: transform 0.24s var(--ease-out), box-shadow 0.24s var(--ease-out);
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift), var(--shadow-bezel); }
.work-card img,
.work-card video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  /* 作品海报多是整页截图（例如 1440×4811），居中裁切会露出截图正中间的空白段；
     靠上对齐能露出应用顶部，更像一张"预览图" */
  object-position: top center;
  border-radius: var(--r-inner);
  background: var(--paper-2);
  display: block;
  transition: transform 0.5s var(--ease-out);
}
.work-card:hover img { transform: scale(1.03); }
.work-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  margin: 13px 6px 4px;
}
.work-desc { font-size: 13px; color: var(--ink-3); margin: 0 6px 8px; line-height: 1.65; }
@media (max-width: 800px) { .works-grid { grid-template-columns: 1fr; } }

/* 成员照片 */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.photo-cell { cursor: zoom-in; }
.photo-cell img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-panel);
  border: 1px solid var(--hairline-soft);
  transition: transform 0.24s var(--ease-out), box-shadow 0.24s var(--ease-out);
}
.photo-cell:hover img { transform: translateY(-4px); box-shadow: var(--shadow-mat); }
.photo-cell figcaption { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }
@media (max-width: 800px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .photo-grid { grid-template-columns: 1fr; } }

/* 空状态 */
.empty-note {
  border: 1px dashed var(--hairline);
  border-radius: var(--r-panel);
  padding: 44px 28px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14.5px;
  max-width: 560px;
}
.empty-note .empty-seal {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy-soft);
  border: 1.5px solid var(--hairline);
  border-radius: 6px;
  display: inline-block;
  padding: 8px 12px;
  letter-spacing: 0.3em;
  margin-bottom: 14px;
}

/* 成员页底部翻页 */
.member-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--hairline-soft);
  padding-block: 30px;
  margin-top: clamp(24px, 4vw, 48px);
}
.pager-link { max-width: 45%; }
.pager-link .pager-dir { font-size: 12px; color: var(--ink-3); letter-spacing: 0.18em; }
.pager-link .pager-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--navy);
  margin-top: 4px;
  transition: color 0.25s;
}
.pager-link:hover .pager-name { color: var(--seal); }
.pager-link.next { text-align: right; margin-left: auto; }

/* 灯箱退出动画与背景景深 */
.lightbox { transition: opacity 0.22s ease; }
.lightbox.closing { opacity: 0; }
.lightbox.closing .lightbox-body { opacity: 0; transform: scale(0.96); transition: opacity 0.2s ease, transform 0.2s ease; animation: none; }
.lightbox-body { will-change: transform, opacity; }

/* 照片墙缓动漂移 */
.strip.marquee { overflow: hidden; padding-bottom: 0; position: relative; }
.strip.marquee::before, .strip.marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 70px;
  z-index: 2;
  pointer-events: none;
}
.strip.marquee::before { left: 0; background: linear-gradient(90deg, var(--paper-2), transparent); }
.strip.marquee::after { right: 0; background: linear-gradient(-90deg, var(--paper-2), transparent); }
/* 用 margin 而不是 gap 拉开间距：gap 不参与 width 计算，
   让 translateX(-50%) 每 80 秒比真实周期少走半个 gap（原来每轮会弹一下 9px）。 */
.strip-track { display: flex; width: max-content; animation: strip-drift 80s linear infinite; }
.strip.marquee .strip-item { margin-right: 18px; }
.strip.marquee:hover .strip-track { animation-play-state: paused; }
/* 键盘走到跑马灯上时先停住，否则焦点环会随动画一直漂走 */
.strip.marquee:focus-within .strip-track { animation-play-state: paused; }
@keyframes strip-drift { to { transform: translateX(-50%); } }

/* 成员目录无障碍触发态 */
.gallery-item:focus-visible, .strip-item:focus-visible, .photo-cell:focus-visible, .cert-item:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 3px;
}

/* 荣誉统计条 */
.award-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
/* 荣誉汇总行：左边级别统计胶囊，右边年份分布微型柱。
   时间维度一眼可见，又不必像时间轴那样把同样的奖项再列一遍、把页面拉得更长。 */
.award-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 0;
  margin-top: 16px;
}
.award-summary .award-stats { margin-top: 0; }
/* 年份分布紧跟在级别胶囊后面，用一条细分隔线断开：
   两边是同一份汇总的两个侧面（级别 / 年份），分开多远会读成两个不相干的碎片。 */
.award-years {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-left: clamp(18px, 2.6vw, 30px);
  padding-left: clamp(18px, 2.6vw, 30px);
  border-left: 1px solid var(--hairline);
}
.ay-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ay-bar {
  display: block;
  position: relative;
  width: 13px;
  height: 38px;
  border-radius: 3px;
  background: rgba(28, 46, 84, 0.1);
  overflow: hidden;
}
.ay-bar::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: var(--h, 100%);
  border-radius: 3px;
  background: var(--navy);
}
.ay-year {
  font-size: 11px;
  line-height: 1;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-chip {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  background: var(--mat);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 5px 15px;
  font-variant-numeric: tabular-nums;
}
.stat-chip-n { background: var(--seal); border-color: var(--seal); color: #fdf7f4; }

/* 返回顶部 */
#top-sentinel { position: absolute; top: 0; height: 1px; width: 1px; }
.to-top {
  position: fixed;
  /* 宽屏时把按钮放到正文栏外侧的留白里，避免压住页脚文字；窄屏仍在右下角 */
  right: max(22px, calc((100vw - 1200px) / 2 - 66px));
  bottom: 26px;
  z-index: 30;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.06em;
  display: grid;
  place-items: center;
  /* 外投影 + 一圈纸白内描边，让它像一枚真的按钮，而不是贴上去的深色圆片 */
  box-shadow: 0 8px 22px rgba(19, 32, 60, 0.34), inset 0 0 0 1px rgba(250, 250, 248, 0.2), inset 0 1px 0 rgba(250, 250, 248, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s var(--ease-out), background 0.2s ease, box-shadow 0.25s var(--ease-out);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover {
  background: var(--navy-deep);
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(19, 32, 60, 0.42), inset 0 0 0 1px rgba(250, 250, 248, 0.34), inset 0 1px 0 rgba(250, 250, 248, 0.2);
}
.to-top:active { transform: scale(0.94); }

/* 首屏合照缓变焦（随开场编排） */
.anim-home .hero-photo img { animation: hero-zoom 12s cubic-bezier(0.23, 1, 0.32, 1) 0.42s both; }
@keyframes hero-zoom { from { transform: scale(1.055); } to { transform: scale(1); } }

/* ---------- 可点开大图的图版：悬停浮出"放大"提示 ---------- */
/* 不写"查看大图"文字——那等于在图片上贴胶囊，是常见的俗套；
   只用一枚最小的放大镜。半透明深藏青底 + 纸白内描边，浅底图（奖状）和深底图（徽章图版）上都看得见。 */
.gallery-item, .theme-plate, .photo-cell, .strip-item { position: relative; }
.gallery-item::after, .theme-plate::after, .photo-cell::after, .strip-item::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: rgba(15, 24, 44, 0.55);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fafaf8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M15.6 15.6 20 20'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 15px 15px;
  box-shadow: inset 0 0 0 1px rgba(250, 250, 248, 0.42);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  pointer-events: none;
  z-index: 2;
}
.gallery-item:hover::after, .gallery-item:focus-visible::after,
.theme-plate:hover::after, .theme-plate:focus-visible::after,
.photo-cell:hover::after, .photo-cell:focus-visible::after,
.strip-item:hover::after, .strip-item:focus-visible::after {
  opacity: 1;
  transform: none;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 24, 44, 0.93);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox-body {
  max-width: min(1100px, 90vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: lb-in 0.35s var(--ease-out);
}
.lightbox-body img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  /* 换图时先淡出旧图再淡入新图，避免"啪"地闪一下 */
  opacity: 0;
  transition: opacity 0.22s ease;
}
.lightbox-body img.lb-ready { opacity: 1; }
/* 图注拆两行：标题一行、序号与原图尺寸一行。
   以前三样东西用全角空格挤在一行，赛事名一长就折行、"1 / 20" 被挤到第二行。 */
.lb-cap {
  margin-top: 18px;
  max-width: 58ch;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
}
.lb-cap-title {
  color: rgba(250, 250, 248, 0.92);
  font-size: 14.5px;
  line-height: 1.6;
  text-wrap: pretty;
}
/* 级别徽章：深色遮罩上的变体（国家级=印章红实底，省级/校级=纸白描边） */
.lb-cap-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 999px;
  padding: 4px 13px;
}
/* 没有级别时不占位（用 :empty 收起，避免依赖 hidden 属性） */
.lb-cap-badge:empty { display: none; }
.lb-cap-badge.badge-national { background: var(--seal); color: #fdf7f4; }
.lb-cap-badge.badge-provincial { color: rgba(250, 250, 248, 0.92); box-shadow: inset 0 0 0 1px rgba(250, 250, 248, 0.42); }
.lb-cap-badge.badge-school { color: rgba(250, 250, 248, 0.78); box-shadow: inset 0 0 0 1px rgba(250, 250, 248, 0.26); }
.lb-cap-meta {
  color: rgba(250, 250, 248, 0.62);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
/* 团队奖：列出同获此奖的同学，可点进各人页面 */
.lb-cap-mates {
  color: rgba(250, 250, 248, 0.62);
  font-size: 12.5px;
  line-height: 1.7;
  text-wrap: pretty;
}
.lb-cap-mates:empty { display: none; }
.lb-cap-mates a {
  color: rgba(250, 250, 248, 0.94);
  text-decoration: underline;
  text-decoration-color: rgba(250, 250, 248, 0.4);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.lb-cap-mates a:hover { color: #ffffff; text-decoration-color: rgba(250, 250, 248, 0.9); }
/* 关闭与翻页：圆形玻璃按钮，替掉原来孤零零的 × ‹ › 字符 */
.lightbox-close, .lightbox-nav {
  flex: none;
  width: 48px;
  height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(250, 250, 248, 0.08);
  box-shadow: inset 0 0 0 1px rgba(250, 250, 248, 0.22);
  color: rgba(250, 250, 248, 0.86);
  font-size: 26px;
  line-height: 1;
  transition: background 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out), color 0.25s;
}
.lightbox-close { position: absolute; top: 22px; right: 26px; font-size: 24px; }
/* 注意：按钮自身的 display 会压过 UA 的 [hidden]，必须显式补一条 */
.lightbox-nav[hidden] { display: none; }
.lightbox-close:hover, .lightbox-nav:hover {
  background: rgba(250, 250, 248, 0.16);
  box-shadow: inset 0 0 0 1px rgba(250, 250, 248, 0.42);
  color: #ffffff;
  transform: scale(1.06);
}
.lightbox-close:active, .lightbox-nav:active { transform: scale(0.94); }
/* 深色遮罩上的焦点环改用纸白色：原来那圈印章红方块在暗底上像误画的框 */
.lightbox :focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; box-shadow: none; }
@keyframes lb-in {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: none; }
}
/* 窄屏：左右箭头浮到图片两侧，别和图片抢宽度（证书多是竖长图，本来就窄） */
@media (max-width: 640px) {
  .lightbox { padding: 12px; }
  .lightbox-body { max-width: 100%; }
  .lightbox-body img { max-height: 66vh; }
  .lightbox-nav {
    position: absolute;
    top: 50%;
    margin-top: -21px;
    width: 42px;
    height: 42px;
    font-size: 22px;
    background: rgba(15, 24, 44, 0.55);
    box-shadow: inset 0 0 0 1px rgba(250, 250, 248, 0.28);
  }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
  .lightbox-close { top: 12px; right: 14px; width: 42px; height: 42px; font-size: 22px; }
  .lb-cap { margin-top: 14px; }
  .lb-cap-title { font-size: 13.5px; }
}

/* ---------- 入场动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }
/* 键盘 Tab 到还没进视口的卡片时，元素本身还是 opacity:0，
   焦点环会跟着一起透明——看起来像"按了 Tab 却没反应"。聚焦时立刻点亮。 */
.reveal:focus,
.reveal:focus-within { opacity: 1; transform: none; transition: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  /* 只压 duration 不够：首屏编排带 0.08–0.52s 的 delay，
     动画时长变成 0.01ms 之后元素仍要等半秒才出现，所以 delay 也必须压掉 */
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    animation-delay: -1ms !important;
  }
  .anim-home .hero-seal, .anim-home .hero-title, .anim-home .hero-tagline, .anim-home .hero-cta, .anim-home .hero-photo, .anim-home .hero-photo img { animation: none; opacity: 1; clip-path: none; }
  .strip-track { animation: none; }
  .strip.marquee { overflow-x: auto; padding-bottom: 14px; }
}

/* ---------- 工具类与细节 ---------- */
.file-list { margin-top: 26px; }
.cert-action { color: var(--seal); }
.cert-item[data-lb-src] { cursor: zoom-in; }

/* 资料还没补齐时占位，比空白更体面，也提示本人来补 */
.meta-todo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  font-size: 13px;
  color: var(--ink-3);
  border: 1px dashed var(--hairline);
  border-radius: 999px;
  padding: 4px 14px;
}
.meta-todo::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--seal);
  opacity: 0.5;
}

/* 主按钮里的"按钮中按钮"箭头 */
.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: 2px;
  border-radius: 50%;
  background: rgba(250, 250, 248, 0.18);
  font-size: 13px;
  line-height: 1;
  transition: transform 0.32s var(--ease-out), background 0.32s var(--ease-out);
}
.btn-primary:hover .btn-icon { transform: translateX(3px); background: rgba(250, 250, 248, 0.3); }
.hero-dark .btn-primary .btn-icon { background: rgba(19, 32, 60, 0.1); }
.hero-dark .btn-primary:hover .btn-icon { background: rgba(19, 32, 60, 0.18); }

/* 顶部阅读进度：用滚动驱动动画，不支持该特性的浏览器就不显示（不报错） */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 45;
  pointer-events: none;
  background: linear-gradient(90deg, var(--seal), #c25a41);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    animation: progress-grow linear both;
    animation-timeline: scroll(root);
  }
}
@keyframes progress-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* 正文断行优化，减少末行孤字 */
.bio-text p, .theme-desc, .research-desc, .section-sub, .work-desc, .paper-title { text-wrap: pretty; }

/* 跳到主内容：不画整页描边，但要给键盘用户一个"已经落在这里"的反馈 */
main:focus { outline: none; }
main:focus-visible { outline: 2px solid var(--seal); outline-offset: -2px; }
main:target, main:focus { animation: land-flash 0.9s ease-out; }
@keyframes land-flash {
  from { background: rgba(166, 58, 43, 0.07); }
  to { background: transparent; }
}

/* 关闭 JavaScript 时的提示（其余内容由 JS 渲染） */
.noscript-note {
  max-width: 620px;
  margin: 14vh auto;
  padding: 30px 34px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  background: var(--mat);
  box-shadow: var(--shadow-mat);
  text-align: center;
}
.noscript-note strong { font-family: var(--font-display); font-size: 20px; color: var(--navy); }
.noscript-note p { margin-top: 10px; color: var(--ink-2); font-size: 14.5px; }
.noscript-note code { font-size: 13px; color: var(--seal); }

/* ---------- 打印 ---------- */
@media print {
  .nav, .to-top, .lightbox, .scroll-progress, .footer-col,
  .member-pager, .filter-row, .strip, .noscript-note { display: none !important; }
  body { background: #fff; color: #000; }
  .hero-dark, .footer { background: #fff !important; color: #000 !important; }
  .hero-dark .hero-title, .hero-dark .hero-tagline, .hero-dark .hero-eyebrow,
  .hero-dark .stat-num, .hero-dark .stat-label, .footer-name, .footer-line,
  .footer-base, .footer-col a { color: #000 !important; }
  .hero-dark .hero-seal { color: var(--seal) !important; border-color: var(--seal) !important; }
  .gallery { columns: 2; }
  .gallery-item, .work-card, .research-card, .file-card, .award-textcard,
  .masthead-photo, .hero-photo, .member-card .ph { box-shadow: none !important; border-color: #ccc !important; }
  .section, .member-section { padding-block: 16px; break-inside: avoid; }
  /* 打印证书是为了存档，此时绝不能裁切：把 cover 改回完整显示 */
  .gallery-item img, .paper-thumb, .theme-img, .photo-cell img,
  .masthead-photo img, .work-card img, .member-card .ph img {
    object-fit: contain !important;
    aspect-ratio: auto !important;
    max-height: none !important;
  }
  /* 年级筛选用内联 display:none 隐藏区块，打印前必须还原，否则只印出被筛的那一届 */
  .cohort { display: block !important; }
  .filter-row { display: none !important; }
  /* 打印时入场动画不能把内容留在透明状态 */
  .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
  img, img.img-fade { opacity: 1 !important; }
  .lightbox-body img { opacity: 1 !important; }
  /* 成员卡的档案色罩与去饱和是屏幕上的统一处理，打印要还原成原始照片 */
  .member-card .ph::after { display: none !important; }
  .member-card .ph img { filter: none !important; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { max-width: 560px; }
  .masthead-grid { grid-template-columns: 1fr; }
  .masthead-photo { max-width: 300px; }
  .gallery { columns: 2; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  /* 两列时只有右侧那一列保留分隔线 */
  .hero-dark .stat:nth-child(odd) { border-left: none; padding-left: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .gallery { columns: 1; }
  .paper-row { flex-wrap: wrap; }
  .paper-link { margin-left: 0; }
  .strip-item, .strip-item img { width: 240px; height: 160px; }
}
