/* ============================================================
   styles.css — 冰川蓝个人主页
   Palette:
     --ice-1 #73B3F6  （冰川蓝·主）
     --ice-2 #BCD6F3  （冰川蓝·浅）
     --sun   #EFB400  （阳光黄·点缀）
     --snow  #FFFFFF
   ============================================================ */

:root {
  --ice-1: #73B3F6;
  --ice-2: #BCD6F3;
  --ice-3: #E7F0FB;
  --ice-4: #F6FAFE;
  --sun: #EFB400;
  --sun-soft: #FBE6A7;
  --sun-bright: #FFD43B;   /* 非简并符号专用·亮黄 */
  --snow: #FFFFFF;

  --ink-1: #0F1F33;
  --ink-2: #243A55;
  --ink-3: #4A6076;
  --ink-4: #7A8A9D;

  --line: #D9E4F3;
  --line-soft: #EAF0F8;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 2px 6px rgba(115, 179, 246, 0.10);
  --shadow:    0 10px 30px rgba(20, 60, 110, 0.08);
  --shadow-lg: 0 22px 60px rgba(20, 60, 110, 0.12);

  --ease: cubic-bezier(.2,.8,.2,1);
  --max-w: 1160px;

  --font-sans: "Inter", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  background:
    radial-gradient(1200px 600px at 80% -200px, rgba(115, 179, 246, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(188, 214, 243, 0.35), transparent 60%),
    var(--snow);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
/* MathJax 例外:行内公式的 SVG 必须保持 inline,否则 img/svg→block 的重置会把每条公式顶到单独一行 */
mjx-container > svg { display: inline-block; max-width: none; overflow: visible; }
mjx-container[display="true"] > svg { display: block; margin: 0 auto; }
a { color: var(--ice-1); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--sun); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--ice-2); color: var(--ink-1); }

/* ---------- Layout primitives ---------- */
.section { padding: 96px 0; position: relative; }
.section--tight { padding: 56px 0; }
.section--alt { background: linear-gradient(180deg, var(--ice-4), var(--snow)); }
.section__inner { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
.section__head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section__head--compact { margin-bottom: 28px; }
.section__eyebrow {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ice-1); font-weight: 600; margin: 0 0 10px;
}
.section__title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.2vw, 36px);
  color: var(--ink-1); margin: 0 0 16px; font-weight: 600;
  letter-spacing: .01em;
}
.section__intro { color: var(--ink-3); margin: 0; font-size: 15.5px; }
.section__intro strong { color: var(--ink-1); font-weight: 700; }
.muted { color: var(--ink-4); }

.section__head--programme {
  max-width: 1060px;
  text-align: center;
}
.section__head--programme .section__title { margin-bottom: 14px; }
.programme-head__body {
  display: grid;
  grid-template-columns: minmax(0, 760px) clamp(104px, 12vw, 142px);
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: left;
}
.section__head--programme .section__intro { line-height: 1.85; }
.section__head--programme .paw-divider {
  width: 100%;
}
/* 纲领头部 · 详细论文按钮（下接 paw 分隔符 → 版权说明） */
.programme-head__cta {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  margin-top: 22px;
  margin-bottom: 18px;
}
.programme-head__cta .btn { white-space: nowrap; }
/* 现在跟在 paw 分隔符之后,作为 head 的最后一行版权说明,自带一点上间距 */
.programme-head__cta-note {
  margin: 4px 0 0;
  font-size: 12px; color: var(--ink-4);
  letter-spacing: .01em;
  text-align: center;
}
.programme-head__cta-note a { color: var(--ink-3); border-bottom: 1px dashed var(--line); }
.programme-head__cta-note a:hover { color: var(--ice-1); border-color: var(--ice-1); }
.programme-ouroboros {
  display: block;
  width: 100%;
  max-width: 142px;
  height: auto;
  margin: 0 auto;
  opacity: .7;
  filter: drop-shadow(0 8px 18px rgba(15, 23, 42, .12));
  transform: translateX(28px);
  pointer-events: none;
  user-select: none;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.is-scrolled { border-color: var(--line-soft); background: rgba(255, 255, 255, 0.88); }
.nav__inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink-1);
}
.nav__brand:hover { color: var(--ink-1); }
/* MARK: 顶栏品牌符号容器（marks.js 注入 ears） */
.brand-glyph {
  display: inline-flex; width: 36px; height: 22px; align-items: center; justify-content: center;
  filter: drop-shadow(0 4px 10px rgba(115, 179, 246, .35));
}
.brand-glyph .mark { width: 100%; height: 100%; }
.brand-text { display: inline-flex; flex-direction: column; line-height: 1.1; }
.brand-zh { font-family: var(--font-serif); font-weight: 600; font-size: 17px; letter-spacing: .06em; }
.brand-en { font-size: 11px; color: var(--ink-4); letter-spacing: .1em; }

