/* ==========================================================================
   设计 03 · 全息空间
   --------------------------------------------------------------------------
   立体感来自真实的 CSS 3D：
     · .space-grid      透视网格（rotateX 铺成地面）
     · [data-tilt]      perspective() + rotateX/rotateY 跟随指针
     · .holo-cover/body 子层 translateZ 浮起，制造真实层间视差
     · [data-reveal]    滚动时从 Z 轴深处飞入

   三条硬约束（违反就会「看着像 3D、其实是平的」）：
     1. preserve-3d 的容器不能有 overflow:hidden —— 会压平子层
     2. 不能用 filter / backdrop-filter 包 preserve-3d 的元素 —— 同样压平
     3. 对比度：可点击控件 ≥ 4.5，正文 ≥ 7
   ========================================================================== */

/* ------------------------------------------------------------ 1 · 变量 */

:root {
  --void: #04060e;
  --void-2: #070b18;

  --glass: rgba(15, 21, 40, 0.66);
  --glass-2: rgba(22, 30, 54, 0.78);
  --glass-3: rgba(30, 40, 70, 0.6);

  --line: rgba(126, 168, 255, 0.13);
  --line-2: rgba(126, 168, 255, 0.28);
  --line-3: rgba(126, 168, 255, 0.45);

  --fg: #e9edfb;
  --fg-2: #b6c1de;
  --fg-3: #7e8bab;

  --cyan: #38e1ff;
  --violet: #9d7bff;
  --pink: #ff7ac8;
  --mint: #5ef2c0;

  --accent: var(--cyan);
  --accent-2: var(--violet);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;

  --shadow-1: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-2: 0 30px 90px rgba(0, 0, 0, 0.6);
  --glow-cyan: 0 0 0 1px rgba(56, 225, 255, 0.35), 0 14px 44px rgba(56, 225, 255, 0.18);
  --glow-violet: 0 0 0 1px rgba(157, 123, 255, 0.35), 0 14px 44px rgba(157, 123, 255, 0.18);

  --wrap: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font: 'Inter', 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', system-ui, -apple-system,
    'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
}

/**
 * 把倾斜用的自定义属性注册成**有类型**的。
 *
 * 不注册的话，浏览器把 --rx 的变化当成离散值：var(--rx) 一变，
 * 用到它的 transform 会直接跳过去，CSS 里写的 0.55s 缓动形同虚设。
 * 注册成 <angle> / <percentage> 之后它就能被插值，回弹才是平滑的。
 *
 * --mx / --my 必须 inherits: true —— 虹彩高光 .holo-sheen 是倾斜元素的**子节点**，
 * 声明成 false 的话它只会读到初始值 50%，高光永远钉在正中间、不跟指针。
 * --rx / --ry 只有倾斜元素自己用得上，保持 false 即可。
 *
 * 旧浏览器不认 @property，会退化成「跟手时流畅、松手时瞬回」——可用，只是略生硬。
 */
@property --rx {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@property --ry {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@property --mx {
  syntax: '<percentage>';
  inherits: true;
  initial-value: 50%;
}

@property --my {
  syntax: '<percentage>';
  inherits: true;
  initial-value: 50%;
}

/* ------------------------------------------------------------ 2 · 基础 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
  background: var(--void);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

code,
kbd,
pre {
  font-family: var(--mono);
}

::selection {
  color: #04060e;
  background: var(--cyan);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 10px 16px;
  color: #04060e;
  background: var(--cyan);
  border-radius: var(--r-sm);
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* -------------------------------------------------- 3 · 背景空间（不接收指针） */

.space {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, #0a1024 0%, var(--void) 55%, #020308 100%);
}

.space-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}

.space-glow-a {
  top: -18vh;
  left: -8vw;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(56, 225, 255, 0.5), transparent 65%);
  animation: drift-a 26s ease-in-out infinite alternate;
}

.space-glow-b {
  top: 12vh;
  right: -14vw;
  width: 56vw;
  height: 56vw;
  background: radial-gradient(circle, rgba(157, 123, 255, 0.45), transparent 65%);
  animation: drift-b 32s ease-in-out infinite alternate;
}

.space-glow-c {
  bottom: -24vh;
  left: 30%;
  width: 48vw;
  height: 48vw;
  background: radial-gradient(circle, rgba(255, 122, 200, 0.28), transparent 68%);
  animation: drift-a 38s ease-in-out infinite alternate-reverse;
}

@keyframes drift-a {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(4vw, 6vh, 0) scale(1.12);
  }
}

@keyframes drift-b {
  from {
    transform: translate3d(0, 0, 0) scale(1.08);
  }
  to {
    transform: translate3d(-5vw, 4vh, 0) scale(1);
  }
}

/**
 * 透视网格：用 rotateX 把平面「放倒」成地面，是整套视觉里最强的 3D 信号。
 *
 * 几何约束（实测踩过的坑，改参数前先读）：
 *   远端在 Z 轴的位移 = 元素高度 × sin(倾角)，它必须 **小于** perspective，
 *   否则远端跑到「眼睛后面」会被整体裁掉 —— 网格一片空白，而且不报任何错。
 *
 *   这里用 vh 让高度与透视一起随视口缩放，比例恒定安全：
 *     2H × sin(64°) ≈ 1.80H  <  3.2H（= 320vh）
 *   早期版本写成 `height: 90vh` + `perspective: 520px`（固定值），
 *   在 2400px 高的窗口下远端越界，整片网格直接消失。
 */
.space-grid {
  position: absolute;
  left: -50%;
  right: -50%;
  bottom: 0;
  height: 200vh;
  background-image:
    linear-gradient(rgba(126, 168, 255, 0.26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 168, 255, 0.26) 1px, transparent 1px);
  background-size: 96px 96px;
  transform: perspective(320vh) rotateX(64deg);
  transform-origin: 50% 100%;
  /* 近处清晰、远处（密集区）渐隐，避免地平线附近糊成一片 */
  mask-image: linear-gradient(
    to top,
    #000 0%,
    rgba(0, 0, 0, 0.62) 22%,
    rgba(0, 0, 0, 0.2) 42%,
    transparent 60%
  );
  -webkit-mask-image: linear-gradient(
    to top,
    #000 0%,
    rgba(0, 0, 0, 0.62) 22%,
    rgba(0, 0, 0, 0.2) 42%,
    transparent 60%
  );
  animation: grid-flow 16s linear infinite;
}

