/* ═══════════════════════════════════════════
   星幕小站 · 主题变量与基础
   ═══════════════════════════════════════════ */

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --ink: #06070a;
  --night: #0c1017;
  --deep: #121825;
  --mist: #d9e8e0;
  --paper: #fff8e6;
  --muted: #8ea39a;
  --line: rgba(217, 232, 224, 0.18);
  --gold: #e4bf70;
  --gold-dim: rgba(228, 191, 112, 0.12);
  --jade: #7cd9be;
  --jade-dim: rgba(124, 217, 190, 0.08);
  --wine: #8f3f52;
  --shadow: rgba(0, 0, 0, 0.38);
  --card-bg: rgba(6, 7, 10, 0.34);
  --card-bg-hover: rgba(6, 7, 10, 0.5);
  --surface: rgba(255, 248, 230, 0.04);
  --surface-hover: rgba(255, 248, 230, 0.07);
  --text-body: rgba(217, 232, 224, 0.76);
  --text-dim: rgba(217, 232, 224, 0.55);
  --btn-bg: rgba(255, 248, 230, 0.06);
  --btn-border: rgba(255, 248, 230, 0.28);
  --header-bg: linear-gradient(180deg, rgba(6, 7, 10, 0.76), transparent);
  --body-bg:
    linear-gradient(180deg, rgba(6, 7, 10, 0.88), rgba(12, 16, 23, 0.98)),
    radial-gradient(circle at 18% 18%, rgba(124, 217, 190, 0.1), transparent 30%),
    radial-gradient(circle at 82% 34%, rgba(228, 191, 112, 0.08), transparent 26%),
    var(--ink);
}

[data-theme="light"] {
  color-scheme: light;
  --ink: #f5efe0;
  --night: #ede5d5;
  --deep: #e4d9c3;
  --mist: #3d352a;
  --paper: #1a1510;
  --muted: #6b5e4f;
  --line: rgba(60, 50, 35, 0.14);
  --gold: #b8942e;
  --gold-dim: rgba(184, 148, 46, 0.1);
  --jade: #3d8b6e;
  --jade-dim: rgba(61, 139, 110, 0.08);
  --wine: #8f3f52;
  --shadow: rgba(0, 0, 0, 0.08);
  --card-bg: rgba(245, 239, 224, 0.6);
  --card-bg-hover: rgba(245, 239, 224, 0.82);
  --surface: rgba(60, 50, 35, 0.04);
  --surface-hover: rgba(60, 50, 35, 0.07);
  --text-body: rgba(60, 50, 35, 0.78);
  --text-dim: rgba(60, 50, 35, 0.52);
  --btn-bg: rgba(60, 50, 35, 0.05);
  --btn-border: rgba(60, 50, 35, 0.22);
  --header-bg: linear-gradient(180deg, rgba(245, 239, 224, 0.82), transparent);
  --body-bg:
    linear-gradient(180deg, rgba(245, 239, 224, 0.94), rgba(237, 229, 213, 0.98)),
    radial-gradient(circle at 18% 18%, rgba(61, 139, 110, 0.06), transparent 30%),
    radial-gradient(circle at 82% 34%, rgba(184, 148, 46, 0.05), transparent 26%),
    var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--body-bg);
  color: var(--mist);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  transition: background 420ms ease, color 420ms ease;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 248, 230, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 248, 230, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

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

/* ═══════════════════════════════════════════
   滚动进度条
   ═══════════════════════════════════════════ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  height: 2px;
  background: linear-gradient(90deg, var(--jade), var(--gold));
  box-shadow: 0 0 10px rgba(124, 217, 190, 0.4), 0 0 20px rgba(228, 191, 112, 0.25);
  transform-origin: left;
  scale: 0 1;
  width: 100%;
  transition: scale 0.1s linear;
}

/* ═══════════════════════════════════════════
   光标辉光
   ═══════════════════════════════════════════ */

.cursor-glow {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(124, 217, 190, 0.08),
    rgba(228, 191, 112, 0.04) 28%,
    transparent 58%
  );
  translate: -50% -50%;
  opacity: 0;
  filter: blur(40px);
  transition: opacity 360ms ease;
}

[data-theme="light"] .cursor-glow {
  background: radial-gradient(
    circle at center,
    rgba(61, 139, 110, 0.12),
    rgba(184, 148, 46, 0.06) 28%,
    transparent 58%
  );
}

/* ═══════════════════════════════════════════
   Canvas 背景
   ═══════════════════════════════════════════ */

#sky {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
}

[data-theme="dark"] #sky { background: var(--ink); }
[data-theme="light"] #sky { background: var(--ink); }

/* ═══════════════════════════════════════════
   站点头部
   ═══════════════════════════════════════════ */

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(18px, 5vw, 72px);
  color: var(--paper);
  background: transparent;
  pointer-events: none;
  transition: color 420ms ease;
  --header-shell-blur: 14px;
  --nav-rail-blur: 10px;
}