.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__links a {
  display: inline-block;
  padding: 8px 14px; border-radius: 999px;
  font-size: 14px; color: var(--ink-3); font-weight: 500;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav__links a:hover { background: var(--ice-3); color: var(--ink-1); }
.nav__links a.is-active { background: var(--ice-2); color: var(--ink-1); }

.lang-switch {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 600;
  background: rgba(255, 255, 255, .65);
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.lang-switch:hover { background: var(--ice-3); color: var(--ink-1); border-color: var(--ice-2); }

.nav__toggle { display: none; width: 40px; height: 40px; position: relative; border-radius: 10px; }
.nav__toggle span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ink-2); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s var(--ease); }
.nav__toggle span:nth-child(1) { top: 14px; }
.nav__toggle span:nth-child(2) { top: 19px; }
.nav__toggle span:nth-child(3) { top: 24px; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100vh - 64px);
  display: flex; align-items: center;
  padding: 80px 0 120px;
}
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__glacier {
  position: absolute; inset: -20% -10% 40% 40%;
  background:
    radial-gradient(closest-side, rgba(115, 179, 246, .55), transparent 70%),
    radial-gradient(closest-side at 70% 30%, rgba(188, 214, 243, .7), transparent 75%);
  filter: blur(20px);
  animation: drift 22s ease-in-out infinite alternate;
}
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(115, 179, 246, .10) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(115, 179, 246, .10) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 40%, transparent 75%);
  opacity: .7;
}
@keyframes drift {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(-30px, 20px) scale(1.08); }
}

.hero__inner {
  position: relative;
  max-width: var(--max-w); margin: 0 auto; padding: 0 32px;
  width: 100%;
}
/* 两栏：左文字 / 右头像 */
.hero__grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 56px;
  align-items: center;
}
.hero__text { min-width: 0; }

.hero__kicker {
  display: inline-block; margin: 0 0 22px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--snow); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--ink-2); font-size: 13px; letter-spacing: .04em;
}
.hero__kicker::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--sun); margin-right: 8px; vertical-align: 2px;
  box-shadow: 0 0 0 4px rgba(239, 180, 0, 0.18);
}

.hero__title { margin: 0 0 18px; line-height: 1.1; }
.hero__title-zh {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.2vw, 52px);
  font-weight: 600;
  color: var(--ink-1);
  letter-spacing: .04em;
}
.hero__title-en {
  display: block;
  margin-top: 4px;
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: .05em;
}

/* Hero 主题句（一行大字的研究宣言） */
.hero__headline {
  margin: 0 0 20px;
  max-width: 560px;
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-1);
  letter-spacing: .02em;
}

/* Hero 研究目标列表 */
.hero__highlights {
  list-style: none; margin: 0 0 24px; padding: 0;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 600px;
}
.hero__hl {
  display: flex; align-items: baseline; gap: 10px;
  padding: 10px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--line);
  backdrop-filter: blur(4px);
}
.hero__hl-kw {
  flex: 0 0 auto;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--ice-1);
  padding: 3px 8px; border-radius: 6px;
  background: rgba(115, 179, 246, .12);
  white-space: nowrap;
}
.hero__hl-text { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }

.hero__bio {
  max-width: 640px;
  font-size: 16px; line-height: 1.75;
  color: var(--ink-2); margin: 0 0 24px;
}
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 10px 18px;
  margin-bottom: 28px; font-size: 14px; color: var(--ink-3);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta svg { width: 16px; height: 16px; color: var(--ice-1); }

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

