/* ===== 变量与基础 ===== */
:root {
  --color-bg: #0a0e14;
  --color-bg-elevated: #0f1419;
  --color-surface: rgba(22, 30, 44, 0.72);
  --color-surface-solid: #161e2c;
  --color-surface-light: rgba(36, 48, 68, 0.85);
  --color-primary: #4f8ef7;
  --color-primary-light: #7eb3ff;
  --color-accent: #22d3ee;
  --color-gold: #fbbf24;
  --color-text: #eef2f7;
  --color-text-muted: #8b9cb3;
  --color-border: rgba(148, 163, 184, 0.12);
  --color-border-hover: rgba(126, 179, 255, 0.35);
  --font-sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 40px rgba(79, 142, 247, 0.15);
  --header-height: 72px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --glass: blur(16px) saturate(160%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: rgba(79, 142, 247, 0.35);
  color: #fff;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(79, 142, 247, 0.35);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(79, 142, 247, 0.55);
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 15% 10%, rgba(79, 142, 247, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 85% 80%, rgba(34, 211, 238, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(251, 191, 36, 0.03) 0%, transparent 60%),
    var(--color-bg);
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

/* ── 光标光晕 ── */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 480px;
  height: 480px;
  margin: -240px 0 0 -240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 142, 247, 0.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.5s ease;
  mix-blend-mode: screen;
}

.cursor-glow.active {
  opacity: 1;
}

/* ── 滚动显现 ── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s var(--ease-spring);
}

.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: none; }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.12s; opacity: 1; transform: none; }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.19s; opacity: 1; transform: none; }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.26s; opacity: 1; transform: none; }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.33s; opacity: 1; transform: none; }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.4s; opacity: 1; transform: none; }
.reveal-stagger.revealed > *:nth-child(7) { transition-delay: 0.47s; opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }

  body[data-page="resume"] .resume-fly-item {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cursor-glow {
    display: none;
  }
}

/* ===== 导航栏（由 nav.js 注入） ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  background: rgba(10, 14, 20, 0.82);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  box-shadow: 0 1px 0 var(--color-border), var(--shadow);
  border-bottom: 1px solid var(--color-border);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.15rem;
  transition: transform var(--transition);
}

.nav-brand:hover {
  color: var(--color-text);
  transform: scale(1.03);
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 16px rgba(79, 142, 247, 0.35);
  transition: box-shadow var(--transition), transform var(--transition);
}

.nav-brand:hover .brand-icon {
  box-shadow: 0 6px 24px rgba(79, 142, 247, 0.5);
  transform: rotate(-3deg) scale(1.05);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.nav-links {
  display: flex;
  gap: 4px;
  position: relative;
}

.nav-indicator {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 8px;
  background: rgba(79, 142, 247, 0.12);
  border: 1px solid rgba(79, 142, 247, 0.2);
  pointer-events: none;
  transition: transform 0.4s var(--ease-spring), width 0.35s ease, height 0.35s ease, opacity 0.3s ease;
  z-index: 0;
}

.nav-link {
  position: relative;
  z-index: 1;
  padding: 8px 18px;
  border-radius: 8px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  transition: color var(--transition);
  background: transparent;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text);
  background: transparent;
}

.nav-link.active {
  color: var(--color-primary-light);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: var(--transition);
  border-radius: 2px;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== 轮播图 ===== */
.carousel {
  position: relative;
  height: 100vh;
  min-height: 520px;
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide.active img {
  animation: ken-burns 18s ease-in-out infinite alternate;
}

@keyframes ken-burns {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-slide.active img {
    animation: none;
  }
}

.carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 14, 20, 0.35) 0%,
    rgba(10, 14, 20, 0.65) 55%,
    var(--color-bg) 100%
  );
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}

.carousel-content {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-content h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff, var(--color-primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.carousel-content p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 28px;
}

/* 首页轮播 · 居中排版 + 字级强调 */
.carousel-content.hero-type {
  text-align: center;
}

.hero-line1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.15em 0.35em;
  margin-bottom: clamp(20px, 4vw, 36px);
  line-height: 1.1;
}

.hero-line1 .hero-base {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  color: rgba(226, 232, 240, 0.88);
  letter-spacing: 0.06em;
}

