/*
  说明：全站CSS - 「Cosmic Portfolio」视觉系统
  设计理念：深空背景 + 电光强调色 + 毛玻璃卡片 + 创意微交互
  作者：Stephen's Personal Homepage
*/

/* ===================== 字体引入 ===================== */
/* 说明：Syne用于英文display标题，JetBrains Mono用于代码/技术元素，Noto Sans SC用于中文 */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700;800&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

/* ===================== CSS变量 - 暗色主题（默认） ===================== */
:root {
  /* 说明：背景色系 - 深空风格 */
  --bg-base: #080810;
  --bg-surface: #0e0e1a;
  --bg-elevated: #141425;
  --bg-muted: #1a1a2e;
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);

  /* 说明：强调色系 */
  --accent-mint: #00F5D4;         /* 电光薄荷 - 主强调 */
  --accent-orange: #FF6B35;       /* 活力橙 - 次强调/CTA */
  --accent-purple: #9B5DE5;       /* 柔紫 - 装饰 */
  --accent-blue: #4EA8DE;         /* 天蓝 - 辅助 */

  /* 说明：文字色系 */
  --text-primary: #E8E8F0;
  --text-secondary: #8892B0;
  --text-muted: #5A6080;

  /* 说明：边框与阴影 */
  --border-color: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(0, 245, 212, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(0, 245, 212, 0.08);
  --shadow-glow-orange: 0 0 40px rgba(255, 107, 53, 0.08);

  /* 说明：字体系统 */
  --font-display: 'Syne', 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* 说明：布局变量 */
  --container-max: 1100px;
  --section-padding: 120px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* 说明：动画时长 */
  --duration-fast: 0.15s;
  --duration-normal: 0.3s;
  --duration-slow: 0.6s;
}

/* ===================== 浅色主题 ===================== */
[data-theme="light"] {
  --bg-base: #F0F0F5;
  --bg-surface: #F7F7FA;
  --bg-elevated: #FFFFFF;
  --bg-muted: #E8E8F0;
  --bg-glass: rgba(255, 255, 255, 0.7);
  --bg-glass-hover: rgba(255, 255, 255, 0.85);

  --accent-mint: #00B894;
  --accent-orange: #E55A2B;
  --accent-purple: #7C3AED;
  --accent-blue: #2563EB;

  --text-primary: #1a1a2e;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  --border-color: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);
  --border-glow: rgba(0, 184, 148, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 40px rgba(0, 184, 148, 0.1);
  --shadow-glow-orange: 0 0 40px rgba(229, 90, 43, 0.1);
}

/* 说明：浅色模式隐藏粒子和噪点 */
[data-theme="light"] #particles { opacity: 0.15; }
[data-theme="light"] .noise-overlay { opacity: 0.02; }

/* ===================== 重置与基础样式 ===================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* 说明：Canvas粒子背景 - 固定定位全屏 */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* 说明：噪点纹理叠加 - 增加质感 */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* 说明：文字选中高亮色 */
::selection {
  background: var(--accent-mint);
  color: var(--bg-base);
}

/* 说明：链接基础样式 */
a {
  color: var(--accent-mint);
  text-decoration: none;
  transition: color var(--duration-fast);
}
a:hover {
  color: var(--accent-orange);
}

/* ===================== 布局容器 ===================== */
.container {
  position: relative;
  width: min(var(--container-max), calc(100% - 48px));
  margin-inline: auto;
  z-index: 1;
}

/* 说明：通用Section区块 */
.section {
  position: relative;
  padding: var(--section-padding) 0;
}

/* ===================== 顶部导航栏 ===================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(8, 8, 16, 0.7);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--duration-normal);
}

[data-theme="light"] .site-header {
  background: rgba(240, 240, 245, 0.75);
}

/* 说明：导航栏滚动后添加更强的背景 */
.site-header.scrolled {
  background: rgba(8, 8, 16, 0.92);
  box-shadow: var(--shadow-md);
}
[data-theme="light"] .site-header.scrolled {
  background: rgba(240, 240, 245, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 0;
}

/* 说明：品牌Logo */
.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  position: relative;
}
.brand::before {
  content: '⚡';
  margin-right: 6px;
  font-size: 16px;
}
.brand:hover {
  color: var(--accent-mint);
  text-decoration: none;
}

/* 说明：桌面导航链接 */
.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
  letter-spacing: 0.3px;
}
.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
  text-decoration: none;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--accent-mint);
  border-radius: 1px;
}
.nav-link--external {
  color: var(--accent-orange);
}
.nav-link--external:hover {
  color: var(--accent-orange);
  background: rgba(255, 107, 53, 0.08);
}