.site-header::before {
  position: absolute;
  inset: 12px clamp(12px, 3vw, 34px) auto;
  z-index: -1;
  height: 68px;
  content: "";
  border: 1px solid rgba(255, 248, 230, 0.14);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(6, 7, 10, 0.82), rgba(6, 7, 10, 0.5));
  backdrop-filter: blur(var(--header-shell-blur));
  -webkit-backdrop-filter: blur(var(--header-shell-blur));
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.24);
  transition:
    background 420ms ease,
    border-color 420ms ease,
    box-shadow 420ms ease,
    opacity 420ms ease;
}

.site-header.is-compact {
  --header-shell-blur: 10px;
  --nav-rail-blur: 6px;
}

.site-header.is-compact::before {
  border-color: rgba(255, 248, 230, 0.12);
  background: linear-gradient(180deg, rgba(6, 7, 10, 0.88), rgba(6, 7, 10, 0.62));
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.24);
}

[data-theme="light"] .site-header::before {
  border-color: rgba(60, 50, 35, 0.12);
  background: linear-gradient(180deg, rgba(245, 239, 224, 0.88), rgba(245, 239, 224, 0.64));
}

[data-theme="light"] .site-header.is-compact::before {
  border-color: rgba(60, 50, 35, 0.1);
  background: linear-gradient(180deg, rgba(245, 239, 224, 0.94), rgba(245, 239, 224, 0.74));
}

.site-header > * {
  pointer-events: auto;
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-family: "Noto Serif SC", "STZhongsong", "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.brand-mark {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 5px var(--gold-dim),
    0 0 22px rgba(228, 191, 112, 0.34);
  transition: box-shadow 420ms ease, border-color 420ms ease, transform 420ms ease;
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  inset: 50% auto auto 50%;
  content: "";
  background: var(--gold);
  transform: translate(-50%, -50%);
}

.brand-mark::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(228, 191, 112, 0.6);
}

.brand-mark::after {
  width: 12px;
  height: 1px;
  opacity: 0.45;
}

.brand:hover .brand-mark,
.brand:focus-visible .brand-mark {
  transform: rotate(12deg) scale(1.05);
}

/* ═══════════════════════════════════════════
   Header nav rail
   ═══════════════════════════════════════════ */

.nav-rail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border: 1px solid rgba(255, 248, 230, 0.14);
  border-radius: 999px;
  background: rgba(6, 7, 10, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 248, 230, 0.04);
  backdrop-filter: blur(var(--nav-rail-blur));
  -webkit-backdrop-filter: blur(var(--nav-rail-blur));
}

.site-header.is-compact .nav-rail {
  background: rgba(6, 7, 10, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 248, 230, 0.03);
}

[data-theme="light"] .nav-rail {
  border-color: rgba(60, 50, 35, 0.12);
  background: rgba(245, 239, 224, 0.56);
}

[data-theme="light"] .site-header.is-compact .nav-rail {
  background: rgba(245, 239, 224, 0.68);
}

/* ═══════════════════════════════════════════
   主题切换按钮
   ═══════════════════════════════════════════ */

.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 248, 230, 0.18);
  border-radius: 50%;
  color: var(--paper);
  background: linear-gradient(180deg, rgba(255, 248, 230, 0.08), rgba(255, 248, 230, 0.03));
  font-size: 16px;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.theme-toggle:hover {
  border-color: var(--gold);
  background: var(--gold-dim);
  transform: scale(1.12);
  box-shadow: 0 0 18px rgba(228, 191, 112, 0.28);
}

[data-theme="light"] .theme-toggle {
  border-color: rgba(60, 50, 35, 0.18);
  background: rgba(60, 50, 35, 0.05);
}

[data-theme="light"] .theme-toggle:hover {
  border-color: var(--gold);
  background: var(--gold-dim);
}

/* 日月图标的堆叠与旋转过渡：见文末「v2 美化增强层」 */

/* ═══════════════════════════════════════════
   导航链接
   ═══════════════════════════════════════════ */

.nav-links {
  gap: clamp(14px, 3vw, 36px);
  color: var(--text-dim);
  font-size: 14px;
}

.nav-links a {
  position: relative;
  padding: 9px 14px;
  border-radius: 999px;
  transition: color 180ms ease;
}

.nav-links a::after {
  position: absolute;
  inset: 0;
  content: "";
  border: 1px solid transparent;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 248, 230, 0.02), transparent);
  transition: border-color 220ms ease, background 220ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--paper);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  border-color: rgba(124, 217, 190, 0.28);
  background: linear-gradient(180deg, rgba(124, 217, 190, 0.1), rgba(228, 191, 112, 0.06));
}

/* ═══════════════════════════════════════════
   主体
   ═══════════════════════════════════════════ */

