/* 基础主题变量 */
:root {
  --bg: #f5f7fa;
  --text: #1f2937;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-contrast: #ffffff;
  --card: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}

/* 暗色主题 */
.theme-dark {
  --bg: #0b1220;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --primary: #3b82f6;
  --primary-contrast: #0b1220;
  --card: #1e293b;
  --border: #334155;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 全局 */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px;
}

.section { padding: 64px 0; }

/* 头部导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Logo区域 */
.nav .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 700;
  color: var(--text);
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.nav .logo::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.nav .logo:hover::before {
  opacity: 0.08;
}
.nav .logo:hover {
  transform: translateY(-1px);
}
.logo-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--border);
  transition: all 0.25s ease;
  position: relative;
  z-index: 1;
}
.nav .logo:hover .logo-avatar {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 15%, transparent);
}
.logo-text {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 16px;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 1;
}
.logo-sub {
  font-weight: 500;
  color: var(--muted);
  font-size: 14px;
  transition: color 0.25s ease;
}
.nav .logo:hover .logo-sub {
  color: var(--primary);
}

/* 导航链接 */
.nav-links {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.nav-links a {
  position: relative;
  color: var(--text);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-links a:hover {
  background: var(--card);
  color: var(--primary);
  transform: translateY(-1px);
}
.nav-links a:hover::after {
  transform: scaleX(1);
}
.nav-links a:active {
  transform: translateY(0);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  transition: transform .08s ease, background .2s ease, border-color .2s ease;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in oklab, var(--border), var(--primary));
}
.btn.primary {
  background: var(--primary);
  color: var(--primary-contrast);
  border-color: var(--primary);
}

/* 主题切换按钮 */
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: var(--card);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.theme-toggle::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--primary), color-mix(in oklab, var(--primary), #f59e0b));
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.theme-toggle:hover::before {
  opacity: 0.15;
}

.theme-toggle:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12),
              0 0 0 4px color-mix(in oklab, var(--primary) 10%, transparent);
}

.theme-toggle:active {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* SVG 图标 */
.theme-toggle svg {
  position: absolute;
  width: 22px;
  height: 22px;
  color: var(--text);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

/* 太阳图标 */
.sun-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-dark .sun-icon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

/* 月亮图标 */
.moon-icon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.theme-dark .moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  color: #fbbf24;
}

/* 太阳光线动画 */
@keyframes sunRays {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(15deg);
  }
}

.theme-toggle:hover .sun-icon {
  animation: sunRays 1s ease-in-out infinite;
}

/* 月亮摇摆动画 */
@keyframes moonSway {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(-10deg) scale(1.05);
  }
}

.theme-dark .theme-toggle:hover .moon-icon {
  animation: moonSway 1s ease-in-out infinite;
}

/* Hero */
.hero {
  padding-top: 48px;
  padding-bottom: 48px;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  margin: 0 0 12px;
}
.hero .subtitle {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 20px;
  font-weight: 500;
}
.hero .hero-intro {
  font-size: 15px;
  line-height: 1.8;
  margin: 20px 0;
  max-width: 700px;
}
.hero .hero-intro strong {
  color: var(--primary);
  font-weight: 600;
}
.hero .hero-highlight {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  margin: 20px 0;
  padding: 16px 20px;
  background: var(--card);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  max-width: 700px;
}
.hero .hero-highlight strong {
  color: var(--text);
  font-weight: 600;
}
.hero .cta { display: flex; gap: 12px; margin-top: 24px; }
.accent { color: var(--primary); }

/* 头像 */
.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin: 20px 0;
}

/* 卡片与网格 */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 6px 10px; border-radius: 999px; border: 1px dashed var(--border); font-size: 12px; }

