/* =================================================================
   程冠肇 · 个人主页  —  Premium Design System
   -----------------------------------------------------------------
   - CSS variables drive the light/dark theme
   - Glassmorphism, gradient aurora, smooth premium motion
   ================================================================= */

/* ---------- Design tokens ---------- */
:root {
  --bg: #07070c;
  --bg-soft: #0d0d16;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f4fb;
  --text-dim: rgba(244, 244, 251, 0.62);
  --text-faint: rgba(244, 244, 251, 0.40);
  --accent: #7c5cff;
  --accent-2: #18d6e0;
  --accent-3: #ff7eb6;
  --gradient: linear-gradient(120deg, #7c5cff 0%, #18d6e0 100%);
  --gradient-soft: linear-gradient(120deg, rgba(124,92,255,0.18), rgba(24,214,224,0.18));
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-soft: #eef0f7;
  --surface: rgba(255, 255, 255, 0.65);
  --surface-strong: rgba(255, 255, 255, 0.85);
  --border: rgba(20, 20, 40, 0.10);
  --border-strong: rgba(20, 20, 40, 0.18);
  --text: #14141f;
  --text-dim: rgba(20, 20, 31, 0.62);
  --text-faint: rgba(20, 20, 31, 0.40);
  --shadow: 0 24px 60px -24px rgba(40, 40, 90, 0.25);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #fff; }

/* ---------- Aurora background (smooth mesh, no hard edges) ---------- */
.aurora-bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  pointer-events: none;
}
.aurora {
  position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.5;
  transition: background 0.6s var(--ease);
}
.aurora--1 { width: 50vw; height: 50vw; top: -14vw; left: -10vw; background: radial-gradient(circle, #7c5cff, transparent 72%); animation: float1 18s ease-in-out infinite; }
.aurora--2 { width: 44vw; height: 44vw; top: 18vh; right: -12vw; background: radial-gradient(circle, #18d6e0, transparent 72%); animation: float2 22s ease-in-out infinite; }
.aurora--3 { width: 38vw; height: 38vw; bottom: -14vw; left: 28vw; background: radial-gradient(circle, #ff7eb6, transparent 72%); opacity: 0.3; animation: float3 26s ease-in-out infinite; }
.aurora--4 { width: 30vw; height: 30vw; top: 40vh; left: 8vw; background: radial-gradient(circle, #5b8cff, transparent 72%); opacity: 0.22; animation: float1 30s ease-in-out infinite reverse; }
[data-theme="light"] .aurora { opacity: 0.26; }

@keyframes float1 { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(6vw,4vw) scale(1.12);} }
@keyframes float2 { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(-5vw,6vw) scale(1.08);} }
@keyframes float3 { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(4vw,-5vw) scale(1.15);} }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding: 120px 0; position: relative; }
.section__eyebrow { font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent-2); font-weight: 600; }
.section__title { font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; margin: 14px 0 18px; line-height: 1.1; }
.section__lead { color: var(--text-dim); max-width: 56ch; font-size: 1.05rem; }

/* projects page header with decorative photo pair (springy interactions) */
.projects-head { display: flex; align-items: center; justify-content: space-between; gap: 56px; }
.projects-head__text { flex: 1 1 auto; min-width: 0; }
.projects-head__media {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 16px;
  perspective: 800px;
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.projects-head__media:hover { transform: scale(1.03) rotateY(-4deg); }
/* 时间轴页：三张照片纵向堆叠，前两张保持左右、第三张在下方 */
.projects-head__media--stacked {
  flex-direction: column; align-items: center; gap: 12px;
}
.projects-head__pair {
  display: flex; align-items: center; gap: 16px;
}
.projects-head__media--stacked .projects-head__photo--third {
  margin-top: 4px;
}
.projects-head__photo {
  width: 128px; height: 168px; object-fit: cover;
  border-radius: 20px; border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  transform-origin: center bottom;
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.45s ease;
}
/* 联系页照片：保持原图比例（1364×1024，约 4:3 横构图），不裁切 */
.projects-head__photo--contact {
  width: clamp(220px, 22vw, 268px);
  height: auto;
  object-fit: contain;
  border-radius: 18px;
}
.projects-head__photo--offset { transform: translateY(26px) rotate(4deg); }
.projects-head__photo--third {
  width: 120px; height: 156px;
  transform: translateY(14px) rotate(-3deg);
}
.projects-head__media:hover .projects-head__photo {
  transform: translateY(-14px) scale(1.08) rotate(-4deg);
  box-shadow: 0 32px 70px -22px rgba(0,0,0,0.55);
}
.projects-head__media:hover .projects-head__photo--offset {
  transform: translateY(12px) scale(1.08) rotate(8deg);
  transition-delay: 0.08s;
}
.projects-head__media:hover .projects-head__photo--third {
  transform: translateY(-8px) scale(1.08) rotate(4deg);
  transition-delay: 0.16s;
}
.projects-head__media:active .projects-head__photo {
  transform: translateY(-6px) scale(0.98) rotate(0deg);
  transition-duration: 0.12s;
}
.projects-head__media:active .projects-head__photo--offset {
  transform: translateY(20px) scale(0.98) rotate(4deg);
  transition-duration: 0.12s;
}
.projects-head__media:active .projects-head__photo--third {
  transform: translateY(2px) scale(0.98) rotate(0deg);
  transition-duration: 0.12s;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--border);
}
.nav__inner { max-width: var(--maxw); margin-inline: auto; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.nav__logo { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.02em; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.nav__logo-img { height: 32px; width: auto; display: block; flex-shrink: 0; transform: translateX(-3px); }
.nav__brand { display: flex; align-items: center; gap: 18px; }
.nav__links { display: flex; gap: 8px; }
.nav__link { position: relative; padding: 8px 14px; border-radius: 999px; color: var(--text-dim); font-size: 0.95rem; transition: color 0.25s var(--ease); }
.nav__link::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--gradient); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); border-radius: 2px; }
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  cursor: pointer; transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.theme-toggle:hover { transform: rotate(20deg) scale(1.08); border-color: var(--border-strong); }
.theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__moon { display: block; }
.nav__burger { display: none; flex-direction: column; gap: 5px; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; align-items: center; justify-content: center; }
.nav__burger span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s var(--ease); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px;
  border-radius: 999px; font-weight: 600; font-size: 0.98rem; cursor: pointer;
  border: 1px solid transparent; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
  will-change: transform;
}
.btn--primary { background: var(--gradient); color: #fff; box-shadow: 0 12px 30px -10px rgba(124,92,255,0.6); }
.btn--primary:hover { box-shadow: 0 18px 40px -10px rgba(124,92,255,0.8); }
.btn--ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--border-strong); background: var(--surface-strong); }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding-top: 90px; overflow: hidden; }
#hero-canvas { position: absolute; inset: 0; z-index: 0; }
/* Soft vignette so the nebula fades gently at the screen edges */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 40%, color-mix(in srgb, var(--bg) 70%, transparent) 100%);
}