@keyframes grid-flow {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 0 96px;
  }
}

.space-noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: radial-gradient(rgba(255, 255, 255, 0.9) 1px, transparent 0);
  background-size: 3px 3px;
}

/* ------------------------------------------------------------ 4 · 顶栏 */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 9, 20, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.topbar-inner {
  /* 主题切换器的下拉面板锚在这一层 —— 见「主题切换器」一节 */
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* 三个错位的小方块，用 3D 旋转做「立体标记」 */
.brand-mark {
  position: relative;
  display: inline-block;
  width: 26px;
  height: 26px;
  transform-style: preserve-3d;
  transform: rotateX(-18deg) rotateY(28deg);
  transition: transform 0.5s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotateX(-18deg) rotateY(388deg);
}

.brand-mark i {
  position: absolute;
  inset: 0;
  display: block;
  border: 1.5px solid var(--cyan);
  border-radius: 6px;
}

.brand-mark i:nth-child(1) {
  transform: translateZ(0);
  opacity: 0.9;
}

.brand-mark i:nth-child(2) {
  border-color: var(--violet);
  transform: translateZ(7px) scale(0.82);
  opacity: 0.75;
}

.brand-mark i:nth-child(3) {
  border-color: var(--pink);
  transform: translateZ(14px) scale(0.62);
  opacity: 0.6;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.06em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-2);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.3s var(--ease);
}

.nav-axis {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-3);
  transition: color 0.2s;
}

.nav-item:hover {
  color: var(--fg);
  background: rgba(126, 168, 255, 0.08);
  border-color: var(--line-2);
  transform: translateY(-1px);
}

.nav-item:hover .nav-axis {
  color: var(--cyan);
}

.nav-item.is-active {
  color: var(--fg);
  background: rgba(56, 225, 255, 0.1);
  border-color: var(--line-3);
}

.nav-item.is-active .nav-axis {
  color: var(--cyan);
}

/* ------------------------------------------------------------ 5 · 舞台 */

.stage {
  display: block;
  padding: 0 0 40px;
}

/* ------------------------------------- 6 · 3D 基础：倾斜 / 分层 / 光泽 / 入场 */

/**
 * 倾斜：perspective() 写在元素自己的 transform 里，
 * 配合 preserve-3d 让子层的 translateZ 真正产生层间视差。
 * --rx / --ry / --mx / --my 由 client.js 通过指针事件写入。
 *
 * ⚠️ data-tilt 与 data-reveal **不能挂在同一个元素上**：
 *   两者都用 transform 实现，reveal 的规则特异性更高，会把倾斜整个盖掉，
 *   表现为「卡片完全不跟手、也不报错」。所以卡片拆成两层 ——
 *   外层 .holo-card 管入场，内层 .holo-link 管倾斜。
 */
[data-tilt] {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
  position: relative;
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.55s var(--ease);
}

[data-tilt].is-tilting {
  transition: transform 0.08s linear;
}

/* 卡片内部分层：封面浮得低、文字浮得高，倾斜时产生真实层差 */
.holo-cover {
  position: relative;
  transform: translateZ(18px);
  border-radius: var(--r-md);
}

.holo-body {
  position: relative;
  transform: translateZ(38px);
}

/* 虹彩高光：跟随指针位置 */
.holo-sheen {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background: radial-gradient(
    340px circle at var(--mx) var(--my),
    rgba(160, 220, 255, 0.22),
    rgba(157, 123, 255, 0.1) 42%,
    transparent 68%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}

[data-tilt]:hover .holo-sheen {
  opacity: 1;
}

/* 边缘光：一层内描边，抬升时变亮 */
.holo-edge {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--line-2);
  pointer-events: none;
  transition: box-shadow 0.35s var(--ease);
}

[data-tilt]:hover .holo-edge {
  box-shadow: inset 0 0 0 1px var(--line-3), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/**
 * 入场：默认**可见**，只有 JS 确认可用后才由 client.js 加上 .reveal-ready，
 * 再配合 .is-in 播放。这样无 JS 时内容不会消失。
 */
[data-reveal] {
  opacity: 1;
}

.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, -140px) rotateX(7deg);
  transition: opacity 0.7s var(--ease-out), transform 0.85s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 55ms);
}

.reveal-ready [data-reveal].is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0) rotateX(0deg);
}

/* ------------------------------------------------------- 7 · 首页场景 */

.scene {
  position: relative;
  padding: 92px 0 76px;
  transform-style: preserve-3d;
}

.scene-layer {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
}

/**
 * 装饰光环层。
 *
 * ⚠️ 必须 overflow:hidden。三个 .orbit 都用了负的 right 偏移伸出容器，
 * 桌面宽度下伸出部分还在视口内（不会撑开页面），但窄屏下会顶出 42px 横向溢出。
 * 实测：390px 视口下 documentElement.scrollWidth = 432，元凶就是 .orbit-a。
 */
.scene-far {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* 三圈错位的光环，纯装饰，给场景一个「深度参照物」 */
.orbit {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.orbit-a {
  top: -40px;
  right: -60px;
  width: 340px;
  height: 340px;
  border-color: rgba(56, 225, 255, 0.18);
}

.orbit-b {
  top: 40px;
  right: 40px;
  width: 200px;
  height: 200px;
  border-color: rgba(157, 123, 255, 0.2);
}

.orbit-c {
  top: 120px;
  right: 130px;
  width: 90px;
  height: 90px;
  border-color: rgba(255, 122, 200, 0.24);
}

.scene-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.kicker-dot {
  width: 7px;
  height: 7px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--cyan);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.78);
  }
}

