/* ==========================================================================
   唐财兴 · 个人作品集
   设计基调：宣纸白 / 墨色 / 青瓷绿点缀 / 克制动效
   ========================================================================== */

/* ---------- 0. 字体「唐才歆」 ----------
   源文件 assets/唐才歆字体.ttf（3.7MB）。为缩短首屏等待，
   已用 fontTools 无损压缩出 assets/唐才歆字体.woff2（2.2MB）优先加载，
   老浏览器自动回退 ttf。字体只有单字重，用 100~900 权重区间声明，
   避免浏览器自己合成粗体把笔画糊掉。缺字（如 · → ← ↑ ↓ ×）由后面的
   系统字体兜底。
   -------------------------------------------------------------------- */
@font-face {
  font-family: "TangCaixin";
  src: url("../唐才歆字体.woff2") format("woff2"),
       url("../唐才歆字体.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- 0.1 设计变量 ---------- */
:root {
  --bg:          #f7f5f1;   /* 宣纸白 */
  --bg-soft:     #f0ede6;
  --surface:     #fcfbf8;
  --surface-2:   #ffffff;
  --line:        rgba(38, 33, 27, 0.10);
  --line-strong: rgba(38, 33, 27, 0.22);

  --text:        #23201b;   /* 墨 */
  --text-dim:    #6d675e;
  --text-faint:  #9b948a;

  --accent:      #2e6b5e;   /* 青瓷绿 */
  --accent-soft: rgba(46, 107, 94, 0.10);
  --accent-2:    #b08430;   /* 琥珀，小点缀 */

  /* 全站统一使用「唐才歆」，后面的系统字体只做兜底（缺字时才用得到） */
  --font-latin: "TangCaixin", "唐才歆", "Songti SC", Georgia, serif;
  --font-sans:  "TangCaixin", "唐才歆", -apple-system, "Segoe UI",
                "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-mono:  "TangCaixin", "唐才歆", ui-monospace, Consolas,
                "Courier New", monospace;

  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io:  cubic-bezier(0.65, 0.05, 0.36, 1);
  --dur:      0.9s;

  --gut:      clamp(20px, 5vw, 64px);
  --maxw:     1400px;
  --sec-pad:  clamp(88px, 13vh, 168px);
  --nav-h:    76px;

  --r-sm: 4px;
  --r-md: 10px;
  --r-lg: 18px;

  --shadow-sm: 0 2px 10px rgba(38, 33, 27, 0.05);
  --shadow-md: 0 14px 34px -14px rgba(38, 33, 27, 0.18);
  --shadow-lg: 0 30px 60px -22px rgba(38, 33, 27, 0.28);
}

/* ---------- 1. 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* 「唐才歆」只有单字重、没有斜体字形，浏览器硬合成的斜体（把字往右歪一下）
   笔画会发糊，所以全站禁用斜体 —— 需要强调的地方一律用颜色区分。 */
em, i, cite, q, dfn, var, address, blockquote { font-style: normal; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4, p { margin: 0; }

::selection { background: var(--accent); color: #f7f5f1; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #efece5; }
::-webkit-scrollbar-thumb { background: #d5cfc4; border-radius: 20px; border: 3px solid #efece5; }
::-webkit-scrollbar-thumb:hover { background: #bdb5a7; }

/* ---------- 2. 通用排版与布局 ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
}

.sec { padding: var(--sec-pad) 0; position: relative; }
.sec--tight { padding: calc(var(--sec-pad) * 0.62) 0; }

/* 区块标头 —— 编号 + 眉标 + 大标题 */
.sec__head { margin-bottom: clamp(40px, 6vw, 76px); }

.sec__label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 26px;
}
.sec__label .idx { color: var(--accent-2); }
.sec__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent 72%);
}

.sec__title {
  font-size: clamp(30px, 5.2vw, 62px);
  font-weight: 300;
  line-height: 1.22;
  letter-spacing: 0.02em;
  max-width: 22ch;
  color: var(--text);
}
.sec__title em {
  font-family: var(--font-latin);
  font-style: normal;
  font-size: 1.06em;
  color: var(--accent);
  letter-spacing: 0;
}

.sec__desc {
  margin-top: 22px;
  max-width: 52ch;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.95;
}

.sec__head--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* 滚动揭示 */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 3. 颗粒 / 光标 / 进度条 ----------
   注意：颗粒层曾经写成 inset:-120%，元素面积是视口的 11.6 倍，
   合成器上要长期维持约 24 万像素级的大图层（笔记本核显直接卡死）。
   现在改成视口大小 + 位移背景图，视觉一致，开销降到 1/10。
   -------------------------------------------------------------------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  animation: grainShift 7s steps(8) infinite;
}
@keyframes grainShift {
  0%, 100% { background-position: 0 0; }
  20% { background-position: -62px 48px; }
  40% { background-position: 74px -42px; }
  60% { background-position: -46px -70px; }
  80% { background-position: 58px 64px; }
}

.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), #7fb3a5);
  z-index: 9990;
  transition: opacity 0.4s;
}

.cursor, .cursor-dot {
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  pointer-events: none;
  border-radius: 50%;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity 0.35s;
}
.cursor {
  width: 40px; height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  margin: -20px 0 0 -20px;
  transition: width 0.35s var(--ease), height 0.35s var(--ease),
              margin 0.35s var(--ease), opacity 0.35s, background-color 0.35s;
}
.cursor-dot {
  width: 4px; height: 4px;
  margin: -2px 0 0 -2px;
  background: #fff;
}
.cursor.is-active, .cursor-dot.is-active { opacity: 1; }
.cursor.is-hover {
  width: 76px; height: 76px;
  margin: -38px 0 0 -38px;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
}
.cursor.is-view {
  width: 92px; height: 92px;
  margin: -46px 0 0 -46px;
  background: #ffffff;
  border-color: transparent;
  mix-blend-mode: normal;
  box-shadow: var(--shadow-md);
}
.cursor__text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.3s;
  font-family: var(--font-mono);
}
.cursor.is-view .cursor__text { opacity: 1; }
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-dot { display: none !important; }
}