/* constellation network is rendered by Three.js in hero.js */
.hero__grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr); gap: 48px; align-items: center; }
.hero__text { position: relative; z-index: 2; }
.hero__avatar { position: relative; z-index: 2; display: flex; justify-content: center; align-items: center; perspective: 1000px; }
.hero__avatar-card { position: relative; width: min(300px, 25vw); aspect-ratio: 1; border-radius: 50%; padding: 10px; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--gradient) border-box; border: 2px solid transparent; backdrop-filter: blur(14px); box-shadow: 0 24px 60px -18px var(--accent), inset 0 2px 0 rgba(255,255,255,.08); animation: avatarFloat 5s ease-in-out infinite; will-change: transform; }
.hero__avatar-card img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.hero__avatar-card::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: var(--gradient); opacity: 0.25; filter: blur(28px); z-index: -1; animation: avatarGlow 4s ease-in-out infinite; }
@keyframes avatarFloat { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-16px) rotate(1.5deg); } }
@keyframes avatarGlow { 0%, 100% { opacity: 0.22; transform: scale(1); } 50% { opacity: 0.35; transform: scale(1.06); } }
.hero__badge {
  position: relative; display: inline-flex; align-items: center; gap: 9px; padding: 8px 18px;
  border-radius: 999px; font-size: 0.88rem; font-weight: 600; letter-spacing: 0.01em; color: var(--text);
  margin-bottom: 26px; overflow: hidden; backdrop-filter: blur(10px);
  border: 1.5px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--gradient) border-box;
  box-shadow: 0 8px 26px -12px var(--accent), inset 0 1px 0 rgba(255,255,255,.07);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.hero__badge:hover { transform: translateY(-1px); box-shadow: 0 12px 32px -12px var(--accent), inset 0 1px 0 rgba(255,255,255,.07); }
.hero__badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gradient); box-shadow: 0 0 12px var(--accent-2); flex: none; animation: pulse 2s infinite; }
.hero__badge::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-130%); animation: badgeShine 4.5s ease-in-out infinite; pointer-events: none; }
@keyframes badgeShine { 0%, 55% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.hero__title { font-family: var(--font-display); font-size: clamp(1.85rem, 4.2vw, 3rem); font-weight: 700; line-height: 1.14; letter-spacing: -0.02em; max-width: 28ch; }
.hero__title .gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.14em; letter-spacing: -0.01em; }
.hero__bio { color: var(--text-dim); max-width: 60ch; font-size: 1.05rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 64px; }
.stat {
  position: relative;
  padding: 22px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  overflow: hidden;
  cursor: default;
  transition: transform .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease);
  will-change: transform;
}
.stat::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(150px circle at var(--mx, 50%) var(--my, 30%), color-mix(in srgb, var(--accent) 24%, transparent), transparent 62%);
  opacity: 0;
  transition: opacity .45s var(--ease);
  pointer-events: none;
}
.stat:hover {
  transform: translateY(-8px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  box-shadow: 0 22px 46px -22px color-mix(in srgb, var(--accent) 60%, transparent);
}
.stat:hover::before { opacity: 1; }
.stat__num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform .45s var(--ease);
}
.stat:hover .stat__num { transform: scale(1.06); }
.stat__label { color: var(--text-dim); font-size: 0.9rem; margin-top: 4px; transition: color .45s var(--ease); }
.stat:hover .stat__label { color: var(--text); }

/* ---------- Cards / Glass ---------- */
.glass {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  backdrop-filter: blur(20px) saturate(160%); box-shadow: var(--shadow);
}
.card {
  position: relative; padding: 28px; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(16px);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--gradient); opacity: 0; transition: opacity 0.4s var(--ease);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.card:hover { transform: translateY(-6px); border-color: transparent; box-shadow: 0 30px 60px -24px rgba(124,92,255,0.45); }
.card:hover::before { opacity: 1; }
.card__tag { display: inline-block; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 12px; }
.card__title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; margin-bottom: 10px; }
.card__desc { color: var(--text-dim); font-size: 0.96rem; }
.card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { font-size: 0.78rem; padding: 5px 12px; border-radius: 999px; background: var(--surface-strong); border: 1px solid var(--border); color: var(--text-dim); }

/* ---------- Article card (published paper) ---------- */
.card--article { border-color: color-mix(in srgb, var(--accent) 32%, var(--border)); }
.card--article::after {
  content: ""; position: absolute; top: 0; left: 28px; right: 28px; height: 2px;
  background: var(--gradient); opacity: 0.75; border-radius: 2px;
}
.card--article .card__tag {
  margin-bottom: 0;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #5b3fe0);
  padding: 6px 13px;
  border-radius: 999px;
  box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}