.scene-name {
  margin-bottom: 10px;
  font-size: clamp(44px, 8vw, 88px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  background: linear-gradient(96deg, #ffffff 8%, var(--cyan) 42%, var(--violet) 74%, var(--pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.scene-tagline {
  font-size: clamp(15px, 2vw, 19px);
  color: var(--fg-2);
  letter-spacing: 0.01em;
}

.scene-lead {
  max-width: 640px;
  margin-top: 22px;
  font-size: 16px;
  line-height: 1.85;
  color: var(--fg-2);
}

.scene-dims {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 42px;
  transform-style: preserve-3d;
}

.dim-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 18px 16px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
}

.dim-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.dim-key {
  font-size: 13px;
  color: var(--fg-2);
}

.dim-note {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* 称号标签在「关于我」里统一呈现（.about-honor），
   首屏不再重复一遍 —— 同一屏里出现两次同样的六个标签只是噪声。 */

.scene-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--fg);
  background: var(--glass-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  transition: transform 0.3s var(--ease), border-color 0.25s, box-shadow 0.3s, background 0.25s;
}

.btn:hover {
  transform: translateY(-3px);
  border-color: var(--line-3);
  box-shadow: var(--glow-cyan);
}

.btn-primary {
  color: #04060e;
  background: linear-gradient(96deg, var(--cyan), var(--violet));
  border-color: transparent;
}

.btn-primary:hover {
  box-shadow: 0 16px 44px rgba(56, 225, 255, 0.3);
}

/* ------------------------------------------------------------ 8 · 区块 */

.block {
  margin-top: 84px;
}

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
}

.section-mark {
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--cyan);
  border-radius: 3px;
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(56, 225, 255, 0.5);
}

.block-more {
  font-size: 13.5px;
  color: var(--fg-2);
  transition: color 0.2s, transform 0.3s var(--ease);
}

.block-more:hover {
  color: var(--cyan);
  transform: translateX(3px);
}

/* -------------------------------------- 8b · 首页个人版块（关于我 / 服务 / 作品 / 荣誉 / 课程 / 联系） */

/**
 * 首页的「主语」是人，不是文章。
 * 这一组版块把原博客首页的信息补齐：关于我、服务能力、核心产品、荣誉与活动、
 * 精品课程、合作与联系。文章与分类退到它们后面。
 *
 * 复用第 6 节的 [data-tilt] / [data-reveal] 机制，
 * 所以这里只写「盒子长什么样」，不再重复 3D 那套。
 */

/* 版块副标题（荣誉那块要标数量和分类） */
.block-note {
  margin: -14px 0 24px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--fg-3);
}

/* 所有卡片共用的虹彩高光：跟随指针，hover 才亮 */
.about-sheen,
.work-sheen,
.gal-sheen,
.course-sheen,
.series-sheen {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background: radial-gradient(
    320px circle at var(--mx) var(--my),
    rgba(160, 220, 255, 0.2),
    rgba(157, 123, 255, 0.09) 44%,
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}

[data-tilt]:hover .about-sheen,
[data-tilt]:hover .work-sheen,
[data-tilt]:hover .gal-sheen,
[data-tilt]:hover .course-sheen,
[data-tilt]:hover .series-sheen {
  opacity: 1;
}

/* 卡片通用底：玻璃面 + 细描边 + 抬升时描边变亮 */
.svc-card,
.about-card,
.work-card,
.gal-card,
.course-card,
.contact-card,
.series-card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  transition: border-color 0.3s var(--ease), box-shadow 0.35s var(--ease);
}

.svc-card:hover,
.about-card:hover,
.work-card:hover,
.gal-card:hover,
.course-card:hover,
.contact-card:hover,
.series-card:hover {
  border-color: var(--line-3);
  box-shadow: var(--shadow-2), 0 0 44px rgba(56, 225, 255, 0.12);
}

/* ---------- 关于我 ---------- */

.about-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  padding: 34px;
  overflow: hidden;
}

/* 头像层：单独 translateZ，鼠标划过时和文字之间出现真实层差 */
.about-figure {
  position: relative;
  transform: translateZ(46px);
}

.about-avatar {
  display: block;
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--void-2);
}

/* 头像外圈的旋转光环 */
.about-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px dashed rgba(56, 225, 255, 0.34);
  animation: spin 26s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.about-body {
  position: relative;
  transform: translateZ(22px);
}

.about-name {
  margin-bottom: 8px;
  font-size: 21px;
  font-weight: 700;
  color: var(--fg);
}

.about-roles {
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--cyan);
}

.about-text {
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--fg-2);
}

.about-honors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.about-honor {
  padding: 5px 12px;
  font-size: 12.5px;
  color: var(--fg-2);
  background: rgba(126, 168, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* ---------- 服务能力 ---------- */

.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  perspective: 1600px;
}

.svc-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 28px 24px;
}

.svc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: var(--cyan);
  background: rgba(56, 225, 255, 0.08);
  border: 1px solid rgba(56, 225, 255, 0.24);
  border-radius: var(--r-sm);
  transform: translateZ(34px);
}

.svc-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--fg);
  transform: translateZ(24px);
}

.svc-detail {
  font-size: 14px;
  line-height: 1.85;
  color: var(--fg-2);
  transform: translateZ(14px);
}

/* ---------- 核心产品与解决方案 ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  perspective: 1600px;
}

.work-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.work-figure {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--void-2);
  border-bottom: 1px solid var(--line);
  transform: translateZ(20px);
}

.work-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.work-card:hover .work-figure img {
  transform: scale(1.045);
}

/* 图片底部一层渐隐，让卡片边界不那么硬 */
.work-glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 52%;
  background: linear-gradient(to top, rgba(7, 11, 24, 0.86), transparent);
  pointer-events: none;
}

.work-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 22px;
  transform: translateZ(38px);
}

.work-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--fg);
}

.work-desc {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--fg-2);
}

.work-cta {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--cyan);
  transition: transform 0.3s var(--ease);
}

.work-card:hover .work-cta {
  transform: translateX(4px);
}

/* ---------- 荣誉与活动风采 ---------- */

.gal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  perspective: 1600px;
}

.gal-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.gal-figure {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--void-2);
  border-bottom: 1px solid var(--line);
  transform: translateZ(16px);
}

.gal-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 证书/活动照底色五花八门，压一点饱和度让整墙更统一 */
  filter: saturate(0.82) brightness(0.94);
  transition: filter 0.5s var(--ease), transform 0.6s var(--ease-out);
}

.gal-card:hover .gal-figure img {
  filter: saturate(1) brightness(1.02);
  transform: scale(1.05);
}

.gal-cap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 16px;
  transform: translateZ(30px);
}

.gal-kind {
  align-self: flex-start;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  border-radius: 999px;
}

.gal-kind-honor {
  color: var(--cyan);
  background: rgba(56, 225, 255, 0.1);
  border: 1px solid rgba(56, 225, 255, 0.3);
}

.gal-kind-activity {
  color: var(--violet);
  background: rgba(157, 123, 255, 0.12);
  border: 1px solid rgba(157, 123, 255, 0.32);
}