/* 说明：主题切换按钮 */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast);
  font-size: 0;
  flex-shrink: 0;
}
.theme-toggle::before {
  content: '☀️';
  font-size: 14px;
}
[data-theme="dark"] .theme-toggle::before {
  content: '🌙';
}
.theme-toggle:hover {
  border-color: var(--accent-mint);
  box-shadow: var(--shadow-glow);
}

/* 说明：汉堡菜单按钮 - 仅移动端可见 */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--duration-fast);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* 说明：移动端侧边导航 */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  transition: opacity var(--duration-normal);
}
.mobile-nav-overlay.open { display: block; opacity: 1; }

.mobile-nav {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-color);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  padding: 80px 32px 32px;
  gap: 8px;
  transition: right var(--duration-normal) ease;
}
.mobile-nav.open { right: 0; }

.mobile-nav-link {
  display: block;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
}
.mobile-nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
  text-decoration: none;
}

/* ===================== Section通用标题 ===================== */
.section-header {
  margin-bottom: 56px;
}
.section-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-mint);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -2px;
  line-height: 1.1;
}

/* ===================== HERO 全屏开场 ===================== */
.section--hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  text-align: center;
  overflow: hidden;
}
/* 说明：Hero背景渐变光晕 */
.section--hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 245, 212, 0.06), rgba(155, 93, 229, 0.04) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* 说明：头像 - 带发光边框环 */
.hero-avatar-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: 32px;
}
.hero-avatar-glow {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent-mint), var(--accent-purple), var(--accent-orange), var(--accent-mint));
  animation: avatar-glow-spin 6s linear infinite;
  opacity: 0.7;
}
@keyframes avatar-glow-spin {
  to { transform: rotate(360deg); }
}
.hero-avatar {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-base);
  z-index: 1;
}

/* 说明：问候语 */
.hero-greeting {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

/* 说明：名字 */
.hero-name {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(48px, 10vw, 80px);
  font-weight: 800;
  letter-spacing: -3px;
  line-height: 1;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-mint) 50%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 说明：打字机身份标签容器 */
.hero-typing-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 20px;
  height: 36px;
}
.hero-typing-prefix {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-weight: 500;
}
.hero-typing-text {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-mint);
  min-width: 1px;
}
.hero-typing-cursor {
  font-family: var(--font-mono);
  color: var(--accent-mint);
  animation: cursor-blink 1s step-end infinite;
  font-weight: 300;
}
@keyframes cursor-blink {
  50% { opacity: 0; }
}

/* 说明：一句话宣言 */
.hero-subtitle {
  margin: 0 0 48px;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.9;
  max-width: 560px;
}

/* 说明：向下滚动指示器 */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  transition: color var(--duration-fast);
}
.scroll-indicator:hover {
  color: var(--accent-mint);
  text-decoration: none;
}
.scroll-indicator-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.scroll-indicator-line {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent-mint), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ===================== SKILLS 能力可视化 ===================== */
.section--skills {
  /* 说明：添加左侧装饰渐变 */
}
.section--skills::before {
  content: '';
  position: absolute;
  top: 20%;
  left: -200px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 245, 212, 0.04), transparent 70%);
  pointer-events: none;
}

.skills-grid {
  display: grid;
  gap: 0;
}