main {
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════
   Hero 区域
   ═══════════════════════════════════════════ */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(320px, 1.14fr);
  align-items: center;
  gap: clamp(30px, 6vw, 92px);
  min-height: 86svh;
  padding: clamp(96px, 13vh, 142px) clamp(20px, 6vw, 84px) 5vh;
}

.hero-copy {
  max-width: 610px;
}

.hero-note {
  max-width: 26ch;
  margin: 18px 0 0;
  color: var(--text-body);
  font-size: 16px;
}

.kicker,
.eyebrow {
  margin: 0 0 14px;
  color: var(--jade);
  font-size: 13px;
  transition: color 420ms ease;
}

h1, h2, h3, p { overflow-wrap: anywhere; }

h1, h2 {
  margin: 0;
  color: var(--paper);
  font-family: "Noto Serif SC", "STZhongsong", "Songti SC", "Noto Serif CJK SC", serif;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.06em;
  transition: color 420ms ease;
}

h1 {
  font-size: clamp(58px, 8vw, 124px);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-shadow: 0 0 34px rgba(228, 191, 112, 0.15);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1 {
    color: transparent;
    background-image: linear-gradient(
      110deg,
      var(--paper) 0%,
      rgba(255, 248, 230, 0.88) 18%,
      rgba(228, 191, 112, 0.96) 32%,
      rgba(255, 248, 230, 0.88) 48%,
      rgba(124, 217, 190, 0.92) 62%,
      rgba(255, 248, 230, 0.9) 78%,
      var(--paper) 100%
    );
    background-size: 240% 100%;
    background-position: 0% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: title-shimmer 8.5s linear infinite;
  }

  .section-heading h2 {
    color: transparent;
    background-image: linear-gradient(90deg, var(--paper), rgba(228, 191, 112, 0.98) 52%, rgba(255, 248, 230, 0.88));
    background-size: 100% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  [data-theme="light"] .section-heading h2 {
    background-image: linear-gradient(90deg, var(--paper), rgba(184, 148, 46, 0.96) 54%, rgba(26, 21, 16, 0.72));
  }
}

h2 {
  font-size: clamp(34px, 5vw, 72px);
}

h3 {
  margin: 0;
  color: var(--paper);
  font-family: "Noto Serif SC", "STZhongsong", "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.04em;
  transition: color 420ms ease;
}

.poem {
  margin: 22px 0 0;
  color: rgba(255, 248, 230, 0.88);
  font-family: "Noto Serif SC", "KaiTi", "STKaiti", "Songti SC", serif;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.45;
}

[data-theme="light"] .poem {
  color: rgba(26, 21, 16, 0.82);
}

/* ═══════════════════════════════════════════
   Hero 操作按钮 (magnetic)
   ═══════════════════════════════════════════ */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 42px;
}

.hero-actions a {
  position: relative;
  min-width: 134px;
  padding: 12px 18px;
  overflow: hidden;
  border: 1px solid var(--btn-border);
  border-radius: 6px;
  color: var(--paper);
  background: var(--btn-bg);
  text-align: center;
  will-change: transform;
  transition: border-color 180ms ease, background 180ms ease;
}

.hero-actions a::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -45%;
  width: 34%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(124, 217, 190, 0.36), transparent);
  transform: skewX(-22deg);
  transition: left 340ms ease;
}

.hero-actions a:hover,
.hero-actions a:focus-visible {
  border-color: rgba(124, 217, 190, 0.78);
  background: var(--jade-dim);
}

.hero-actions a:hover::before,
.hero-actions a:focus-visible::before {
  left: 112%;
}

/* ═══════════════════════════════════════════
   星幕之窗
   ═══════════════════════════════════════════ */

.veil-stage {
  display: grid;
  justify-items: center;
  gap: 18px;
  min-width: 0;
}

.veil-window-shell {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(100%, 760px);
}

.veil-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  width: min(100%, 640px);
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.veil-metadata span {
  padding: 6px 10px;
  border: 1px solid rgba(255, 248, 230, 0.1);
  border-radius: 999px;
  background: rgba(255, 248, 230, 0.03);
}

[data-theme="light"] .veil-metadata span {
  border-color: rgba(60, 50, 35, 0.1);
  background: rgba(60, 50, 35, 0.04);
}

.veil-window {
  position: relative;
  width: 100%;
  aspect-ratio: 1.92;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 230, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 45% 40%, rgba(124, 217, 190, 0.06), transparent 38%),
    radial-gradient(ellipse at 60% 55%, rgba(228, 191, 112, 0.05), transparent 42%),
    radial-gradient(ellipse at 30% 60%, rgba(143, 63, 82, 0.06), transparent 35%),
    radial-gradient(ellipse at center, rgba(255, 248, 230, 0.04), transparent 28%);
  box-shadow:
    0 32px 110px rgba(0, 0, 0, 0.42),
    inset 0 0 92px rgba(0, 0, 0, 0.74),
    inset 0 0 0 1px rgba(255, 248, 230, 0.06);
  clip-path: ellipse(48% 40% at 50% 50%);
  animation: star-breathe 9s ease-in-out infinite;
  will-change: transform;
}