/* ---------- 4. 预加载 ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: grid;
  place-items: center;
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: min(300px, 62vw);
}
.preloader__mark {
  font-size: 40px;
  font-weight: 300;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: var(--text);
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.1s forwards;
}
.preloader__bar {
  width: 100%;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.preloader__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.35s linear;
}
.preloader__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--text-faint);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 5. 导航 ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 900;
  display: flex;
  align-items: center;
  transition: background-color 0.5s var(--ease), backdrop-filter 0.5s,
              border-color 0.5s, height 0.5s var(--ease), box-shadow 0.5s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  height: 62px;
  background: rgba(247, 245, 241, 0.82);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.nav__in {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  letter-spacing: 0.18em;
}
.brand__cn { font-size: 17px; font-weight: 400; }
.brand__en {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.3em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 38px);
}
.nav__link {
  position: relative;
  font-size: 13.5px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  padding: 6px 0;
  transition: color 0.35s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.5s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--accent); }
.nav__link .num {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--accent-2);
  vertical-align: super;
  margin-right: 5px;
  opacity: 0.85;
}

.burger {
  display: none;
  width: 40px; height: 40px;
  position: relative;
  margin-right: -8px;
}
.burger span {
  position: absolute;
  left: 8px;
  width: 24px; height: 1.5px;
  background: var(--text);
  transition: transform 0.45s var(--ease), opacity 0.3s;
}
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 24px; }
.burger.is-open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger.is-open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 880;
  background: rgba(247, 245, 241, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--gut);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.8s var(--ease);
}
.menu.is-open { clip-path: inset(0 0 0 0); }
.menu__list { display: flex; flex-direction: column; gap: 6px; }
.menu__item {
  font-size: clamp(28px, 9vw, 52px);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 8px 0;
  display: flex;
  align-items: baseline;
  gap: 16px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), color 0.3s;
}
.menu.is-open .menu__item { opacity: 1; transform: none; }
.menu__item:hover { color: var(--accent); }
.menu__item .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-2);
  letter-spacing: 0.2em;
}
.menu__foot {
  margin-top: 56px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  opacity: 0;
  transition: opacity 0.6s var(--ease) 0.4s;
}
.menu.is-open .menu__foot { opacity: 1; }

/* ---------- 6. 首屏 Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: -8% -4%;
  z-index: -3;
  background: #dfe4df url("../img/hero.jpg?v=3") center 40% / cover no-repeat;
  will-change: transform;
  animation: kenburns 26s var(--ease-io) infinite alternate;
}
@keyframes kenburns {
  from { transform: translate3d(0, var(--py, 0px), 0) scale(1.06); }
  to   { transform: translate3d(0, calc(var(--py, 0px) - 14px), 0) scale(1.13); }
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg,
      rgba(247, 245, 241, 0.92) 0%,
      rgba(247, 245, 241, 0.62) 22%,
      rgba(247, 245, 241, 0.22) 48%,
      rgba(247, 245, 241, 0.34) 72%,
      rgba(247, 245, 241, 0.92) 94%,
      var(--bg) 100%),
    linear-gradient(90deg, rgba(247, 245, 241, 0.5), rgba(247, 245, 241, 0) 46%);
}
.hero .wrap { width: 100%; padding-top: var(--nav-h); }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 30px;
}
.hero__eyebrow::before {
  content: "";
  width: 46px; height: 1.5px;
  background: var(--accent);
}

.hero__title {
  font-size: clamp(58px, 15vw, 178px);
  font-weight: 200;
  line-height: 0.98;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
  color: var(--text);
}
.hero__title .ch {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  /* 「唐才歆」的字形比 0.98 的行盒高（最高约 1.05em，浏览器还会按
     usWinAscent 1057/1000 定位基线），遮罩不留上方空间就会削顶。
     给遮罩补一块上方留白、再用等量负 margin 抵消：字形完整、版面位置不变。 */
  padding-top: 0.42em;
  margin-top: -0.42em;
}
.hero__title .ch > span {
  display: inline-block;
  /* 位移必须大于遮罩总高（0.42 + 0.98 = 1.4em），否则字还没完全藏住就开始往上走 */
  transform: translateY(150%);
  transition: transform 1.15s var(--ease);
}
.hero__title.is-split .ch > span { transform: translateY(0); }

.hero__sub {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: clamp(14px, 1.7vw, 19px);
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 24px;
}
/* 词汇轮播：用 grid 把每条都叠在同一个格子里，
   容器的宽高就自动等于最长/最高的那一条 —— 文案多长都不会被切掉。
   （原来的写法是写死 width:2.6em / height:1.5em，长句必被裁。） */
.rotator {
  position: relative;
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  min-width: 0;
  color: var(--accent);
}
.rotator__i {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.75s var(--ease), opacity 0.6s;
}
.rotator__i.is-on { transform: translateY(0); opacity: 1; }
.rotator__i.is-out { transform: translateY(-100%); opacity: 0; }

.hero__desc {
  max-width: 46ch;
  color: var(--text-dim);
  font-size: 15.5px;
  line-height: 2;
  margin-bottom: 42px;
}

.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 30px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--text);
  overflow: hidden;
  transition: color 0.45s, border-color 0.45s;
  isolation: isolate;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--text);
  transform: translateY(101%);
  transition: transform 0.6s var(--ease);
}
.btn:hover { color: var(--bg); border-color: var(--text); }
.btn:hover::before { transform: translateY(0); }
.btn--solid {
  background: var(--accent);
  border-color: var(--accent);
  color: #f7f5f1;
}
.btn--solid::before { background: var(--text); }
.btn--solid:hover { color: var(--bg); border-color: var(--text); }
.btn__arrow { transition: transform 0.5s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(5px); }

/* 首屏右下角的站点信息：门户首页只有一屏，改为跟随文案排布 */
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px clamp(18px, 2.4vw, 34px);
  margin-top: clamp(16px, 2vw, 24px);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.hero__meta b { color: var(--text-dim); font-weight: 400; }