.hero-line1 .hero-name {
  font-size: clamp(3.2rem, 8vw, 5.5rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #ffffff 20%, var(--color-primary-light) 60%, var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-line2 {
  max-width: 680px;
  margin: 0 auto clamp(28px, 5vw, 40px);
  line-height: 2.1;
  font-weight: 300;
}

.hero-line2 .hero-base {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: rgba(148, 163, 184, 0.95);
  letter-spacing: 0.04em;
}

.hero-line2 .hl {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.06em;
  padding: 0 0.12em;
  background: linear-gradient(transparent 62%, rgba(59, 130, 246, 0.35) 62%);
}

/* 逐字悬停 · 缓慢飞动 */
.hero-float-char {
  display: inline-block;
  cursor: default;
  transition: text-shadow 0.5s ease, filter 0.5s ease;
}

.hero-line1 .hero-name .hero-float-char {
  font-size: clamp(3.2rem, 8vw, 5.5rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #ffffff 20%, var(--color-primary-light) 60%, var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-line2 .hl .hero-float-char {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.06em;
  background: linear-gradient(transparent 62%, rgba(59, 130, 246, 0.35) 62%);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-float-char:hover {
    position: relative;
    z-index: 2;
    animation: hero-text-drift 3.8s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.55);
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.4));
  }

  .hero-line1 .hero-name .hero-float-char:hover {
    filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.6));
  }

  .hero-line2 .hl .hero-float-char:hover {
    text-shadow: 0 0 24px rgba(255, 255, 255, 0.45);
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5));
  }
}

@keyframes hero-text-drift {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  20% {
    transform: translate(3px, -12px) rotate(-4deg);
  }
  40% {
    transform: translate(-4px, -8px) rotate(3deg);
  }
  60% {
    transform: translate(2px, -14px) rotate(-2deg);
  }
  80% {
    transform: translate(-2px, -6px) rotate(2deg);
  }
}

.carousel-btn {
  position: relative;
  display: inline-block;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.06em;
  overflow: hidden;
  transition: box-shadow var(--transition), color var(--transition);
  box-shadow: 0 4px 20px rgba(79, 142, 247, 0.35);
}

.carousel-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.25) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.carousel-btn:hover {
  color: #fff;
  box-shadow: 0 8px 32px rgba(79, 142, 247, 0.55), 0 0 24px rgba(34, 211, 238, 0.2);
}

.carousel-btn:hover::before {
  transform: translateX(120%);
}

.magnetic-wrap {
  display: inline-block;
}

.carousel-arrow {
  width: 46px;
  height: 46px;
  border: 1px solid var(--color-border);
  background: rgba(22, 30, 44, 0.65);
  backdrop-filter: blur(12px);
  color: var(--color-text);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.carousel-arrow:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 24px rgba(79, 142, 247, 0.45);
  transform: scale(1.08);
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.carousel-controls {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.carousel-controls-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.2);
}

.carousel-dot.active {
  background: var(--color-primary-light);
  width: 28px;
  border-radius: 5px;
  box-shadow: 0 0 12px rgba(126, 179, 255, 0.5);
}

/* ===== 通用区块 ===== */
main {
  padding-top: var(--header-height);
}

.page-main {
  padding: 48px 0 80px;
}

.section {
  padding: 80px 0;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
  letter-spacing: 0.04em;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  margin: 14px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width 0.5s var(--ease-spring);
}

.section:hover .section-title::after,
.reveal.revealed .section-title::after {
  width: 64px;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 48px;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
}

.section-subtitle.motto {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--color-primary-light);
  margin-bottom: 40px;
}

/* ===== 首页特色卡片 ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --tilt-lift: 0px;
  position: relative;
  background: var(--color-surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  overflow: hidden;
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(var(--tilt-lift));
  transition:
    transform 0.15s ease-out,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(79, 142, 247, 0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.feature-card.is-tilting::before,
.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow), var(--shadow-glow);
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(79, 142, 247, 0.18), rgba(34, 211, 238, 0.12));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 8px 20px rgba(79, 142, 247, 0.25);
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ===== 技能标签 ===== */
.skills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.skill-tag {
  position: relative;
  overflow: hidden;
  display: inline-block;
  padding: 10px 22px;
  background: var(--color-surface-light);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.4s var(--ease-spring);
}

.skill-tag:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-light);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(79, 142, 247, 0.25);
  background: rgba(79, 142, 247, 0.1);
}

.skill-ripple {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: rgba(126, 179, 255, 0.5);
  animation: skill-ripple 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes skill-ripple {
  to {
    transform: scale(18);
    opacity: 0;
  }
}

/* ===== 关于页 ===== */
.about-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}

.about-avatar-wrap {
  position: relative;
  width: fit-content;
}

.about-avatar-wrap::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent), var(--color-gold));
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
}

.about-avatar-wrap:hover::before {
  opacity: 1;
  animation: avatar-ring 3s linear infinite;
}

@keyframes avatar-ring {
  to { filter: hue-rotate(360deg); }
}

.about-avatar {
  position: relative;
  z-index: 1;
  width: 280px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  object-fit: cover;
  border: 3px solid var(--color-surface-solid);
  box-shadow: var(--shadow);
  transition: transform 0.5s var(--ease-spring), box-shadow 0.5s ease;
}

.about-avatar-wrap:hover .about-avatar {
  transform: scale(1.03);
  box-shadow: var(--shadow), 0 0 40px rgba(79, 142, 247, 0.2);
}