.gal-title {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--fg);
}

/* ---------- 精品课程 ---------- */

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px;
  perspective: 1600px;
}

.course-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.course-figure {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--void-2);
  border-bottom: 1px solid var(--line);
  transform: translateZ(20px);
}

.course-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.course-card:hover .course-figure img {
  transform: scale(1.045);
}

.course-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #04060e;
  background: linear-gradient(96deg, var(--cyan), var(--violet));
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(56, 225, 255, 0.32);
}

.course-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 22px;
  transform: translateZ(38px);
}

.course-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--fg);
}

.course-desc {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--fg-2);
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.course-meta-item {
  padding: 4px 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--cyan);
  background: rgba(56, 225, 255, 0.07);
  border: 1px solid rgba(56, 225, 255, 0.24);
  border-radius: 999px;
}

/* ---------- 合作与联系 ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  perspective: 1600px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  height: 100%;
  padding: 24px;
}

.contact-kind {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  transform: translateZ(20px);
}

.contact-value {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--fg);
  overflow-wrap: anywhere;
  transform: translateZ(32px);
}

a.contact-value:hover {
  color: var(--cyan);
}

.contact-value-static {
  color: var(--fg-2);
}

/* 二维码：默认压暗，hover 才亮起来，避免一屏二维码抢注意力 */
.contact-qr {
  display: block;
  margin-top: 6px;
  transform: translateZ(26px);
}

.contact-qr img {
  display: block;
  width: 128px;
  height: 128px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  opacity: 0.72;
  transition: opacity 0.35s var(--ease), transform 0.4s var(--ease);
}

.contact-card:hover .contact-qr img {
  opacity: 1;
  transform: scale(1.04);
}

/* ------------------------------------------------------------ 9 · 文章卡片 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
  /* 父级给一点透视，让相邻卡片的倾斜有共同的消失点 */
  perspective: 1600px;
}

.holo-card {
  position: relative;
  border-radius: var(--r-lg);
}

.holo-link {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  padding: 18px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  transition: background 0.3s, box-shadow 0.4s var(--ease), border-color 0.3s;
}

.holo-card:hover .holo-link {
  background: var(--glass-2);
  border-color: var(--line-2);
  box-shadow: var(--shadow-2);
}

.holo-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}

.holo-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-3);
}

.holo-tag {
  padding: 2px 9px;
  color: var(--cyan);
  background: rgba(56, 225, 255, 0.1);
  border: 1px solid rgba(56, 225, 255, 0.22);
  border-radius: 999px;
}

.holo-title {
  font-size: 18px;
  line-height: 1.42;
  color: var(--fg);
  transition: color 0.25s;
}

.holo-card:hover .holo-title {
  color: #ffffff;
}

.holo-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--fg-2);
}

.holo-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  font-size: 12.5px;
  color: var(--fg-3);
}

.holo-stat {
  font-family: var(--mono);
}

.holo-open {
  margin-left: auto;
  font-weight: 600;
  color: var(--cyan);
  transition: transform 0.3s var(--ease);
}

.holo-card:hover .holo-open {
  transform: translateX(4px);
}

/* ------------------------------------------------------- 10 · 分类卡 */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  perspective: 1600px;
}

/* 与文章卡片同样的两层分工：.cat-cell 只管入场，.cat-card 只管倾斜 */
.cat-cell {
  display: flex;
}

.cat-cell > .cat-card {
  flex: 1 1 auto;
}

.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.4s var(--ease);
}

.cat-card:hover {
  background: var(--glass-2);
  border-color: var(--line-3);
  box-shadow: var(--shadow-2);
}

.cat-glow {
  position: absolute;
  top: -60%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(56, 225, 255, 0.22), transparent 68%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.cat-card:hover .cat-glow {
  opacity: 1;
}

.cat-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--fg);
}

.cat-count {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--cyan);
}

.cat-date {
  font-size: 12px;
  color: var(--fg-3);
}

.cat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.cat-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 8px 0 10px;
}

.cat-list li {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--fg-2);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-card-lg .cat-name {
  font-size: 19px;
}

/* ------------------------------------------------------ 11 · 页面头 */

.page-wrap {
  padding-top: 68px;
}

.page-header {
  margin-bottom: 42px;
}

.page-kicker {
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}

.page-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.page-desc {
  margin-top: 12px;
  font-size: 15px;
  color: var(--fg-2);
}

.page-desc code {
  padding: 2px 7px;
  font-size: 13px;
  color: var(--pink);
  background: rgba(255, 122, 200, 0.1);
  border-radius: 6px;
}

.year-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.year-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg-2);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color 0.2s, border-color 0.2s, transform 0.3s var(--ease);
}

.year-tab span {
  font-size: 11px;
  color: var(--fg-3);
}

.year-tab:hover {
  color: var(--fg);
  border-color: var(--line-3);
  transform: translateY(-2px);
}

/* ------------------------------------------------------------ 12 · 归档 */

.year-block {
  margin-bottom: 46px;
}

.year-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.year-num {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.year-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-3), transparent);
}

.year-count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-3);
}

.entry-list {
  display: flex;
  flex-direction: column;
}

.entry {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: background 0.22s, transform 0.3s var(--ease);
}

.entry:hover {
  background: rgba(126, 168, 255, 0.07);
  transform: translateX(4px);
}

.entry-date {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg-3);
}

.entry-name {
  font-size: 15px;
  color: var(--fg);
  transition: color 0.2s;
}

.entry:hover .entry-name {
  color: var(--cyan);
}

.entry-tag {
  padding: 2px 10px;
  font-size: 11.5px;
  color: var(--fg-2);
  background: rgba(126, 168, 255, 0.09);
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}

/* ------------------------------------------------------------ 13 · 文章 */

.article-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 52px;
  padding-top: 54px;
}

.coord-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-3);
}

.coord-line a {
  color: var(--fg-2);
  transition: color 0.2s;
}

.coord-line a:hover {
  color: var(--cyan);
}

.coord-sep {
  color: var(--fg-3);
  opacity: 0.6;
}

.coord-here {
  color: var(--fg-3);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-header {
  margin: 26px 0 34px;
}

.article-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-3);
}

.kicker-pill {
  padding: 3px 11px;
  color: var(--cyan);
  background: rgba(56, 225, 255, 0.1);
  border: 1px solid rgba(56, 225, 255, 0.24);
  border-radius: 999px;
}

