/* ===========================================================================
   陈乐恒 Leheng Chen — 个人站样式
   设计令牌来自 Claude Design 稿；此处把内联样式与 style-hover 编译成真 CSS。
   =========================================================================== */

:root {
  --bg: #f2ede0;
  --ink: #14150f;
  --surf: #1e3226;
  --surfink: #f2ede0;
  --acc: #efa92b;
  --acc2: #d2532a;
  --line: rgba(20, 21, 15, 0.16);
  --mute: rgba(20, 21, 15, 0.58);

  /* 高亮：半透明暖色 + 柔和晕光，而不是实心深色块 */
  --hl-core: rgba(239, 169, 43, 0.3);
  --hl-fade: rgba(239, 169, 43, 0.07);
  --hl-edge: rgba(239, 169, 43, 0.38);
  --hl-cast: rgba(210, 83, 42, 0.45);

  --serif: 'Bodoni Moda', 'Noto Serif SC', Georgia, 'Times New Roman', serif;
  --read: 'Newsreader', 'Noto Serif SC', Georgia, serif;
  --sans: 'Space Grotesk', 'Noto Serif SC', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --pad: 60px;
  --max: 1440px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

html[data-mode='dark'] {
  --bg: #0e1210;
  --ink: #efead9;
  --surf: #17211b;
  --surfink: #efead9;
  --line: rgba(239, 234, 217, 0.18);
  --mute: rgba(239, 234, 217, 0.6);
  /* 深色底上同样的暖色会显得更亮，压一档 */
  --hl-core: rgba(239, 169, 43, 0.22);
  --hl-fade: rgba(239, 169, 43, 0.05);
  --hl-edge: rgba(239, 169, 43, 0.3);
  --hl-cast: rgba(239, 169, 43, 0.3);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

a { color: var(--acc2); text-decoration: none; border-bottom: 1px solid currentColor; }
a:hover { color: var(--acc); }

code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--line);
  padding: 1px 5px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: var(--acc);
  color: #14150f;
  padding: 12px 18px;
  border: 0;
  font-family: var(--mono);
  font-size: 13px;
}
.skip:focus { left: 12px; top: 12px; }

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

.wrap { max-width: var(--max); margin: 0 auto; }
.dim { opacity: 0.72; }
.acc2 { color: var(--acc2); }
.mb-lg { margin-bottom: 44px; }
.mt-lg { margin-top: 48px; }
.mt-md { margin-top: 22px; }

/* --- 排版 -------------------------------------------------------------- */

.h1 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(44px, 6.4vw, 92px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 20ch;
}

.h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0;
}

.h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  margin: 0 0 16px;
}

/* 中文标题下的英文小字 */
.en {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: 0.005em;
  color: var(--mute);
  font-size: 0.58em;
  line-height: 1.35;
  margin-top: 0.45em;
}
.en--hero { color: rgba(242, 237, 224, 0.66); font-size: 0.28em; letter-spacing: 0.04em; margin-top: 0.5em; }
.en--sm { font-size: 0.26em; }
.en--xs { font-size: 0.24em; }
.h2 .en { font-size: 0.42em; margin-top: 0.6em; }

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--mute);
  margin: 0 0 18px;
  line-height: 1.7;
}
.kicker--acc { color: var(--acc); }

.prose-lead {
  font-family: var(--read);
  font-size: clamp(19px, 1.7vw, 25px);
  line-height: 1.6;
  margin: 0;
  text-wrap: pretty;
}
.prose-lead strong { color: var(--acc2); font-weight: 500; }
.prose-lead--wide { max-width: 62ch; margin-top: 34px; }

.prose-sub {
  font-size: 15.5px;
  line-height: 1.7;
  margin: 18px 0 0;
  color: var(--mute);
  text-wrap: pretty;
}
.prose-sub--wide { max-width: 70ch; }