.about-info h1 {
  font-size: 2rem;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff, var(--color-primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-tagline {
  color: var(--color-primary-light);
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.about-info p {
  color: var(--color-text-muted);
  margin-bottom: 16px;
  text-align: justify;
}

.about-highlight {
  position: relative;
  margin: 32px 0;
  padding: 28px 32px 28px 36px;
  background: linear-gradient(135deg, rgba(79, 142, 247, 0.1), rgba(34, 211, 238, 0.06));
  border: 1px solid rgba(126, 179, 255, 0.3);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(79, 142, 247, 0.1);
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s var(--ease-spring);
  cursor: default;
}

.about-highlight:hover {
  border-color: rgba(126, 179, 255, 0.55);
  box-shadow: 0 12px 40px rgba(79, 142, 247, 0.2), 0 0 32px rgba(34, 211, 238, 0.08);
  transform: translateY(-3px);
}

.about-highlight::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(to bottom, var(--color-primary), var(--color-accent));
}

.about-highlight p {
  margin: 0;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 600;
  line-height: 1.9;
  color: #fff;
  letter-spacing: 0.04em;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
  list-style: none;
  padding: 0;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-primary-light);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ===== 履历时间线 ===== */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-primary), var(--color-accent));
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  padding: 24px 28px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 32px;
  width: 12px;
  height: 12px;
  background: var(--color-primary);
  border-radius: 50%;
  border: 3px solid var(--color-bg);
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.timeline-item h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.timeline-org {
  color: var(--color-primary-light);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.timeline-item p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ===== 履历页 · 教育 & 奖项 ===== */
.resume-edu {
  margin-bottom: 56px;
}

.edu-card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --tilt-lift: 0px;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 28px 32px;
  background: var(--color-surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(var(--tilt-lift));
  transition: transform 0.15s ease-out, border-color 0.4s ease, box-shadow 0.4s ease;
}

.edu-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-glow);
}

.edu-period {
  flex-shrink: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.06em;
  padding-right: 32px;
  border-right: 1px solid var(--color-border);
}

.edu-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.edu-school {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.resume-awards {
  padding-bottom: 24px;
}

/* 履历 · 滚动飞入 */
body[data-page="resume"] .resume-fly-item {
  opacity: 0;
  transform: translateY(var(--fly-distance, 72px));
  transition:
    opacity var(--fly-duration, 0.75s) cubic-bezier(0.22, 1, 0.36, 1),
    transform var(--fly-duration, 0.75s) cubic-bezier(0.22, 1.28, 0.36, 1);
  transition-delay: var(--fly-delay, 0s);
  will-change: transform, opacity;
}

body[data-page="resume"] .resume-fly-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body[data-page="resume"] .award-item.resume-fly-item.is-visible:hover {
  transform: scale(1.03);
}

.resume-year-block {
  margin-bottom: 52px;
}

.resume-year-block:last-child {
  margin-bottom: 0;
}

.resume-year {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  color: rgba(148, 163, 184, 0.22);
  letter-spacing: 0.08em;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.award-tier-group {
  margin-bottom: 28px;
}

.award-tier-group:last-child {
  margin-bottom: 0;
}

.award-tier-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  padding-left: 4px;
}

.award-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.award-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transform: scale(1);
  transform-origin: center center;
  transition:
    transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1),
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    background 0.35s ease;
  will-change: transform, box-shadow;
}

.award-item:hover {
  z-index: 2;
  transform: scale(1.03);
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow:
    0 0 0 1px rgba(96, 165, 250, 0.2),
    0 8px 32px rgba(59, 130, 246, 0.28),
    0 0 48px rgba(59, 130, 246, 0.15);
  background: linear-gradient(135deg, rgba(36, 48, 68, 0.95), rgba(26, 35, 50, 0.98));
}

/* 重点荣誉 · 预留证书图 */
.award-item--featured {
  position: relative;
  padding: 22px 24px;
  align-items: stretch;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(6, 182, 212, 0.04));
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}

.award-item--featured::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(to bottom, #fbbf24, var(--color-primary-light));
  transition: box-shadow 0.35s ease;
}

.award-item--featured:hover {
  transform: scale(1.04);
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.25),
    0 12px 40px rgba(59, 130, 246, 0.35),
    0 0 60px rgba(251, 191, 36, 0.18),
    0 0 80px rgba(96, 165, 250, 0.12);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(6, 182, 212, 0.1));
}

.award-item--featured:hover::before {
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.6);
}

.award-item--featured:hover .award-cert img {
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow:
    0 4px 20px rgba(59, 130, 246, 0.35),
    0 0 24px rgba(251, 191, 36, 0.2);
  transform: scale(1.05);
}

.award-item--featured .award-title {
  font-size: 1.05rem;
  color: #fff;
}

.award-meta {
  flex: 1;
  min-width: 0;
  padding-left: 8px;
}

.award-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.award-level {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 50px;
  margin-bottom: 8px;
}

.award-tags .award-level {
  margin-bottom: 0;
}