[data-theme="light"] .veil-window {
  background:
    radial-gradient(ellipse at 45% 40%, rgba(61, 139, 110, 0.06), transparent 38%),
    radial-gradient(ellipse at 60% 55%, rgba(184, 148, 46, 0.05), transparent 42%),
    radial-gradient(ellipse at 30% 60%, rgba(143, 63, 82, 0.04), transparent 35%),
    radial-gradient(ellipse at center, rgba(100, 85, 60, 0.04), transparent 28%);
  box-shadow:
    0 28px 90px var(--shadow),
    inset 0 0 80px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(60, 50, 35, 0.1);
}

.veil-window::before {
  position: absolute;
  inset: 8% 3%;
  z-index: 4;
  content: "";
  pointer-events: none;
  border-top: 1px solid rgba(228, 191, 112, 0.22);
  border-bottom: 1px solid rgba(124, 217, 190, 0.12);
  border-radius: 50%;
  opacity: 0.6;
}

.veil-window::after {
  position: absolute;
  inset: 16% 14%;
  z-index: 4;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(255, 248, 230, 0.06);
  border-radius: 50%;
  filter: blur(3px);
}

[data-theme="light"] .veil-window::after {
  border-color: rgba(60, 50, 35, 0.08);
}

#veil-stars {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.veil-glass {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 38% 26%, rgba(255, 248, 230, 0.14), transparent 10%),
    radial-gradient(ellipse at 62% 52%, rgba(124, 217, 190, 0.06), transparent 18%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 28% 70%, rgba(124, 217, 190, 0.06));
  mix-blend-mode: screen;
}

