/* ============================================================
   李许源 · AI 生成师 — 个人作品站
   深色赛博渐变大屏 / 水墨晕染 / 电影感排版
   ============================================================ */

/* 自托管字体，不依赖外部 CDN */
@font-face {
  font-family: "Bebas Neue";
  src: url("assets/fonts/bebas-neue.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #05060a;
  --ink-soft: #0a0c14;
  --paper: #f4f2ec;
  --muted: rgba(244, 242, 236, 0.6);
  --muted-2: rgba(244, 242, 236, 0.38);
  --line: rgba(244, 242, 236, 0.1);
  --line-soft: rgba(244, 242, 236, 0.06);

  --cyan: #5ef3ff;
  --violet: #8b5cf6;
  --magenta: #ff2f7d;
  --jade: #2ff2b3;

  --font-cn: "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC",
    "Noto Sans SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Mono", Consolas, monospace;
  --font-display: "Bebas Neue", "Impact", "Haettenschweiler", "Arial Narrow",
    sans-serif;

  --pad: clamp(20px, 4.6vw, 72px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-cn);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

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

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

h1, h2, h3, p, ul, ol, figure {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
}

::selection {
  background: rgba(94, 243, 255, 0.28);
  color: #fff;
}

/* ---------- 全局纹理 ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 自定义光标 ---------- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  pointer-events: none;
  border-radius: 50%;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

body.cursor-ready .cursor-dot,
body.cursor-ready .cursor-ring {
  opacity: 1;
}

.cursor-dot {
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  background: #fff;
  mix-blend-mode: difference;
}

.cursor-ring {
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 1px solid rgba(244, 242, 236, 0.35);
  transition: width 0.35s var(--ease), height 0.35s var(--ease),
    margin 0.35s var(--ease), border-color 0.35s var(--ease),
    background-color 0.35s var(--ease);
}

.cursor-ring.is-hover {
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-color: rgba(94, 243, 255, 0.75);
  background: rgba(94, 243, 255, 0.07);
}

@media (pointer: coarse), (hover: none) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--pad);
  transition: padding 0.5s var(--ease), background-color 0.5s var(--ease),
    backdrop-filter 0.5s var(--ease), border-color 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}

.topbar.is-scrolled {
  padding-top: 14px;
  padding-bottom: 14px;
  background: rgba(5, 6, 10, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line-soft);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  color: #05060a;
  background: linear-gradient(140deg, #dff9ff, #7de9ff 45%, #b69bff);
  border-radius: 10px;
  box-shadow: 0 0 22px rgba(94, 243, 255, 0.28);
}

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

.brand-text b {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.16em;
}

.brand-text i {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--muted-2);
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 34px);
}

.nav-link {
  position: relative;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  padding: 6px 0;
  transition: color 0.3s var(--ease);
  white-space: nowrap;
}

.nav-link span {
  display: inline-block;
  margin-right: 7px;
  font-size: 8px;
  color: var(--muted-2);
  transform: translateY(-1px);
  transition: color 0.3s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  transition: width 0.45s var(--ease);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--paper);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

.nav-link:hover span,
.nav-link.is-active span {
  color: var(--cyan);
}

.topbar-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  font-size: 12px;
  letter-spacing: 0.08em;
  border: 1px solid rgba(94, 243, 255, 0.34);
  border-radius: 999px;
  color: #dffaff;
  background: rgba(94, 243, 255, 0.05);
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease), color 0.4s var(--ease);
  white-space: nowrap;
}

.topbar-cta svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.4s var(--ease);
}

.topbar-cta:hover {
  background: rgba(94, 243, 255, 0.14);
  border-color: rgba(94, 243, 255, 0.7);
  box-shadow: 0 0 30px rgba(94, 243, 255, 0.18);
  color: #fff;
}

.topbar-cta:hover svg {
  transform: translateX(4px);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 9px;
  right: 9px;
  height: 1px;
  background: var(--paper);
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}

.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 23px; }

.nav-toggle.is-open span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 90% at 50% -12%, #16204a 0%, #0a0d1c 46%, #05060a 76%);
}

/* 细扫描线，给大屏一点"显示器"质感 */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.16;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.055) 0px,
    rgba(255, 255, 255, 0.055) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

.hero-bg {
  position: absolute;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.5;
  will-change: transform;
}

.blob-a {
  width: 66vw;
  height: 66vw;
  left: -10vw;
  top: -18vw;
  opacity: 0.44;
  background: radial-gradient(circle at 50% 50%, rgba(52, 108, 255, 0.72), rgba(52, 108, 255, 0) 66%);
  animation: drift-a 26s ease-in-out infinite alternate;
}

.blob-b {
  width: 54vw;
  height: 54vw;
  right: -12vw;
  top: 2vw;
  opacity: 0.36;
  background: radial-gradient(circle at 50% 50%, rgba(176, 62, 255, 0.6), rgba(176, 62, 255, 0) 66%);
  animation: drift-b 30s ease-in-out infinite alternate;
}

.blob-c {
  width: 62vw;
  height: 46vw;
  left: 18vw;
  bottom: -26vw;
  opacity: 0.4;
  background: radial-gradient(circle at 50% 50%, rgba(0, 232, 214, 0.5), rgba(0, 232, 214, 0) 68%);
  animation: drift-c 34s ease-in-out infinite alternate;
}

.blob-d {
  width: 40vw;
  height: 30vw;
  left: 26vw;
  top: 34vh;
  opacity: 0.32;
  background: radial-gradient(circle at 50% 50%, rgba(255, 46, 128, 0.3), rgba(255, 46, 128, 0) 68%);
  animation: drift-d 22s ease-in-out infinite alternate;
}

@keyframes drift-d {
  from { transform: translate3d(-4vw, 2vw, 0) scale(0.92); }
  to   { transform: translate3d(6vw, -3vw, 0) scale(1.18); }
}

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

@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.06); }
  to   { transform: translate3d(-7vw, 5vw, 0) scale(0.94); }
}