.level-national {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.level-provincial {
  background: rgba(168, 85, 247, 0.15);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.level-competition {
  background: rgba(59, 130, 246, 0.15);
  color: var(--color-primary-light);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.level-school {
  background: rgba(6, 182, 212, 0.12);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.level-college {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.level-dept {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

.level-cert {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.award-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 50px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(245, 158, 11, 0.15));
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.award-date {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.award-title {
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-text);
}

.award-org {
  font-size: 0.86rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.award-cert {
  flex-shrink: 0;
  width: 130px;
  margin: 0;
  text-align: center;
}

.award-item--featured .award-cert {
  width: 148px;
}

.award-cert img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: linear-gradient(135deg, var(--color-surface-light), var(--color-bg));
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  transform: scale(1);
  cursor: zoom-in;
  transition:
    transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1),
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.award-cert img:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.award-item--featured .award-cert img {
  height: 108px;
  border-color: rgba(251, 191, 36, 0.4);
}

.award-cert figcaption {
  display: block;
  margin-top: 6px;
  font-size: 0.6rem;
  color: var(--color-text-muted);
  word-break: break-all;
  line-height: 1.3;
  opacity: 0.65;
}

.award-item--featured .award-cert figcaption {
  color: rgba(251, 191, 36, 0.7);
}

@media (max-width: 768px) {
  .edu-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .edu-period {
    padding-right: 0;
    border-right: none;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
    width: 100%;
  }

  .award-item--featured {
    flex-direction: column;
    align-items: flex-start;
  }

  .award-cert {
    width: 100%;
  }

  .award-cert img,
  .award-item--featured .award-cert img {
    width: 100%;
    height: 180px;
  }
}

/* 履历 · 证书放大预览 */
.award-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.award-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.award-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 12, 0.88);
  backdrop-filter: blur(10px);
}

.award-lightbox-panel {
  position: relative;
  width: min(960px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 24px 24px;
  background: var(--color-surface-solid);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 60px rgba(79, 142, 247, 0.15);
  transform: scale(0.94) translateY(16px);
  transition: transform 0.4s var(--ease-spring);
}

.award-lightbox.open .award-lightbox-panel {
  transform: scale(1) translateY(0);
}

.award-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface-light);
  color: var(--color-text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
}

.award-lightbox-close:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: rotate(90deg);
}

.award-lightbox-title {
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  margin: 0 40px 16px;
  line-height: 1.45;
  color: var(--color-text);
}

.award-lightbox-body {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.award-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.award-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: rgba(22, 30, 44, 0.85);
  backdrop-filter: blur(8px);
  color: var(--color-text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
}

.award-lightbox-nav:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.award-lightbox-prev { left: 8px; }
.award-lightbox-next { right: 8px; }

.award-lightbox-counter {
  margin: 14px 0 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

@media (max-width: 640px) {
  .award-lightbox-panel {
    padding: 16px 12px 20px;
  }

  .award-lightbox-title {
    font-size: 0.92rem;
    margin: 0 36px 12px;
  }

  .award-lightbox-nav {
    width: 34px;
    height: 34px;
    font-size: 1.25rem;
  }

  .award-lightbox-prev { left: 4px; }
  .award-lightbox-next { right: 4px; }
}

/* ===== 联系页 ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-single {
  max-width: 640px;
  margin: 0 auto 48px;
}

.contact-clickable {
  cursor: pointer;
  user-select: none;
}

.contact-clickable:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.contact-hint {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--color-primary-light);
  opacity: 0.7;
  margin-left: 6px;
}

.contact-value {
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 500;
}

.contact-sub {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.contact-clickable:hover .contact-value {
  color: var(--color-primary-light);
}

/* Toast */
.site-toast {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 10001;
  padding: 12px 24px;
  background: rgba(22, 30, 44, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(126, 179, 255, 0.4);
  border-radius: 50px;
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s var(--ease-spring);
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}

.site-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* 访问统计 */
.site-stats-section {
  padding: 24px 0 48px;
}

.site-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 640px;
  margin: 0 auto;
}

.stat-box {
  text-align: center;
  padding: 24px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.stat-box:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-glow);
}

.stat-box .stat-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-primary-light);
  margin-bottom: 6px;
}

.stat-box .stat-label {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.stat-loading {
  grid-column: 1 / -1;
  color: var(--color-text-muted);
}

/* 弹幕留言 */
.contact-page {
  padding-bottom: 160px;
}

.danmaku-section {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  pointer-events: none;
}

.danmaku-lane {
  position: relative;
  height: 100px;
  overflow: hidden;
  pointer-events: none;
}

.danmaku-item {
  position: absolute;
  right: -100%;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  animation: danmaku-fly linear forwards;
  pointer-events: none;
  opacity: 0.92;
}

@keyframes danmaku-fly {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100vw - 100%)); }
}

.danmaku-bar {
  pointer-events: auto;
  background: rgba(10, 14, 20, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--color-border);
  padding: 14px 20px 18px;
}

.danmaku-form {
  display: flex;
  gap: 12px;
  max-width: 680px;
  margin: 0 auto 8px;
}

.danmaku-input {
  flex: 1;
  padding: 12px 18px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.danmaku-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.15);
}