.kicker-sep {
  opacity: 0.5;
}

.article-title {
  font-size: clamp(28px, 4.2vw, 42px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

/* 正文：可读性优先，不做 3D 变换 */
.prose {
  font-size: 16.5px;
  line-height: 1.92;
  color: var(--fg);
}

.prose > * + * {
  margin-top: 20px;
}

.prose h2 {
  margin-top: 52px;
  padding-top: 20px;
  font-size: 26px;
  border-top: 1px solid var(--line);
}

.prose h3 {
  margin-top: 38px;
  font-size: 20px;
}

.prose h4 {
  margin-top: 30px;
  font-size: 17px;
  color: var(--fg-2);
}

.prose p {
  color: #dde3f6;
}

.prose a {
  color: var(--cyan);
  border-bottom: 1px solid rgba(56, 225, 255, 0.35);
  transition: border-color 0.2s, color 0.2s;
}

.prose a:hover {
  color: #ffffff;
  border-bottom-color: var(--cyan);
}

.prose strong {
  color: #ffffff;
  font-weight: 700;
}

.prose ul,
.prose ol {
  padding-left: 24px;
}

.prose ul {
  list-style: none;
}

.prose ul > li {
  position: relative;
  padding-left: 20px;
}

.prose ul > li::before {
  content: '';
  position: absolute;
  top: 0.72em;
  left: 2px;
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 2px;
  transform: rotate(45deg);
  opacity: 0.8;
}

.prose ol {
  list-style: decimal;
}

.prose li + li {
  margin-top: 8px;
}

.prose blockquote {
  padding: 14px 20px;
  color: var(--fg-2);
  background: rgba(126, 168, 255, 0.06);
  border-left: 3px solid var(--violet);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.prose blockquote p {
  color: inherit;
}

.prose img {
  display: block;
  margin: 26px auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
}

.prose hr {
  margin: 44px 0;
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-3), transparent);
}

/* 行内代码 */
.prose :not(pre) > code {
  padding: 2px 7px;
  font-size: 0.88em;
  color: var(--pink);
  background: rgba(255, 122, 200, 0.1);
  border: 1px solid rgba(255, 122, 200, 0.16);
  border-radius: 6px;
}

/* 代码块：深色底 + 细边框，融进深空背景 */
.prose pre {
  margin: 24px 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.7;
  background: rgba(2, 4, 10, 0.86) !important;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), var(--shadow-1);
}

.prose pre code {
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  font-size: inherit;
}

/* 语法高亮：index.mjs 里声明了 codeTheme（github-dark-default），
   但样式里一直没人消费 shiki 写进 <pre> 的那两个 CSS 变量，
   于是代码块始终是单色的 —— 这里把变量接上，配色才真的生效。 */
.prose pre.shiki,
.prose pre.shiki span {
  color: var(--shiki-dark);
}

/* 行号 —— 原站 markdown.lineNumbers 的等价物。
   shiki 每一行是 <span class="line">，行间靠换行断开；
   把 .line 变成 inline-block 并挂 ::before 计数器，正好落在那次换行上。 */
.prose pre.shiki code {
  counter-reset: shiki-line;
}
.prose pre.shiki .line {
  display: inline-block;
  counter-increment: shiki-line;
}
.prose pre.shiki .line::before {
  content: counter(shiki-line);
  display: inline-block;
  box-sizing: border-box;
  width: 3em;
  padding-right: 1.4em;
  text-align: right;
  color: var(--fg-3);
  user-select: none;
}

.prose table {
  width: 100%;
  margin: 26px 0;
  border-collapse: collapse;
  font-size: 14.5px;
}

.prose th,
.prose td {
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--line);
}

.prose th {
  color: var(--fg);
  background: rgba(126, 168, 255, 0.09);
  font-weight: 600;
}

.prose td {
  color: var(--fg-2);
}

/* ------------------------------------------------------------ 14 · 分页 */

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 60px 0 0;
}

.pager-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 0.25s, background 0.25s, transform 0.35s var(--ease);
}

.pager-item:hover {
  background: var(--glass-2);
  border-color: var(--line-3);
  transform: translateY(-3px);
}

.pager-item.is-empty {
  background: none;
  border: 1px dashed var(--line);
}

.pager-next {
  text-align: right;
}

.pager-dir {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--cyan);
}

.pager-title {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--fg);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related {
  margin-top: 62px;
}

.related .section-title {
  margin-bottom: 24px;
}

/* ------------------------------------------------------------ 15 · 侧栏 */

.article-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rail {
  position: sticky;
  top: 92px;
  padding: 18px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.rail-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fg-2);
}

.rail-dot {
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan);
}

.rail-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 52vh;
  overflow-y: auto;
}

.rail-item a {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 5px 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-3);
  transition: color 0.2s;
}

.rail-l3 a {
  padding-left: 14px;
  font-size: 12.5px;
}

.rail-tick {
  flex-shrink: 0;
  width: 12px;
  height: 1px;
  margin-top: 0.72em;
  background: var(--fg-3);
  opacity: 0.55;
  transition: background 0.2s, width 0.25s var(--ease);
}

.rail-item a:hover {
  color: var(--fg);
}

.rail-item a:hover .rail-tick {
  background: var(--cyan);
  width: 18px;
}

.rail-item.is-active a {
  color: var(--cyan);
}

.rail-item.is-active .rail-tick {
  background: var(--cyan);
  width: 18px;
  opacity: 1;
}

.rail-list::-webkit-scrollbar {
  width: 5px;
}

.rail-list::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 3px;
}

.author-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 18px;
  text-align: center;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.author-avatar {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(56, 225, 255, 0.08);
}

.author-name {
  font-size: 15px;
  font-weight: 700;
}

.author-role {
  font-size: 12px;
  line-height: 1.55;
  color: var(--fg-3);
}

.author-mail {
  margin-top: 6px;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cyan);
  border: 1px solid rgba(56, 225, 255, 0.3);
  border-radius: 999px;
  transition: background 0.2s, transform 0.3s var(--ease);
}

.author-mail:hover {
  background: rgba(56, 225, 255, 0.12);
  transform: translateY(-2px);
}

/* ------------------------------ 15b · 系列：轨道卡 / 连载页 / 本系列目录 */