/* 说明：单个技能条 */
.skill-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-color);
  transition: all var(--duration-normal);
}
.skill-item:last-child { border-bottom: none; }
.skill-item:hover {
  padding-left: 8px;
}
.skill-item:hover .skill-bar-fill {
  box-shadow: 0 0 16px rgba(0, 245, 212, 0.3);
}

/* 说明：技能顶部行（名称+图标+百分比） */
.skill-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.skill-icon {
  font-size: 20px;
  line-height: 1;
}
.skill-name {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  flex: 1;
}
.skill-pct {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-mint);
}

/* 说明：技能描述 */
.skill-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  padding-left: 30px;
}

/* 说明：技能进度条 */
.skill-bar {
  height: 6px;
  background: var(--bg-muted);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.skill-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-mint), var(--accent-blue));
  border-radius: var(--radius-full);
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
/* 说明：当skill进入视口时加class触发动画 */
.skill-bar-fill.animate {
  width: var(--target-width);
}

/* ===================== TIMELINE 时间线 ===================== */
.section--timeline::before {
  content: '';
  position: absolute;
  top: 30%;
  right: -200px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(155, 93, 229, 0.04), transparent 70%);
  pointer-events: none;
}

.timeline {
  position: relative;
  padding-left: 40px;
}

/* 说明：时间轴竖线 */
.timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-mint), var(--accent-purple), transparent);
}

/* 说明：单个时间线项 */
.timeline-item {
  position: relative;
  margin-bottom: 40px;
  padding: 28px 32px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--duration-normal);
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

/* 说明：时间线节点圆点 */
.timeline-item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 32px;
  width: 12px;
  height: 12px;
  background: var(--accent-mint);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg-base), 0 0 12px rgba(0, 245, 212, 0.4);
  z-index: 2;
}
/* 说明：hover节点发光增强 */
.timeline-item:hover::before {
  box-shadow: 0 0 0 4px var(--bg-base), 0 0 24px rgba(0, 245, 212, 0.6);
}

/* 说明：时间段 */
.timeline-period {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-mint);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
/* 说明：时间线标题 */
.timeline-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 10px;
}
/* 说明：时间线摘要 */
.timeline-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}
/* 说明：时间线标签 */
.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.timeline-tag {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-purple);
  background: rgba(155, 93, 229, 0.1);
  border: 1px solid rgba(155, 93, 229, 0.2);
  border-radius: var(--radius-full);
}

/* ===================== PROJECTS 项目卡片 ===================== */
.section--projects::before {
  content: '';
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.04), transparent 70%);
  pointer-events: none;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* 说明：项目卡片 */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--duration-normal);
  overflow: hidden;
}
/* 说明：卡片顶部装饰渐变线 */
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-mint), var(--accent-orange));
  opacity: 0;
  transition: opacity var(--duration-normal);
}
.project-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.project-card:hover::before { opacity: 1; }

/* 说明：项目emoji图标 */
.project-icon {
  font-size: 36px;
  margin-bottom: 16px;
  line-height: 1;
}
/* 说明：项目标题 */
.project-card .title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--text-primary);
  margin-bottom: 10px;
}
/* 说明：项目描述 */
.project-card .desc {
  flex: 1;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 20px;
}
/* 说明：项目标签 */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.project-tag {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-blue);
  background: rgba(78, 168, 222, 0.1);
  border: 1px solid rgba(78, 168, 222, 0.2);
  border-radius: var(--radius-full);
}
/* 说明：访问项目按钮 */
.project-card .btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--bg-base);
  background: var(--accent-mint);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
  width: fit-content;
}
.project-card .btn-link:hover {
  background: var(--accent-orange);
  text-decoration: none;
  transform: translateX(4px);
}
.project-card .btn-link::after {
  content: '→';
  transition: transform var(--duration-fast);
}
.project-card .btn-link:hover::after {
  transform: translateX(4px);
}

/* ===================== AI CHATS 对话模块 ===================== */
/* 说明：首页AI对话记录展示区域 */
.section--ai-chats::before {
  content: '';
  position: absolute;
  top: 20%;
  right: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(155, 93, 229, 0.04), transparent 70%);
  pointer-events: none;
}