.danmaku-send {
  flex-shrink: 0;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}

.danmaku-send:hover {
  box-shadow: 0 4px 20px rgba(79, 142, 247, 0.45);
}

.danmaku-tip {
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  opacity: 0.75;
}

.danmaku-tip.is-cloud {
  color: var(--color-accent);
  opacity: 1;
}

.danmaku-tip.is-cloud::before {
  content: '☁ ';
}

body[data-page="contact"] .site-footer {
  margin-bottom: 88px;
}

/* ── 背景音乐控制 ── */
.carousel-bgm-slot {
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.carousel-bgm-slot .bgm-toggle {
  pointer-events: auto;
}

.bgm-toggle {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: 50px;
  background: rgba(22, 30, 44, 0.88);
  backdrop-filter: blur(12px);
  color: var(--color-text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: border-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease, transform 0.35s var(--ease-spring);
  overflow: visible;
}

body[data-page="contact"] .bgm-toggle:not(.bgm-toggle--hero) {
  bottom: 108px;
}

/* 全站通用挂载点（非首页） */
.site-bgm-bar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 998;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.site-bgm-bar .bgm-toggle {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  pointer-events: auto;
}

body[data-page="contact"] .site-bgm-bar {
  bottom: 108px;
}

/* 首页 · 轮播翻页区 */
.bgm-toggle--hero {
  position: relative;
  right: auto;
  bottom: auto;
  left: auto;
  margin-top: 0;
  background: rgba(22, 30, 44, 0.72);
  border-color: rgba(126, 179, 255, 0.25);
  backdrop-filter: blur(14px);
}

.bgm-toggle--hero:hover {
  transform: translateY(-2px);
}

.bgm-toggle--hero.bgm-pop {
  animation: bgm-btn-pop 0.55s var(--ease-spring);
}

.bgm-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-light);
  box-shadow: 0 6px 28px rgba(79, 142, 247, 0.25);
}

.bgm-toggle.bgm-toggle--global:not(.bgm-toggle--hero):hover {
  transform: translateX(-50%) translateY(-2px);
}

.site-bgm-bar .bgm-toggle:hover,
.bgm-toggle--hero:hover {
  transform: translateY(-2px);
}

/* 点击播放 · 爆发特效 */
.bgm-toggle.bgm-pop {
  animation: bgm-btn-pop 0.55s var(--ease-spring);
}

.bgm-toggle.bgm-pop .bgm-ring {
  animation: bgm-ring-burst 0.7s ease-out forwards;
}

.bgm-toggle.bgm-pop .bgm-ring--2 {
  animation: bgm-ring-burst 0.7s ease-out 0.1s forwards;
}

.bgm-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 50px;
  overflow: visible;
}

.bgm-ring {
  position: absolute;
  top: 50%;
  left: 28px;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 2px solid var(--color-primary-light);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.6);
}

.bgm-float-note {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 0.85rem;
  color: var(--color-primary-light);
  pointer-events: none;
  text-shadow: 0 0 8px rgba(126, 179, 255, 0.8);
  animation: bgm-note-float 0.85s ease-out forwards;
  transform: translate(calc(-50% + var(--note-x, 0px)), -50%);
  z-index: 3;
}

.bgm-bars {
  position: absolute;
  left: 18px;
  top: 50%;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  margin-top: -7px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bgm-bars i {
  display: block;
  width: 3px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 2px;
}

.bgm-toggle.is-playing .bgm-bars {
  opacity: 1;
}

.bgm-toggle.is-playing .bgm-bars i {
  animation: bgm-bar-dance 0.8s ease-in-out infinite;
}

.bgm-toggle.is-playing .bgm-bars i:nth-child(1) { animation-delay: 0s; }
.bgm-toggle.is-playing .bgm-bars i:nth-child(2) { animation-delay: 0.12s; }
.bgm-toggle.is-playing .bgm-bars i:nth-child(3) { animation-delay: 0.24s; }
.bgm-toggle.is-playing .bgm-bars i:nth-child(4) { animation-delay: 0.08s; }
.bgm-toggle.is-playing .bgm-bars i:nth-child(5) { animation-delay: 0.18s; }

.bgm-icon {
  position: relative;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(79, 142, 247, 0.25), rgba(34, 211, 238, 0.15));
  font-size: 0.95rem;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.bgm-icon--pause {
  display: none;
  font-size: 0.65rem;
  letter-spacing: -2px;
}

.bgm-toggle.is-playing .bgm-icon--play {
  display: none;
}

.bgm-toggle.is-playing .bgm-icon--pause {
  display: flex;
}

.bgm-toggle.is-playing .bgm-icon {
  animation: bgm-spin 4s linear infinite;
  box-shadow: 0 0 20px rgba(79, 142, 247, 0.45), 0 0 40px rgba(34, 211, 238, 0.15);
}

.bgm-toggle.is-playing {
  border-color: rgba(126, 179, 255, 0.55);
  color: var(--color-primary-light);
  box-shadow: 0 4px 24px rgba(79, 142, 247, 0.3), 0 0 32px rgba(34, 211, 238, 0.08);
}

.bgm-label {
  position: relative;
  z-index: 2;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.bgm-toggle.is-muted {
  border-color: rgba(251, 191, 36, 0.45);
  color: rgba(251, 191, 36, 0.9);
}

.bgm-unlock-hint {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 88px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.bgm-unlock-hint.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.bgm-unlock-hint-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 50px;
  background: rgba(22, 30, 44, 0.92);
  border: 1px solid rgba(126, 179, 255, 0.35);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  color: var(--color-text);
  font-size: 0.88rem;
  cursor: pointer;
  animation: bgm-unlock-bob 2.4s ease-in-out infinite;
}

.bgm-unlock-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  font-size: 0.9rem;
}

.bgm-unlock-hint-inner p {
  margin: 0;
}

@keyframes bgm-unlock-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes bgm-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes bgm-btn-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); box-shadow: 0 0 32px rgba(79, 142, 247, 0.55); }
  100% { transform: scale(1); }
}