@keyframes drift-c {
  from { transform: translate3d(0, 0, 0) scale(0.95); }
  to   { transform: translate3d(5vw, -4vw, 0) scale(1.12); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(244, 242, 236, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 242, 236, 0.045) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse 78% 68% at 50% 42%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 78% 68% at 50% 42%, #000 10%, transparent 78%);
  opacity: 0.9;
}

.hero-horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(to top, rgba(5, 6, 10, 0.96), transparent);
}

.ink-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.78;
}

/* 文字区压暗，保证信息始终可读 */
.hero.is-offscreen .blob {
  animation-play-state: paused;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(58% 76% at 28% 46%, rgba(5, 6, 10, 0.86) 0%, rgba(5, 6, 10, 0.6) 46%, rgba(5, 6, 10, 0) 80%),
    linear-gradient(to top, rgba(5, 6, 10, 0.8), rgba(5, 6, 10, 0.16) 38%, transparent 62%);
}

.hero-frame {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 104px var(--pad) 30px;
  pointer-events: none;
}

.hero-frame a,
.hero-frame button {
  pointer-events: auto;
}

.hero-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  color: var(--muted-2);
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 12px rgba(47, 242, 179, 0.9);
  animation: pulse 2.4s ease-in-out infinite;
}

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

.hero-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 260px);
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
  padding: clamp(28px, 5vh, 64px) 0;
}

.hero-left {
  max-width: 900px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.34em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: clamp(14px, 2vw, 26px);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 34px;
  height: 1px;
  margin-right: 14px;
  vertical-align: middle;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.hero-name {
  position: relative;
  margin-bottom: clamp(20px, 3vw, 34px);
}

.hero-name .ghost {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(16px, 2.1vw, 30px);
  letter-spacing: 0.46em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 242, 236, 0.32);
  margin-bottom: 0.18em;
  padding-left: 0.1em;
}