/* --- 页头 -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 30px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  border: 0;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 9px; height: 9px; background: var(--acc2); display: block; transform: rotate(45deg); }
.brand__cn { font-family: var(--serif); font-weight: 700; font-size: 19px; }
.brand__en { font-family: var(--mono); font-size: 11px; color: var(--mute); letter-spacing: 0.06em; }

.nav { display: flex; gap: 2px; align-items: center; }

.nav__link {
  color: var(--ink);
  border: 0;
  padding: 7px 13px;
  border-radius: 8px;
  line-height: 1.15;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.nav__link:hover,
.nav__link[aria-current='page'] { background: var(--surf); color: var(--surfink); }
.nav__cn { font-size: 14px; font-family: var(--read); }
.nav__en { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; opacity: 0.6; }

.nav__scholar { margin-left: 10px; }

/* --- 按钮 -------------------------------------------------------------- */

.btn {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 12px 18px;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn--acc { background: var(--acc); color: #14150f; padding: 13px 20px; }
.btn--acc:hover { background: var(--acc2); color: #f2ede0; }
.btn--ghost { background: none; border: 1px solid var(--line); color: var(--ink); padding: 11px 18px; }
.btn--ghost:hover { border-color: var(--acc2); color: var(--acc2); }

.mode-toggle {
  position: fixed;
  z-index: 100;
  bottom: 22px;
  right: 22px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-family: var(--mono);
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  transition: border-color 0.25s ease, color 0.25s ease;
}
.mode-toggle:hover { border-color: var(--acc2); color: var(--acc2); }

/* --- 晕光高亮 ----------------------------------------------------------
   ::before 是一个固定尺寸的圆形光斑，靠 transform 移动到光标处。
   用 transform 而不是改渐变的 at 位置：前者走合成层、不重绘、不需要过渡就顺滑；
   后者每帧都要重画渐变，再叠上 transition 就会变成明显的阻尼滞后。
   淡入淡出仍交给 opacity；描边与外投影留在元素本身。坐标由 site.js 写入。 */

[data-hl] { position: relative; isolation: isolate; overflow: hidden; }
[data-hl]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  /* --hl-size 是直径。给百分比时按所在元素的宽度算，所以 100% = 半径等于元素宽度的一半 */
  width: var(--hl-size, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle closest-side, var(--hl-core), var(--hl-fade) 42%, transparent);
  transform: translate3d(var(--hl-px, 0px), var(--hl-py, 0px), 0) translate(-50%, -50%);
  transition: opacity 0.35s ease;
}
/* 触屏没有可跟随的光标，:hover 又会在点按后粘住，所以只在精确指针下启用 */
@media (hover: hover) and (pointer: fine) {
  [data-hl]:hover::before { opacity: 1; }
}

/* --- 标签 / 徽章 -------------------------------------------------------- */

.tags { display: flex; gap: 9px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; font-family: var(--mono); font-size: 11px; }
.tags--acc { font-size: 12px; margin-top: 32px; }

.tag { border: 1px solid var(--line); color: var(--mute); border-radius: 999px; padding: 7px 12px; display: inline-block; }
.tags--acc .tag { border-color: rgba(239, 169, 43, 0.5); color: var(--acc); padding: 8px 14px; }
.tag--solid { background: var(--acc); color: #14150f; border-color: transparent; }
.tag--quiet { color: var(--mute); }
.tag--link { color: var(--ink); }
.tag--link:hover { border-color: var(--acc2); color: var(--acc2); }
.tags--pub { margin-top: 4px; }

.badge {
  display: inline-block;
  width: max-content;
  background: var(--acc2);
  color: #f2ede0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border-radius: 999px;
}
.badge--block { font-size: 10.5px; padding: 5px 11px; margin-bottom: 12px; }

/* --- Hero -------------------------------------------------------------- */

.hero { background: var(--surf); color: var(--surfink); position: relative; overflow: hidden; }

.marquee { overflow: hidden; padding-top: 34px; }
.marquee__track { display: flex; white-space: nowrap; width: max-content; animation: marq 26s linear infinite; }
.marquee__text {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(64px, 10vw, 150px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  padding-right: 40px;
  color: transparent;
  -webkit-text-stroke: 1.4px var(--acc);
}
@keyframes marq { to { transform: translateX(-50%); } }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  padding: 20px var(--pad) 90px;
  align-items: end;
}
.hero__col { min-width: 0; }

.hero__title {
  font-family: var(--serif);
  font-weight: 900;
  margin: 0;
  font-size: clamp(52px, 7.2vw, 104px);
  line-height: 0.88;
  letter-spacing: -0.02em;
}
.hero__title .dot { color: var(--acc); }

.hero__lead {
  font-size: 17.5px;
  line-height: 1.7;
  max-width: 44ch;
  margin: 30px 0 0;
  color: rgba(242, 237, 224, 0.86);
  text-wrap: pretty;
}
.hero__sub {
  font-size: 15px;
  line-height: 1.65;
  max-width: 52ch;
  margin: 14px 0 0;
  color: rgba(242, 237, 224, 0.55);
  text-wrap: pretty;
}

.hero__media { position: relative; min-width: 0; }
.hero__media-plate { position: absolute; inset: 26px -18px -22px 34px; background: var(--acc2); }
.hero__media-frame { position: relative; height: 430px; }
.hero__badge {
  position: absolute;
  right: -18px;
  bottom: -58px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--acc);
  color: #14150f;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.08em;
}

/* --- 通用区块 ---------------------------------------------------------- */

.section { padding: 110px var(--pad); }
.section--tight { padding-top: 0; padding-bottom: 96px; }
.section--head { padding: 70px var(--pad) 30px; }

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.band { background: var(--surf); color: var(--surfink); padding: 96px var(--pad); }
.band--head { padding: 64px var(--pad) 74px; }
.band .kicker { color: var(--acc); }

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

.about { display: grid; grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr); gap: 70px; }

.meta { margin: 34px 0 0; display: flex; flex-direction: column; gap: 12px; font-family: var(--mono); font-size: 13px; }
.meta__row { display: flex; gap: 12px; }
.meta dt { color: var(--mute); width: 80px; flex: none; margin: 0; }
.meta dd { margin: 0; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  margin-top: 44px;
  border: 1px solid var(--line);
}
.stat { background: var(--bg); padding: 22px; }
.stat__n { font-family: var(--serif); font-size: 42px; font-weight: 700; line-height: 1; }
.stat__k { font-family: var(--mono); font-size: 11px; color: var(--mute); margin-top: 6px; line-height: 1.5; }

.offduty { margin-top: 34px; background: var(--acc); color: #14150f; padding: 26px 28px; }
.offduty .kicker { color: rgba(20, 21, 15, 0.75); margin-bottom: 14px; }
.offduty__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; font-size: 15px; }
.offduty__en { display: block; font-size: 12.5px; opacity: 0.66; margin-top: 2px; }

/* --- 研究方向 ---------------------------------------------------------- */

/* 研究板块并入首页：锚点要避开粘性页头 */
.research { scroll-margin-top: 92px; }
.research__intro { margin-bottom: 52px; }
.research__label { margin-bottom: 20px; }
.h1--inline { max-width: 24ch; }

.thread-stack { display: flex; flex-direction: column; gap: 18px; }
.thread-card { display: grid; grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr); gap: 34px; padding: 38px; }
.thread-card--dark { background: var(--surf); color: var(--surfink); }
.thread-card--dark .kicker { color: var(--acc); }
.thread-card--dark .en { color: rgba(242, 237, 224, 0.6); }
.thread-card--dark .thread-card__cn { color: rgba(242, 237, 224, 0.86); }
.thread-card--dark .thread-card__en { color: rgba(242, 237, 224, 0.52); }
.thread-card--dark .tag { border-color: rgba(239, 169, 43, 0.5); color: var(--acc); }
.thread-card--acc { background: var(--acc); color: #14150f; }
.thread-card--acc .kicker { color: rgba(20, 21, 15, 0.7); }
.thread-card--acc .en { color: rgba(20, 21, 15, 0.6); }
.thread-card--acc .thread-card__en { color: rgba(20, 21, 15, 0.62); }
.thread-card--acc .tag { border-color: rgba(20, 21, 15, 0.35); color: inherit; }
.thread-card .h3 { margin: 0; }
.thread-card__cn { margin: 0 0 10px; font-size: 16px; line-height: 1.75; }
.thread-card__en { margin: 0 0 18px; font-size: 14px; line-height: 1.7; }
.thread-card .tags { font-size: 11px; }
.thread-card .tag { padding: 6px 11px; }

/* --- 论文列表（首页行式） ---------------------------------------------- */

.pub-rows { display: flex; flex-direction: column; }
.pub-row {
  --hl-size: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 60px 160px 1fr 200px;
  gap: 24px;
  padding: 26px 6px;
  align-items: center;
  color: var(--ink);
  border-radius: 12px;
  transition: box-shadow 0.3s ease;
}
.pub-row__thumb { display: block; aspect-ratio: 16 / 10; }
.pub-row:last-child { border-bottom: 1px solid var(--line); }
@media (hover: hover) and (pointer: fine) {
  .pub-row:hover {
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--hl-edge), 0 14px 40px -26px var(--hl-cast);
  }
}
.pub-row__year { font-family: var(--mono); font-size: 13px; color: var(--acc2); }
.pub-row__body { min-width: 0; }
.pub-row__title { display: block; font-family: var(--read); font-size: clamp(18px, 1.6vw, 23px); line-height: 1.35; }
.pub-row .badge { margin-bottom: 10px; }
.pub-row__venue { font-family: var(--mono); font-size: 11px; color: var(--mute); text-align: right; }