/* 说明：模块引导文字 */
.section-lead {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 600px;
  margin-bottom: 32px;
}

/* 说明：对话卡片网格布局 */
.ai-chats-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 24px;
}

/* 说明：单个对话卡片 */
.ai-chat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 28px 24px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--duration-normal);
  overflow: hidden;
}
/* 说明：卡片左侧装饰渐变线 */
.ai-chat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-purple), var(--accent-mint));
  opacity: 0;
  transition: opacity var(--duration-normal);
}
.ai-chat-card:hover {
  border-color: rgba(155, 93, 229, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(155, 93, 229, 0.08);
}
.ai-chat-card:hover::before { opacity: 1; }

/* 说明：卡片头部（图标+日期） */
.ai-chat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.ai-chat-card-icon {
  font-size: 28px;
  line-height: 1;
}
.ai-chat-card-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* 说明：卡片标题 */
.ai-chat-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

/* 说明：卡片摘要 */
.ai-chat-card-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 16px;
}

/* 说明：对话预览区域 */
.chat-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

/* 说明：预览气泡 */
.chat-preview-bubble {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
}
.chat-preview-bubble.me {
  border-left: 2px solid var(--accent-mint);
}
.chat-preview-bubble.ai {
  border-left: 2px solid var(--accent-orange);
}

/* 说明：预览角色标签 */
.chat-preview-role {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}
.chat-preview-bubble.me .chat-preview-role {
  color: var(--accent-mint);
}
.chat-preview-bubble.ai .chat-preview-role {
  color: var(--accent-orange);
}

/* 说明：对话卡片标签 */
.ai-chat-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.chat-card-tag {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-purple);
  background: rgba(155, 93, 229, 0.1);
  border: 1px solid rgba(155, 93, 229, 0.2);
  border-radius: var(--radius-full);
}

/* 说明：对话卡片阅读按钮 */
.ai-chat-card .btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--bg-base);
  background: var(--accent-purple);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
  width: fit-content;
}
.ai-chat-card .btn-link:hover {
  background: var(--accent-mint);
  text-decoration: none;
  transform: translateX(4px);
}

/* 说明：查看更多按钮容器 */
.section-more {
  margin-top: 32px;
  text-align: center;
}
.section-more .btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-purple);
  background: transparent;
  border: 1px solid rgba(155, 93, 229, 0.3);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
}
.section-more .btn-link:hover {
  color: var(--bg-base);
  background: var(--accent-purple);
  text-decoration: none;
}

/* ===================== STATS 数据面板 ===================== */
.section--stats {
  text-align: center;
}
.section--stats .section-header {
  text-align: left;
}

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

/* 说明：单个统计卡片 */
.stat-card {
  position: relative;
  padding: 36px 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  transition: all var(--duration-normal);
}
.stat-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
/* 说明：统计图标 */
.stat-icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: block;
  line-height: 1;
}
/* 说明：统计数字 - 大字 */
.stat-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 4px;
}
/* 说明：统计标签（中文） */
.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
/* 说明：统计副标签（英文） */
.stat-sublabel {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* ===================== TRAVEL 旅行足迹 ===================== */
.section--travel::before {
  content: '';
  position: absolute;
  top: 10%;
  left: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(78, 168, 222, 0.04), transparent 70%);
  pointer-events: none;
}

/* 说明：当前所在城市指示 */
.travel-current {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}
.travel-current strong {
  color: var(--accent-mint);
  font-family: var(--font-display);
}
/* 说明：脉搏动画指示器 */
.travel-pulse {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--accent-mint);
  border-radius: 50%;
  position: relative;
}
.travel-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent-mint);
  animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

/* 说明：城市标签网格 */
.travel-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* 说明：城市卡片 */
.travel-city {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 28px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--duration-normal);
  min-width: 120px;
}
.travel-city:hover {
  border-color: var(--accent-blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.travel-city.highlight {
  border-color: var(--accent-mint);
  background: rgba(0, 245, 212, 0.05);
}
.travel-city-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
}
.travel-city-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ===================== FOOTER 页脚 ===================== */
.site-footer {
  position: relative;
  padding: 80px 0 40px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}
.footer-cta {
  margin-bottom: 40px;
}
.footer-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
  margin: 0 0 12px;
}
.footer-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
}