.hero-name .cn {
  display: block;
  font-size: clamp(64px, 12.4vw, 186px);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.045em;
  background: linear-gradient(168deg, #ffffff 6%, #dfe7f7 42%, #8e9bbd 84%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 34px 90px rgba(94, 243, 255, 0.08);
}

.hero-role {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  color: var(--muted);
  margin-bottom: clamp(16px, 2.4vw, 26px);
}

.hero-role .tag {
  padding: 3px 8px;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(94, 243, 255, 0.9);
  border: 1px solid rgba(94, 243, 255, 0.26);
  border-radius: 3px;
}

.hero-role strong {
  font-weight: 500;
  color: #eaf9ff;
  letter-spacing: 0.18em;
}

.hero-role em {
  font-style: normal;
  color: var(--muted-2);
}

.hero-desc {
  max-width: 46ch;
  font-size: clamp(13.5px, 1.12vw, 15.5px);
  line-height: 2;
  color: var(--muted);
  margin-bottom: clamp(24px, 3.4vw, 40px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
    background-color 0.4s var(--ease), border-color 0.4s var(--ease),
    color 0.4s var(--ease);
}

.btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary {
  color: #04121a;
  background: linear-gradient(120deg, #b7f8ff, #6ee9ff 46%, #9d8bff);
  box-shadow: 0 10px 40px rgba(94, 243, 255, 0.18);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.75) 50%, transparent 75%);
  transform: translateX(-120%);
  transition: transform 0.85s var(--ease);
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 50px rgba(94, 243, 255, 0.34);
}

.btn-ghost {
  color: rgba(244, 242, 236, 0.82);
  border: 1px solid rgba(244, 242, 236, 0.16);
  background: rgba(255, 255, 255, 0.015);
}

.btn-ghost:hover {
  color: #fff;
  border-color: rgba(244, 242, 236, 0.4);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding-left: clamp(0px, 1.4vw, 22px);
  border-left: 1px solid var(--line-soft);
}

.mini-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--muted-2);
  margin-bottom: 12px;
}

.mini-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 7px 0;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  transition: border-color 0.3s var(--ease), padding-left 0.3s var(--ease);
}

.mini-row span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--muted-2);
}

.mini-row b {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(244, 242, 236, 0.86);
  word-break: break-all;
  transition: color 0.3s var(--ease);
}

.mini-row:hover {
  padding-left: 6px;
  border-bottom-color: rgba(94, 243, 255, 0.5);
}

.mini-row:hover b {
  color: var(--cyan);
}

.mini-note {
  font-size: 12px;
  line-height: 1.95;
  color: var(--muted-2);
}

.hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 3.4vw, 58px);
}

.stats li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.9vw, 42px);
  line-height: 1;
  letter-spacing: 0.02em;
  background: linear-gradient(150deg, #ffffff, #9fb0cf 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-num .unit {
  font-size: 0.5em;
  margin-left: 2px;
  color: rgba(94, 243, 255, 0.85);
  -webkit-text-fill-color: rgba(94, 243, 255, 0.85);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--muted-2);
  transition: color 0.3s var(--ease);
}

.scroll-cue:hover {
  color: var(--paper);
}

.scroll-line {
  position: relative;
  display: block;
  width: 46px;
  height: 1px;
  overflow: hidden;
  background: rgba(244, 242, 236, 0.14);
}

.scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: scan 2.6s var(--ease) infinite;
}

@keyframes scan {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

/* 首屏入场 */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-topline > *,
.eyebrow,
.hero-name .ghost,
.hero-name .cn,
.hero-role,
.hero-desc,
.hero-actions,
.hero-right .mini-block,
.hero-bottom {
  animation: rise 1.15s var(--ease) both;
}

.hero-topline > *:nth-child(2) { animation-delay: 0.1s; }
.eyebrow { animation-delay: 0.18s; }
.hero-name .ghost { animation-delay: 0.26s; }
.hero-name .cn { animation-delay: 0.34s; }
.hero-role { animation-delay: 0.5s; }
.hero-desc { animation-delay: 0.6s; }
.hero-actions { animation-delay: 0.72s; }
.hero-right .mini-block:nth-child(1) { animation-delay: 0.82s; }
.hero-right .mini-block:nth-child(2) { animation-delay: 0.94s; }
.hero-bottom { animation-delay: 1s; }

/* ============================================================
   SECTION 公共
   ============================================================ */
.section {
  position: relative;
  padding: clamp(88px, 11vw, 168px) var(--pad);
  border-top: 1px solid var(--line-soft);
}

.section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 380px;
  background: radial-gradient(70% 100% at 18% 0%, rgba(58, 120, 255, 0.09), transparent 70%);
  pointer-events: none;
}

.section-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 400px);
  align-items: end;
  gap: clamp(20px, 4vw, 60px);
  padding-bottom: clamp(38px, 5vw, 66px);
  margin-bottom: clamp(38px, 5vw, 66px);
  border-bottom: 1px solid var(--line-soft);
}

.section-index {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.3em;
  color: rgba(94, 243, 255, 0.68);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(34px, 5.2vw, 76px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.section-title .thin {
  font-weight: 300;
  color: var(--muted);
}

.section-desc {
  font-size: 13px;
  line-height: 2;
  color: var(--muted);
  max-width: 42ch;
}

/* ============================================================
   WORKS
   ============================================================ */
.works-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 24px);
}

.work-card {
  position: relative;
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
}