/* --- 论文列表（发表页详式） ------------------------------------------- */

.pub-list { display: flex; flex-direction: column; }
.pub { border-top: 1px solid var(--line); padding: 32px 0; display: grid; grid-template-columns: 104px minmax(0, 1fr) 300px; gap: 30px; }
.pub:last-child { border-bottom: 1px solid var(--line); }
.pub__title a { color: inherit; border: 0; }
.pub__title a:hover { color: var(--acc2); }
.pub__thumb { display: block; border: 0; aspect-ratio: 16 / 10; align-self: start; }
.pub__thumb:hover .slot { border-color: var(--acc2); }
.pub__year { font-family: var(--serif); font-size: 34px; font-weight: 700; color: var(--mute); line-height: 1; }
.pub__year--hot { color: var(--acc2); }
.pub__title { font-family: var(--read); font-weight: 500; font-size: clamp(21px, 2vw, 27px); line-height: 1.3; margin: 0 0 10px; }
.pub__authors { margin: 0 0 12px; font-size: 14px; color: var(--mute); line-height: 1.6; }
.pub__authors strong { color: var(--ink); font-weight: 500; }
.pub__venue { margin: 0 0 14px; font-family: var(--mono); font-size: 12px; color: var(--mute); }

/* --- 图片位 ------------------------------------------------------------ */