/* 说明：联系方式链接 */
.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.footer-link-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--duration-fast);
}
.footer-link-item:hover {
  color: var(--accent-mint);
  border-color: var(--accent-mint);
  text-decoration: none;
  box-shadow: var(--shadow-glow);
}
.footer-link-icon {
  font-size: 16px;
  line-height: 1;
}

/* 说明：版权信息 */
.footer-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.dot { opacity: 0.4; }

/* ===================== Hero入场动画（CSS keyframes，不依赖JS） ===================== */
/* 说明：Hero区元素用CSS keyframes实现入场动画，确保首屏立即可见 */
@keyframes hero-fade-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.section--hero [data-animate] {
  opacity: 0;
  animation: hero-fade-in 0.8s ease forwards;
}
.section--hero [data-animate]:nth-child(1) { animation-delay: 0.1s; }
.section--hero [data-animate]:nth-child(2) { animation-delay: 0.3s; }
.section--hero [data-animate]:nth-child(3) { animation-delay: 0.5s; }
.section--hero [data-animate]:nth-child(4) { animation-delay: 0.7s; }
.section--hero [data-animate]:nth-child(5) { animation-delay: 0.9s; }
.section--hero [data-animate]:nth-child(6) { animation-delay: 1.1s; }
.section--hero [data-animate]:nth-child(7) { animation-delay: 1.3s; }

/* ===================== 滚动入场动画（非Hero区） ===================== */
/* 说明：初始隐藏，滚动到视口时触发 */
.section:not(.section--hero) [data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.section:not(.section--hero) [data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}
/* 说明：错开延迟 */
.section:not(.section--hero) [data-animate]:nth-child(2) { transition-delay: 0.1s; }
.section:not(.section--hero) [data-animate]:nth-child(3) { transition-delay: 0.2s; }
.section:not(.section--hero) [data-animate]:nth-child(4) { transition-delay: 0.25s; }
.section:not(.section--hero) [data-animate]:nth-child(5) { transition-delay: 0.3s; }
.section:not(.section--hero) [data-animate]:nth-child(6) { transition-delay: 0.35s; }

/* ===================== 响应式设计 ===================== */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 80px;
  }

  .container { width: calc(100% - 32px); }

  /* 说明：移动端显示汉堡菜单，隐藏桌面导航 */
  .nav { display: none; }
  .hamburger { display: flex; }

  /* 说明：Hero区域调整 */
  .hero-avatar-wrap { width: 120px; height: 120px; }
  .hero-avatar { width: 120px; height: 120px; }
  .hero-name { font-size: clamp(36px, 12vw, 56px); letter-spacing: -2px; }
  .hero-typing-wrap { font-size: 16px; flex-wrap: wrap; justify-content: center; }
  .hero-subtitle { font-size: 14px; }

  /* 说明：项目卡片单列 */
  .projects-grid { grid-template-columns: 1fr; }

  /* 说明：统计卡片2列 */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  /* 说明：时间线紧凑 */
  .timeline { padding-left: 32px; }
  .timeline-item { padding: 20px 24px; }
  .timeline-item::before { left: -26px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-typing-wrap { flex-direction: column; gap: 4px; height: auto; }
}

/* ===================== 打印样式 ===================== */
@media print {
  .site-header, .site-footer, .theme-toggle, .hamburger,
  #particles, .noise-overlay, .scroll-indicator { display: none !important; }
  body { background: white; color: black; }
  .section { padding: 40px 0; }
}

/* ===================== 子页面复用样式 ===================== */
/* 说明：以下样式供blog子页面继续使用（base.html模板） */

/* 说明：页面标题（子页面） */
.page-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  color: var(--text-primary);
}
.page-title::before {
  content: '# ';
  color: var(--accent-mint);
  font-weight: 400;
}