/**
 * 一个目录里装了不止一篇文章，就是一条「轨道」。
 *
 * 三处入口共用 .series-card（首页 #series、分类页第一段、/series/ 总览页），
 * 连载页用 .series-track 那条带编号的竖直轨道，文章页侧栏用 .series-rail。
 * 玻璃面与虹彩高光都挂在第 8b 节的卡片通用底上，这里只补布局，不新造颜色。
 *
 * ⚠️ 文字一律用 --fg / --fg-2 / --cyan，不用 --fg-3：
 *   .space 是 fixed 的，三团 glow 会随滚动从任意一张卡片背后经过，
 *   而玻璃面只有 0.66 不透明度。实测 --fg-3(#7e8bab) 在青色光晕正心的
 *   透底色(#15374c) 上只剩 3.7:1，小字直接跌破 AA；同一位置 --fg-2 还有 6.9:1。
 */

.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
  perspective: 1600px;
}

.series-grid-lg {
  grid-template-columns: repeat(auto-fill, minmax(372px, 1fr));
}

/* 与 .holo-card / .cat-cell 同样的两层分工：外层管入场，内层管倾斜 */
.series-cell {
  display: flex;
  min-width: 0;
}

.series-cell > .series-card {
  flex: 1 1 auto;
  min-width: 0;
}

.series-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  /* 8b 那组通用底把 transition 整体覆盖了，这里把倾斜的回弹补回来：
     [data-tilt] 的 0.55s 只有出现在同一份列表里，松手时才真的走得动 */
  transition: transform 0.55s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.35s var(--ease);
}

/* 两层 translateZ：文案一层、编号列表一层，倾斜时层间出现视差 */
.series-card-inner,
.series-card-foot {
  position: relative;
  transform: translateZ(16px);
}

.series-card-rows {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateZ(30px);
}

.series-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.series-card-cat {
  padding: 2px 9px;
  font-size: 11.5px;
  color: var(--cyan);
  background: rgba(56, 225, 255, 0.1);
  border: 1px solid rgba(56, 225, 255, 0.22);
  border-radius: 999px;
}

.series-card-count {
  flex: none;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
}

.series-card-inner {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.series-card-title {
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--fg);
  overflow-wrap: anywhere;
  transition: color 0.25s;
}

.series-card:hover .series-card-title {
  color: #ffffff;
}

.series-card-dek {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--fg-2);
}

.series-card-row {
  /* 单行截断：条目 title 常常三四十字，两行会把卡片撑得比封面卡还高。
     这里刻意用 block 而不是 flex —— flex 容器上 text-overflow 不生效，
     匿名文本项只会越过去被裁掉，连个省略号都没有 */
  display: block;
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-2);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.series-card-no {
  display: inline-block;
  min-width: 22px;
  margin-right: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cyan);
}

.series-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 13px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-2);
  border-top: 1px solid var(--line);
}

.series-card-cta {
  margin-left: auto;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cyan);
  transition: transform 0.3s var(--ease);
}

.series-card:hover .series-card-cta {
  transform: translateX(4px);
}

/* ---------- 连载页：一条从上往下的轨道 ---------- */

.series-hero {
  margin-bottom: 20px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.series-hero-title {
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.series-hero-lead {
  max-width: 720px;
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--fg-2);
}

.series-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 26px;
}

/* 引导线由「每一节自己往下画一段」，而不是整条轨道画一根：
   各节高度不一（有条目摘要的行更高），一根到底的线会在最后一节的方块下面拖尾。
   段高 = 本节剩余 + 8px 间距 + 下一节的 34px（方块中心），下一节的方块是
   不透明底，正好把伸进它那一格的线头盖住。 */
.series-step {
  position: relative;
}

.series-step::before {
  content: '';
  position: absolute;
  top: 34px;
  left: 20px;
  width: 1px;
  height: calc(100% + 8px);
  background: var(--line-2);
}

.series-step:last-child::before {
  display: none;
}

.series-step-link {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 13px 16px;
  margin-left: -16px;
  margin-right: -16px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s, transform 0.3s var(--ease);
}

.series-step-link:hover {
  background: rgba(126, 168, 255, 0.07);
  border-color: var(--line);
  transform: translateX(4px);
}

.series-step-no {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--cyan);
  background: var(--void-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  transition: border-color 0.25s, box-shadow 0.35s var(--ease);
}

.series-step-link:hover .series-step-no {
  border-color: rgba(56, 225, 255, 0.55);
  box-shadow: 0 0 16px rgba(56, 225, 255, 0.28);
}

.series-step-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.series-step-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--fg);
  overflow-wrap: anywhere;
  transition: color 0.2s;
}

.series-step-link:hover .series-step-title {
  color: #ffffff;
}

.series-step-dek {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--fg-2);
}

.series-step-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-2);
  white-space: nowrap;
}

/* ---------- 侧栏 / 连载页共用的玻璃面板 ---------- */

.series-panel {
  padding: 18px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.series-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fg-2);
}

.series-panel-title {
  display: block;
  margin-bottom: 12px;
  padding-bottom: 12px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  transition: color 0.2s;
}

.series-panel-title:hover {
  color: var(--cyan);
}

.series-panel-link {
  display: block;
  margin-top: 12px;
  padding-top: 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cyan);
  border-top: 1px solid var(--line);
  transition: transform 0.3s var(--ease);
}

.series-panel-link:hover {
  transform: translateX(3px);
}

.series-facts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.series-facts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.series-facts dt {
  font-size: 12.5px;
  color: var(--fg-2);
}

.series-facts dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.series-sibs {
  display: flex;
  flex-direction: column;
}

.series-sibs a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fg-2);
  border-bottom: 1px dashed var(--line);
  transition: color 0.2s, transform 0.3s var(--ease);
}

.series-sibs li:last-child a {
  border-bottom: 0;
}

.series-sibs a:hover {
  color: var(--cyan);
  transform: translateX(3px);
}

.series-sib-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.series-sib-count {
  flex: none;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-2);
}

/* ---------- 文章页侧栏的「本系列」 ---------- */

.series-rail-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.series-rail-item a {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 6px 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-2);
  border-left: 2px solid transparent;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.series-rail-item a:hover {
  color: var(--fg);
  background: rgba(126, 168, 255, 0.08);
}

.series-rail-item.is-current a {
  color: var(--cyan);
  font-weight: 600;
  background: rgba(56, 225, 255, 0.12);
  border-left-color: var(--cyan);
}

.series-rail-no {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
}