.slot {
  position: relative;
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}
.slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}
/* 图片就位前显示虚线占位框；加载成功后淡入照片、淡出占位 */
.slot.is-loaded img { opacity: 1; }
.slot__ph {
  position: absolute;
  inset: 10px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--mute);
  padding: 8px;
  transition: opacity 0.3s ease;
}
.slot.is-loaded .slot__ph { opacity: 0; }

/* 论文 teaser：图幅比例差异很大（3.8:1 到 4:3 都有），
   用 contain 完整呈现而不是裁切 —— 图里的东西是有意义的。 */
.slot--fit {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  transition: border-color 0.25s ease;
}
.slot--fit img { object-fit: contain; }

/* --- 摄影 -------------------------------------------------------------- */

.photo-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.h1--photo { font-size: clamp(52px, 7vw, 88px); }
.photo-head__note { max-width: 48ch; }
.photo-head__cn { margin: 0 0 8px; font-size: 16px; line-height: 1.7; color: rgba(242, 237, 224, 0.86); }
.photo-head__en { margin: 0; font-size: 13.5px; line-height: 1.65; color: rgba(242, 237, 224, 0.5); }
.band--head + .section { padding-top: 36px; }

.teaser-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.masonry { columns: 3; column-gap: 16px; }
.masonry .shot { break-inside: avoid; margin-bottom: 26px; }