.seal {
  margin: 0;
  color: var(--text-dim);
  font-family: "Noto Serif SC", "KaiTi", "STKaiti", "Songti SC", serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

/* ═══════════════════════════════════════════
   内容板块
   ═══════════════════════════════════════════ */

.section {
  position: relative;
  padding: clamp(44px, 7vw, 92px) clamp(20px, 6vw, 84px) clamp(76px, 10vw, 130px);
  /* 顶部边框由文末「星轨分割线」渐变线替代 */
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(260px, 1fr);
  gap: clamp(18px, 5vw, 70px);
  align-items: end;
  max-width: 1180px;
  margin: 0 auto 44px;
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -18px;
}

.section-heading p:last-child {
  max-width: 620px;
  margin: 0;
  color: var(--text-body);
  font-size: 18px;
}

/* ═══════════════════════════════════════════
   星图板块
   ═══════════════════════════════════════════ */

.band-map {
  background:
    linear-gradient(180deg, rgba(18, 24, 37, 0.48), rgba(6, 7, 10, 0.1)),
    linear-gradient(90deg, rgba(124, 217, 190, 0.04), rgba(228, 191, 112, 0.04));
}

[data-theme="light"] .band-map {
  background:
    linear-gradient(180deg, rgba(237, 229, 213, 0.48), rgba(245, 239, 224, 0.1)),
    linear-gradient(90deg, rgba(61, 139, 110, 0.04), rgba(184, 148, 46, 0.04));
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════
   项目卡片 (有机辉光 + 磁吸)
   ═══════════════════════════════════════════ */

.project-card {
  position: relative;
  min-height: 268px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(217, 232, 224, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(180deg, var(--surface-hover), var(--surface)),
    var(--card-bg);
  cursor: default;
  will-change: transform, border-color, box-shadow;
  transition:
    border-color 220ms ease,
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
    background 220ms ease,
    box-shadow 360ms ease;
}

[data-theme="light"] .project-card {
  border-color: rgba(60, 50, 35, 0.14);
}

/* 卡片有机辉光层 */
.card-glow {
  position: absolute;
  inset: -1px;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(
    600px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    rgba(124, 217, 190, 0.12),
    transparent 40%
  );
  transform: scale(0.95);
  transition: opacity 320ms ease, transform 420ms ease;
}

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

.project-card::before {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 1;
  width: 10px;
  height: 10px;
  content: "";
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 26px rgba(228, 191, 112, 0.76);
  transform: scale(0.82);
  opacity: 0.72;
  transition: box-shadow 320ms ease, transform 420ms ease, opacity 320ms ease;
}

.project-card:hover::before {
  box-shadow: 0 0 38px rgba(228, 191, 112, 0.9);
}

.project-card::after {
  position: absolute;
  top: 28px;
  right: 30px;
  z-index: 1;
  width: 120px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, rgba(228, 191, 112, 0.6), transparent);
  transform: rotate(-18deg);
  transform-origin: right;
  opacity: 0.24;
  transition: transform 620ms cubic-bezier(0.16, 1, 0.3, 1), opacity 320ms ease;
}

.project-card:hover {
  border-color: rgba(124, 217, 190, 0.48);
  background:
    linear-gradient(180deg, rgba(124, 217, 190, 0.09), var(--surface)),
    var(--card-bg-hover);
  box-shadow:
    0 18px 48px var(--shadow),
    0 0 40px rgba(124, 217, 190, 0.06);
}

.project-card.is-revealed {
  border-color: rgba(124, 217, 190, 0.4);
  box-shadow:
    0 18px 48px var(--shadow),
    0 0 0 1px rgba(124, 217, 190, 0.08) inset;
}

.project-card.is-revealed::before {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 0 32px rgba(228, 191, 112, 0.9);
}

.project-card.is-revealed::after {
  opacity: 0.8;
  transform: rotate(-18deg) scaleX(1);
}

.project-card.is-revealed .card-glow {
  opacity: 1;
  transform: scale(1);
}

.project-card.is-active {
  border-color: rgba(228, 191, 112, 0.46);
  box-shadow:
    0 18px 48px var(--shadow),
    0 0 0 1px rgba(228, 191, 112, 0.08) inset;
}

.project-card > *:not(.card-glow) {
  position: relative;
  z-index: 1;
}

.project-card-top,
.project-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-card-bottom {
  margin-top: auto;
  color: var(--text-dim);
  font-size: 13px;
}

.project-chip,
.project-coordinate,
.project-callout {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 248, 230, 0.12);
  border-radius: 999px;
  background: rgba(255, 248, 230, 0.03);
}

[data-theme="light"] .project-chip,
[data-theme="light"] .project-coordinate,
[data-theme="light"] .project-callout {
  border-color: rgba(60, 50, 35, 0.1);
  background: rgba(60, 50, 35, 0.04);
}

.project-chip {
  color: var(--jade);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-coordinate {
  color: var(--text-dim);
  font-size: 12px;
}

.project-callout {
  color: var(--gold);
  font-size: 12px;
}

.project-marker {
  position: absolute;
  top: 78px;
  right: 22px;
  z-index: 1;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(124, 217, 190, 0.3);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 5px rgba(124, 217, 190, 0.08),
    0 0 18px rgba(124, 217, 190, 0.16);
}

.project-marker::before,
.project-marker::after {
  position: absolute;
  inset: 50% auto auto 50%;
  content: "";
  background: rgba(228, 191, 112, 0.8);
  transform: translate(-50%, -50%);
}

.project-marker::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.project-marker::after {
  width: 14px;
  height: 1px;
  opacity: 0.55;
}

.project-index {
  margin: 18px 0 46px;
  color: var(--text-dim);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 40px;
}

.project-card p:not(.project-index) {
  margin: 14px 0 28px;
  color: var(--text-body);
}

/* ═══════════════════════════════════════════
   溪记板块
   ═══════════════════════════════════════════ */

.band-notes {
  background: linear-gradient(180deg, rgba(6, 7, 10, 0.08), rgba(13, 21, 27, 0.74));
}

[data-theme="light"] .band-notes {
  background: linear-gradient(180deg, rgba(245, 239, 224, 0.08), rgba(237, 229, 213, 0.74));
}

.note-river {
  position: relative;
  display: grid;
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
  padding-left: 28px;
}

.note-river::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 116px;
  width: 1px;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(124, 217, 190, 0.5), rgba(228, 191, 112, 0.42), transparent);
  /* 溪水随滚动向下生长（JS 以 GSAP scrub 驱动 --river-progress，默认 1 为完整可见） */
  transform: scaleY(var(--river-progress, 1));
  transform-origin: top;
}

.note-river article {
  position: relative;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 26px;
  padding: 22px 0 22px 38px;
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(255, 248, 230, 0.03), transparent 72%);
  transition: background 260ms ease, transform 220ms ease, box-shadow 260ms ease;
}

.note-river article::before {
  position: absolute;
  top: 34px;
  left: 111px;
  width: 11px;
  height: 11px;
  content: "";
  border: 1px solid var(--jade);
  border-radius: 50%;
  background: var(--night);
  box-shadow: 0 0 20px rgba(124, 217, 190, 0.42);
  transform: scale(0.78);
  transition: box-shadow 320ms ease, background 420ms ease, transform 420ms ease;
}

.note-river article:hover::before {
  box-shadow: 0 0 32px rgba(124, 217, 190, 0.64);
}

.note-river article:hover {
  background: linear-gradient(90deg, rgba(124, 217, 190, 0.05), transparent 72%);
  transform: translateX(2px);
}

.note-river article.is-revealed {
  background: linear-gradient(90deg, rgba(124, 217, 190, 0.08), transparent 72%);
  box-shadow: inset 0 0 0 1px rgba(124, 217, 190, 0.06);
}

.note-river article.is-revealed::before {
  background: var(--paper);
  box-shadow:
    0 0 0 6px rgba(124, 217, 190, 0.08),
    0 0 26px rgba(124, 217, 190, 0.52);
  animation: node-pulse 980ms ease-out 1;
  transform: scale(1);
}