.scrollcue {
  position: absolute;
  left: var(--gut);
  bottom: calc(var(--sec-pad) * 0.5);
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.scrollcue__bar {
  width: 1.5px; height: 46px;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}
.scrollcue__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  animation: cueDrop 2.1s var(--ease-io) infinite;
}
@keyframes cueDrop {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

/* ---------- 7. 跑马灯 ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  overflow: hidden;
  white-space: nowrap;
  background: var(--bg-soft);
}
.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 56px;
  animation: slide 34s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee__item {
  font-family: var(--font-latin);
  font-size: clamp(20px, 2.4vw, 30px);
  letter-spacing: 0.16em;
  color: var(--text-faint);
  display: inline-flex;
  align-items: center;
  gap: 56px;
}
.marquee__item i {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  font-style: normal;
}

/* ---------- 8. 关于 ---------- */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(40px, 7vw, 110px);
  align-items: start;
}
.about__quote {
  font-size: clamp(24px, 3.1vw, 40px);
  font-weight: 300;
  line-height: 1.62;
  letter-spacing: 0.03em;
  margin-bottom: 40px;
}
.about__quote em {
  font-family: var(--font-latin);
  font-style: normal;
  color: var(--accent);
}
.about__body p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 2.05;
  margin-bottom: 20px;
  max-width: 50ch;
}
.about__sign {
  margin-top: 36px;
  font-family: var(--font-latin);
  font-size: 30px;
  font-style: normal;
  color: var(--text);
  letter-spacing: 0.04em;
}
.about__sign small {
  display: block;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--text-faint);
  margin-top: 8px;
  text-transform: uppercase;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.stats__i {
  padding: 30px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.5s;
}
.stats__i:hover { background: var(--surface-2); }
.stats__n {
  font-family: var(--font-latin);
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1;
  color: var(--accent);
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.stats__n span { font-size: 16px; color: var(--text-faint); }
.stats__k {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--text-faint);
}

/* ---------- 9. 摄影画廊 ---------- */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.filter {
  padding: 9px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  background: var(--surface-2);
  transition: color 0.35s, border-color 0.35s, background-color 0.35s, box-shadow 0.35s;
}
.filter:hover { color: var(--text); border-color: var(--line-strong); }
.filter.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #f7f5f1;
}

.gallery {
  columns: 3;
  column-gap: clamp(14px, 1.6vw, 24px);
  margin-top: 46px;
}
.card {
  position: relative;
  break-inside: avoid;
  margin-bottom: clamp(14px, 1.6vw, 24px);
  overflow: hidden;
  border-radius: var(--r-sm);
  background: #e7e2d8 center / cover no-repeat;
  padding: 0;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease),
              filter 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); }
html.has-cursor .card,
html.has-cursor .film { cursor: none; }
.card.is-hidden { display: none; }
.card.is-out { opacity: 0; transform: scale(0.94); }
.card__img {
  width: 100%;
  opacity: 0;
  transition: opacity 0.9s var(--ease), transform 1.2s var(--ease), filter 1.2s var(--ease);
  transform: scale(1.03);
}
.card__img.is-loaded { opacity: 1; transform: scale(1); }
/* will-change 只在悬停的那一张上生效：几十张图同时预留合成层会吃掉大量显存 */
.card:hover .card__img { transform: scale(1.055); will-change: transform; }

.card__ov {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 26px;
  background: linear-gradient(0deg, rgba(23, 20, 16, 0.82) 0%, rgba(23, 20, 16, 0.3) 42%, transparent 72%);
  opacity: 0;
  transition: opacity 0.55s var(--ease);
}
.card:hover .card__ov, .card:focus-visible .card__ov { opacity: 1; }
.card__t {
  font-size: 19px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: #f7f5f1;
  transform: translateY(14px);
  transition: transform 0.65s var(--ease);
}
.card__m {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #d8b877;
  text-transform: uppercase;
  margin-bottom: 8px;
  transform: translateY(14px);
  transition: transform 0.65s var(--ease) 0.06s;
}
.card__d {
  margin-top: 6px;
  font-size: 12.5px;
  color: rgba(247, 245, 241, 0.72);
  transform: translateY(14px);
  transition: transform 0.65s var(--ease) 0.12s;
}
.card:hover .card__t, .card:hover .card__m, .card:hover .card__d { transform: none; }

/* ---- 摄影：分批加载 / 精选入口 ---- */
.gallery-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: clamp(34px, 4vw, 56px);
  flex-wrap: wrap;
}
.gallery-count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-faint);
}
.btn--wide { min-width: 210px; justify-content: center; }
.btn[disabled], .btn.is-done { opacity: 0.45; pointer-events: none; }

/* 区块标题右侧的「查看全部」入口 */
.sec__more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 5px;
  border-bottom: 1px solid var(--accent-soft);
  transition: border-color 0.45s, gap 0.45s var(--ease);
}
.sec__more:hover { border-color: var(--accent); gap: 16px; }
.sec__more svg { flex: none; }

/* ---------- 9.1 二级页面页头 ---------- */
.pagehead {
  padding: calc(var(--nav-h) + clamp(52px, 9vw, 104px)) 0 clamp(26px, 4vw, 46px);
}
.pagehead__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 26px;
}
.pagehead__eyebrow::before { content: ""; width: 46px; height: 1.5px; background: var(--accent); }
.pagehead__title {
  font-size: clamp(36px, 7.6vw, 92px);
  font-weight: 300;
  line-height: 1.16;
  letter-spacing: 0.03em;
  max-width: 20ch;
}
.pagehead__title em {
  font-family: var(--font-latin);
  font-style: normal;
  color: var(--accent);
}
.pagehead__desc {
  margin-top: 24px;
  max-width: 56ch;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.95;
}
.pagehead__bar {
  margin-top: 34px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.page-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  transition: color 0.4s;
}
.page-back:hover { color: var(--accent); }

/* 首页「精选」区的小计数 */
.sec__title--sm { font-size: clamp(26px, 3.6vw, 44px); }

/* 标题里的强调字（不倾斜，只换色） */
.pagehead__title .hl { color: var(--accent); }

/* 清单为空 / 未启动服务时的提示 */
.gallery-hint {
  margin: 8px 0 0;
  padding: 22px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.9;
  letter-spacing: 0.04em;
}