.work-card--wide {
  grid-column: span 7;
}

/* 同一行的窄卡让封面撑满行高，两卡底部对齐 */
.work-card:not(.work-card--wide) .work-media {
  aspect-ratio: auto;
  flex: 1 1 auto;
  min-height: 220px;
}

.work-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0a0c14;
  transition: border-color 0.55s var(--ease), transform 0.7s var(--ease),
    box-shadow 0.7s var(--ease);
}

.media-gradient {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 26% 22%, rgba(94, 243, 255, 0.34), transparent 56%),
    radial-gradient(circle at 76% 78%, rgba(139, 92, 246, 0.4), transparent 58%),
    linear-gradient(135deg, #0a1622, #0b0a1a 60%, #05060a);
  filter: blur(2px);
  transition: transform 1.1s var(--ease), filter 1.1s var(--ease);
}

.media-gradient.alt {
  background:
    radial-gradient(circle at 70% 26%, rgba(255, 47, 125, 0.3), transparent 55%),
    radial-gradient(circle at 24% 80%, rgba(47, 242, 179, 0.24), transparent 56%),
    linear-gradient(140deg, #120a18, #080a12 62%, #05060a);
}

.media-gradient.dim {
  background:
    radial-gradient(circle at 50% 44%, rgba(180, 200, 255, 0.16), transparent 58%),
    linear-gradient(150deg, #0b0d16, #05060a);
}

.media-gradient.warm {
  background:
    radial-gradient(circle at 30% 70%, rgba(255, 176, 94, 0.22), transparent 55%),
    radial-gradient(circle at 74% 22%, rgba(139, 92, 246, 0.3), transparent 58%),
    linear-gradient(125deg, #140d12, #0a0a16 60%, #05060a);
}

.media-noise {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  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='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.media-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(244, 242, 236, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 242, 236, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 72%);
}

.media-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.2em;
  color: rgba(244, 242, 236, 0.68);
  border: 1px solid rgba(244, 242, 236, 0.16);
  border-radius: 3px;
  background: rgba(5, 6, 10, 0.4);
  backdrop-filter: blur(6px);
}

.media-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.media-play svg {
  width: 46px;
  height: 46px;
  padding: 12px;
  fill: rgba(244, 242, 236, 0.9);
  border: 1px solid rgba(244, 242, 236, 0.24);
  border-radius: 50%;
  background: rgba(5, 6, 10, 0.28);
  backdrop-filter: blur(4px);
  opacity: 0.55;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease),
    background-color 0.5s var(--ease), border-color 0.5s var(--ease);
}

.work-card:hover .media-play svg {
  opacity: 1;
  transform: scale(1.08);
  background: rgba(94, 243, 255, 0.16);
  border-color: rgba(94, 243, 255, 0.7);
  fill: #eafcff;
}

.media-note {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.work-card:hover .media-note {
  opacity: 1;
  transform: translateY(0);
}

.work-card:hover .work-media {
  border-color: rgba(94, 243, 255, 0.42);
  box-shadow: 0 24px 70px rgba(58, 120, 255, 0.16);
  transform: translateY(-4px);
}

.work-card:hover .media-gradient {
  transform: scale(1.06);
  filter: blur(0px);
}

.work-info {
  padding: 18px 2px 0;
}

.work-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.work-title-row h3 {
  font-size: clamp(17px, 1.7vw, 23px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.work-year {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
}

.work-meta {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.work-empty {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--muted-2);
  padding-left: 12px;
  border-left: 1px solid rgba(244, 242, 236, 0.14);
}

.work-desc {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
  padding-left: 12px;
  border-left: 1px solid rgba(94, 243, 255, 0.32);
}

/* ============================================================
   SKILLS
   ============================================================ */
.skill-list {
  display: flex;
  flex-direction: column;
}

.skill-row {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 140px;
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(26px, 3.4vw, 44px) 0;
  border-bottom: 1px solid var(--line-soft);
  transition: background-color 0.5s var(--ease);
}

.skill-row::before {
  content: "";
  position: absolute;
  left: calc(var(--pad) * -1);
  right: calc(var(--pad) * -1);
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(94, 243, 255, 0.05), transparent 55%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}

.skill-row:hover::before {
  opacity: 1;
}

.skill-num {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: 0.1em;
  color: var(--muted-2);
  padding-top: 2px;
  transition: color 0.4s var(--ease);
}

.skill-row:hover .skill-num {
  color: var(--cyan);
}

.skill-body h3 {
  font-size: clamp(21px, 2.2vw, 30px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.skill-body p {
  max-width: 66ch;
  font-size: 13px;
  line-height: 2;
  color: var(--muted);
  margin-bottom: 18px;
}

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

.chips li {
  padding: 5px 11px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: rgba(244, 242, 236, 0.62);
  border: 1px solid rgba(244, 242, 236, 0.13);
  border-radius: 999px;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease),
    background-color 0.35s var(--ease), transform 0.35s var(--ease);
}

.chips li:hover {
  color: #eafcff;
  border-color: rgba(94, 243, 255, 0.5);
  background: rgba(94, 243, 255, 0.08);
  transform: translateY(-2px);
}

.skill-tag {
  justify-self: end;
  align-self: start;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--muted-2);
  padding-top: 6px;
  white-space: nowrap;
}

.marquee {
  margin-top: clamp(46px, 6vw, 86px);
  overflow: hidden;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 16px 0;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  animation: marquee 34s linear infinite;
}

.marquee-track span {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.2em;
  color: rgba(244, 242, 236, 0.4);
  white-space: nowrap;
}

.marquee-track i {
  font-style: normal;
  font-size: 8px;
  color: rgba(94, 243, 255, 0.55);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   CAMPUS
   ============================================================ */
.campus-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 90px);
  align-items: start;
}

.campus-left {
  position: sticky;
  top: 120px;
}

.campus-school {
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.campus-major {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 24px;
}

.campus-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.campus-roles span {
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(94, 243, 255, 0.86);
  border: 1px solid rgba(94, 243, 255, 0.24);
  border-radius: 3px;
  background: rgba(94, 243, 255, 0.04);
}

.timeline {
  border-top: 1px solid var(--line-soft);
}

.timeline-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: clamp(14px, 2vw, 32px);
  padding: clamp(22px, 2.8vw, 34px) 0;
  border-bottom: 1px solid var(--line-soft);
  transition: padding-left 0.5s var(--ease);
}

.timeline-item:hover {
  padding-left: 14px;
}

.t-year {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
  padding-top: 5px;
  transition: color 0.4s var(--ease);
}

.timeline-item:hover .t-year {
  color: var(--cyan);
}

.t-body h3 {
  font-size: clamp(15px, 1.5vw, 19px);
  font-weight: 600;
  margin-bottom: 6px;
  transition: color 0.4s var(--ease);
}

.t-body p {
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--muted-2);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  position: relative;
  overflow: hidden;
}

.contact::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -30vw;
  width: 90vw;
  height: 70vw;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 50%, rgba(94, 243, 255, 0.16), rgba(139, 92, 246, 0.1) 40%, transparent 68%);
  filter: blur(40px);
  pointer-events: none;
}