.shot { cursor: zoom-in; margin: 0; }
/* 瀑布流按照片自身比例排版，--ar 由 site.js 从数据库里的宽高写入 */
.shot .slot { aspect-ratio: var(--ar, 3 / 4); height: auto; }
.shot--teaser .slot { aspect-ratio: auto; height: 300px; }
.shot .slot img { transition: opacity 0.4s ease, filter 0.5s ease, transform 0.5s var(--ease); }
.shot:hover .slot img { filter: saturate(0.2) contrast(1.05); transform: scale(1.03); }

.shot__cap { margin: 10px 2px 0; font-size: 14px; line-height: 1.5; }
.shot__cap-cn { display: block; color: var(--ink); }
.shot__cap-en { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--mute); margin-top: 3px; }

.gallery__hint {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--mute);
  margin: 0;
  padding: 28px 0;
}

/* --- 灯箱 -------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 12, 10, 0.94);
  display: grid;
  place-items: center;
  padding: 50px;
  cursor: zoom-out;
  backdrop-filter: blur(6px);
}
.lightbox[hidden] { display: none; }
.lightbox__frame { margin: 0; display: flex; flex-direction: column; gap: 14px; max-width: 100%; max-height: 100%; min-height: 0; }
.lightbox__img { max-width: 100%; min-height: 0; object-fit: contain; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5); }
.lightbox__cap { flex: none; text-align: center; max-width: 60ch; margin: 0 auto; }
.lightbox__cap:empty { display: none; }
.lightbox__cap-cn { display: block; font-size: 14.5px; line-height: 1.5; color: rgba(242, 237, 224, 0.86); }
.lightbox__cap-en {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(242, 237, 224, 0.5);
  margin-top: 4px;
}
.lightbox__close {
  position: absolute;
  top: 24px;
  right: 30px;
  font-family: var(--mono);
  font-size: 12px;
  color: #f2ede0;
  letter-spacing: 0.1em;
}

/* --- 履历 -------------------------------------------------------------- */

.cv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
.cv__col { display: flex; flex-direction: column; gap: 56px; }
.h2--cv { font-size: clamp(28px, 3vw, 36px); color: var(--acc2); margin-bottom: 24px; }
.h2__en { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--mute); }

.tl { display: flex; flex-direction: column; }
.tl__row { display: grid; grid-template-columns: 118px 1fr; gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.tl__row:last-child { border-bottom: 1px solid var(--line); }
.tl__period { font-family: var(--mono); font-size: 13px; color: var(--mute); }
.tl__org { font-size: 18px; font-weight: 500; }
.tl__org--sm { font-size: 17px; }
.tl__detail { font-size: 14px; color: var(--mute); margin-top: 5px; line-height: 1.6; }

.cv__card { padding: 30px; }
/* 教育经历：黄色主题色高亮 */
.cv__card--acc { background: var(--acc); color: #14150f; }
.cv__card--acc .h2--cv { color: #14150f; }
.cv__card--acc .h2__en { color: rgba(20, 21, 15, 0.6); }
.cv__card--acc .tl__row { border-color: rgba(20, 21, 15, 0.22); }
.cv__card--acc .tl__period,
.cv__card--acc .tl__detail { color: rgba(20, 21, 15, 0.7); }
.cv__card--dark { background: var(--surf); color: var(--surfink); }
.cv__card--dark .h3 { color: var(--acc); }
.cv__card--dark .h2__en { color: rgba(242, 237, 224, 0.7); }
.cv__card--dark .tags--acc { margin-top: 0; }

.courses { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.course { border-top: 1px solid var(--line); padding: 16px 0; }
.course:last-child { border-bottom: 1px solid var(--line); }
.course__cn { display: block; font-size: 17px; font-weight: 500; }
.course__en { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--mute); margin-top: 5px; }

.placeholder {
  border: 1px dashed var(--line);
  padding: 24px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--mute);
  line-height: 1.9;
}
.placeholder__hint { margin-top: 12px; color: var(--acc2); }

/* --- 页脚 -------------------------------------------------------------- */

.footer { background: var(--surf); color: var(--surfink); padding: 80px var(--pad) 40px; }
.footer__title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 0.95;
  margin: 0 0 34px;
  letter-spacing: -0.02em;
}
.footer__title .en { color: rgba(242, 237, 224, 0.55); font-size: 0.3em; }
.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid rgba(239, 169, 43, 0.35);
  padding-top: 26px;
  font-family: var(--mono);
  font-size: 13px;
}
.footer__k { color: var(--acc); margin-bottom: 8px; }
.footer__grid a { color: var(--surfink); }
.footer__grid a:hover { color: var(--acc); }
.footer__copy { font-family: var(--mono); font-size: 11px; opacity: 0.45; margin: 40px 0 0; }