.note-meta {
  display: grid;
  gap: 8px;
  align-content: start;
  color: var(--text-dim);
}

.note-tag {
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border: 1px solid rgba(255, 248, 230, 0.12);
  border-radius: 999px;
  background: rgba(255, 248, 230, 0.03);
  color: var(--jade);
  font-size: 12px;
  letter-spacing: 0.08em;
}

[data-theme="light"] .note-tag {
  border-color: rgba(60, 50, 35, 0.1);
  background: rgba(60, 50, 35, 0.04);
}

.note-copy {
  min-width: 0;
}

.note-river time {
  color: var(--text-dim);
  font-family: Georgia, "Times New Roman", serif;
}

.note-river p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--text-body);
}

/* ═══════════════════════════════════════════
   照影板块
   ═══════════════════════════════════════════ */

.band-reflection {
  background:
    linear-gradient(145deg, rgba(143, 63, 82, 0.12), rgba(6, 7, 10, 0.2) 44%, rgba(228, 191, 112, 0.1)),
    var(--ink);
}

[data-theme="light"] .band-reflection {
  background:
    linear-gradient(145deg, rgba(143, 63, 82, 0.08), rgba(245, 239, 224, 0.2) 44%, rgba(184, 148, 46, 0.08)),
    var(--ink);
}

.profile-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 34px;
  align-items: center;
  max-width: 1060px;
  margin: 0 auto;
  padding: clamp(26px, 5vw, 46px);
  border-top: 1px solid rgba(255, 248, 230, 0.18);
  border-bottom: 1px solid rgba(124, 217, 190, 0.16);
  background:
    radial-gradient(circle at 20% 20%, rgba(124, 217, 190, 0.05), transparent 30%),
    radial-gradient(circle at 80% 40%, rgba(228, 191, 112, 0.05), transparent 28%);
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 320ms ease, border-color 320ms ease;
}

[data-theme="light"] .profile-panel {
  border-top-color: rgba(60, 50, 35, 0.16);
  border-bottom-color: rgba(61, 139, 110, 0.14);
}

.profile-copy {
  display: grid;
  gap: 10px;
}

.profile-seal {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(228, 191, 112, 0.24);
  border-radius: 50%;
  color: var(--gold);
  font-family: "Noto Serif SC", "STZhongsong", "Songti SC", serif;
  font-size: 28px;
  font-weight: 600;
  background: radial-gradient(circle, rgba(228, 191, 112, 0.08), rgba(255, 248, 230, 0.02));
  box-shadow: inset 0 0 0 8px rgba(228, 191, 112, 0.04);
  transition: box-shadow 320ms ease, transform 320ms ease, border-color 320ms ease;
}