.contact-inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
}

.contact-title {
  font-size: clamp(30px, 5vw, 68px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin: 20px 0 clamp(30px, 4vw, 52px);
}

.contact-title .accent {
  background: linear-gradient(100deg, var(--cyan), #a78bfa 70%, var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.contact-mail {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: clamp(16px, 2.6vw, 36px);
  letter-spacing: -0.01em;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(244, 242, 236, 0.22);
  transition: border-color 0.5s var(--ease), color 0.5s var(--ease);
}

.contact-mail svg {
  width: clamp(18px, 2vw, 28px);
  height: clamp(18px, 2vw, 28px);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.5s var(--ease);
}

.contact-mail:hover {
  color: #eafcff;
  border-bottom-color: var(--cyan);
}

.contact-mail:hover svg {
  transform: translateX(8px);
}

.contact-rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
  margin-top: clamp(34px, 4.6vw, 60px);
}

.contact-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 20px 22px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.014);
  transition: border-color 0.45s var(--ease), background-color 0.45s var(--ease),
    transform 0.45s var(--ease);
}

.contact-chip:hover {
  border-color: rgba(94, 243, 255, 0.4);
  background: rgba(94, 243, 255, 0.05);
  transform: translateY(-3px);
}

.contact-chip .c-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--muted-2);
}

.contact-chip .c-value {
  font-size: clamp(13px, 1.3vw, 16px);
  letter-spacing: 0.02em;
  color: rgba(244, 242, 236, 0.9);
}

.contact-chip .c-action {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease),
    color 0.4s var(--ease);
}

.contact-chip:hover .c-action {
  opacity: 1;
  transform: translateY(0);
  color: var(--cyan);
}