/* ---------- 9.2 字体页（words.html：展示 / 字格 / 下载） ---------- */
.fmeta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px clamp(26px, 4vw, 58px);
  margin-top: 34px;
}
.fmeta__k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.fmeta__v { margin-top: 7px; font-size: 15.5px; color: var(--text); }
.fmeta__v small { font-size: 11.5px; color: var(--text-faint); letter-spacing: 0.06em; }

/* ---- 样张排版 ---- */
.specimen { margin-top: clamp(38px, 5vw, 66px); }
.specimen__paper {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: clamp(28px, 5vw, 68px);
}
.specimen__title {
  text-align: center;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 400;
  letter-spacing: 0.1em;
}
.specimen__by {
  margin-top: 12px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.specimen__rule {
  width: 46px;
  height: 1.5px;
  margin: 26px auto 0;
  background: var(--accent);
  opacity: 0.5;
}
.specimen__body {
  margin-top: clamp(26px, 3.4vw, 44px);
  font-size: clamp(17px, 1.55vw, 20px);
  line-height: 2.06;
  letter-spacing: 0.022em;
  color: var(--text);
}
.specimen__body p { margin: 0 0 1.15em; text-indent: 2em; }
.specimen__body p:last-child { margin-bottom: 0; }
.specimen__body b { font-weight: 400; color: var(--accent); }
/* 样张里的诗句 / 童谣：居中不缩进，比正文略收一点 */
.specimen__verse {
  margin: 0 0 1.5em;
  text-align: center;
  font-size: 0.95em;
  line-height: 2.02;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.specimen__verse:last-child { margin-bottom: 0; }

/* ---- 样张上方的「文章目录」：点标题切换下面那张纸 ---- */
.specimen__pick {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 16px;
}
.specimen__picklabel {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.wtabs { display: flex; flex-wrap: wrap; gap: 8px; }
.wtabs__b {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  white-space: nowrap;
  transition: background-color 0.35s, border-color 0.35s, color 0.35s;
}
.wtabs__b:hover { background: rgba(255, 255, 255, 0.85); border-color: var(--accent); color: var(--text); }
.wtabs__t { overflow: hidden; text-overflow: ellipsis; }
.wtabs__no {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  opacity: 0.62;
}
/* 选中那颗是青瓷绿底，文字要显式改成纸白（别指望继承，
   后面同权重的规则会把它压掉 —— 这个坑踩过） */
.wtabs__b.is-on { border-color: var(--accent); background: var(--accent); color: #f7f5f1; }
.wtabs__b.is-on .wtabs__t,
.wtabs__b.is-on .wtabs__no { color: #f7f5f1; }
.wtabs__b.is-on .wtabs__no { opacity: 0.8; }
.wtabs__b:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- 字格 ---- */
.glyphs { margin-top: clamp(30px, 4vw, 46px); }
.glyphs__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.glyphs__tabs { display: flex; gap: 9px; flex-wrap: wrap; }
.gtab {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  padding: 9px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  transition: background 0.35s, border-color 0.35s, color 0.35s;
}
.gtab:hover { color: var(--text); border-color: var(--text-dim); }
.gtab.is-on { background: var(--accent); border-color: var(--accent); color: #f7f5f1; }
.glyphs__tools {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
}
.glyphs__tools input[type="range"] { width: 108px; accent-color: var(--accent); }
.glyph-grid {
  --g: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(38px, 4.2vw, 52px), 1fr));
  margin-top: 24px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.glyph {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--g);
  line-height: 1;
  color: var(--text);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 0.24s, color 0.24s;
}
.glyph:hover { background: var(--accent); color: #f7f5f1; }
/* 该字体确实没收录的字：琥珀色 + 下划线，提示会回落到系统字体 */
.glyph--miss { color: var(--accent-2); }
.glyph--miss::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 14%;
  width: 13px;
  height: 1px;
  background: var(--accent-2);
  transform: translateX(-50%);
}
.glyph:hover.glyph--miss { color: #f7f5f1; }
.glyph:hover.glyph--miss::after { background: #f7f5f1; }
.glyph-note {
  margin-top: 18px;
  font-size: 12.5px;
  line-height: 1.95;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}
.glyph-note b { color: var(--accent-2); font-weight: 400; }

/* ---- 下载 ---- */
.dl {
  margin-top: clamp(30px, 4vw, 46px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
.dl__box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow-sm);
}
.dl__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px dashed var(--line);
}
.dl__row:first-child { padding-top: 0; }
.dl__row:last-child { border-bottom: 0; padding-bottom: 0; }
.dl__name { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); word-break: break-all; }
.dl__size { margin-top: 5px; font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.dl__note {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.95;
  color: var(--text-dim);
}
.dl__note b { font-weight: 400; color: var(--accent); }
.dl__note a { border-bottom: 1px solid var(--accent-soft); }
.dl__note a:hover { border-color: var(--accent); color: var(--accent); }
.code {
  margin-top: 22px;
  background: #23201b;
  color: #e9e5dc;
  border-radius: var(--r-sm);
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.95;
  white-space: pre;
  overflow-x: auto;
}
.code b { color: #8fc7b6; font-weight: 400; }
.code i { color: #d8b877; font-style: normal; }

/* ---------- 9.3 门户首页（板块入口 / 播放器 + 逐行歌词） ---------- */
/* 板块入口卡片 */
.entries {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
  margin-top: clamp(34px, 4vw, 52px);
}
.entry {
  position: relative;
  display: block;
  padding: clamp(24px, 2.6vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease),
              border-color 0.6s var(--ease);
}
.entry:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.entry__k {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.entry__t {
  display: block;
  margin-top: 16px;
  font-size: clamp(20px, 2.1vw, 26px);
  letter-spacing: 0.04em;
  color: var(--text);
  transition: color 0.5s;
}
.entry:hover .entry__t { color: var(--accent); }
.entry__d { display: block; margin-top: 12px; font-size: 13px; line-height: 1.92; color: var(--text-dim); }
.entry__go {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.entry__n {
  position: absolute;
  right: 14px;
  bottom: -8px;
  font-size: 62px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.07;
  pointer-events: none;
}

/* ---------- 首屏：左文案 / 右歌词 / 下方播放条 + 曲名按钮 ---------- */
.hero__cols {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: center;
}
.hero__main { min-width: 0; }

/* 歌词靠右，和页面右边线对齐 */
.hero__lyric {
  min-width: 0;
  width: 100%;
  justify-self: end;
  text-align: right;
}

/* 隐藏的播放器外壳：只给播放逻辑提供 DOM 挂点，不占位、不可聚焦 */
.ghost { display: none; }

/* ---------- 曲名 + 进度条（就压在曲名按钮上方，不显示播放器） ---------- */
.nowbar {
  margin-top: clamp(26px, 3.2vw, 40px);
}
.nowbar__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 13px;
  min-width: 0;
}
.nowbar__state {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--text-faint);
  transition: color 0.4s;
}
.nowbar.is-playing .nowbar__state { color: var(--accent); }
.nowbar__title {
  min-width: 0;
  font-size: 18px;
  letter-spacing: 0.05em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nowbar__times {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  white-space: nowrap;
}
.nowbar__sep { opacity: 0.45; }
/* 进度条紧贴曲名下方，做得粗一点好拖 */
.nowbar .seek { margin-top: 3px; }
.nowbar .seek__track { height: 5px; background: rgba(35, 32, 27, 0.13); }
.nowbar .seek__fill { background: var(--text); }
.nowbar .seek__dot { width: 14px; height: 14px; background: var(--text); border-color: var(--text); }
/* 播放中让把手一直露着，一眼能看出这里可以拖 */
.nowbar.is-playing .seek__dot { transform: translate(-50%, -50%) scale(1); }
/* 悬停时整条加粗一点，强化"可以拖"的暗示 */
.nowbar .seek:hover .seek__track { height: 6px; }

/* ---------- 曲名按钮：排满一行再换行 ---------- */
.tracks--hero {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(14px, 1.6vw, 18px);
  border-top: 0;
}
.tracks--hero .track {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  grid-template-columns: none;
  width: auto;
  flex: none;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.42);
  transition: background-color 0.4s, border-color 0.4s, color 0.4s;
}
.tracks--hero .track:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--accent);
  padding: 10px 14px;
}
.tracks--hero .track.is-on { border-color: var(--accent); background: var(--accent); color: #f7f5f1; }
.tracks--hero .track__t { font-size: 13px; letter-spacing: 0.03em; }
.tracks--hero .track__d {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  opacity: 0.6;
}
/* ⚠️ 被选中的那颗是青瓷绿底，子元素必须显式改成纸白 ——
   文件后面还有 `.track.is-on .track__t { color: var(--accent) }`（同权重、更靠后），
   不在这里压住的话就是「青瓷绿字 + 青瓷绿底」= 完全看不见（踩过）。 */
.tracks--hero .track.is-on .track__t,
.tracks--hero .track.is-on .track__d { color: #f7f5f1; }
.tracks--hero .track.is-on .track__d { opacity: 0.75; }
.tracks--hero .track.is-on .track__d { display: block; }
/* 小三角 = 可播放；正在播时变成小方块 = 再点一下停止 */
.tracks--hero .track__ico {
  width: 0;
  height: 0;
  border-left: 7px solid currentColor;
  border-top: 4.5px solid transparent;
  border-bottom: 4.5px solid transparent;
  opacity: 0.55;
  transition: opacity 0.4s;
}
.tracks--hero .track.is-on .track__ico { opacity: 1; }
.tracks--hero.is-playing .track.is-on .track__ico {
  width: 8px;
  height: 8px;
  border: 0;
  background: currentColor;
  border-radius: 1px;
}
.lrc {
  /* 三行歌词 + 右下角的 Lyrics 小字：三行永远是同一套行高，
     当前句落在哪一行都能居中显示，整块的高度也稳定。 */
  min-height: clamp(178px, 21vh, 236px);
  display: grid;
  grid-template-rows: repeat(3, auto) auto;
  align-content: center;
  justify-items: end;
  gap: clamp(10px, 1.5vw, 20px);
  text-align: right;
  padding: 0;
}
/* 侧行（当前句前后那两行）：淡出、缩小 */
.lrc__line {
  opacity: 0.58;
  font-size: clamp(13px, 1.3vw, 16px);
  transform: scale(0.94);
  transform-origin: right center;
  color: var(--text-dim);
  transition: opacity 0.55s var(--ease), transform 0.7s var(--ease),
              color 0.5s;
}
/* 当前句：墨黑色，比原来的浅绿对比强得多 */
.lrc__line--now {
  opacity: 1;
  font-size: clamp(19px, 2.05vw, 27px);
  transform: none;
  letter-spacing: 0.06em;
  color: var(--text);
}
/* 换行那一瞬间整体淡出，换完字再淡入 */
.lrc.is-swap .lrc__line { opacity: 0; }
.lrc__hint {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* 门户上的曲目条（横向滚动的小药丸） */
.tracks--bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-top: clamp(28px, 3vw, 42px);
  padding-bottom: 10px;
  border-top: 0;
  scrollbar-width: thin;
}
.tracks--bar .track {
  display: inline-flex;
  align-items: center;
  grid-template-columns: none;
  width: auto;
  flex: none;
  gap: 0;
  padding: 11px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color 0.4s, border-color 0.4s, color 0.4s;
}
.tracks--bar .track:hover { background: rgba(38, 33, 27, 0.035); padding: 11px 20px; }
.tracks--bar .track.is-on { border-color: var(--accent); background: var(--accent-soft); }
.tracks--bar .track__no,
.tracks--bar .track__a,
.tracks--bar .track__eq,
.tracks--bar .track__d { display: none !important; }
.tracks--bar .track__t { font-size: 13.5px; }

/* ---------- 9.4 科研文章（PDF 现在走页内阅读，旧的「外链」样式已删） ---------- */

/* ---------- 9.5 网页作品卡片 ---------- */
.webgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(286px, 1fr));
  gap: clamp(18px, 2vw, 30px);
  margin-top: 40px;
}
.webcard {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.webcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.webcard__thumb {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--bg-soft) center / cover no-repeat;
  overflow: hidden;
}
.webcard__thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.9s var(--ease); }
.webcard__thumb img.is-loaded { opacity: 1; }
.webcard__ph {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 46px;
  color: var(--accent);
  opacity: 0.2;
}
.webcard__body { display: block; padding: 20px 22px 24px; }
.webcard__t { display: block; font-size: 19px; letter-spacing: 0.04em; color: var(--text); transition: color .5s; }
.webcard:hover .webcard__t { color: var(--accent); }
.webcard__m {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 11px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.webcard__d { display: block; margin-top: 14px; font-size: 13px; line-height: 1.9; color: var(--text-dim); }
.webcard__go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.webcard--soon { opacity: 0.72; }
.webcard--soon .webcard__go { color: var(--text-faint); }

/* 压缩包卡片：整张卡就是下载入口 */
.webcard--dl .webcard__go { color: var(--accent-2); }
.webcard--dl:hover .webcard__go { color: var(--accent); }

/* ---------- 10. 灯箱 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: rgba(244, 242, 237, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__top, .lightbox__bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px var(--gut);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0 var(--gut);
  overflow: hidden;
}
.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 210px);
  object-fit: contain;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg);
  background: #fff;
  transform: scale(0.96);
  opacity: 0;
  transition: transform 0.75s var(--ease), opacity 0.55s;
}
.lightbox.is-open .lightbox__img { transform: scale(1); opacity: 1; }
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px; height: 54px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  transition: background-color 0.4s, border-color 0.4s, color 0.4s;
}
.lightbox__nav:hover {
  background: var(--accent); border-color: var(--accent); color: #f7f5f1;
}
.lightbox__nav--prev { left: calc(var(--gut) + 6px); }
.lightbox__nav--next { right: calc(var(--gut) + 6px); }
.lightbox__close {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  transition: color 0.35s;
}
.lightbox__close:hover { color: var(--accent); }
.lightbox__cap { color: var(--text-dim); }
.lightbox__cap b { color: var(--text); font-weight: 400; letter-spacing: 0.1em; }

/* ---------- 11. 影像 ---------- */
.films {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 26px);
}
.film {
  position: relative;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-2);
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.5s var(--ease);
}
.film:hover { box-shadow: var(--shadow-md); }
.film__thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: block;
}
.film__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.3s var(--ease), filter 0.8s;
  filter: saturate(0.92);
}
.film:hover .film__thumb img { transform: scale(1.07); filter: saturate(1.06); }
.film__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(23, 20, 16, 0.55), transparent 58%);
}
.film__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 66px; height: 66px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(20, 18, 15, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  color: #fff;
  transition: transform 0.6s var(--ease), background-color 0.5s, border-color 0.5s;
  z-index: 2;
}
.film:hover .film__play {
  transform: translate(-50%, -50%) scale(1.12);
  background: var(--accent);
  border-color: var(--accent);
}
.film__play svg { margin-left: 3px; }
.film__meta { padding: 20px 4px 0; display: block; }
.film__t {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.film__dur {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}
.film__tags {
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.film__note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.85;
}

/* 视频弹窗 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9600;
  display: grid;
  place-items: center;
  padding: var(--gut);
  background: rgba(244, 242, 237, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__box {
  width: min(1080px, 100%);
  transform: translateY(22px);
  transition: transform 0.7s var(--ease);
}
.modal.is-open .modal__box { transform: none; }
.modal__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111 center / cover no-repeat;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: grid;
  place-items: center;
}
.modal__frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.modal__empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(247, 245, 241, 0.82);
  text-align: center;
  padding: 24px;
}
.modal__empty .tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  background: var(--surface-2);
  padding: 6px 14px;
  border-radius: 999px;
}
.modal__empty p { color: var(--text-dim); font-size: 13.5px; max-width: 40ch; }
.modal__empty code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
  background: rgba(38, 33, 27, 0.06);
  padding: 3px 7px;
  border-radius: 3px;
}
.modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.modal__title { font-size: 18px; font-weight: 400; letter-spacing: 0.05em; }
.modal__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 6px;
}
.iconbtn {
  width: 42px; height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  background: var(--surface-2);
  transition: background-color 0.4s, border-color 0.4s, color 0.4s, transform 0.4s var(--ease);
}
.iconbtn:hover {
  background: var(--text); border-color: var(--text); color: var(--bg);
  transform: rotate(90deg);
}

/* ---------- 12. 音乐 ---------- */
.music__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(30px, 4.5vw, 74px);
  align-items: start;
}