.profile-currently {
  margin: 0;
  color: var(--jade);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-name {
  margin: 0 0 8px;
  color: var(--paper);
  font-family: "Noto Serif SC", "STZhongsong", "Songti SC", "Noto Serif CJK SC", serif;
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.profile-panel p:not(.profile-name):not(.profile-currently) {
  max-width: 680px;
  margin: 0;
  color: var(--text-body);
}

.profile-tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(54px, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.profile-tags li {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid rgba(255, 248, 230, 0.14);
  border-radius: 999px;
  color: rgba(255, 248, 230, 0.82);
  background: var(--surface);
  transition:
    border-color 240ms ease,
    background 240ms ease,
    box-shadow 240ms ease;
}

[data-theme="light"] .profile-tags li {
  border-color: rgba(60, 50, 35, 0.14);
  color: rgba(60, 50, 35, 0.82);
}

.profile-tags li:hover {
  border-color: var(--jade);
  background: var(--jade-dim);
  box-shadow: 0 0 16px rgba(124, 217, 190, 0.16);
}

.profile-panel.is-revealed {
  border-top-color: rgba(228, 191, 112, 0.24);
  border-bottom-color: rgba(124, 217, 190, 0.24);
  box-shadow: inset 0 0 0 1px rgba(228, 191, 112, 0.08);
}

.profile-panel.is-revealed .profile-seal {
  border-color: rgba(228, 191, 112, 0.34);
  box-shadow:
    inset 0 0 0 8px rgba(228, 191, 112, 0.06),
    0 0 28px rgba(228, 191, 112, 0.16);
  transform: translateY(-2px) rotate(2deg);
}

/* ═══════════════════════════════════════════
   页脚
   ═══════════════════════════════════════════ */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(20px, 6vw, 84px) 44px;
  color: var(--text-dim);
  border-top: 1px solid var(--line);
  align-items: center;
}

.footer-copy {
  display: grid;
  gap: 6px;
}

.footer-note {
  margin: 0;
  color: var(--text-body);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--jade);
  transition: color 180ms ease, text-shadow 220ms ease;
}

.site-footer a:hover {
  color: var(--gold);
}

.site-footer > a {
  position: relative;
  padding: 8px 14px;
  border: 1px solid rgba(255, 248, 230, 0.1);
  border-radius: 999px;
  background: rgba(255, 248, 230, 0.03);
  overflow: hidden;
}

[data-theme="light"] .site-footer > a {
  border-color: rgba(60, 50, 35, 0.1);
  background: rgba(60, 50, 35, 0.03);
}

.site-footer > a::before {
  position: absolute;
  inset: -18px;
  content: "";
  background: radial-gradient(circle, rgba(228, 191, 112, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
  transform: scale(0.86);
}

.site-footer > a:hover::before,
.site-footer > a:focus-visible::before {
  opacity: 1;
  transform: scale(1);
}

.site-footer > a:hover,
.site-footer > a:focus-visible {
  text-shadow: 0 0 18px rgba(228, 191, 112, 0.26);
}

.site-footer > a:focus-visible {
  border-color: rgba(124, 217, 190, 0.42);
}

.icp {
  margin: 6px 0 0;
  font-size: 13px;
  color: rgba(255, 248, 230, 0.42);
}

[data-theme="light"] .icp {
  color: rgba(60, 50, 35, 0.4);
}

.icp a {
  color: inherit;
}

.back-to-top-star {
  color: var(--gold);
  font-size: 14px;
  transition: transform 220ms ease, filter 220ms ease, text-shadow 220ms ease;
}

.site-footer > a:hover .back-to-top-star,
.site-footer > a:focus-visible .back-to-top-star {
  transform: translateY(-1px) scale(1.08);
  text-shadow: 0 0 12px rgba(228, 191, 112, 0.52);
  filter: drop-shadow(0 0 10px rgba(228, 191, 112, 0.35));
}

/* ═══════════════════════════════════════════
   Reduced motion fallback
   ═══════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(22px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 500ms ease, transform 500ms ease;
}

.project-card.reveal:nth-child(2).is-visible { transition-delay: 60ms; }
.project-card.reveal:nth-child(3).is-visible { transition-delay: 120ms; }
.note-river article.reveal:nth-child(2).is-visible { transition-delay: 60ms; }
.note-river article.reveal:nth-child(3).is-visible { transition-delay: 120ms; }

/* ═══════════════════════════════════════════
   关键帧
   ═══════════════════════════════════════════ */

@keyframes star-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.008); }
}

@keyframes title-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

@keyframes node-pulse {
  0% { transform: scale(0.78); box-shadow: 0 0 0 0 rgba(124, 217, 190, 0); }
  55% { transform: scale(1.2); box-shadow: 0 0 0 8px rgba(124, 217, 190, 0.06); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(124, 217, 190, 0); }
}

/* ═══════════════════════════════════════════
   响应式 — 平板 (≤900px)
   ═══════════════════════════════════════════ */

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    padding-top: 16px;
  }

  .site-header::before {
    inset: 10px 14px auto;
    height: 74px;
  }

  .nav-rail {
    width: 100%;
    justify-content: space-between;
  }

  .nav-links {
    gap: 16px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 112px;
  }

  .hero-copy {
    max-width: none;
  }

  .veil-window {
    width: min(100%, 620px);
  }

  .veil-window-shell {
    width: 100%;
  }

  .section-heading,
  .project-grid,
  .profile-panel {
    grid-template-columns: 1fr;
  }

  .section-heading .eyebrow {
    margin-bottom: -10px;
  }

  .project-card {
    min-height: 230px;
  }

  .project-card-top,
  .project-card-bottom {
    flex-wrap: wrap;
  }

  .project-coordinate {
    width: 100%;
  }

  .project-marker {
    top: 88px;
  }

  .note-river {
    padding-left: 20px;
  }

  .note-river::before {
    left: 98px;
  }

  .note-river article::before {
    left: 93px;
  }

  .profile-tags {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cursor-glow {
    display: none;
  }
}

/* ═══════════════════════════════════════════
   响应式 — 手机 (≤620px)
   ═══════════════════════════════════════════ */