.contact-chip.is-static {
  cursor: default;
}

.contact-chip.is-static .c-value {
  color: rgba(47, 242, 179, 0.88);
}

.contact-chip.is-static .c-action {
  opacity: 1;
  transform: none;
}

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: clamp(70px, 9vw, 120px);
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--muted-2);
  text-transform: uppercase;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  z-index: 300;
  padding: 12px 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #04121a;
  background: linear-gradient(120deg, #c8faff, #7ceaff);
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(94, 243, 255, 0.3);
  opacity: 0;
  transform: translate(-50%, 20px) scale(0.94);
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

/* ============================================================
   滚动出现
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1180px) {
  .hero-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-right {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line-soft);
    padding-top: 22px;
  }

  .hero-desc {
    max-width: 52ch;
  }
}

@media (max-width: 900px) {
  .nav {
    position: fixed;
    inset: 0;
    z-index: 70;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 26px;
    padding: 0 var(--pad);
    background: rgba(5, 6, 10, 0.94);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s var(--ease), visibility 0.45s var(--ease);
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    font-size: 15px;
    letter-spacing: 0.14em;
  }

  .nav-link span {
    font-size: 10px;
  }

  .nav-toggle {
    display: block;
    z-index: 90;
  }

  .topbar-cta {
    display: none;
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

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

  .work-card,
  .work-card--wide {
    grid-column: auto;
    height: auto;
  }

  .work-card .work-media,
  .work-card:not(.work-card--wide) .work-media {
    aspect-ratio: 16 / 10;
    flex: none;
    min-height: 0;
  }

  .skill-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .skill-tag {
    display: none;
  }

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

  .campus-left {
    position: static;
  }

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

  .hero-frame {
    padding-top: 92px;
  }
}

@media (max-width: 640px) {
  .hero-topline .coord {
    display: none;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 22px;
    width: 100%;
  }

  .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 26px;
  }

  .hero-right {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .hero-name .cn {
    font-size: clamp(56px, 17vw, 96px);
  }

  .hero-name .ghost {
    font-size: 13px;
    letter-spacing: 0.34em;
  }

  .timeline-item {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .contact-mail {
    font-size: 15px;
    gap: 10px;
  }
}

/* ============================================================
   《未断》封面 + 视频弹层
   ============================================================ */
.work-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.1s var(--ease), filter 0.6s var(--ease);
}

.media-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(5, 6, 10, 0.88), rgba(5, 6, 10, 0.1) 48%, rgba(5, 6, 10, 0.3));
  pointer-events: none;
}

.work-card--video:hover .work-cover {
  transform: scale(1.045);
}

.work-card--video .media-badge {
  color: #eafcff;
  border-color: rgba(94, 243, 255, 0.42);
  background: rgba(5, 6, 10, 0.55);
}

.work-card--video .media-play svg {
  opacity: 0.92;
  background: rgba(5, 6, 10, 0.42);
}

.film-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  /* 显式约束列宽，避免被底部横滑静帧条的最大内容宽度撑开 */
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: clamp(12px, 3vw, 40px);
  /* 窗口高度不足时可纵向滚动，避免静帧条被裁掉 */
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}

.film-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.film-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 8, 0.88);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
}

.film-panel {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform: translateY(20px) scale(0.985);
  transition: transform 0.55s var(--ease);
}

.film-modal.is-open .film-panel {
  transform: none;
}

.film-close,
.book-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(244, 242, 236, 0.28);
  border-radius: 50%;
  background: rgba(5, 6, 10, 0.6);
  backdrop-filter: blur(8px);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.film-close svg,
.book-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.film-close:hover,
.book-close:hover {
  background: rgba(94, 243, 255, 0.18);
  border-color: rgba(94, 243, 255, 0.7);
  transform: rotate(90deg);
}

.film-player {
  border: 1px solid rgba(244, 242, 236, 0.12);
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.65);
}

.film-video {
  display: block;
  width: 100%;
  max-height: 58svh;
  background: #000;
  object-fit: contain;
}

.film-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.film-meta h3 {
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.film-meta h3 span {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  vertical-align: middle;
}

.film-meta p {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.film-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  white-space: nowrap;
  padding-bottom: 4px;
}

.film-hint i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(94, 243, 255, 0.8);
  animation: pulse 2.4s ease-in-out infinite;
}

.film-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 242, 236, 0.24) transparent;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}

.film-strip.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.film-strip::-webkit-scrollbar {
  height: 4px;
}