.player {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(165deg, var(--surface-2), var(--surface) 52%, #f3f0e9);
  padding: clamp(22px, 3vw, 34px);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.player::after {
  content: "";
  position: absolute;
  top: -42%; right: -32%;
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(46, 107, 94, 0.09), transparent 66%);
  pointer-events: none;
}
.player__top { display: flex; gap: 22px; align-items: center; position: relative; z-index: 1; }
.player__art {
  width: clamp(86px, 11vw, 116px);
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  flex: none;
  position: relative;
  box-shadow: var(--shadow-md);
}
.player__art img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.6s;
}
.player__art::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--r-sm);
}
.player__info { min-width: 0; }
.player__now {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.player__title {
  font-size: clamp(20px, 2.4vw, 27px);
  font-weight: 300;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player__album {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
}

.viz {
  margin: 24px 0 2px;
  height: 64px;
  width: 100%;
  position: relative;
  z-index: 1;
}
.viz canvas { width: 100%; height: 100%; }

.seek {
  position: relative;
  z-index: 1;
  height: 22px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.seek__track {
  position: relative;
  width: 100%;
  height: 3px;
  background: rgba(38, 33, 27, 0.12);
  border-radius: 3px;
}
.seek__buf, .seek__fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  border-radius: 3px;
}
.seek__buf { background: rgba(38, 33, 27, 0.14); width: 0; }
.seek__fill { background: var(--accent); width: 0; }
.seek__dot {
  position: absolute;
  top: 50%;
  left: 0;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--accent);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.35s var(--ease);
  box-shadow: var(--shadow-sm);
}
.seek:hover .seek__dot { transform: translate(-50%, -50%) scale(1); }

.player__times {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  margin-top: 6px;
  position: relative;
  z-index: 1;
}

.controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  position: relative;
  z-index: 1;
}
.ctrl {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--text);
  background: var(--surface-2);
  transition: background-color 0.4s, border-color 0.4s, color 0.4s, transform 0.4s var(--ease);
}
.ctrl:hover { background: var(--text); border-color: var(--text); color: var(--bg); }
.ctrl--main {
  width: 62px; height: 62px;
  background: var(--accent);
  border-color: var(--accent);
  color: #f7f5f1;
}
.ctrl--main:hover {
  background: #3b8474; border-color: #3b8474; color: #f7f5f1; transform: scale(1.05);
}
.ctrl__ico { display: block; }
.ctrl__ico--pause { display: none; }
.is-playing .ctrl__ico--play { display: none; }
.is-playing .ctrl__ico--pause { display: block; }