@keyframes bgm-ring-burst {
  0% {
    opacity: 0.85;
    transform: scale(0.6);
  }
  100% {
    opacity: 0;
    transform: scale(3.2);
  }
}

@keyframes bgm-note-float {
  0% {
    opacity: 1;
    transform: translate(calc(-50% + var(--note-x, 0px)), -50%) scale(0.6);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--note-x, 0px)), -90px) scale(1.2);
  }
}

@keyframes bgm-bar-dance {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}

@media (max-width: 768px) {
  .carousel-controls {
    bottom: 32px;
    gap: 10px;
  }

  .bgm-toggle:not(.bgm-toggle--hero) {
    bottom: 16px;
  }

  body[data-page="contact"] .bgm-toggle:not(.bgm-toggle--hero),
  body[data-page="contact"] .site-bgm-bar {
    bottom: 100px;
  }

  .bgm-label {
    display: none;
  }
}

.contact-info-card,
.contact-form {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --tilt-lift: 0px;
  background: var(--color-surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(var(--tilt-lift));
  transition: transform 0.15s ease-out, border-color 0.4s ease, box-shadow 0.4s ease;
}

.contact-info-card:hover,
.contact-form:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-glow);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding: 12px;
  margin-left: -12px;
  margin-right: -12px;
  border-radius: var(--radius-sm);
  transition: background 0.3s ease, transform 0.3s var(--ease-spring);
}

.contact-item:hover {
  background: rgba(79, 142, 247, 0.06);
  transform: translateX(6px);
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-icon {
  width: 44px;
  height: 44px;
  background: var(--color-surface-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease;
}

.contact-item:hover .contact-icon {
  transform: scale(1.12) rotate(-8deg);
  box-shadow: 0 6px 16px rgba(79, 142, 247, 0.2);
}

.contact-item h4 {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.contact-form {
  /* merged above */
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--color-text-muted);
  transition: color 0.3s ease;
}

.form-group:focus-within label {
  color: var(--color-primary-light);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition), background 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.15), 0 0 20px rgba(79, 142, 247, 0.1);
  background: rgba(15, 20, 25, 0.9);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.btn-submit {
  position: relative;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(79, 142, 247, 0.3);
}

.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.btn-submit:hover {
  box-shadow: 0 8px 32px rgba(79, 142, 247, 0.5);
}

.btn-submit:hover::before {
  transform: translateX(120%);
}

.form-tip {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

.card-heading {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 28px;
  letter-spacing: 0.04em;
}

/* ===== 作品集页 ===== */
.portfolio-header {
  margin-bottom: 36px;
}

.portfolio-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}

.portfolio-tab {
  padding: 10px 22px;
  border: 1px solid var(--color-border);
  border-radius: 50px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.35s var(--ease-spring);
}

.portfolio-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-light);
  transform: translateY(-2px);
}

.portfolio-tab.active {
  background: linear-gradient(135deg, rgba(79, 142, 247, 0.2), rgba(34, 211, 238, 0.12));
  border-color: rgba(126, 179, 255, 0.5);
  color: #fff;
  box-shadow: 0 4px 20px rgba(79, 142, 247, 0.2);
}

.portfolio-cat-desc {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.portfolio-grid--masonry {
  grid-auto-flow: dense;
}

.portfolio-card--wide {
  grid-column: span 2;
}

.portfolio-card--gallery .portfolio-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 14, 20, 0.75) 0%, transparent 50%);
  pointer-events: none;
}

.portfolio-gallery-count {
  position: absolute;
  bottom: 12px;
  left: 14px;
  z-index: 2;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50px;
  background: rgba(10, 14, 20, 0.75);
  backdrop-filter: blur(8px);
  color: var(--color-primary-light);
  border: 1px solid rgba(126, 179, 255, 0.3);
}