.card--article .card__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; margin-bottom: 16px; }
.card--article .card__venue {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap;
  color: transparent; background: var(--gradient); -webkit-background-clip: text; background-clip: text;
}
.card--article .card__title { font-size: 1.3rem; line-height: 1.4; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card--article .card__authors { font-size: 0.84rem; color: var(--text-dim); margin: -2px 0 12px; }
.card--article .card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.card--article .card__read {
  font-weight: 600; font-size: 0.9rem;
  color: transparent; background: var(--gradient); -webkit-background-clip: text; background-clip: text;
}
.card--article .card__read .arrow { display: inline-block; transition: transform 0.3s var(--ease); }
.card--article:hover .card__read .arrow { transform: translateX(4px); }
.card--exp .card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card--exp .card__read {
  font-weight: 600; font-size: 0.9rem;
  color: transparent; background: var(--gradient); -webkit-background-clip: text; background-clip: text;
}
.card--exp .card__read .arrow { display: inline-block; transition: transform 0.3s var(--ease); }
.card--exp:hover .card__read .arrow { transform: translateX(4px); }
.card--article .card__list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 9px; }
.card--article .card__list li { position: relative; padding-left: 18px; font-size: 0.88rem; line-height: 1.5; color: var(--text-dim); }
.card--article .card__list li::before { content: ""; position: absolute; left: 0; top: 0.52em; width: 7px; height: 7px; border-radius: 2px; background: var(--gradient); }

/* ---------- Experience card (internship) ---------- */
.card--exp { border-color: color-mix(in srgb, var(--accent) 22%, var(--border)); }
.card--exp::after {
  content: ""; position: absolute; top: 0; left: 28px; right: 28px; height: 2px;
  background: var(--gradient); opacity: 0.75; border-radius: 2px;
}
.card--exp .card__brands { display: flex; align-items: center; gap: 14px; min-height: 56px; margin-bottom: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; }
.brand img { height: 22px; width: auto; display: block; flex-shrink: 0; }
.brand--ctrip { color: #2577e3; }
.brand--qunar { color: #4ECDC4; }
.brand--meituan { color: #FFC300; margin-left: -14px; }
.brand--meituan img { height: 56px; width: auto; }
.brand--ecmax { color: #fff; background: #9e1b23; padding: 5px 10px; border-radius: 6px; margin-left: -2px; }
.brand--ecmax img { height: 18px; width: auto; display: block; }
.brand--gov { color: #d32f2f; letter-spacing: 0.5px; font-weight: 700; }
.brand--gov img { height: 36px; width: auto; display: block; flex-shrink: 0; }
.brand--xjtu { color: #a41f35; letter-spacing: 0.5px; font-weight: 700; }
.brand--xjtu img { height: 30px; width: auto; display: block; flex-shrink: 0; }
.card--exp .card__title { font-size: 1.28rem; margin-bottom: 4px; }
.card--exp .card__role { font-size: 0.84rem; color: var(--text-dim); margin-bottom: 12px; }
/* "in progress" status badge on experience cards */
.card__status { margin-left: auto; align-self: center; display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 600; color: #16a34a; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, #16a34a 14%, transparent); border: 1px solid color-mix(in srgb, #16a34a 35%, transparent); }
[data-theme="light"] .card__status { color: #15803d; }
.card__status-dot { width: 6px; height: 6px; border-radius: 50%; background: #16a34a; animation: statusPulse 1.8s ease-out infinite; }
@keyframes statusPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, #16a34a 55%, transparent); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .card__status-dot { animation: none; } }
.card--exp .card__list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 9px; }
.card--exp .card__list li { position: relative; padding-left: 18px; font-size: 0.88rem; line-height: 1.5; color: var(--text-dim); }
.card--exp .card__list li::before {
  content: ""; position: absolute; left: 0; top: 0.52em; width: 7px; height: 7px; border-radius: 2px;
  background: var(--gradient);
}

/* ---------- Project grid ---------- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
/* 全部项目：article / exp 卡片等高，令第一、二行（1–6）对齐 */
.grid--3 .card--article,
.grid--3 .card--exp { display: flex; flex-direction: column; min-height: 404px; }
.grid--3 .card--article .card__foot,
.grid--3 .card--exp .card__foot,
.grid--3 .card--exp .card__meta { margin-top: auto; }

/* ---------- Teaser card (coming soon) ---------- */
.grid--3 .card--teaser { display: flex; flex-direction: column; min-height: 404px; }
.card--teaser {
  align-items: center; text-align: center; justify-content: center; gap: 4px;
  border-style: dashed;
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
}
.card--teaser::before { display: none; }
.card--teaser .card__title { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.card__teaser-stage { position: relative; width: 92px; height: 92px; margin: 4px auto 14px; display: grid; place-items: center; }
.card__teaser-orbit {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px dashed color-mix(in srgb, var(--accent-2) 70%, transparent);
  animation: teaserSpin 9s linear infinite;
}
.card__teaser-orbit--2 {
  inset: 18px; border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  animation-duration: 6s; animation-direction: reverse;
}
.card__teaser-star { font-size: 1.6rem; color: var(--accent-2); animation: teaserPulse 2.4s ease-in-out infinite; }

.card__teaser-dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 6px; }
.card__teaser-dots i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  animation: teaserBounce 1.3s ease-in-out infinite;
}
.card__teaser-dots i:nth-child(2) { animation-delay: 0.18s; }
.card__teaser-dots i:nth-child(3) { animation-delay: 0.36s; }

@keyframes teaserSpin { to { transform: rotate(360deg); } }
@keyframes teaserPulse { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.28); opacity: 1; } }
@keyframes teaserBounce { 0%, 100% { transform: translateY(0); opacity: 0.45; } 50% { transform: translateY(-7px); opacity: 1; } }

.card--teaser:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); box-shadow: 0 30px 60px -24px rgba(124,92,255,0.35); }
.card--teaser:hover .card__teaser-orbit { animation-duration: 2.4s; }
.card--teaser:hover .card__teaser-orbit--2 { animation-duration: 1.6s; }
.card--teaser:hover .card__teaser-star { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .card__teaser-orbit, .card__teaser-star, .card__teaser-dots i { animation: none; }
}

/* ---------- Timeline (cosmic starry theme, rebuilt) ---------- */
/* ① 整页星空：body 拿到 .timeline-view 后强制深空配色，明暗主题都不会出现白底/黑字 */
body.timeline-view {
  --bg: #06081a;
  --bg-soft: #0a0b22;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-strong: rgba(255, 255, 255, 0.095);
  --border: rgba(255, 255, 255, 0.13);
  --border-strong: rgba(255, 255, 255, 0.24);
  --text: #f4f4fb;
  --text-dim: rgba(238, 240, 255, 0.74);
  --text-faint: rgba(238, 240, 255, 0.48);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75);
  background: #06081a;
  color: var(--text);
}
/* 本页不要极光，宇宙背景交给 .timeline__stars */
body.timeline-view .aurora-bg { display: none; }
/* 导航栏：顶部加一层暗色渐变兜底，未滚动时文字也清晰 */
body.timeline-view .nav::before {
  content: ""; position: absolute; inset: -1px 0 0 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 6, 22, 0.66) 0%, rgba(4, 6, 22, 0.28) 55%, rgba(4, 6, 22, 0) 100%);
}
body.timeline-view .nav__logo,
body.timeline-view .nav__link:hover { color: #fff; }
body.timeline-view .nav.is-scrolled {
  background: rgba(6, 8, 26, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}
/* 顶部标题压在土星上，加一点投影确保可读 */
body.timeline-view .section__title { text-shadow: 0 3px 26px rgba(0, 0, 0, 0.6); }
body.timeline-view .section__lead,
body.timeline-view .section__eyebrow { text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55); }
body.timeline-view .footer { border-top-color: rgba(255, 255, 255, 0.1); }
/* 时间轴页：取消滚动淡入，标题 / 整条时间轴 / 底部链接直接显示 */
body.timeline-view .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* 星空背景为 fixed 满视口层（见 .timeline__stars），本区块透明。
   注意：不能设 overflow:hidden，否则会把满宽的土星裁到 1120px 容器里。 */
.timeline-page { position: relative; padding-top: clamp(150px, 14vw, 240px); }
.timeline-page > *:not(.timeline__stars):not(.timeline__saturn) { position: relative; z-index: 1; }

/* ② 顶部超大土星：整颗星球远宽于页面，只有下方圆边 + 前景星环落在可视区内 */
.timeline__saturn {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 100vw; min-width: 1000px; max-width: 2600px;
  z-index: 0; pointer-events: none; user-select: none;
}
.timeline__saturn .saturn { display: block; width: 100%; height: auto; }
.saturn__halo { animation: satBreathe 9s ease-in-out infinite; transform-origin: 800px -120px; }
@keyframes satBreathe { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }

/* 星环缓慢自转：直接旋转椭圆会变成"翻滚"，所以让环上的物质带沿轨道流动。
   dasharray 之和按椭圆周长取近似整除，接缝几乎不可见；内环更快（开普勒运动）。 */
.saturn__band { stroke-linecap: butt; }
/* 位移量必须是各自 dash 周期的整数倍，动画循环才不会"跳一下" */
.saturn__band--a {
  stroke-dasharray: 196 87.5;   /* 周期 283.5，周长 ≈ 4537 ÷ 16 */
  animation: ringDriftA 46s linear infinite;
}
.saturn__band--b {
  stroke-dasharray: 205 93;     /* 周期 298，周长 ≈ 4172 ÷ 14 */
  animation: ringDriftB 33s linear infinite;
}
@keyframes ringDriftA { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -1134; } }  /* 283.5 × 4 */
@keyframes ringDriftB { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -1192; } }  /* 298 × 4 */