/* ---------- Hero avatar ---------- */
.hero__portrait {
  position: relative;
  width: clamp(200px, 22vw, 280px);
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  margin-top: 8px; /* 与 kicker 的视觉基线对齐，略高于文字块中心 */
}
.hero__avatar {
  position: relative; width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(115, 179, 246, .3), rgba(188, 214, 243, .4));
  box-shadow:
    0 20px 50px rgba(115, 179, 246, .3),
    0 2px 8px rgba(0, 0, 0, .08),
    inset 0 0 0 1px rgba(255, 255, 255, .6);
}
.hero__avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* 外环：冰蓝描边 + 淡淡呼吸 */
.hero__avatar-ring {
  position: absolute; inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(115, 179, 246, .35);
  pointer-events: none;
  animation: avatarRing 4s ease-in-out infinite;
}
@keyframes avatarRing {
  0%, 100% { transform: scale(1);    opacity: .6; }
  50%      { transform: scale(1.04); opacity: .3; }
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 14.5px;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .2s var(--ease), color .2s var(--ease);
  border: 1px solid transparent;
}
.btn--primary {
  background: linear-gradient(135deg, var(--ice-1), #5a9dea);
  color: var(--snow); box-shadow: 0 8px 24px rgba(115, 179, 246, .35);
}
.btn--primary:hover { transform: translateY(-2px); color: var(--snow); box-shadow: 0 12px 30px rgba(115, 179, 246, .45); }
.btn--ghost { background: var(--snow); color: var(--ink-1); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ice-1); color: var(--ice-1); transform: translateY(-2px); }

.hero__scroll {
  position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%);
  width: 22px; height: 36px; border: 2px solid var(--ice-1); border-radius: 999px;
  opacity: .7;
}
.hero__scroll span {
  position: absolute; left: 50%; top: 7px; transform: translateX(-50%);
  width: 3px; height: 8px; background: var(--ice-1); border-radius: 2px;
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%,100% { opacity: 0; transform: translate(-50%, 0); }
  50%     { opacity: 1; transform: translate(-50%, 10px); }
}

/* ---------- Programme · 折叠条列表 ---------- */
.programme-list {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 920px; margin: 0 auto;
}
.prog-item {
  scroll-margin-top: 96px;
  background: var(--snow);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
  overflow: hidden;
}
.prog-item:hover { border-color: var(--ice-2); }
.prog-item[open] { box-shadow: var(--shadow); border-color: var(--ice-2); }

.prog-item__summary {
  list-style: none;
  padding: 18px 24px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr) auto;
  grid-template-areas:
    "idx  title chev"
    "sum  sum   sum"
    "kw   kw    kw";
  align-items: center;
  gap: 6px 16px;
  transition: background .2s var(--ease);
}
.prog-item__summary::-webkit-details-marker { display: none; }
.prog-item__summary:hover { background: var(--ice-4); }
.prog-item__summary:focus-visible { outline: 2px solid var(--ice-1); outline-offset: -2px; border-radius: inherit; }

.prog-item__idx {
  grid-area: idx;
  justify-self: start;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ice-1); letter-spacing: .18em; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  background: var(--ice-3);
  box-sizing: border-box;
  width: 114px;
  text-align: center;
  white-space: nowrap;
}
.prog-item__title {
  grid-area: title;
  font-family: var(--font-serif); font-weight: 600;
  font-size: 20px; color: var(--ink-1);
  line-height: 1.3;
}
.prog-item__sum {
  grid-area: sum;
  font-size: 14.5px; color: var(--ink-3); line-height: 1.7;
}
.prog-item__kw {
  grid-area: kw;
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 2px;
}
.prog-item__kw span {
  padding: 3px 10px; border-radius: 999px;
  background: var(--ice-4); color: var(--ink-3);
  font-size: 12px;
  border: 1px solid var(--line-soft);
}
.prog-item__chev {
  grid-area: chev;
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  color: var(--ice-1);
  opacity: .65;
  transition: transform .35s var(--ease), opacity .25s var(--ease), color .25s var(--ease);
  user-select: none;
}
.prog-item__chev .mark--paw { width: 100%; height: 100%; color: inherit; }
.prog-item__summary:hover .prog-item__chev { opacity: 1; }
.prog-item[open] .prog-item__chev {
  transform: rotate(-12deg) scale(1.08);
  opacity: 1;
}