.series-rail-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ---------- 眉部系列标签：唯一可点的胶囊 ---------- */

.kicker-pill-link {
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.kicker-pill-link:hover {
  color: #ffffff;
  background: rgba(56, 225, 255, 0.2);
  border-color: rgba(56, 225, 255, 0.5);
}

/* ---------- 轨道读完的那句话 ---------- */

.pager-note {
  margin-top: 16px;
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--fg-2);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.pager-note a {
  font-weight: 600;
  color: var(--cyan);
  border-bottom: 1px solid rgba(56, 225, 255, 0.35);
  transition: color 0.2s, border-color 0.2s;
}

.pager-note a:hover {
  color: #ffffff;
  border-bottom-color: var(--cyan);
}

/* ------------------------------------------------------------ 16 · 检索 */

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 620px;
  padding: 4px 20px;
  background: var(--glass-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  box-shadow: var(--shadow-1);
  transition: border-color 0.25s, box-shadow 0.3s;
}

.search-box:focus-within {
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
}

.search-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1.8px solid var(--fg-3);
  border-radius: 50%;
  position: relative;
}

.search-icon::after {
  content: '';
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 7px;
  height: 1.8px;
  background: var(--fg-3);
  transform: rotate(45deg);
  border-radius: 2px;
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 14px 0;
  font-family: inherit;
  font-size: 16px;
  color: var(--fg);
  background: none;
  border: 0;
  outline: 0;
}

.search-input::placeholder {
  color: var(--fg-3);
}

.search-hint {
  margin: 18px 0 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg-3);
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.result-item {
  display: block;
  padding: 18px 20px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 0.25s, background 0.25s, transform 0.35s var(--ease);
}

.result-item:hover {
  background: var(--glass-2);
  border-color: var(--line-3);
  transform: translateY(-3px);
}

.result-title {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--fg);
}

.result-meta {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-3);
}

.result-excerpt {
  margin-top: 9px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--fg-2);
}

mark {
  padding: 1px 3px;
  color: #04060e;
  background: var(--cyan);
  border-radius: 3px;
}

/* ------------------------------------------------------------ 17 · 404 */

.notfound {
  padding-top: 90px;
}

.nf-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46vh;
  text-align: center;
}

/* 背景里那个巨大的 404，用 translateZ 推到最深处 */
.nf-ghost {
  position: absolute;
  font-size: clamp(120px, 26vw, 300px);
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(126, 168, 255, 0.16);
  transform: translateZ(-180px) scale(1.1);
  user-select: none;
  pointer-events: none;
}

.nf-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transform-style: preserve-3d;
  transform: translateZ(40px);
}

.nf-body .scene-actions {
  justify-content: center;
  margin-top: 28px;
}

/* --------------------------------------------------- 18 · 主题切换器 */

.theme-switch {
  display: flex;
  align-items: center;
  padding-left: 16px;
  margin-left: 4px;
  border-left: 1px solid var(--line);
}

/* <summary> 自带的小三角要去掉，换成自己画的箭头 */
.theme-switch-trigger,
.theme-hero-trigger {
  list-style: none;
  cursor: pointer;
}
.theme-switch-trigger::-webkit-details-marker,
.theme-hero-trigger::-webkit-details-marker {
  display: none;
}
.theme-switch-trigger::marker,
.theme-hero-trigger::marker {
  content: '';
}

.theme-switch-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--glass-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--fg-2);
  font-size: 12.5px;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.theme-switch-trigger:hover {
  color: var(--fg);
  background: rgba(126, 168, 255, 0.1);
  border-color: var(--line-3);
}

.theme-switch-trigger:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.theme-switch-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-2);
}

.theme-switch-current {
  color: var(--fg);
}

.theme-switch-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.2s var(--ease);
}

.theme-switch-picker[open] .theme-switch-caret {
  transform: rotate(180deg);
}

/* 面板锚在**顶栏内层容器**上，而不是按钮上。
   按钮在窄屏会被推到左边，锚按钮的话右对齐的面板会伸出屏幕左侧；
   锚容器就永远是「贴着容器右缘往左展开」，任何宽度都不会横向溢出。 */
.theme-switch-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  display: grid;
  gap: 4px;
  width: min(284px, calc(100vw - 44px));
  padding: 10px;
  background: var(--glass);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.theme-switch-panel-title {
  padding: 2px 10px 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
}

.theme-switch-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--fg-2);
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.theme-switch-item:hover {
  color: var(--fg);
  background: rgba(126, 168, 255, 0.1);
  border-color: var(--line-2);
}

.theme-switch-item.is-current {
  color: var(--cyan);
  background: rgba(56, 225, 255, 0.1);
  border-color: rgba(56, 225, 255, 0.28);
}

.theme-switch-dot {
  width: 5px;
  height: 5px;
  flex: none;
  background: currentColor;
  border-radius: 50%;
}

.theme-switch-name {
  flex: 1;
  min-width: 0;
}

.theme-switch-state {
  flex: none;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.theme-hero {
  margin-top: 88px;
  padding: 34px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}

.theme-hero-head {
  margin-bottom: 20px;
}

.theme-hero-kicker {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.theme-hero-title {
  font-size: 24px;
  font-weight: 700;
}

.theme-hero-note {
  margin-top: 8px;
  font-size: 14px;
  color: var(--fg-2);
}

/* 首页这处不浮层：展开就把版面撑开，不会盖住页脚 */
.theme-hero-picker {
  display: block;
}

.theme-hero-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  background: var(--glass-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  transition: border-color 0.25s, background 0.25s, transform 0.4s var(--ease);
}

.theme-hero-trigger:hover {
  transform: translateY(-2px);
  border-color: var(--line-3);
  box-shadow: var(--glow-violet);
}

.theme-hero-trigger:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.theme-hero-trigger-label {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
}

.theme-hero-trigger-name {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--fg);
}

.theme-hero-caret {
  flex: none;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--fg-2);
  transition: transform 0.2s var(--ease);
}

.theme-hero-picker[open] .theme-hero-caret {
  transform: rotate(180deg);
}

.theme-hero-panel {
  margin-top: 16px;
}

.theme-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  perspective: 1400px;
}

.theme-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  background: rgba(8, 12, 26, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: transform 0.4s var(--ease), border-color 0.25s, background 0.25s, box-shadow 0.35s;
}