.portfolio-card--gallery .portfolio-card-body h3 {
  background: linear-gradient(135deg, #fff, var(--color-primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.portfolio-card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --tilt-lift: 0px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(var(--tilt-lift));
  transition: transform 0.15s ease-out, border-color 0.4s ease, box-shadow 0.4s ease;
}

.portfolio-card--text {
  cursor: default;
}

.portfolio-card--text.has-link {
  cursor: pointer;
}

.portfolio-card--text.has-link:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-glow);
}

.portfolio-thumb.is-text {
  aspect-ratio: auto;
  min-height: 88px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(79, 142, 247, 0.12) 0%, rgba(34, 211, 238, 0.06) 100%);
  border-bottom: 1px solid var(--color-border);
}

.portfolio-thumb-text {
  font-size: 2.2rem;
  line-height: 1;
  background: transparent;
}

.portfolio-card--text .portfolio-card-body p {
  line-height: 1.75;
}

.portfolio-card--text.has-link .portfolio-card-body p::after {
  content: ' ↗';
  color: var(--color-primary-light);
  font-size: 0.85em;
}

.portfolio-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-glow);
}

.portfolio-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--color-bg-elevated);
  overflow: hidden;
}

.portfolio-thumb img,
.portfolio-thumb .portfolio-video-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-thumb.is-video {
  background: linear-gradient(135deg, #141c2b 0%, #0a0e14 100%);
}

.portfolio-thumb.is-video-pending {
  background: linear-gradient(135deg, #1a2438 0%, #0d121c 50%, #162033 100%);
}

.portfolio-thumb.is-video-pending::before,
.portfolio-thumb.is-video-fallback::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 20%, rgba(79, 142, 247, 0.18), transparent 52%),
    radial-gradient(circle at 80% 85%, rgba(34, 211, 238, 0.12), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.portfolio-thumb.is-video-pending::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 2px solid rgba(126, 179, 255, 0.35);
  border-top-color: var(--color-primary-light);
  border-radius: 50%;
  animation: portfolio-thumb-spin 0.8s linear infinite;
  z-index: 1;
}

.portfolio-thumb.is-video-fallback {
  background: linear-gradient(135deg, #1a2438 0%, #0d121c 50%, #162033 100%);
}

.portfolio-thumb-loading {
  display: none;
}

.portfolio-thumb.has-poster .portfolio-video-poster {
  display: block;
}

.portfolio-card:hover .portfolio-thumb img,
.portfolio-card:hover .portfolio-thumb .portfolio-video-poster {
  transform: scale(1.06);
}

.portfolio-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--color-surface-light), var(--color-bg));
}

.portfolio-thumb.thumb-error {
  background: linear-gradient(135deg, var(--color-surface-light), var(--color-bg));
}

.portfolio-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.42) 100%);
  pointer-events: none;
  z-index: 2;
  transition: background 0.35s ease;
}

.portfolio-play-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.88);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.38),
    0 0 0 8px rgba(79, 142, 247, 0.12);
  transform: scale(1);
  transition:
    transform 0.35s var(--ease-spring),
    background 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.portfolio-play-btn svg {
  margin-left: 3px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.portfolio-card:hover .portfolio-play {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(79, 142, 247, 0.38) 100%);
}

.portfolio-card:hover .portfolio-play-btn {
  transform: scale(1.1);
  background: rgba(79, 142, 247, 0.82);
  border-color: #fff;
  box-shadow:
    0 12px 36px rgba(79, 142, 247, 0.45),
    0 0 0 10px rgba(79, 142, 247, 0.18);
}

@keyframes portfolio-thumb-spin {
  to { transform: rotate(360deg); }
}

.portfolio-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 50px;
  background: rgba(10, 14, 20, 0.75);
  backdrop-filter: blur(8px);
  color: var(--color-primary-light);
  border: 1px solid var(--color-border);
}

.portfolio-card-body {
  padding: 20px 22px;
}

.portfolio-card-body h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.portfolio-card-body p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.portfolio-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 24px;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
}

.portfolio-tip {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  opacity: 0.7;
}

.portfolio-tip code {
  padding: 2px 8px;
  background: var(--color-surface-light);
  border-radius: 4px;
  font-size: 0.8rem;
}

/* 作品预览弹窗 */
.portfolio-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.portfolio-modal.open {
  opacity: 1;
  visibility: visible;
}

.portfolio-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 12, 0.85);
  backdrop-filter: blur(8px);
}

.portfolio-modal-panel {
  position: relative;
  width: min(900px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--color-surface-solid);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 32px 32px;
  box-shadow: var(--shadow), 0 0 60px rgba(79, 142, 247, 0.15);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s var(--ease-spring);
}

.portfolio-modal.open .portfolio-modal-panel {
  transform: scale(1) translateY(0);
}

.portfolio-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface-light);
  color: var(--color-text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease;
}

.portfolio-modal-close:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: rotate(90deg);
}

.portfolio-modal-title {
  font-size: 1.25rem;
  margin-bottom: 8px;
  padding-right: 40px;
}