/* 说明：副标题/引导文字（子页面） */
.lead {
  margin: 0 0 24px;
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 680px;
}

/* 说明：meta信息 */
.meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 说明：卡片组件（子页面） */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal);
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.card.pad { padding: 24px; }
.card.accent { border-left: 3px solid var(--accent-mint); }

/* 说明：网格布局（子页面） */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.col-6 { grid-column: span 6; }
.col-12 { grid-column: span 12; }
@media (max-width: 768px) { .col-6 { grid-column: span 12; } }

/* 说明：标签组件（子页面） */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  transition: all var(--duration-fast);
}
.tag:hover {
  color: var(--accent-mint);
  border-color: var(--accent-mint);
  text-decoration: none;
}

/* 说明：列表组件（子页面） */
.list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.list-item {
  display: grid; gap: 8px; padding: 20px 24px;
  background: var(--bg-elevated); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); transition: all var(--duration-fast);
}
.list-item:hover { border-color: var(--accent-mint); transform: translateX(4px); box-shadow: var(--shadow-md); }
.list-item a { color: var(--text-primary); }
.list-item a:hover { color: var(--accent-mint); text-decoration: none; }
.list-item a strong { font-family: var(--font-mono); font-weight: 700; }

/* 说明：技能条（子页面兼容） */
.skill { display: grid; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--border-color); }
.skill:last-child { border-bottom: none; }
.skill .top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.skill .name { font-family: var(--font-mono); font-weight: 700; font-size: 14px; color: var(--text-primary); }
.skill .desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.bar { position: relative; height: 6px; background: var(--bg-muted); border-radius: var(--radius-full); overflow: hidden; }
.bar > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent-mint), var(--accent-blue));
  border-radius: var(--radius-full); animation: bar-fill 1s ease-out forwards; animation-delay: var(--delay, 0s);
}
@keyframes bar-fill { from { width: 0; } }

/* 说明：聊天气泡（子页面） */
.chat { display: grid; gap: 16px; padding: 8px 0; }
.bubble {
  max-width: min(720px, 85%); padding: 16px 20px;
  border-radius: var(--radius-lg); line-height: 1.8;
  white-space: pre-wrap; word-break: break-word;
}
.bubble.me {
  margin-left: auto;
  background: linear-gradient(135deg, var(--accent-mint), var(--accent-blue));
  color: var(--bg-base); border-bottom-right-radius: 6px;
}
.bubble.ai {
  margin-right: auto; background: var(--bg-muted);
  border: 1px solid var(--border-color); color: var(--text-primary); border-bottom-left-radius: 6px;
}
.bubble.ai::before {
  content: 'AI >'; display: block; font-family: var(--font-mono);
  font-size: 11px; font-weight: 700; color: var(--accent-orange);
  margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px;
}

/* 说明：文章正文排版（子页面） */
.prose { line-height: 1.9; color: var(--text-primary); }
.prose h1, .prose h2, .prose h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.3; margin: 2em 0 0.8em; }
.prose h1::before { content: '#'; color: var(--accent-mint); margin-right: 8px; font-weight: 400; }
.prose h2::before { content: '##'; color: var(--accent-mint); margin-right: 8px; font-weight: 400; }
.prose h3::before { content: '###'; color: var(--accent-mint); margin-right: 8px; font-weight: 400; }
.prose p { margin: 0 0 1.5em; }
.prose a { color: var(--accent-mint); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { margin: 0 0 1.5em; padding-left: 1.5em; }
.prose li { margin-bottom: 0.5em; }
.prose blockquote {
  margin: 1.5em 0; padding: 16px 20px; background: var(--bg-muted);
  border-left: 3px solid var(--accent-mint); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.prose pre {
  margin: 1.5em 0; padding: 20px; background: var(--bg-muted);
  border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow-x: auto;
}
.prose code { font-family: var(--font-mono); font-size: 0.9em; }
.prose :not(pre) > code { padding: 2px 6px; background: var(--bg-muted); border-radius: 4px; color: var(--accent-orange); }

/* 说明：首页老样式兼容（hero-card等） */
.hero-card {
  position: relative; padding: 40px;
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-muted));
  border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow: hidden;
}
.hero-tags .tag { background: transparent; border: 1px dashed var(--border-strong); color: var(--text-primary); }
.hero-tags .tag::before { content: '//'; margin-right: 6px; color: var(--accent-mint); }
.hero-tags .tag:hover { border-style: solid; background: var(--accent-mint); color: var(--bg-base); }
.hero-tags .tag:hover::before { color: var(--bg-base); }