/* --- 滚动进场 ---------------------------------------------------------- */

[data-reveal].armed { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
[data-reveal].armed.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal].armed { opacity: 1; transform: none; transition: none; }
  .marquee__track { animation: none; }
}

/* --- 响应式 ------------------------------------------------------------ */

@media (max-width: 1180px) {
  :root { --pad: 40px; }
  .about { grid-template-columns: 1fr; gap: 48px; }
  .hero__grid { gap: 40px; }
  .pub-row { grid-template-columns: 56px 130px minmax(0, 1fr); gap: 18px; align-items: start; }
  .pub-row__venue { grid-column: 3; text-align: left; margin-top: -8px; }
  .pub { grid-template-columns: 104px minmax(0, 1fr) 240px; }
}

@media (max-width: 960px) {
  .site-header { flex-wrap: wrap; gap: 12px; padding: 12px 20px; }
  .nav { width: 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav__link { flex: none; }
  .nav__scholar { flex: none; white-space: nowrap; }
  .hero__grid { grid-template-columns: 1fr; padding-bottom: 110px; }
  .hero__media { max-width: 460px; }
  .thread-card { grid-template-columns: 1fr; gap: 20px; padding: 28px; }
  .cv { grid-template-columns: 1fr; gap: 48px; }
  .teaser-grid { grid-template-columns: repeat(2, 1fr); }
  .masonry { columns: 2; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .pub { grid-template-columns: 88px minmax(0, 1fr) 190px; gap: 20px; }
}

@media (max-width: 620px) {
  :root { --pad: 20px; }
  body { font-size: 15px; }
  .section { padding: 64px var(--pad); }
  .section--tight { padding-top: 0; padding-bottom: 64px; }
  .section--head { padding: 48px var(--pad) 24px; }
  .band { padding: 64px var(--pad); }
  .hero__media-frame { height: 320px; }
  .hero__badge { width: 88px; height: 88px; right: -6px; bottom: -44px; font-size: 9px; }
  .stats { grid-template-columns: 1fr; }
  .research { scroll-margin-top: 130px; }
  .pub { grid-template-columns: 1fr; gap: 14px; }
  .pub__year { font-size: 26px; }
  .pub__thumb { aspect-ratio: 16 / 9; }
  .pub-row { grid-template-columns: 1fr; gap: 12px; }
  .pub-row__thumb { aspect-ratio: 16 / 9; }
  .pub-row__venue { grid-column: 1; margin-top: 0; }
  .tl__row { grid-template-columns: 1fr; gap: 6px; }
  .teaser-grid { grid-template-columns: 1fr; }
  .masonry { columns: 1; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer { padding: 56px var(--pad) 32px; }
  .mode-toggle { bottom: 14px; right: 14px; }
}