/* 技术栈区域 */
.tech-section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.tech-section > h3 {
  margin-bottom: 24px;
}
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.tech-item {
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.tech-item h4 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--primary);
}
.tech-motto {
  text-align: center;
  font-size: 15px;
  color: var(--muted);
  padding: 20px;
  background: linear-gradient(135deg, color-mix(in oklab, var(--primary) 8%, transparent), color-mix(in oklab, var(--primary) 3%, transparent));
  border-radius: 12px;
  margin-top: 20px;
}
.tech-motto strong {
  color: var(--primary);
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
/* 项目卡片新版UI */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), 0 12px 40px rgba(0, 0, 0, 0.08);
  border-color: transparent;
}

.project-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.project-icon svg {
  width: 28px;
  height: 28px;
}

.project-card:hover .project-icon {
  transform: scale(1.1);
}

/* 项目图标颜色 */
.project-icon.ai-platform {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.project-icon.ai-coding {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.project-icon.content-growth {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.project-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.project-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  white-space: nowrap;
}

.project-badge.practice {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}

.project-badge.growth {
  background: linear-gradient(135deg, #11998e, #38ef7d);
}

.project-content > p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.project-highlight {
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 12px;
  border-left: 3px solid var(--primary);
}

.project-highlight span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  background: color-mix(in oklab, var(--primary) 10%, transparent);
  color: var(--primary);
  border-radius: 20px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: gap 0.2s ease;
}

.project-link:hover {
  gap: 10px;
}

.project-link svg {
  transition: transform 0.2s ease;
}

.project-link:hover svg {
  transform: translateX(2px);
}

/* 旧版兼容 */
.project {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
}
.project-thumb {
  display: grid;
  place-items: center;
  font-size: 32px;
}
.project-body h3 { margin: 0 0 6px; }
.project-body p { margin: 0 0 12px; color: var(--muted); }
.project .actions { display: flex; gap: 8px; }

/* 联系 */
.contact-intro {
  max-width: 600px;
  margin: 0 auto 40px;
  text-align: center;
}
.contact-intro > p:first-child {
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--text);
}
.contact-focus {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.contact-focus li {
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.contact-focus li:hover {
  border-color: var(--primary);
  background: color-mix(in oklab, var(--primary) 5%, var(--card));
  transform: translateY(-2px);
}
.contact-cta {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
}
.contact-cta strong {
  color: var(--primary);
  font-weight: 600;
}

.contact-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 48px;
}
.contact-section {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.contact-section h3 {
  margin: 0 0 20px;
  font-size: 18px;
  color: var(--text);
}

/* 社交图标横向布局 */
/* 内容平台区域 */
.platform-section {
  margin-top: 48px;
}
.platform-cards {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}
.platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow);
}
.platform-card:hover {
  border-color: transparent;
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}
.platform-card.wechat-channels:hover {
  background: linear-gradient(135deg, rgba(250, 157, 59, 0.1), rgba(250, 157, 59, 0.05));
  box-shadow: 0 16px 48px rgba(250, 157, 59, 0.2);
}
.platform-card.douyin:hover {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.05), rgba(37, 244, 238, 0.05));
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}
.theme-dark .platform-card.douyin:hover {
  background: linear-gradient(135deg, rgba(254, 44, 85, 0.1), rgba(37, 244, 238, 0.1));
  box-shadow: 0 16px 48px rgba(254, 44, 85, 0.2);
}
.platform-card.kuaishou:hover {
  background: linear-gradient(135deg, rgba(255, 73, 6, 0.1), rgba(255, 73, 6, 0.05));
  box-shadow: 0 16px 48px rgba(255, 73, 6, 0.2);
}
.platform-card.wecom:hover {
  background: linear-gradient(135deg, rgba(24, 144, 255, 0.1), rgba(24, 144, 255, 0.05));
  box-shadow: 0 16px 48px rgba(24, 144, 255, 0.2);
}
.platform-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}
.platform-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}
.platform-card:hover .platform-icon {
  transform: scale(1.1);
}
.platform-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.5px;
}