.film-strip::-webkit-scrollbar-thumb {
  background: rgba(244, 242, 236, 0.22);
  border-radius: 2px;
}

.film-strip figure {
  position: relative;
  flex: 0 0 auto;
  width: clamp(260px, 34vw, 380px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  scroll-snap-align: start;
  background: #0a0c14;
}

.film-strip img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.7s var(--ease);
  filter: saturate(0.94) brightness(0.92);
  pointer-events: none;
}

.film-strip figure:hover img {
  transform: scale(1.06);
  filter: none;
}

.film-strip figcaption {
  position: absolute;
  left: 10px;
  bottom: 8px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

@media (max-width: 900px) {
  .film-panel {
    gap: 14px;
  }

  .film-video {
    max-height: 46svh;
  }
}

@media (max-width: 640px) {
  .film-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .film-strip figure {
    width: 62vw;
  }

  .film-hint {
    padding-bottom: 0;
  }
}

/* ============================================================
   大一课程作业 · 翻页图册
   ============================================================ */
.work-card--reels {
  cursor: pointer;
}

.work-card--reels:hover .work-cover {
  transform: scale(1.045);
}

.work-card--reels .media-badge {
  color: #dffaff;
  border-color: rgba(94, 243, 255, 0.42);
  background: rgba(5, 6, 10, 0.55);
}

.work-card--reels .media-play svg {
  opacity: 0.92;
  background: rgba(5, 6, 10, 0.42);
}

.work-card--gallery {
  cursor: pointer;
}

.work-card--gallery:hover .work-cover {
  transform: scale(1.045);
}

.work-card--gallery .media-badge {
  color: #ffeaf2;
  border-color: rgba(255, 47, 125, 0.42);
  background: rgba(5, 6, 10, 0.55);
}

.work-card--gallery .media-play svg {
  opacity: 0.92;
  background: rgba(5, 6, 10, 0.42);
}

.book-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 40px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}

.book-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.book-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 8, 0.985);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
}

.book-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2vw, 20px);
  padding-top: 52px;
  transform: translateY(18px) scale(0.985);
  transition: transform 0.55s var(--ease);
}

.book-modal.is-open .book-panel {
  transform: none;
}

.book-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 26px);
}

/* 纸张堆叠：每张卡按其在堆里的层数（--d）偏移、缩放 */
.book-stack {
  position: relative;
  width: min(calc(66svh * 0.72), 70vw);
  aspect-ratio: 0.72;
  cursor: pointer;
}

.stack-card {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid rgba(244, 242, 236, 0.16);
  background: #0a0c12;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.55);
  transform: translate3d(calc(var(--d, 0) * 9px), calc(var(--d, 0) * 10px), 0)
    scale(calc(1 - var(--d, 0) * 0.028));
  transform-origin: 50% 100%;
  transition: transform 0.62s cubic-bezier(0.22, 0.8, 0.24, 1),
    opacity 0.45s ease, box-shadow 0.45s ease, filter 0.45s ease;
  will-change: transform, opacity;
}

.stack-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* 视频卡片：16:9，保留原生控件 */
.reel-stack {
  width: min(calc(72svh * 16 / 9), 76vw);
  aspect-ratio: 16 / 9;
}

.reel-stack .stack-card {
  transform: translate3d(calc(var(--d, 0) * 16px), calc(var(--d, 0) * 15px), 0)
    scale(calc(1 - var(--d, 0) * 0.03));
}

.book-stack.reel-stack:hover .stack-card:not(.is-top) {
  transform: translate3d(calc(var(--d, 0) * 21px), calc(var(--d, 0) * 19px), 0)
    scale(calc(1 - var(--d, 0) * 0.03)) rotate(calc(var(--d, 0) * 0.8deg));
}

.stack-card video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #05060a;
  border-radius: 3px;
}

/* 大二课程作业：视频 + 图片混排，给稳定的 16:10 画框 */
.year2-stack {
  width: min(calc(72svh * 1.6), 76vw);
  aspect-ratio: 16 / 10;
}

.year2-stack .stack-card {
  transform: translate3d(calc(var(--d, 0) * 14px), calc(var(--d, 0) * 13px), 0)
    scale(calc(1 - var(--d, 0) * 0.03));
}

.book-stack.year2-stack:hover .stack-card:not(.is-top) {
  transform: translate3d(calc(var(--d, 0) * 19px), calc(var(--d, 0) * 17px), 0)
    scale(calc(1 - var(--d, 0) * 0.03)) rotate(calc(var(--d, 0) * 0.8deg));
}