.portfolio-modal-desc {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.portfolio-modal-body img,
.portfolio-modal-body video {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.portfolio-modal-body video {
  background: #000;
}

/* 图集浏览 */
.portfolio-modal.is-gallery .portfolio-modal-panel {
  width: min(1060px, 96vw);
}

.gallery-viewer {
  position: relative;
}

.gallery-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(58vh, 520px);
  background: var(--color-bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
  margin-bottom: 16px;
}

.gallery-stage img {
  max-height: min(58vh, 520px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border: none;
  border-radius: 0;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(calc(-50% - 28px));
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  background: rgba(22, 30, 44, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 2;
  transition: all 0.3s ease;
}

.gallery-nav:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 20px rgba(79, 142, 247, 0.4);
}

.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

.gallery-counter {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.gallery-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  transition: all 0.25s ease;
  background: none;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  border-radius: 0;
}

.gallery-thumb.active,
.gallery-thumb:hover {
  opacity: 1;
  border-color: var(--color-primary-light);
  box-shadow: 0 0 12px rgba(79, 142, 247, 0.35);
}

@media (max-width: 768px) {
  .portfolio-card--wide {
    grid-column: span 1;
  }

  .gallery-nav {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
}

/* ===== 页脚 ===== */
.site-footer {
  position: relative;
  background: var(--color-surface-solid);
  border-top: 1px solid var(--color-border);
  padding: 40px 0 24px;
  margin-top: auto;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-accent), transparent);
  opacity: 0.5;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  position: relative;
  transition: color var(--transition);
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-primary-light);
  transition: width 0.35s ease;
}

.footer-links a:hover {
  color: var(--color-primary-light);
}

.footer-links a:hover::after {
  width: 100%;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-copy {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.footer-motto {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.12em;
}

.brand-sub {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* ── 页面进入 ── */
body {
  opacity: 0;
  transition: opacity 0.5s ease;
}

body.is-ready {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  body {
    opacity: 1;
    transition: none;
  }
}

/* ── 回到顶部 ── */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 997;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: rgba(22, 30, 44, 0.88);
  backdrop-filter: blur(10px);
  color: var(--color-text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.35s var(--ease-spring);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  color: #fff;
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 6px 24px rgba(79, 142, 247, 0.35);
}

body[data-page="contact"] .back-to-top {
  bottom: 168px;
}

/* ── 首页：信息条 ── */
.home-facts {
  padding: 0 0 8px;
  margin-top: -12px;
}

.home-facts-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.home-facts-list li {
  text-align: center;
  padding: 18px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.35s ease, transform 0.35s var(--ease-spring);
}

.home-facts-list li:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-3px);
}

.home-facts-list strong {
  display: block;
  font-size: 1.15rem;
  color: var(--color-primary-light);
  margin-bottom: 4px;
}

.home-facts-list span {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
}

/* ── 首页：快速导航 ── */
.section--compact {
  padding-top: 48px;
  padding-bottom: 48px;
}

.home-quick-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.quick-nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s var(--ease-spring);
}

.quick-nav-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-glow);
  color: inherit;
}

.quick-nav-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.quick-nav-label {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--color-text);
}

.quick-nav-desc {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* ── 首页：CTA ── */
.home-cta {
  padding: 0 0 80px;
}

.home-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 36px 40px;
  background: linear-gradient(135deg, rgba(79, 142, 247, 0.12), rgba(34, 211, 238, 0.06));
  border: 1px solid rgba(126, 179, 255, 0.28);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(79, 142, 247, 0.1);
}

.home-cta-text h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  margin-bottom: 10px;
}

.home-cta-text p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  max-width: 520px;
  margin: 0;
}

.home-cta-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── 轮播 eyebrow ── */
.carousel-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--color-accent);
  margin-bottom: 12px;
  opacity: 0.9;
}

/* ── 关于页 ── */
.about-stats--hero {
  margin: 0 0 28px;
}

.about-stats--hero .stat-item {
  padding: 14px 10px;
}

.about-stats--hero .stat-num {
  font-size: 1.25rem;
}

.about-lead {
  font-size: 1.05rem;
  color: var(--color-text) !important;
  line-height: 1.85;
  margin-bottom: 18px !important;
}

.section-title--sm {
  font-size: 1.2rem;
}

.section-title--sm::after {
  width: 32px;
}

.portfolio-cat-desc {
  display: none;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(15, 20, 25, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 4px;
    transform: translateY(-120%);
    opacity: 0;
    transition: all var(--transition);
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-link {
    padding: 14px 16px;
  }

  .nav-indicator {
    display: none;
  }

  .about-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-avatar {
    width: 200px;
    margin: 0 auto;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .home-facts-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-quick-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-cta-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
  }

  .home-cta-btn {
    width: 100%;
    text-align: center;
  }

  .about-stats--hero {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .site-stats-grid {
    grid-template-columns: 1fr;
  }

  .danmaku-form {
    flex-direction: column;
  }

  .danmaku-send {
    width: 100%;
  }

  .carousel-controls {
    bottom: 32px;
  }
}