/* 说明：子页面导航样式兼容 */
.site-main { padding: 48px 0 80px; min-height: calc(100vh - 200px); }

/* 说明：无障碍跳转链接 */
.skip-link {
  position: absolute; left: -9999px; top: 16px;
  background: var(--bg-elevated); color: var(--text-primary);
  padding: 12px 16px; border-radius: var(--radius-md);
  border: 1px solid var(--border-strong); font-family: var(--font-mono); font-size: 13px; z-index: 9999;
}
.skip-link:focus { left: 16px; }

/* 说明：打字光标效果（子页面兼容） */
.typing-cursor::after { content: '|'; color: var(--accent-mint); animation: cursor-blink 1s step-end infinite; margin-left: 2px; }

/* 说明：工具类 */
.text-center { text-align: center; }
.text-mono { font-family: var(--font-mono); }

/* ===================== GUESTBOOK 留言板（踩一踩） ===================== */
/* 说明：留言板区块 - 深空风格装饰光晕 */
.section--guestbook {
  overflow: hidden; /* 说明：隐藏滚动条溢出 */
}
.section--guestbook::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 30%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 245, 212, 0.03), transparent 70%);
  pointer-events: none;
}
.section--guestbook::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: 20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(155, 93, 229, 0.03), transparent 70%);
  pointer-events: none;
}

/* 说明：留言滚动墙容器 */
.guestbook-wall {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
  /* 说明：超出容器宽度不显示滚动条 */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 0 24px;
}