/* 长图在卡片里先露顶部一段，细节交给放大查看 */
.year2-stack .stack-card img.is-long {
  object-fit: cover;
  object-position: top center;
}

/* 长图卡片上的“放大细看”按钮 */
.stack-zoom {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 9px 18px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #dffaff;
  white-space: nowrap;
  border: 1px solid rgba(94, 243, 255, 0.5);
  border-radius: 999px;
  background: rgba(5, 6, 10, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.stack-zoom:hover {
  background: rgba(94, 243, 255, 0.16);
  border-color: rgba(94, 243, 255, 0.9);
}

/* 长图放大查看 */
.zoom-view {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: none;
  overflow: hidden;
  background: rgba(2, 3, 6, 0.97);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.zoom-view.is-open {
  display: block;
}

.zoom-view img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  max-height: none;
  transform-origin: 0 0;
  -webkit-user-drag: none;
  user-select: none;
  cursor: grab;
  touch-action: none;
}

.zoom-view img.is-dragging {
  cursor: grabbing;
}

.zoom-close {
  position: absolute;
  top: 22px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(244, 242, 236, 0.22);
  background: rgba(5, 6, 10, 0.6);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.zoom-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.zoom-close:hover {
  border-color: rgba(94, 243, 255, 0.7);
  background: rgba(94, 243, 255, 0.12);
}

.zoom-hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
  white-space: nowrap;
}

/* 悬停：最上面一张抬起，后面几张轻微散开，做出纸张叠放的厚度 */
.book-stack:hover .stack-card.is-top {
  transform: translate3d(0, -14px, 0) scale(1.012);
  box-shadow: 0 46px 92px rgba(0, 0, 0, 0.68);
}

.book-stack:hover .stack-card:not(.is-top) {
  transform: translate3d(calc(var(--d, 0) * 11px), calc(var(--d, 0) * 12px), 0)
    scale(calc(1 - var(--d, 0) * 0.028)) rotate(calc(var(--d, 0) * 0.55deg));
}

.book-arrow {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: clamp(36px, 3vw, 46px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(244, 242, 236, 0.22);
  background: rgba(244, 242, 236, 0.05);
  color: var(--paper);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.book-arrow svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.book-arrow:hover {
  background: rgba(94, 243, 255, 0.16);
  border-color: rgba(94, 243, 255, 0.6);
  transform: scale(1.05);
}

.book-arrow[disabled] {
  opacity: 0.25;
  pointer-events: none;
}

.book-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.book-caption h3 {
  font-size: clamp(17px, 1.7vw, 22px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.book-caption h3 span {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  vertical-align: middle;
}

.book-caption p {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  line-height: 1.75;
  color: var(--muted);
  max-width: 60ch;
}

.book-count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-mono);
  color: var(--muted-2);
  white-space: nowrap;
}

.book-count b {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 500;
  color: var(--paper);
}

.book-count i {
  font-style: normal;
  opacity: 0.5;
}

.book-count span {
  font-size: 11px;
  letter-spacing: 0.14em;
}

.book-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.book-dots button {
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: rgba(244, 242, 236, 0.2);
  transition: width 0.3s var(--ease), background-color 0.3s var(--ease);
}

.book-dots button:hover {
  background: rgba(244, 242, 236, 0.5);
}

.book-dots button.is-active {
  width: 34px;
  background: var(--cyan);
}

@media (max-width: 900px) {
  .book-stack {
    width: min(calc(58svh * 0.72), 72vw);
  }

  .book-stack.reel-stack {
    width: min(calc(58svh * 16 / 9), 72vw);
  }

  .book-stack.year2-stack {
    width: min(calc(58svh * 1.6), 72vw);
  }

  .book-panel {
    padding-top: 46px;
  }
}

@media (max-width: 640px) {
  .book-frame {
    gap: 6px;
  }

  .book-stack {
    width: min(calc(50svh * 0.72), 68vw);
  }

  .book-stack.reel-stack {
    width: min(calc(50svh * 16 / 9), 68vw);
  }

  .book-stack.year2-stack {
    width: min(calc(50svh * 1.6), 68vw);
  }

  .book-arrow {
    width: 34px;
  }

  .book-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .book-caption p {
    font-size: 10px;
  }
}

/* ============================================================
   减少动态
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .ink-canvas {
    display: none;
  }
}