/* 展开正文 */
.prog-item__body {
  padding: 8px 34px 22px;
  color: var(--ink-2); font-size: 16px; line-height: 1.85;
  border-top: 1px solid var(--line-soft);
}
.prog-item__body > p:first-child { margin-top: 18px; }
.prog-item__body p { margin: 0 0 16px; }
.prog-item__body ul { margin: 0 0 16px; padding-left: 22px; }
.prog-item__body li { margin: 6px 0; }
.prog-item__body b { color: var(--ink-1); font-weight: 600; }

/* 行内公式 $...$:不要额外垂直 margin */
.prog-item__body mjx-container { margin: 0; }
/* 块级公式 $$...$$ */
.prog-item__body mjx-container[display="true"] {
  margin: 14px 0;
  overflow-x: auto; overflow-y: hidden;
  max-width: 100%;
}

/* 文中插图 */
.prog-figure {
  margin: 20px 0;
  padding: 14px;
  background: var(--ice-4);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  text-align: center;
}
.prog-figure img {
  max-width: 100%; height: auto;
  margin: 0 auto;
  border-radius: 6px;
}
.prog-figure figcaption {
  margin-top: 10px;
  font-size: 13.5px; color: var(--ink-3); line-height: 1.65;
  font-family: var(--font-serif);
}

/* 文献区 */
.prog-item__refs-wrap {
  padding: 14px 34px 22px;
  border-top: 1px dashed var(--line);
}
.prog-item__refs-title {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-3); letter-spacing: .22em;
  margin: 0 0 8px; text-transform: uppercase;
}
.prog-item__refs {
  margin: 0; padding-left: 22px;
  font-size: 14px; color: var(--ink-3); line-height: 1.75;
}
.prog-item__refs li { margin: 6px 0; }
.prog-item__refs a { color: var(--ink-2); }
.prog-item__refs a:hover { color: var(--ice-1); }
.prog-item__refs strong { color: var(--ink-1); font-weight: 800; }
.prog-item__refs-venue { color: var(--ink-4); font-style: italic; }

/* ---------- News ---------- */
.news {
  list-style: none; padding: 0; margin: 0;
  max-width: 760px; margin-inline: auto;
  border-left: 2px solid var(--ice-2);
  max-height: 176px; overflow-y: auto; padding-right: 10px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
  overscroll-behavior: contain;
}
.news li {
  position: relative;
  padding: 14px 8px 14px 28px;
  border-bottom: 1px dashed var(--line-soft);
  display: flex; align-items: baseline; gap: 18px;
  font-size: 15px;
}
.news li:last-child { border-bottom: 0; }
.news li::before {
  content: ""; position: absolute; left: -7px; top: 22px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--snow); border: 2px solid var(--ice-1);
  box-shadow: 0 0 0 4px rgba(115, 179, 246, .12);
}
.news__date {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ice-1); font-weight: 600; letter-spacing: .06em;
  flex: 0 0 100px; white-space: nowrap;
}
.news__text { color: var(--ink-2); min-width: 0; }