.theme-card:hover {
  transform: translateY(-4px) rotateX(4deg);
  border-color: var(--line-3);
  background: var(--glass-2);
  box-shadow: var(--glow-violet);
}

.theme-card.is-current {
  border-color: rgba(56, 225, 255, 0.42);
  background: rgba(56, 225, 255, 0.07);
}

.theme-card-name {
  font-size: 16px;
  font-weight: 700;
}

.theme-card-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--fg-2);
}

.theme-card-flag {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

/* ------------------------------------------------------------ 19 · 页脚 */

.foot {
  margin-top: 110px;
  border-top: 1px solid var(--line);
  background: rgba(4, 6, 14, 0.6);
}

.foot-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 34px 24px;
}

.foot-name {
  font-size: 16px;
  font-weight: 700;
}

.foot-mail {
  font-size: 13px;
  color: var(--fg-2);
  transition: color 0.2s;
}

.foot-mail:hover {
  color: var(--cyan);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.foot-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  font-size: 12.5px;
  color: var(--fg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color 0.2s, border-color 0.2s, transform 0.3s var(--ease);
}

.foot-link:hover {
  color: var(--cyan);
  border-color: var(--line-3);
  transform: translateY(-2px);
}

.foot-arrow {
  font-size: 10px;
  opacity: 0.7;
}

.foot-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
  font-size: 12.5px;
  color: var(--fg-2);
}

.foot-dim {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
}

/* 首页版块索引 —— 从文章页进来的访客原本没有任何入口回到首页的作品 / 荣誉等版块，
   这些锚点只存在于首页内部导航。放一行在页脚，任何页面上都能回得去。
   只写上下 padding，左右交给 .wrap（窄屏会自动收成 18px）。 */
.foot-sections {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 20px;
  padding-top: 18px;
  padding-bottom: 26px;
  border-top: 1px dashed var(--line);
}

.foot-sections-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--fg-3);
}

.foot-sections-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.foot-section {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
  transition: color 0.2s;
}

.foot-section::before {
  content: '#';
  margin-right: 1px;
  color: var(--cyan);
  opacity: 0.55;
}

.foot-section:hover {
  color: var(--cyan);
}

.foot-section:hover::before {
  opacity: 1;
}

/* ------------------------------------------- 20 · 复制工具条配色贴合主题 */

html[data-theme='dark'] {
  --ct-fg: #c7d1ea;
  --ct-fg-dim: #93a0c0;
  --ct-bg: rgba(126, 168, 255, 0.08);
  --ct-bg-hover: rgba(126, 168, 255, 0.16);
  --ct-border: rgba(126, 168, 255, 0.24);
  --ct-accent: #38e1ff;
  --ct-wechat: #5ef2c0;
  --ct-panel: #0b1020;
  --ct-panel-text: #e9edfb;
  --ct-panel-dim: #b6c1de;
  --ct-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}

/* ------------------------------------------------------------ 21 · 响应式 */

@media (max-width: 1080px) {
  /* 顶栏多了「系列」这一个落点，从这一档开始要收着放才挤得下；
     860 以下整条导航换成可横滑，brand 的副标语先让位 */
  .nav {
    gap: 2px;
  }

  .nav-item {
    padding: 6px 9px;
    font-size: 13.5px;
  }

  .brand-sub {
    display: none;
  }

  .article-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .rail {
    position: static;
  }

  .article-side {
    order: 2;
  }

  /* 侧栏折回文档流后独占整幅宽度：「本系列」是七条起步的列表，
     排成两列省掉一半高度，读者不用滚过半屏才看到正文目录 */
  .series-rail .series-rail-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2px 16px;
  }

  /* 首页个人版块：三列压成两列，荣誉墙四列压成三列 */
  .work-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .topbar-inner {
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
  }

  .theme-switch {
    margin-left: auto;
    padding-left: 0;
    border-left: 0;
  }

  .scene {
    padding: 60px 0 48px;
  }

  .scene-dims {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .orbit-a,
  .orbit-b,
  .orbit-c {
    opacity: 0.5;
  }

  /* 关于我：头像与文字改为上下排 */
  .about-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 26px;
  }

  .svc-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foot-inner {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .foot-meta {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 0 18px;
  }

  .card-grid,
  .cat-grid,
  .work-grid,
  .contact-grid,
  .course-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 荣誉墙在窄屏保留两列 —— 一列的话图片会占满屏，翻起来太累 */
  .gal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .about-card {
    padding: 22px;
  }

  .about-avatar {
    width: 96px;
    height: 96px;
  }

  .contact-qr img {
    width: 104px;
    height: 104px;
  }

  .entry {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .entry-tag {
    justify-self: start;
  }

  .pager {
    grid-template-columns: minmax(0, 1fr);
  }

  .pager-next {
    text-align: left;
  }

  .series-grid,
  .series-grid-lg {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 轨道行右侧的「时长 / 日期」在窄列里会把标题挤成一列字，改成跟到标题下面；
     方块尺寸不动，引导线的 left:20px 是按 40px 方块的中心算的 */
  .series-step-link {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
  }

  .series-step-meta {
    grid-column: 2;
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
  }

  /* 390px 下两列会把条目压成三字一行，回退成单列 */
  .series-rail .series-rail-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .theme-hero {
    padding: 22px;
  }
}

/* ------------------------------------------------ 22 · 降级（必须保留） */

/**
 * 触屏没有 hover，倾斜会变成「点一下抖一下」，直接关掉，
 * 只保留入场与分层（静态的 Z 分层仍然好看）。
 */
@media (hover: none), (pointer: coarse) {
  [data-tilt] {
    transform: none !important;
  }

  .holo-sheen,
  .about-sheen,
  .work-sheen,
  .gal-sheen,
  .course-sheen,
  .series-sheen {
    display: none;
  }

  /* 触屏上二维码没有 hover 可依赖，直接给足对比度 */
  .contact-qr img {
    opacity: 1;
  }
}

/* 尊重系统「减少动态效果」：所有位移归零，只留透明度 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  [data-tilt] {
    transform: none !important;
  }

  .reveal-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .space-glow {
    animation: none;
  }

  .space-grid {
    animation: none;
  }
}

/* 打印：去掉所有装饰层 */
@media print {
  .space,
  .topbar,
  .foot,
  .theme-hero,
  .copy-toolbar,
  .article-side {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  .prose p,
  .prose li {
    color: #000;
  }
}