/* 平台二维码悬浮提示 */
.platform-card.has-qr .qr-tooltip {
  position: absolute;
  bottom: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  text-align: center;
}
.platform-card.has-qr .qr-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 10px solid transparent;
  border-top-color: var(--bg);
}
.platform-card.has-qr .qr-tooltip::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 11px solid transparent;
  border-top-color: var(--border);
}
.platform-card.has-qr:hover .qr-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}
.platform-card .qr-tooltip img {
  width: auto;
  height: auto;
  max-width: 200px;
  max-height: 280px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 12px;
}
.platform-card .qr-tooltip span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* 旧的样式保留兼容 */
.social-icons {
  display: flex;
  gap: 16px;
  justify-content: center;
}
.social-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.social-icon:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.social-icon svg,
.social-icon .platform-logo {
  width: 40px;
  height: 40px;
  transition: transform 0.25s ease;
  border-radius: 8px;
  object-fit: contain;
}
.social-icon:hover svg,
.social-icon:hover .platform-logo {
  transform: scale(1.1);
}
.social-icon > span {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

/* 品牌色 */
.social-icon.wechat-channels { color: #fa9d3b; }
.social-icon.douyin { color: #000; }
.theme-dark .social-icon.douyin { color: #fff; }
.social-icon.kuaishou { color: #ff4906; }

/* 悬浮二维码提示 */
.social-icon.has-qr .qr-tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  text-align: center;
  min-width: 200px;
}
.social-icon.has-qr .qr-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: var(--bg);
}
.social-icon.has-qr .qr-tooltip::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 9px solid transparent;
  border-top-color: var(--border);
}
.social-icon.has-qr:hover .qr-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}
.social-icon .qr-tooltip img {
  width: 180px;
  height: auto;
  border-radius: 12px;
  margin-bottom: 8px;
}
.social-icon .qr-tooltip > span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.qr-placeholder {
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border-radius: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-list li {
  width: 100%;
}
.contact-list a,
.contact-list button.contact-link,
.contact-list div.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s ease;
  width: 100%;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  text-align: left;
}
.contact-list a:hover,
.contact-list button.contact-link:hover,
.contact-list div.contact-link:hover {
  border-color: var(--primary);
  background: color-mix(in oklab, var(--primary) 5%, var(--bg));
}
.contact-list a:hover,
.contact-list button.contact-link:hover {
  transform: translateX(4px);
}
.contact-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border-radius: 10px;
  flex-shrink: 0;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.contact-info strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.contact-info span {
  font-size: 13px;
  color: var(--muted);
}
.contact-note {
  font-size: 14px;
  color: var(--muted);
  margin: 12px 0 20px;
}
.contact-note strong {
  color: var(--primary);
  font-weight: 600;
}

/* 书籍卡片 */
.books {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}
.book-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.book-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 100px;
  background: linear-gradient(135deg, var(--primary), color-mix(in oklab, var(--primary), #000 20%));
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.book-icon {
  font-size: 36px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.book-info h3 {
  margin: 0 0 4px;
  font-size: 18px;
}
.book-author {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}
.book-desc {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}
.book-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0 0 14px;
}
.book-tags li {
  padding: 4px 10px;
  font-size: 11px;
  background: color-mix(in oklab, var(--primary) 15%, transparent);
  color: var(--primary);
  border-radius: 999px;
}
.book-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.book-license {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

/* 阅读栏目新版UI */
.section-desc {
  color: var(--muted);
  margin-bottom: 32px;
}

.reading-showcase {
  display: flex;
  justify-content: center;
}

.reading-card {
  max-width: 800px;
  width: 100%;
}

.reading-card-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  padding: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.reading-card:hover .reading-card-inner {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

/* 3D书籍效果 */
.book-visual {
  position: relative;
  perspective: 1000px;
}

.book-3d {
  position: relative;
  width: 140px;
  height: 190px;
  transform-style: preserve-3d;
  transform: rotateY(-15deg);
  transition: transform 0.5s ease;
}

.reading-card:hover .book-3d {
  transform: rotateY(-25deg) translateX(-10px);
}

.book-front {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px 12px 12px 4px;
  box-shadow: 
    0 0 0 1px rgba(255,255,255,0.1) inset,
    2px 2px 8px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: white;
  text-align: center;
}

.book-spine {
  position: absolute;
  left: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(90deg, #5a67d8 0%, #667eea 100%);
  transform: rotateY(90deg) translateZ(10px) translateX(-10px);
  border-radius: 2px 0 0 2px;
}

.book-title-cn {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 4px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.book-title-sub {
  font-size: 16px;
  font-weight: 500;
  opacity: 0.9;
  margin-bottom: 12px;
}

.book-version {
  font-size: 12px;
  padding: 4px 12px;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  margin-bottom: 16px;
}

.book-author-badge {
  font-size: 11px;
  opacity: 0.8;
}

.book-shadow {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 20px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.2) 0%, transparent 70%);
  filter: blur(4px);
}

/* 阅读内容区域 */
.reading-content {
  display: flex;
  flex-direction: column;
}

.reading-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.reading-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
}

.reading-pages {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 12px;
}

.reading-title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.reading-author {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
}

.reading-desc {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}

.reading-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.reading-tags span {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  background: color-mix(in oklab, var(--primary) 12%, transparent);
  color: var(--primary);
  border-radius: 20px;
  transition: all 0.2s ease;
}

.reading-tags span:hover {
  background: color-mix(in oklab, var(--primary) 20%, transparent);
  transform: translateY(-2px);
}

.reading-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.reading-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.reading-actions .btn svg {
  flex-shrink: 0;
}

.reading-license {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* 页脚 */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; }
.site-footer .container { text-align: center; }
.footer-motto {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 16px;
  color: var(--text);
}
.footer-motto strong {
  color: var(--primary);
  font-size: 18px;
}
.site-footer small { color: var(--muted); display: block; margin-top: 12px; }

/* ========== 响应式优化 ========== */

/* 移动端遮罩层 */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-overlay.active {
  display: block;
  opacity: 1;
}

/* 移动端汉堡菜单按钮 */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 60;
  position: relative;
  overflow: hidden;
}
.menu-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.menu-toggle:hover::before {
  opacity: 0.1;
}
.menu-toggle:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px color-mix(in oklab, var(--primary) 20%, transparent);
  transform: translateY(-2px);
}
.menu-toggle:active {
  transform: scale(0.95) translateY(-1px);
}

/* 小屏幕（<= 640px） */
@media (max-width: 640px) {
  /* 导航栈叠布局 */
  .nav {
    flex-wrap: wrap;
    padding: 12px 16px;
    position: relative;
  }
  .nav .logo {
    flex: 1;
    padding: 4px 10px 4px 4px;
  }
  .logo-avatar {
    width: 32px;
    height: 32px;
  }
  .logo-text {
    font-size: 15px;
  }
  .logo-sub {
    font-size: 13px;
  }
  
  /* 汉堡菜单按钮显示 */
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    order: 2;
  }
  
  /* 主题切换按钮 */
  .icon-btn {
    order: 1;
  }
  
  /* 移动端菜单面板 */
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg);
    flex-direction: column;
    gap: 0;
    padding: 80px 0 32px;
    margin: 0;
    z-index: 50;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
  }
  
  .nav-links.open {
    display: flex;
    right: 0;
  }
  
  .nav-links li {
    width: 100%;
    opacity: 0;
    transform: translateX(20px);
    animation: none;
  }
  
  .nav-links.open li {
    animation: slideIn 0.3s ease forwards;
  }
  .nav-links.open li:nth-child(1) { animation-delay: 0.05s; }
  .nav-links.open li:nth-child(2) { animation-delay: 0.1s; }
  .nav-links.open li:nth-child(3) { animation-delay: 0.15s; }
  .nav-links.open li:nth-child(4) { animation-delay: 0.2s; }
  .nav-links.open li:nth-child(5) { animation-delay: 0.25s; }
  
  @keyframes slideIn {
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  .nav-links a {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    font-size: 17px;
    font-weight: 500;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
  }
  
  .nav-links a:hover,
  .nav-links a:active {
    background: var(--card);
    padding-left: 32px;
    color: var(--primary);
  }
  
  /* 菜单关闭按钮区域 */
  .nav-links::before {
    content: '菜单';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
  }

  /* 版块边距缩小 */
  .section { padding: 40px 0; }
  .hero { padding-top: 32px; padding-bottom: 32px; }

  /* 按钮触摸友好 */
  .btn { height: 44px; padding: 0 16px; font-size: 15px; }
  .theme-toggle { width: 44px; height: 44px; }

  /* 联系列表垂直排列 */
  .contact-focus {
    grid-template-columns: 1fr;
  }
  .contact-sections {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .contact-list a {
    padding: 12px 14px;
  }
  .contact-list a:hover {
    transform: translateX(2px);
  }

  /* 项目卡片简化 */
  .project { grid-template-columns: 1fr; }
  .project-thumb { justify-self: start; font-size: 28px; }

  /* 项目卡片移动端 */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .project-card {
    padding: 24px;
  }
  .project-icon {
    width: 48px;
    height: 48px;
  }
  .project-icon svg {
    width: 24px;
    height: 24px;
  }
  .project-header {
    flex-direction: column;
    gap: 8px;
  }
  .project-header h3 {
    font-size: 17px;
  }

  /* 书籍卡片简化 */
  .book-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .book-cover {
    width: 100%;
    height: 80px;
  }
  .book-tags { justify-content: center; }
  .book-actions { justify-content: center; flex-wrap: wrap; }

  /* 头像缩小 */
  .avatar { width: 100px; height: 100px; }

  /* 平台卡片移动端优化 */
  .platform-cards {
    gap: 16px;
  }
  .platform-card {
    padding: 20px 24px;
  }
  .platform-icon {
    width: 48px;
    height: 48px;
  }
  .platform-name {
    font-size: 13px;
  }

  /* 阅读卡片移动端优化 */
  .reading-card-inner {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 24px;
  }
  .book-visual {
    display: flex;
    justify-content: center;
  }
  .book-3d {
    width: 120px;
    height: 160px;
    transform: rotateY(-10deg);
  }
  .reading-card:hover .book-3d {
    transform: rotateY(-15deg);
  }
  .book-title-cn {
    font-size: 18px;
  }
  .book-title-sub {
    font-size: 14px;
  }
  .reading-content {
    text-align: center;
  }
  .reading-header {
    justify-content: center;
  }
  .reading-title {
    font-size: 20px;
  }
  .reading-tags {
    justify-content: center;
  }
  .reading-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  /* 禁止滚动（菜单打开时） */
  body.menu-open {
    overflow: hidden;
  }
}

/* 中屏幕（641px - 768px） */
@media (min-width: 641px) and (max-width: 768px) {
  .section { padding: 48px 0; }
  .btn { height: 40px; }
  .theme-toggle { width: 44px; height: 44px; }
}

/* 汉堡菜单隐藏（大屏幕） */
@media (min-width: 641px) {
  .menu-toggle { display: none !important; }
  .nav-links {
    display: flex !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    flex-direction: row !important;
  }
  .nav-links li {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .nav-links a {
    border-bottom: none !important;
    padding: 8px 10px !important;
    font-size: inherit !important;
  }
  .nav-links::before {
    display: none !important;
  }
  .mobile-overlay {
    display: none !important;
  }
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: var(--primary-contrast);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
  z-index: 999;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}
.back-to-top:active {
  transform: translateY(-2px);
}
.back-to-top svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 640px) {
  .back-to-top {
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
  }
  .back-to-top svg {
    width: 20px;
    height: 20px;
  }
}