@media (max-width: 620px) {
  .site-header {
    position: absolute;
    flex-direction: column;
    gap: 10px;
    background: transparent;
    backdrop-filter: none;
  }

  .site-header::before {
    inset: 10px 10px auto;
    height: 126px;
    border-radius: 28px;
  }

  .nav-rail {
    flex-direction: column;
    width: 100%;
    padding: 10px;
    border-radius: 24px;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .nav-links a {
    flex: 1 1 0;
    text-align: center;
  }

  h1 {
    font-size: clamp(46px, 16vw, 68px);
  }

  .poem {
    font-size: 24px;
  }

  .hero {
    padding-top: 142px;
  }

  .hero-note {
    max-width: none;
  }

  .veil-metadata {
    width: 100%;
    justify-content: center;
  }

  .veil-window {
    aspect-ratio: 1.46;
    clip-path: ellipse(48% 36% at 50% 50%);
  }

  .veil-window-shell {
    gap: 10px;
  }

  .hero-actions a {
    flex: 1 1 150px;
  }

  .note-river::before {
    left: 8px;
  }

  .note-river article {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-left: 28px;
  }

  .note-river article::before {
    left: 3px;
  }

  .note-meta {
    grid-auto-flow: column;
    grid-template-columns: auto auto;
    justify-content: start;
    align-items: center;
  }

  .project-card-top,
  .project-card-bottom {
    align-items: flex-start;
  }

  .project-index {
    margin-bottom: 32px;
  }

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

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ═══════════════════════════════════════════
   Reduced motion
   ═══════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

/* ═══════════════════════════════════════════
   v2 美化增强层 · 2026-08
   - 本地子集化思源宋体（tools/build_fonts.py 生成）
   - 颗粒噪点 / 星轨分割线 / 溪水流动
   - 日月图标过渡 / 导航 scroll-spy / 选中色 / 滚动条
   ═══════════════════════════════════════════ */

/* ── 本地衬线字体（仅含页面用到的字符，改文案后需重跑 tools/build_fonts.py） ── */

@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./assets/fonts/noto-serif-sc-600.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("./assets/fonts/noto-serif-sc-900.woff2") format("woff2");
}

/* ── 文字选中 / 键盘焦点 ── */

::selection {
  background: rgba(228, 191, 112, 0.32);
  color: #fff8e6;
  text-shadow: none;
}

[data-theme="light"] ::selection {
  background: rgba(184, 148, 46, 0.3);
  color: #1a1510;
}

:focus-visible {
  outline: 2px solid rgba(124, 217, 190, 0.6);
  outline-offset: 3px;
}

/* ── 细滚动条 ── */

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 217, 190, 0.38) transparent;
}

[data-theme="light"] html {
  scrollbar-color: rgba(61, 139, 110, 0.45) transparent;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(124, 217, 190, 0.5), rgba(228, 191, 112, 0.5)) padding-box;
}

/* ── 颗粒噪点（去塑料感） ── */

body::after {
  position: fixed;
  inset: 0;
  z-index: 26;
  pointer-events: none;
  content: "";
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
}

[data-theme="light"] body::after {
  opacity: 0.05;
  mix-blend-mode: multiply;
}

/* ── 板块星轨分割线 ── */

.section::before {
  position: absolute;
  top: 0;
  right: clamp(20px, 6vw, 84px);
  left: clamp(20px, 6vw, 84px);
  height: 1px;
  content: "";
  background: linear-gradient(
    90deg,
    transparent 2%,
    rgba(124, 217, 190, 0.34) 30%,
    rgba(228, 191, 112, 0.38) 68%,
    transparent 98%
  );
  opacity: 0.6;
}

.section::after {
  position: absolute;
  top: 0;
  left: 50%;
  content: "✦";
  color: var(--gold);
  font-size: 13px;
  line-height: 1;
  text-shadow: 0 0 12px rgba(228, 191, 112, 0.55);
  opacity: 0.85;
  transform: translate(-50%, -50%);
}

/* ── 引导小标签：宽字距 ── */

.kicker {
  letter-spacing: 0.3em;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

/* ── 主题切换：日月图标旋转过渡 ── */

.theme-icon-dark,
.theme-icon-light {
  grid-area: 1 / 1;
  transition: opacity 320ms ease, transform 520ms cubic-bezier(0.34, 1.4, 0.4, 1);
}

[data-theme="dark"] .theme-icon-light {
  opacity: 0;
  transform: rotate(110deg) scale(0.3);
}

[data-theme="light"] .theme-icon-dark {
  opacity: 0;
  transform: rotate(-110deg) scale(0.3);
}

/* ── 导航 scroll-spy 当前板块 ── */

.nav-links a.is-current {
  color: var(--paper);
}

.nav-links a.is-current::after {
  border-color: rgba(228, 191, 112, 0.34);
  background: linear-gradient(180deg, rgba(228, 191, 112, 0.12), rgba(124, 217, 190, 0.07));
}

/* ── 溪记：沿溪而下的流动微光 ── */

.note-river::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 115px;
  width: 3px;
  content: "";
  pointer-events: none;
  background: linear-gradient(
      180deg,
      transparent,
      rgba(228, 191, 112, 0.5) 38%,
      rgba(124, 217, 190, 0.55) 62%,
      transparent
    )
    no-repeat;
  background-size: 100% 130px;
  filter: blur(0.4px);
  opacity: 0.8;
  animation: river-flow 7.5s linear infinite;
}

@keyframes river-flow {
  from { background-position: 0 -130px; }
  to { background-position: 0 calc(100% + 130px); }
}

@media (max-width: 900px) {
  .note-river::after { left: 97px; }
}

@media (max-width: 620px) {
  .note-river::after { left: 7px; }
}

/* ── 诗句逐字入场（JS 拆字后生效） ── */

.poem-char {
  display: inline-block;
}