@media (prefers-reduced-motion: reduce) {
  .saturn__halo, .saturn__band { animation: none; }
}

/* 闪烁星点层 = 固定满视口宇宙背景：深空渐变 + 星云光晕 + 平铺星点（JS 失败也有星空）。
   用 position:fixed 铺满整个视口，故页面两侧不再有大白边。 */
.timeline__stars {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background-color: #06081a;
  background-image:
    radial-gradient(1100px 560px at 12% -8%, rgba(124,92,255,.22), transparent 60%),
    radial-gradient(1000px 520px at 96% 8%, rgba(79,209,197,.16), transparent 60%),
    radial-gradient(900px 620px at 50% 122%, rgba(246,162,60,.12), transparent 60%),
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.92) 0 1.4px, transparent 1.8px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.7) 0 1.4px, transparent 1.8px),
    radial-gradient(circle at 45% 85%, rgba(207,227,255,.82) 0 1.8px, transparent 2.2px),
    linear-gradient(180deg, #070a18 0%, #0a0b22 55%, #05060f 100%);
  background-size: auto, auto, auto, 240px 240px, 280px 280px, 300px 300px, auto;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat, repeat, no-repeat;
}
.twinkle-star {
  position: absolute; border-radius: 50%; background: #fff;
  box-shadow: 0 0 6px 1px rgba(255,255,255,.8);
  animation: twinkle 3.2s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }

/* 内凹菱形四芒星：四条边向中心内凹，闪烁时轻微自转，比圆点更有"星辰"质感 */
.twinkle-star--gem {
  border-radius: 0;
  background: #fff;
  clip-path: polygon(
    50% 0%,   58% 42%,  100% 50%,  58% 58%,
    50% 100%, 42% 58%,  0% 50%,    42% 42%
  );
  box-shadow: none;
  filter: drop-shadow(0 0 5px rgba(255,255,255,.85))
          drop-shadow(0 0 11px rgba(155,123,255,.45));
  animation-name: twinkleGem;
}
@keyframes twinkleGem {
  0%, 100% { opacity: .22; transform: scale(.55) rotate(0deg); }
  50%      { opacity: 1;   transform: scale(1.12) rotate(45deg); }
}