/* ---------- Publication filters ---------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin-bottom: 32px;
}
.filters button {
  padding: 8px 16px; border-radius: 999px;
  background: var(--snow); border: 1px solid var(--line);
  color: var(--ink-3); font-size: 13.5px; font-weight: 500;
  transition: all .2s var(--ease);
}
.filters button:hover { border-color: var(--ice-1); color: var(--ink-1); }
.filters button.is-active {
  background: var(--ink-1); color: var(--snow); border-color: var(--ink-1);
}

/* ---------- Publications list ---------- */
.pubs { display: grid; gap: 14px; max-width: 900px; margin: 0 auto; }
.pub {
  background: var(--snow);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px 26px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px 22px;
  align-items: start;
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.pub:hover { border-color: var(--ice-2); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.pub__body { min-width: 0; }
.pub__title {
  font-family: var(--font-serif); font-weight: 600;
  font-size: 17px; color: var(--ink-1); line-height: 1.45; margin: 0 0 8px;
}
.pub__title a { color: inherit; }
.pub__title a:hover { color: var(--ice-1); }
.pub__authors {
  color: var(--ink-3); font-size: 13.5px; line-height: 1.6; margin: 0 0 6px;
}
.pub__authors b { color: var(--ink-1); font-weight: 600; }
.pub__venue { color: var(--ink-4); font-size: 13px; margin: 0; font-style: italic; }
.pub__role {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  letter-spacing: .08em;
}
.pub__role.first { background: var(--sun-soft); color: #7d5a00; }
.pub__role.equal { background: rgba(121, 103, 255, .12); color: #5142b8; }
.pub__role.co    { background: var(--ice-3);   color: var(--ink-2); }
.pub__tag {
  display: inline-block;
  padding: 3px 9px; border-radius: 6px;
  background: var(--ice-4); color: var(--ice-1);
  font-size: 11.5px; letter-spacing: .04em;
}
/* tag + "Export citation" 同一行 */
.pub__meta-row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 14px; margin-top: 10px;
}

/* "Export citation" 触发按钮 */
.cite__btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 22px;
  border-radius: 6px;
  font-size: 11.5px; letter-spacing: .04em;
  color: var(--ice-1);
  background: transparent;
  border: 1px dashed var(--ice-2);
  position: relative;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.cite__btn::before {
  /* 小型 clipboard 图标 */
  content: ""; position: absolute; left: 8px; top: 50%;
  width: 9px; height: 11px;
  border: 1.4px solid currentColor; border-radius: 2px;
  transform: translateY(-50%);
}
.cite__btn::after {
  content: ""; position: absolute; left: 11px; top: 50%;
  width: 3px; height: 2px;
  border: 1.4px solid currentColor; border-bottom: 0;
  border-radius: 1px 1px 0 0;
  transform: translateY(calc(-50% - 5px));
}
.cite__btn:hover {
  color: var(--ink-1); border-color: var(--ice-1); background: var(--ice-4);
}
.cite__btn[aria-expanded="true"] {
  background: var(--ice-3); color: var(--ink-1); border-color: var(--ice-1); border-style: solid;
}

/* BibTeX 折叠面板 */
.cite__panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--ice-4), var(--snow));
  overflow: hidden;
}
.cite__panel[hidden] { display: none; }
.cite__panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: var(--ice-3);
  border-bottom: 1px solid var(--line);
}
.cite__panel-title {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-2); letter-spacing: .14em; font-weight: 600;
  text-transform: uppercase;
}
.cite__status {
  flex: 1;
  font-size: 11.5px; color: var(--ice-1);
  font-family: var(--font-mono);
}
.cite__status.is-error { color: #d04848; }
.cite__copy, .cite__close {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  font-family: var(--font-mono);
  background: var(--snow);
  border: 1px solid var(--line);
  color: var(--ink-2);
  transition: all .2s var(--ease);
}
.cite__copy:hover { background: var(--ice-1); color: var(--snow); border-color: var(--ice-1); }
.cite__close { padding: 0 8px; line-height: 22px; font-size: 14px; }
.cite__close:hover { color: var(--ink-1); border-color: var(--ice-2); }
.cite__code {
  margin: 0;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px; line-height: 1.65;
  color: var(--ink-1);
  white-space: pre;
  overflow-x: auto;
}
.cite__code code { font-family: inherit; }

.pub__group-title {
  grid-column: 1 / -1;
  font-size: 12px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink-4); font-weight: 600; margin: 26px 0 6px;
  padding-left: 4px;
}
.pub__group-title:first-child { margin-top: 0; }