.player__vol {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  color: var(--text-faint);
}
.player__vol .seek { width: 74px; height: 18px; }

/* ---- 歌词 ---- */
.lyrics {
  position: relative;
  margin-top: 24px;
  height: 232px;
  overflow: hidden;
  z-index: 1;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%);
}
.lyrics__in {
  padding: 96px 8px;
  transition: transform 0.7s var(--ease);
  will-change: transform;
}
.lyrics__l {
  padding: 8px 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-dim);
  opacity: 0.5;
  text-align: center;
  cursor: pointer;
  transform-origin: center;
  transition: color 0.45s, opacity 0.45s, transform 0.45s var(--ease);
}
.lyrics__l:hover { opacity: 0.85; }
.lyrics__l.is-on {
  color: var(--accent);
  opacity: 1;
  transform: scale(1.05);
  font-weight: 400;
}
.lyrics__l--note {
  font-size: 12.5px;
  font-style: normal;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.lyrics__l--note.is-on { color: var(--accent-2); }
.lyrics__empty {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--text-faint);
  font-size: 13px;
  letter-spacing: 0.1em;
}

/* ---- 曲目 ---- */
.tracks { border-top: 1px solid var(--line); }
.track {
  display: grid;
  grid-template-columns: 42px 1fr auto auto;
  align-items: center;
  gap: 18px;
  padding: 17px 6px;
  border-bottom: 1px solid var(--line);
  width: 100%;
  text-align: left;
  transition: background-color 0.4s, padding 0.5s var(--ease);
}
.track:hover { background: rgba(38, 33, 27, 0.035); padding-left: 14px; padding-right: 14px; }
.track.is-on .track__t { color: var(--accent); }
.track__no {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 0.16em;
}
.track.is-on .track__no { color: var(--accent); }
.track__t { font-size: 15.5px; font-weight: 400; letter-spacing: 0.05em; transition: color 0.4s; }
.track__a { font-size: 12px; color: var(--text-faint); letter-spacing: 0.08em; }
.track__d {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
}
.track__eq { display: none; align-items: flex-end; gap: 2px; height: 12px; }
.track.is-on .track__eq { display: flex; }
.track.is-on .track__d { display: none; }
.track__eq i { width: 2px; background: var(--accent); animation: eq 1s ease-in-out infinite; }
.track__eq i:nth-child(1) { height: 40%; animation-delay: 0s; }
.track__eq i:nth-child(2) { height: 100%; animation-delay: 0.18s; }
.track__eq i:nth-child(3) { height: 62%; animation-delay: 0.36s; }
@keyframes eq {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}