/* ---- 流星：约 5s 一颗，一道细长拖尾自左上划向右下 ---- */
.meteor {
  position: absolute;
  width: var(--m-len, 200px);
  height: 2px;
  transform: rotate(var(--m-angle, 32deg));
  transform-origin: 0 50%;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(191,224,255,.35) 22%,
    rgba(255,255,255,.95) 78%,
    #ffffff 100%);
  border-radius: 999px;
  filter: drop-shadow(0 0 6px rgba(191,224,255,.85));
  animation: meteorFly 1.3s cubic-bezier(0.35, 0, 0.65, 1) forwards;
}
/* 流星头部的小亮点 */
.meteor::after {
  content: ""; position: absolute; right: -1px; top: 50%;
  width: 4px; height: 4px; border-radius: 50%; background: #fff;
  transform: translateY(-50%);
  box-shadow: 0 0 8px 2px rgba(255,255,255,.9), 0 0 18px 5px rgba(124,92,255,.45);
}
.meteor--warm {
  background: linear-gradient(90deg,
    rgba(255,217,160,0) 0%,
    rgba(255,217,160,.38) 22%,
    rgba(255,240,207,.95) 78%,
    #fff6e6 100%);
  filter: drop-shadow(0 0 6px rgba(246,176,74,.85));
}
.meteor--warm::after { box-shadow: 0 0 8px 2px rgba(255,240,207,.9), 0 0 18px 5px rgba(246,176,74,.5); }

@keyframes meteorFly {
  0%   { opacity: 0;   transform: rotate(var(--m-angle, 32deg)) translateX(0) scaleX(.2); }
  12%  { opacity: 1; }
  78%  { opacity: 1; }
  100% { opacity: 0;   transform: rotate(var(--m-angle, 32deg)) translateX(var(--m-travel, 520px)) scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .meteor { display: none; }
  .twinkle-star, .twinkle-star--gem { animation: none; opacity: .7; }
}

.timeline { position: relative; max-width: 1000px; margin: 0 auto; z-index: 1; }

/* JS 绘制的蜿蜒曲线容器（覆盖整个时间轴，不干扰布局） */
.timeline__spine { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: visible; }
.timeline__spine svg { position: absolute; left: 0; top: 0; overflow: visible; }
.timeline__path {
  fill: none; stroke: url(#tlStroke); stroke-width: 2.6;
  stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(124,92,255,.55));
  animation: pathPulse 4s ease-in-out infinite;
}
@keyframes pathPulse { 0%, 100% { opacity: .82; } 50% { opacity: 1; } }

.timeline__item { position: relative; width: 50%; box-sizing: border-box; padding-bottom: 56px; z-index: 1; }
.timeline__item--left { left: 0; padding-right: 92px; }
.timeline__item--right { left: 50%; padding-left: 92px; }

/* 行星节点：CSS 渲染，始终可见（不依赖 JS）。径向渐变球体 + 土星光环 + 辉光。
   左右各向中心偏移 34px，给蜿蜒曲线留出大胆折返的空间，且永不与卡片重叠。 */
.timeline__node {
  position: absolute; top: 18px; width: 22px; height: 22px; border-radius: 50%; z-index: 3;
  background: radial-gradient(circle at 34% 30%, #ffffff 0%, var(--accent) 42%, var(--accent-2) 100%);
  box-shadow: 0 0 16px 3px color-mix(in srgb, var(--accent) 50%, transparent), inset 0 0 4px rgba(255,255,255,.6);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.timeline__node::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 36px; height: 14px; transform: translate(-50%, -50%) rotate(-24deg);
  border: 2px solid color-mix(in srgb, #ffffff 55%, transparent); border-radius: 50%;
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 45%, transparent);
}
.timeline__item--left .timeline__node { right: 23px; }
.timeline__item--right .timeline__node { left: 23px; }

/* 行星配色按项循环（紫 / 青 / 琥珀），增加宇宙趣味 */
.timeline__item:nth-child(3n+1) .timeline__node {
  background: radial-gradient(circle at 34% 30%, #fff, #9b7bff 42%, #5b3fe0 100%);
  box-shadow: 0 0 16px 3px rgba(155,123,255,.5), inset 0 0 4px rgba(255,255,255,.6);
}
.timeline__item:nth-child(3n+2) .timeline__node {
  background: radial-gradient(circle at 34% 30%, #fff, #4fd1c5 42%, #2c9b8f 100%);
  box-shadow: 0 0 16px 3px rgba(79,209,197,.5), inset 0 0 4px rgba(255,255,255,.6);
}
.timeline__item:nth-child(3n+3) .timeline__node {
  background: radial-gradient(circle at 34% 30%, #fff, #f6b04a 42%, #d97706 100%);
  box-shadow: 0 0 16px 3px rgba(246,176,74,.5), inset 0 0 4px rgba(255,255,255,.6);
}

/* 年份标签：独立块，位于卡片上方，与卡片保持间距，绝不重叠 */
.timeline__year {
  display: block; width: fit-content;
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; letter-spacing: 0.03em;
  color: #fff;
  background: color-mix(in srgb, var(--accent) 16%, rgba(12,14,34,.7));
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  padding: 5px 16px; border-radius: 999px; margin-bottom: 16px;
  backdrop-filter: blur(8px);
}
.timeline__item--left .timeline__year { margin-left: auto; }   /* 靠右（贴近曲线） */
.timeline__item--right .timeline__year { margin-right: auto; } /* 靠左（贴近曲线） */

/* 独立卡片类：复刻 .card 外观，但【不带】 ::before 渐变描边伪元素与 .card__shine，
   彻底规避 WebKit 下 mask-composite 被截断成“乱码方框”的问题 */
.tl-card {
  position: relative; padding: 28px; border-radius: var(--radius); overflow: hidden;
  background: color-mix(in srgb, var(--surface) 88%, rgba(10,12,30,.6));
  border: 1px solid color-mix(in srgb, var(--border) 80%, rgba(255,255,255,.08));
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px -22px rgba(0,0,0,.7);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.tl-card:not(.card--teaser) { display: block; text-align: left; }
.tl-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 30px 60px -24px rgba(124,92,255,0.5);
}
/* 沿用 article/exp/teaser 的描边配色（覆盖 .tl-card 的默认 border 色） */
.tl-card.card--article { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.tl-card.card--exp { border-color: color-mix(in srgb, var(--accent) 28%, var(--border)); }
.tl-card.card--teaser { border-style: dashed; border-color: color-mix(in srgb, var(--accent) 38%, var(--border)); }

/* hover 时行星放大发光 */
.timeline__item:hover .timeline__node {
  transform: scale(1.3);
  box-shadow: 0 0 22px 6px color-mix(in srgb, var(--accent-2) 40%, transparent), inset 0 0 4px rgba(255,255,255,.7);
}

.timeline__foot { text-align: center; margin-top: 8px; }
.timeline__back {
  display: inline-block; font-size: 0.95rem; font-weight: 600; color: #fff;
  padding: 10px 22px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  text-decoration: none; background: color-mix(in srgb, var(--accent) 14%, rgba(12,14,34,.6));
  transition: color .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.timeline__back:hover { color: #fff; background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

/* 响应式：移动端单列，曲线靠左，年份与卡片纵向排列 */
@media (max-width: 760px) {
  .timeline-page { padding-top: 132px; }
  .timeline__saturn { min-width: 760px; }
  .timeline__item, .timeline__item--left, .timeline__item--right {
    width: 100%; left: 0; padding: 0 12px 44px 58px;
  }
  .timeline__node, .timeline__item--left .timeline__node, .timeline__item--right .timeline__node { left: 14px; right: auto; top: 18px; }
  .timeline__year, .timeline__item--left .timeline__year, .timeline__item--right .timeline__year { margin-left: 0; margin-right: auto; }
}

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.about__text p { color: var(--text-dim); margin-bottom: 16px; }

/* 精选区标题右侧「全部项目」链接 */
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section__more { display: inline-flex; align-items: center; gap: 6px; font-size: 0.92rem; font-weight: 600; color: var(--accent); white-space: nowrap; transition: color .3s var(--ease); }
.section__more .arrow { transition: transform .3s var(--ease); }
.section__more:hover { color: var(--accent-2); }
.section__more:hover .arrow { transform: translateX(4px); }

/* 关于我段落内的「联系我」行内链接 */
.about__link { color: var(--accent); font-weight: 600; white-space: nowrap; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); padding-bottom: 1px; transition: color .3s var(--ease), border-color .3s var(--ease); }
.about__link:hover { color: var(--accent-2); border-color: var(--accent-2); }
.about__visual { aspect-ratio: 1; border-radius: var(--radius); position: relative; overflow: hidden; display: grid; place-items: center; }
.about__gallery { position: relative; width: 100%; height: 100%; perspective: 800px; }
.about__photo { position: absolute; border-radius: var(--radius-sm); overflow: hidden; box-shadow: 0 14px 34px -12px rgba(0,0,0,0.35); transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); will-change: transform; cursor: pointer; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about__photo--4 { width: 46%; height: 44%; top: 5%; left: 5%; transform: rotate(-5deg); z-index: 4; }
.about__photo--2 { width: 40%; height: 42%; top: 6%; right: 6%; transform: rotate(5deg); z-index: 2; }
.about__photo--5 { width: 44%; height: 46%; bottom: 7%; left: 6%; transform: rotate(4deg); z-index: 2; }
.about__photo--1 { width: 50%; height: 58%; bottom: 5%; right: 4%; transform: rotate(-4deg); z-index: 1; }
.about__photo:hover { z-index: 10; transform: scale(1.06) rotate(0deg); box-shadow: 0 28px 60px -16px rgba(124,92,255,0.45); }
.about__photo--1:hover { transform: scale(1.08) rotate(0deg) translateY(-4px); }
.about__photo--2:hover { transform: scale(1.08) rotate(0deg) translateY(-4px); }
.about__photo--4:hover { transform: scale(1.08) rotate(0deg) translateY(-4px); }
.about__photo--5:hover { transform: scale(1.08) rotate(0deg) translateY(-4px); }
.about__facts { list-style: none; display: grid; gap: 12px; margin: 22px 0 4px; }
.about__facts li { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(12px); transition: border-color 0.3s var(--ease), transform 0.3s var(--ease); }
.about__facts li:hover { border-color: var(--border-strong); transform: translateX(4px); }
.about__facts-icon { font-size: 1.2rem; line-height: 1; width: 1.4rem; height: 1.4rem; display: inline-flex; align-items: center; justify-content: center; }
.about__facts-logo { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact__links { display: flex; flex-direction: column; gap: 12px; }
.contact__link { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); transition: 0.3s var(--ease); }
.contact__link:hover { border-color: var(--border-strong); transform: translateX(4px); }
.contact__link span { color: var(--text-dim); }
.form { display: grid; gap: 14px; }
.form input, .form textarea {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface);
  border: 1px solid var(--border); color: var(--text); font-family: inherit; font-size: 0.95rem;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); background: var(--surface-strong); }
.form textarea { resize: vertical; min-height: 130px; }
.form__note { font-size: 0.85rem; color: var(--text-faint); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); margin-top: 60px; }
.footer__inner { max-width: var(--maxw); margin-inline: auto; padding: 36px 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.footer__copy { color: var(--text-dim); font-size: 0.9rem; }
.footer__social { display: flex; gap: 18px; }
.footer__social-link { color: var(--text-dim); font-size: 0.9rem; transition: color 0.25s var(--ease); }
.footer__social-link:hover { color: var(--text); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 精选项目卡片：Q弹浮现 + 依次错位 ---------- */
.featured-grid .card.reveal {
  opacity: 0;
  transform: translateY(46px) scale(0.9);
  transition: opacity 0.7s var(--ease),
              transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.featured-grid .card.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.featured-grid .card.reveal:nth-child(1) { transition-delay: 0.04s; }
.featured-grid .card.reveal:nth-child(2) { transition-delay: 0.16s; }
.featured-grid .card.reveal:nth-child(3) { transition-delay: 0.28s; }
/* hover 需置于 is-visible 之后（同优先级后定义赢），避免被落位 transform 压制 */
.featured-grid .card.reveal:hover {
  transform: translateY(-8px) scale(1.03);
  transition-delay: 0s;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .section { padding: 90px 0; }
  .nav__links {
    position: fixed; inset: 64px 16px auto 16px; flex-direction: column; gap: 4px;
    background: var(--surface-strong); backdrop-filter: blur(20px); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px; transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: 0.3s var(--ease);
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__burger { display: flex; }
  .about, .contact__grid { grid-template-columns: 1fr; gap: 32px; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .projects-head { flex-direction: column; align-items: flex-start; gap: 28px; }
  .projects-head__photo { width: 108px; height: 142px; }
  .projects-head__photo--contact { width: min(72vw, 320px); height: auto; }
  .stats { grid-template-columns: 1fr; }
  .hero__grid { grid-template-columns: 1fr; gap: 38px; text-align: center; }
  .hero__title { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .hero__avatar-card { width: min(215px, 58vw); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .featured-grid .card.reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Reading progress ---------- */
.reading-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200;
  background: var(--gradient); transform: scaleX(0); transform-origin: left;
  transition: transform 0.1s linear; box-shadow: 0 0 12px rgba(124, 92, 255, 0.6);
}

/* ---------- Hero typewriter cursor ---------- */
.tw-cursor {
  display: inline-block; width: 3px; height: 0.95em; margin-left: 4px;
  background: var(--accent-2); vertical-align: -0.1em; border-radius: 2px;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ---------- Card 3D tilt + shine (idea #1) ---------- */
.card { transform-style: preserve-3d; }
.card__shine {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity 0.4s var(--ease);
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.16), transparent 42%);
  mix-blend-mode: screen;
}
.card:hover .card__shine { opacity: 1; }

/* ---------- Back to top (idea #6) ---------- */
.to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 150; width: 48px; height: 48px;
  border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--surface-strong); border: 1px solid var(--border); color: var(--text);
  backdrop-filter: blur(14px); font-size: 1.2rem; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(16px) scale(0.9); pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.3s var(--ease);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--border-strong); transform: translateY(-3px); }

/* ---------- Footer refine (idea #6) ---------- */
.footer__brand { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }

/* ============================================================
   足迹页（Footprints）— 倾斜的中国地图 + 到访城市光点
   ============================================================ */
/* 整页深空「星图」氛围，强制暗底浅字 */
body.footprint-view {
  --bg: #05060f;
  --bg-soft: #0a0b1e;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-strong: rgba(255, 255, 255, 0.095);
  --border: rgba(255, 255, 255, 0.13);
  --border-strong: rgba(255, 255, 255, 0.24);
  --text: #f4f4fb;
  --text-dim: rgba(238, 240, 255, 0.74);
  --text-faint: rgba(238, 240, 255, 0.48);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75);
  color: var(--text);
  background: #06081a;
}
body.footprint-view .aurora-bg { display: none; }
body.footprint-view .nav::before {
  content: ""; position: absolute; inset: -1px 0 0 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(4,5,12,0.7) 0%, rgba(4,5,12,0.28) 55%, rgba(4,5,12,0) 100%);
}
body.footprint-view .nav__logo,
body.footprint-view .nav__link:hover { color: #fff; }
body.footprint-view .nav.is-scrolled {
  background: rgba(5,6,15,0.72); border-bottom-color: rgba(255,255,255,0.12);
}
body.footprint-view .section__title,
body.footprint-view .section__lead,
body.footprint-view .section__eyebrow { text-shadow: 0 2px 18px rgba(0,0,0,0.55); }
body.footprint-view .footer { border-top-color: rgba(255,255,255,0.1); }
/* 足迹页：取消滚动淡入，内容直接显示 */
body.footprint-view .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

.footprint {
  position: relative; min-height: 100vh;
  padding: 116px 24px 90px;
  overflow: hidden;
}
/* 满视口星空层（position: fixed）：仿时间轴页，地图与卡片均置于星空背景之上 */
.footprint__bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background-color: #06081a;
  background-image:
    radial-gradient(1100px 560px at 12% -8%, rgba(124,92,255,.22), transparent 60%),
    radial-gradient(1000px 520px at 96% 8%, rgba(79,209,197,.16), transparent 60%),
    radial-gradient(900px 620px at 50% 122%, rgba(246,162,60,.12), transparent 60%),
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.92) 0 1.4px, transparent 1.8px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.7) 0 1.4px, transparent 1.8px),
    radial-gradient(circle at 45% 85%, rgba(207,227,255,.82) 0 1.8px, transparent 2.2px),
    linear-gradient(180deg, #070a18 0%, #0a0b22 55%, #05060f 100%);
  background-size: auto, auto, auto, 240px 240px, 280px 280px, 300px 300px, auto;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat, repeat, no-repeat;
}
/* 标题区 */
.footprint__head { position: relative; z-index: 1; max-width: 1320px; margin: 0 auto 8px; }
.footprint__head .section__title { font-size: clamp(2.4rem, 5vw, 3.6rem); margin: 6px 0 12px; }
.footprint__head .section__lead { max-width: 560px; }

/* 布局：地图与卡片同一行，卡片宽固定、地图自适应填满剩余空间 */
.footprint__layout {
  position: relative; z-index: 1;
  max-width: 1320px; margin: 18px auto 0;
  display: flex; align-items: flex-start; gap: 28px;
}

/* 舞台：地图容器（已取消倾转，平铺于星空背景之上） */
.footprint__stage {
  position: relative; z-index: 1; flex: 1 1 auto; min-width: 0;
  height: clamp(480px, 72vh, 800px);
  display: grid; place-items: center;
}
/* 地图本体：取消倾转与边框，直接浮在星空背景之上；保持 4:3 真实比例 */
.footprint__map {
  width: 100%;
  height: auto;
  max-height: 100%;
  aspect-ratio: 4/3;
  /* 画布透明，未到访省份半透明，星空从地图内部透出 */
}
.footprint__map canvas { display: block; }

/* 地平网格已随倾转取消一并移除（地图现平铺于星空背景） */
/* 地图下方辉光 */
.footprint__glow {
  position: absolute; left: 50%; top: 60%; z-index: 0;
  width: 60%; height: 38%;
  transform: translate(-50%, -50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(124,92,255,0.5), rgba(124,92,255,0) 70%);
  filter: blur(36px); pointer-events: none;
}

/* 侧栏：统计 + 省份图例，与地图同处一行（flex 列） */
.footprint__panel {
  position: relative; flex: 0 0 248px; width: 248px; z-index: 3;
  align-self: flex-start;
  padding: 22px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(18px); box-shadow: var(--shadow);
}
.footprint__stat { display: flex; gap: 22px; align-items: baseline; }
.footprint__stat-num { display: flex; align-items: baseline; gap: 4px; }
.footprint__stat-num b {
  font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; line-height: 1;
  background: linear-gradient(120deg, #ffd9a0, #c79bff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footprint__stat-num span { color: var(--text-dim); font-size: 0.95rem; }
.footprint__stat-sub { margin: 6px 0 14px; color: var(--text-faint); font-size: 0.85rem; }
.footprint__legend { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 300px; overflow: auto; }
.footprint__legend-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: var(--text-dim);
  padding: 5px 6px; border-radius: 10px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.footprint__legend-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.footprint__legend-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #ffd9a0; box-shadow: 0 0 8px rgba(255,184,102,0.9); flex: 0 0 auto;
}
.footprint__legend-name { flex: 1 1 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.footprint__legend-count { color: var(--text-faint); font-size: 0.72rem; flex: 0 0 auto; }
.footprint__hint { margin-top: 14px; font-size: 0.78rem; color: var(--text-faint); line-height: 1.6; }

/* 自定义 tooltip（正立，跟随光标） */
.footprint__tip {
  position: fixed; z-index: 200; left: 0; top: 0;
  min-width: 150px; max-width: 260px;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(14, 17, 38, 0.92); border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 44px -16px rgba(0,0,0,0.7);
  color: #fff; pointer-events: none; opacity: 0; transform: translateY(6px) scale(0.98);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}
.footprint__tip--on { opacity: 1; transform: none; }
.fp-tip__title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.fp-tip__sub { margin-top: 2px; font-size: 0.8rem; color: #ffd9a0; }
.fp-tip__sub--muted { color: var(--text-faint); }
.fp-tip__body { margin-top: 8px; font-size: 0.84rem; color: var(--text-dim); line-height: 1.55; }
.footprint__tip--prov .fp-tip__title { color: #c79bff; }

/* 弹幕相册：地图下方反向无缝循环照片墙（每行 12 张，三行方向交替） */
.footprint__marquee {
  position: relative; z-index: 1;
  max-width: 1320px; margin: 48px auto 0;
  display: flex; flex-direction: column; gap: 16px;
}
.footprint__marquee-title {
  font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-faint); margin: 0 0 2px 6px;
}
.marquee__row {
  position: relative; width: 100%; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.marquee__row:hover .marquee__track { animation-play-state: paused; }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__row--1 .marquee__track { animation: marquee-left var(--marquee-dur, 42s) linear infinite; }
.marquee__row--2 .marquee__track { animation: marquee-right var(--marquee-dur, 42s) linear infinite; }
.marquee__row--3 .marquee__track { animation: marquee-left var(--marquee-dur, 42s) linear infinite; }
.marquee__item { flex: 0 0 auto; width: 184px; margin-right: 16px; }
.marquee__item img {
  width: 100%; height: 122px; object-fit: cover; display: block;
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 24px rgba(0,0,0,0.4);
  transition: transform 0.4s var(--ease), filter 0.4s var(--ease);
}
.marquee__item img:hover { transform: scale(1.06); filter: brightness(1.08); }
@keyframes marquee-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marquee-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) {
  .marquee__row--1 .marquee__track,
  .marquee__row--2 .marquee__track,
  .marquee__row--3 .marquee__track { animation: none; }
}

/* 响应式：窄屏时卡片堆叠到地图下方，宽屏始终与地图同一行 */
@media (max-width: 1100px) {
  .footprint__layout { flex-direction: column; align-items: stretch; }
  .footprint__panel {
    flex: 1 1 auto; width: auto; max-width: 560px;
    margin: 22px auto 0;
  }
}
@media (max-width: 900px) {
  .footprint__stage { height: clamp(380px, 58vh, 520px); }
  .footprint__legend { grid-template-columns: 1fr 1fr; max-height: none; }
}
@media (max-width: 560px) {
  .footprint { padding: 100px 14px 70px; }
  .footprint__legend { grid-template-columns: 1fr; }
}