/* ---------- Projects ---------- */
.projects {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.proj {
  padding: 26px; border-radius: var(--radius-lg);
  background: var(--snow);
  border: 1px solid var(--line-soft);
  transition: all .25s var(--ease);
  display: flex; flex-direction: column; gap: 14px;
  position: relative; overflow: hidden;
}
.proj::after {
  content: "↗"; position: absolute; top: 20px; right: 22px;
  font-size: 20px; color: var(--ink-4); opacity: .5;
  transition: transform .3s var(--ease), color .3s var(--ease), opacity .3s var(--ease);
}
.proj:hover { border-color: var(--ice-1); transform: translateY(-4px); box-shadow: var(--shadow); }
.proj:hover::after { color: var(--ice-1); opacity: 1; transform: translate(2px, -2px); }
.proj__name {
  font-family: var(--font-mono);
  font-size: 16px; color: var(--ink-1); font-weight: 600; margin: 0;
  padding-right: 28px;
}
.proj__blurb { color: var(--ink-3); font-size: 14px; line-height: 1.7; margin: 0; flex: 1; }
.proj__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.proj__tags span {
  font-size: 11.5px; padding: 3px 9px; border-radius: 6px;
  background: var(--ice-4); color: var(--ink-3);
}

/* ---------- "重要"高亮:纲领核心章节 / 代表性开源作品 ---------- */
/* 共享色板:冰蓝 → 阳光黄 */
.prog-item.is-important {
  border-color: var(--sun-soft);
  background:
    linear-gradient(180deg, rgba(255, 212, 59, .07), transparent 80%),
    var(--snow);
}
.prog-item.is-important:hover { border-color: var(--sun); }
.prog-item.is-important[open] {
  border-color: var(--sun);
  box-shadow: 0 12px 32px rgba(239, 180, 0, .18);
}
.prog-item.is-important .prog-item__idx {
  background: rgba(239, 180, 0, .15);
  color: var(--sun);
}
/* 重要条:paw 变金色,opacity 提高些让它更显眼 */
.prog-item.is-important .prog-item__chev { color: var(--sun); opacity: .9; }
.prog-item.is-important[open] .prog-item__chev { color: var(--sun); opacity: 1; }
/* 左侧细 accent 条 */
.prog-item.is-important::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--sun), var(--sun-soft));
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.prog-item { position: relative; }

/* Projects: 重要作品高亮 */
.proj.is-important {
  border-color: var(--sun-soft);
  background:
    linear-gradient(180deg, rgba(255, 212, 59, .08), transparent 75%),
    var(--snow);
}
.proj.is-important:hover {
  border-color: var(--sun);
  box-shadow: 0 12px 32px rgba(239, 180, 0, .22);
}
.proj.is-important .proj__name { color: var(--ink-1); }
.proj.is-important::after { color: var(--sun); opacity: .85; }
.proj.is-important:hover::after { color: var(--sun); }

/* ---------- About ---------- */
.about__inner {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px;
  align-items: start;
}
.about__text .section__eyebrow,
.about__text .section__title { text-align: left; }
.about__text .section__head { margin: 0 0 24px; text-align: left; }
.about__text p { color: var(--ink-2); font-size: 16px; line-height: 1.85; margin: 0 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips span {
  padding: 6px 14px; border-radius: 999px;
  background: var(--ice-3); color: var(--ink-2);
  font-size: 13px;
}

.about__card {
  padding: 28px;
  background: linear-gradient(160deg, var(--snow), var(--ice-4));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: sticky; top: 96px;
}
.about__card-title {
  font-family: var(--font-serif); font-size: 17px; color: var(--ink-1);
  margin: 0 0 18px; font-weight: 600;
  padding-bottom: 12px; border-bottom: 1px dashed var(--line);
}
.about__meta { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.about__meta li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--ink-2);
}
.about__meta svg { width: 16px; height: 16px; color: var(--ice-1); flex-shrink: 0; }
.about__meta a { color: var(--ink-2); }
.about__meta a:hover { color: var(--ice-1); }
.about__note { margin: 16px 0 0; padding-top: 14px; border-top: 1px dashed var(--line); color: var(--ink-3); font-size: 13px; line-height: 1.7; }