.albums {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 26px;
}
.albums img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r-sm);
  filter: grayscale(100%) contrast(1.04);
  transition: filter 0.6s var(--ease), transform 0.6s var(--ease);
  box-shadow: var(--shadow-sm);
}
.albums img:hover { filter: none; transform: translateY(-4px); }

/* ---------- 13. 文字 ---------- */
.writings { border-top: 1px solid var(--line); }
.writing { border-bottom: 1px solid var(--line); }
.writing__head {
  width: 100%;
  display: grid;
  grid-template-columns: 78px 1fr auto 46px;
  align-items: center;
  gap: clamp(14px, 2.4vw, 34px);
  padding: 30px 6px;
  text-align: left;
  transition: padding 0.55s var(--ease), background-color 0.45s;
}
.writing__head:hover { padding-left: 18px; padding-right: 18px; background: rgba(38, 33, 27, 0.03); }
.writing__no {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}
.writing__t {
  font-size: clamp(18px, 2.2vw, 25px);
  font-weight: 400;
  letter-spacing: 0.04em;
  transition: color 0.45s;
}
.writing.is-open .writing__t, .writing__head:hover .writing__t { color: var(--accent); }
.writing__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.writing__meta .dot { width: 4px; height: 4px; background: var(--line-strong); border-radius: 50%; }
.writing__plus {
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  transition: border-color 0.4s, background-color 0.4s;
}
.writing__head:hover .writing__plus { border-color: var(--line-strong); }
.writing__plus::before, .writing__plus::after {
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform 0.5s var(--ease), opacity 0.4s;
}
.writing__plus::before { width: 12px; height: 1.5px; }
.writing__plus::after { width: 1.5px; height: 12px; }
.writing.is-open .writing__plus { background: var(--accent); border-color: var(--accent); color: #f7f5f1; }
.writing.is-open .writing__plus::after { transform: scaleY(0); opacity: 0; }

.writing__body {
  overflow: hidden;
  height: 0;
  transition: height 0.7s var(--ease);
}
.writing__inner {
  padding: 0 6px 42px;
  max-width: 68ch;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease) 0.12s, transform 0.6s var(--ease) 0.12s;
}
.writing.is-open .writing__inner { opacity: 1; transform: none; }
.writing__inner p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 2.1;
  margin-bottom: 18px;
}
.writing__inner p:first-child {
  font-size: 17px;
  color: var(--text);
  line-height: 1.95;
}
.writing__inner p:first-child::first-letter {
  font-family: var(--font-latin);
  font-size: 3.1em;
  line-height: 0.82;
  float: left;
  padding: 6px 14px 0 0;
  color: var(--accent);
}
.writing__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }

/* ---- 正文里的诗句 / 小标题 / 作者 ---- */
.tx-verse {
  margin: 0 0 1.15em;
  text-align: center;
  font-size: 0.95em;
  line-height: 2.02;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.tx-h { font-weight: 400; color: var(--accent); }
.writing__by {
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---- 科研文章：PDF 逐页阅读（原件不出网，页面上也没有下载入口） ---- */
/* 正文默认限宽 68ch，读论文太窄了，PDF 条目放开 */
.writing--pdf .writing__inner { max-width: none; }
.pdfview { margin-top: 10px; }
.pdfview__pages {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.6vw, 22px);
}
.pdfview__page {
  display: block;
  width: 100%;
  /* 先把高度占住（A4 比例），这样懒加载才真的"滚到附近才取图"，
     展开时也不会因为图片陆续进来而反复跳高度 */
  aspect-ratio: 1 / 1.414;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  box-shadow: var(--shadow-sm);
  user-select: none;
  -webkit-user-drag: none;
}
/* 还没取到的页给个浅底，看着像"正在翻开" */
.pdfview__page:not([src]) { background: var(--surface-2); }
.pdfview__note {
  margin-top: 18px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.pdfview__fail { font-size: 13px; color: var(--text-dim); }

.chip {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 6px 13px;
  border-radius: 999px;
}

/* ---------- 14. 联系 / 页脚 ---------- */
.contact {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(90% 120% at 78% 0%, rgba(46, 107, 94, 0.07), transparent 58%),
    var(--bg-soft);
}
.contact__big {
  font-size: clamp(34px, 7.4vw, 92px);
  font-weight: 200;
  line-height: 1.14;
  letter-spacing: 0.02em;
  margin-bottom: 46px;
  max-width: 18ch;
}
.contact__big em {
  font-family: var(--font-latin);
  font-style: normal;
  color: var(--accent);
}
.contact__mail {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-size: clamp(17px, 2.4vw, 27px);
  font-weight: 300;
  letter-spacing: 0.06em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.5s, color 0.5s;
}
.contact__mail:hover { border-color: var(--accent); color: var(--accent); }
.contact__mail svg { transition: transform 0.5s var(--ease); }
.contact__mail:hover svg { transform: translate(5px, -5px); }

.socials {
  display: flex;
  gap: clamp(16px, 3vw, 40px);
  flex-wrap: wrap;
  margin-top: 54px;
}
.social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.4s;
}
.social:hover { color: var(--accent); }
.social svg { width: 16px; height: 16px; }

.foot {
  border-top: 1px solid var(--line);
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--text-faint);
}
.foot a:hover { color: var(--accent); }

.totop {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 0.4s;
}
.totop:hover { color: var(--accent); }
.totop__ico { transition: transform 0.5s var(--ease); }
.totop:hover .totop__ico { transform: translateY(-4px); }

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1080px) {
  .about__grid { grid-template-columns: 1fr; gap: 52px; }
  .music__grid { grid-template-columns: 1fr; gap: 48px; }
  .films { grid-template-columns: 1fr 1fr; }
  .gallery { columns: 2; }
  .stats { max-width: 560px; }
  .dl { grid-template-columns: 1fr; }
  .hero__cols { grid-template-columns: 1fr; gap: 30px; }
  .lrc { min-height: 0; }
  .nowbar { margin-top: 22px; }
  .entries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  :root { --nav-h: 66px; }
  .nav__links { display: none; }
  .burger { display: block; }
  .hero__meta { display: none; }
  .films { grid-template-columns: 1fr; }
  .writing__head { grid-template-columns: 1fr 40px; gap: 14px; }
  .writing__no { display: none; }
  .writing__meta { grid-column: 1; order: 3; }
  .film__thumb { aspect-ratio: 16 / 9; }
  .lightbox__nav { width: 46px; height: 46px; }
  .lightbox__nav--prev { left: 10px; }
  .lightbox__nav--next { right: 10px; }
  .lightbox__img { max-height: calc(100vh - 190px); }
  .lyrics { height: 200px; }
  .pagehead { padding-top: calc(var(--nav-h) + 40px); }
  .pagehead__bar { gap: 18px; }
}

@media (max-width: 620px) {
  .gallery { columns: 1; }
  .cursor, .cursor-dot { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats__i { padding: 22px 18px; }
  .hero__cta .btn { flex: 1; justify-content: center; }
  .scrollcue { display: none; }
  .track { grid-template-columns: 34px 1fr auto; }
  .track__a { display: none; }
  .player__vol { display: none; }
  .albums { grid-template-columns: repeat(3, 1fr); }
  .foot { justify-content: flex-start; }
  .specimen__paper { padding: 24px 20px; border-radius: var(--r-sm); }
  .specimen__body { font-size: 16.5px; line-height: 2; }
  .dl__box { padding: 22px 18px; }
  .dl__row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .dl__row .btn { width: 100%; justify-content: center; }
  .glyphs__bar { align-items: flex-start; }
  .glyphs__tools { width: 100%; }
  .glyph-grid { grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); }
  .glyph-grid { --g: 18px; }
  .entries { grid-template-columns: 1fr; }
  .webgrid { grid-template-columns: 1fr; }
  .lrc { min-height: 0; gap: 16px; }
  .lrc__line--now { font-size: 19px; }
  .nowbar__head { gap: 4px 10px; }
  .nowbar__state { font-size: 9px; letter-spacing: 0.16em; }
  .nowbar__title { font-size: 15.5px; }
  .nowbar__times { margin-left: 0; }
  .tracks--hero .track { padding: 10px 15px; }
}

/* ---------- 16. 无障碍 / 降级 ---------- */
@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-reveal] { opacity: 1; transform: none; }
  .hero__title .ch > span { transform: none; }
  .card__img { opacity: 1; transform: none; }
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10001;
}
.skip:focus {
  left: var(--gut);
  top: 12px;
  background: var(--accent);
  color: #f7f5f1;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  font-size: 13px;
}