/* 说明：单行滚动轨道 */
.guestbook-track {
  overflow: hidden;
  position: relative;
  /* 说明：左右渐隐遮罩，让卡片淡入淡出 */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

/* 说明：轨道内部 - 横向排列，CSS动画驱动滚动 */
.guestbook-track-inner {
  display: flex;
  gap: 16px;
  width: max-content;
  will-change: transform;
}

/* 说明：第一排 - 从右向左滚动 */
.guestbook-track--row1 .guestbook-track-inner {
  animation: guestbook-scroll-left 40s linear infinite;
}
/* 说明：第二排 - 从左向右滚动（反方向） */
.guestbook-track--row2 .guestbook-track-inner {
  animation: guestbook-scroll-right 45s linear infinite;
}

/* 说明：鼠标悬停时暂停滚动，方便阅读 */
.guestbook-track:hover .guestbook-track-inner {
  animation-play-state: paused;
}

/* 说明：滚动动画关键帧 - 向左 */
@keyframes guestbook-scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
/* 说明：滚动动画关键帧 - 向右 */
@keyframes guestbook-scroll-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* 说明：单张留言卡片 */
.guestbook-card {
  flex-shrink: 0;
  width: 300px;
  padding: 20px 22px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.guestbook-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

/* 说明：卡片头部 - 头像 + 名字 + 时间 */
.guestbook-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
/* 说明：留言者头像emoji */
.guestbook-card-avatar {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
/* 说明：名字与时间的容器 */
.guestbook-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
/* 说明：留言者名字 */
.guestbook-card-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 说明：留言时间 */
.guestbook-card-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* 说明：留言正文 */
.guestbook-card-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
  /* 说明：最多3行，超出省略 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===================== GUESTBOOK 留言表单 ===================== */
/* 说明：表单外层容器 - 居中且限宽 */
.guestbook-form-wrap {
  max-width: 560px;
  margin: 0 auto;
}

/* 说明：表单卡片 - 毛玻璃风格 */
.guestbook-form-card {
  padding: 28px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color var(--duration-normal);
}
.guestbook-form-card:focus-within {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

/* 说明：表单头部 - 图标 + 标题 */
.guestbook-form-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.guestbook-form-icon {
  font-size: 24px;
  line-height: 1;
}
.guestbook-form-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

/* 说明：留言输入框 */
.guestbook-textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  resize: vertical;
  min-height: 80px;
  max-height: 200px;
  line-height: 1.7;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  outline: none;
}
.guestbook-textarea::placeholder {
  color: var(--text-muted);
}
.guestbook-textarea:focus {
  border-color: var(--accent-mint);
  box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.1);
}

/* 说明：底部操作栏 */
.guestbook-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

/* 说明：匿名/署名切换区域 */
.guestbook-name-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* 说明：Toggle开关标签 */
.guestbook-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
/* 说明：隐藏原生checkbox */
.guestbook-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
/* 说明：自定义开关轨道 */
.guestbook-toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  transition: background var(--duration-fast), border-color var(--duration-fast);
  flex-shrink: 0;
}
/* 说明：开关滑块 */
.guestbook-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform var(--duration-fast), background var(--duration-fast);
}
/* 说明：开关激活状态 */
.guestbook-toggle-input:checked + .guestbook-toggle-switch {
  background: rgba(0, 245, 212, 0.15);
  border-color: var(--accent-mint);
}
.guestbook-toggle-input:checked + .guestbook-toggle-switch::after {
  transform: translateX(16px);
  background: var(--accent-mint);
}
/* 说明：开关旁的文字 */
.guestbook-toggle-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* 说明：姓名输入框 */
.guestbook-name-input {
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  width: 140px;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.guestbook-name-input::placeholder {
  color: var(--text-muted);
}
.guestbook-name-input:focus {
  border-color: var(--accent-mint);
  box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.1);
}

/* 说明：提交按钮 - 薄荷绿风格 */
.guestbook-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--bg-base);
  background: var(--accent-mint);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast);
  white-space: nowrap;
  flex-shrink: 0;
}
.guestbook-submit-btn:hover {
  background: var(--accent-orange);
  transform: translateX(4px);
}

/* ===================== GUESTBOOK 浮动入口按钮 ===================== */
/* 说明：固定在右下角的圆形浮动按钮 */
.guestbook-fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 900;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  transition: all var(--duration-normal);
  text-decoration: none;
  box-shadow: var(--shadow-md);
}
.guestbook-fab:hover {
  border-color: var(--accent-mint);
  box-shadow: var(--shadow-glow), var(--shadow-md);
  transform: scale(1.1);
  text-decoration: none;
}
/* 说明：浮动按钮隐藏状态（滚动到留言区时） */
.guestbook-fab.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8) translateY(20px);
}
/* 说明：浮动按钮emoji图标 */
.guestbook-fab-icon {
  font-size: 22px;
  line-height: 1;
  position: relative;
  z-index: 1;
}
/* 说明：呼吸脉搏动画 */
.guestbook-fab-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent-mint);
  opacity: 0;
  animation: guestbook-pulse 2.5s ease-out infinite;
}
@keyframes guestbook-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}/* ===================== GUESTBOOK 响应式适配 ===================== */
@media (max-width: 768px) {
  /* 说明：移动端留言卡片宽度缩小 */
  .guestbook-card {
    width: 240px;
    padding: 16px 18px;
  }
  /* 说明：移动端表单占满宽度 */
  .guestbook-form-card {
    padding: 20px;
  }
  /* 说明：移动端操作栏垂直排列 */
  .guestbook-form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .guestbook-submit-btn {
    justify-content: center;
  }
  /* 说明：移动端浮动按钮靠近底边 */
  .guestbook-fab {
    bottom: 20px;
    right: 20px;
    width: 46px;
    height: 46px;
  }
  .guestbook-fab-icon {
    font-size: 20px;
  }
}