/* ---------- Footer ---------- */
.footer {
  padding: 40px 0 60px;
  border-top: 1px solid var(--line-soft);
  background: var(--snow);
}
.footer__inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 32px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
}
.footer__line { margin: 0; font-size: 13px; color: var(--ink-3); }
.footer__muted { color: var(--ink-4); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   设计 Token · 三个独立符号
   ------------------------------------------------------------
   SVG 几何在 marks.js；这里只做尺寸/颜色/位置。
   每个 MARK 占位都带 "MARK:" 注释，便于查找与微调。
   ============================================================ */

/* 通用基础（所有 marks.js 注入的 svg 都带 .mark 类） */
.mark { display: inline-block; line-height: 0; vertical-align: middle; }
.mark > svg, svg.mark { display: block; width: 100%; height: 100%; }
.mark--paw { color: var(--ice-1); }     /* 爪印颜色（fill=currentColor，冰川蓝） */

/* MARK: 区段标题下方的爪印分隔符（pawDivider，所有 .section__head 自动注入） */
.paw-divider {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin: 6px auto 18px;
}
.paw-divider::before,
.paw-divider::after {
  content: ""; flex: 0 0 56px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ice-2), transparent);
}
.paw-divider .mark { width: 22px; height: 22px; opacity: .9; }

/* MARK: 页脚行首符号容器（高度贴合 viewBox 32×17 的 1.88:1，免去多余上下 padding） */
.footer-mark {
  display: inline-block; width: 22px; height: 12px;
  vertical-align: -2px; margin-right: 6px;
}

/* MARK: Hero 右下角浮标 */
.hero__mark {
  position: absolute; right: max(4vw, 32px); bottom: 12%;
  width: clamp(56px, 7vw, 84px); height: auto;
  opacity: .85;
  filter: drop-shadow(0 8px 22px rgba(115, 179, 246, .25));
  pointer-events: none;
  animation: markFloat 5.2s ease-in-out infinite;
}
@keyframes markFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@media (max-width: 860px) {
  .hero__mark { right: 16px; bottom: 24px; width: 52px; opacity: .7; }
}



/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .section { padding: 72px 0; }
  .section--tight { padding: 48px 0; }
  .section__head--programme {
    text-align: center;
  }
  .programme-head__body {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
  }
  .programme-ouroboros {
    order: -1;
    max-width: 150px;
    transform: none;
  }
  .about__inner { grid-template-columns: 1fr; gap: 28px; }
  .about__card { position: static; }

  .nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav__links {
    position: absolute; top: 64px; left: 16px; right: 16px;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px;
    background: var(--snow);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transform-origin: top right;
    transform: scale(.96) translateY(-6px); opacity: 0; pointer-events: none;
    transition: opacity .2s var(--ease), transform .25s var(--ease);
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { width: 100%; padding: 12px 14px; border-radius: 10px; }
  .lang-switch { margin-left: auto; }

  .hero { min-height: auto; padding: 72px 0 96px; }
  .hero__title-zh { font-size: 40px; }
  /* 小屏：头像挪到上方居中，文字堆下面 */
  .hero__grid-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    justify-items: center;
    text-align: left;
  }
  .hero__text { width: 100%; }
  .hero__portrait {
    grid-row: 1;
    width: clamp(140px, 40vw, 200px);
  }
  .pub { grid-template-columns: 1fr; }
  .pub__role { justify-self: start; }
}

@media (max-width: 480px) {
  .section__inner, .nav__inner, .footer__inner, .hero__inner { padding-inline: 20px; }
  .hero__meta { flex-direction: column; gap: 6px; align-items: flex-start; }
  .hero__title-zh { font-size: 32px; }
  .hero__headline { font-size: 18px; }
  .hero__hl { flex-direction: column; gap: 4px; align-items: flex-start; }
  .prog-item__summary { padding: 16px 18px; gap: 4px 12px; }
  .prog-item__summary { grid-template-columns: 1fr auto; grid-template-areas: "idx chev" "title title" "sum sum" "kw kw"; }
  .prog-item__title { font-size: 18px; }
  .prog-item__body { padding: 8px 22px 18px; }
  .prog-item__refs-wrap { padding: 12px 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
