/* =============================================
   设计令牌 / Design Tokens
   明日方舟风格 v2 — 黑白青配色 + 简洁和谐
   ============================================= */
:root {
  /* 主色调 — 青色系 */
  --primary-50: #ecfeff;
  --primary-100: #cffafe;
  --primary-200: #a5f3fc;
  --primary-300: #67e8f9;
  --primary-400: #22d3ee;
  --primary-500: #06b6d4;
  --primary-600: #0891b2;
  --primary-700: #0e7490;
  --primary-800: #155e75;
  --primary-900: #164e63;

  /* 强调色 — 冰蓝 */
  --accent-400: #38bdf8;
  --accent-500: #0ea5e9;
  --accent-600: #0284c7;

  /* 中性色 — 纯黑白灰 */
  --gray-50: #fafafa;
  --gray-100: #f0f0f0;
  --gray-200: #e0e0e0;
  --gray-300: #c0c0c0;
  --gray-400: #909090;
  --gray-500: #666666;
  --gray-600: #444444;
  --gray-700: #2a2a2a;
  --gray-800: #1a1a1a;
  --gray-900: #0a0a0a;

  /* 语义色 */
  --success: #34d399;
  --warning: #fbbf24;
  --error: #f87171;

  /* 字体 */
  --font-sans: 'Inter', 'PingFang SC', 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* 间距 */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* 阴影 */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.6), 0 4px 6px -4px rgb(0 0 0 / 0.4);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.7), 0 8px 10px -6px rgb(0 0 0 / 0.4);
  --shadow-glow: 0 0 40px rgb(6 182 212 / 0.06);

  /* 圆角 — 明日方舟偏直角 */
  --radius-sm: 0.125rem;
  --radius-md: 0.25rem;
  --radius-lg: 0.375rem;
  --radius-xl: 0.5rem;
  --radius-2xl: 0.75rem;
  --radius-full: 9999px;

  /* 过渡 */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;

  /* 背景 — 纯黑 */
  --bg-primary: #000000;
  --bg-secondary: #050505;
  --bg-card: #0c0c0c;
  --bg-card-hover: #111111;
  --border-color: #1a1a1a;
  --text-primary: #d0d0d0;
  --text-secondary: #707070;
  --text-muted: #444444;
}

/* =============================================
   重置 & 基础
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: default;
}

/* 极淡网格 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
}

/* =============================================
   页面过渡动画
   ============================================= */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.page-transition-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.page-enter {
  animation: pageSlideIn 0.4s ease forwards;
}

@keyframes pageSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   链接
   ============================================= */
a { color: var(--primary-400); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary-200); }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }

/* =============================================
   布局
   ============================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  position: relative;
  z-index: 1;
}

/* =============================================
   导航
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.site-header.scrolled {
  background: rgba(0,0,0,0.97);
  box-shadow: var(--shadow-lg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-icon { font-size: 1.4rem; }
.logo-accent { color: var(--primary-400); }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: var(--primary-400);
  transition: width var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: rgba(6,182,212,0.06);
}

.nav-link.active::after,
.nav-link:hover::after { width: 60%; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  display: block;
}

/* =============================================
   英雄区
   ============================================= */
.hero {
  padding: var(--space-20) 0 var(--space-16);
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: rgba(6,182,212,0.08);
  border: 1px solid rgba(6,182,212,0.15);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--primary-300);
  margin-bottom: var(--space-5);
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-5);
  color: #e8e8e8;
}

.gradient-text {
  background: linear-gradient(135deg, #67e8f9, #06b6d4, #0e7490);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: var(--space-6);
  max-width: 480px;
  line-height: 1.8;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.hero-tag {
  padding: var(--space-1) var(--space-3);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.hero-tag:hover {
  border-color: rgba(6,182,212,0.3);
  color: var(--primary-400);
}

/* 终端窗口 */
.terminal-window {
  background: #080808;
  border: 1px solid #1a1a1a;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: #0c0c0c;
  border-bottom: 1px solid #1a1a1a;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
  margin-left: var(--space-2);
  color: #444;
  font-size: 0.8rem;
}

.terminal-body {
  padding: var(--space-5);
  line-height: 2;
}

.terminal-line { display: flex; gap: var(--space-2); }
.prompt { color: var(--success); }
.cmd { color: var(--primary-300); }
.output { color: #a0a0a0; padding-left: 1.2rem; }

.typing { position: relative; }
.cursor {
  animation: blink 1s infinite;
  color: var(--primary-400);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* =============================================
   主内容
   ============================================= */
.main-content { padding: var(--space-12) 0 var(--space-16); }

.content-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-8);
  align-items: start;
}

/* =============================================
   区段标题
   ============================================= */
.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  white-space: nowrap;
  color: #d0d0d0;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border-color), transparent);
}

/* =============================================
   文章卡片
   ============================================= */
.posts-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, var(--primary-500), var(--accent-500));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.post-card:hover {
  border-color: rgba(6,182,212,0.25);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.post-card:hover::before { opacity: 1; }

.post-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.post-date {
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-tags-mini {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.tag-mini {
  padding: 2px var(--space-2);
  background: rgba(6,182,212,0.08);
  border: 1px solid rgba(6,182,212,0.15);
  border-radius: var(--radius-full);
  color: var(--primary-400);
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.post-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: var(--space-3);
  line-height: 1.4;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.post-card:hover .post-card-title { color: var(--primary-300); }

.post-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-color);
}

.read-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.read-more {
  font-size: 0.85rem;
  color: var(--primary-400);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition-fast);
}

.post-card:hover .read-more { gap: var(--space-2); }

/* =============================================
   侧边栏
   ============================================= */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  position: sticky;
  top: 80px;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}

.sidebar-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

/* 个人简介卡片 */
.profile-card { text-align: center; }

.profile-avatar {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #0e7490, #06b6d4);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #000;
  margin: 0 auto var(--space-3);
}

.profile-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.profile-role {
  font-size: 0.8rem;
  color: var(--primary-400);
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
}

.profile-bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

.profile-link-btn {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: transparent;
  border: 1px solid rgba(6,182,212,0.3);
  border-radius: var(--radius-full);
  color: var(--primary-400);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.profile-link-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  background: rgba(6,182,212,0.08);
  color: var(--primary-300);
}

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tag-cloud-item {
  padding: var(--space-1) var(--space-3);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 4px;
}

.tag-cloud-item:hover {
  background: rgba(6,182,212,0.06);
  border-color: rgba(6,182,212,0.2);
  color: var(--primary-400);
}

.tag-count {
  font-size: 0.7rem;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-full);
  padding: 0 4px;
}

/* 技能条 */
.skill-list { display: flex; flex-direction: column; gap: var(--space-3); }

.skill-item {}

.skill-name {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.skill-bar {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(to right, #0e7490, #06b6d4);
  border-radius: var(--radius-full);
  transition: width 1s ease;
  width: 0;
}

/* =============================================
   页面英雄区（标签/关于页）
   ============================================= */
.page-hero {
  padding: var(--space-12) 0 var(--space-8);
  text-align: center;
  position: relative;
  z-index: 1;
}

.page-hero-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: #e0e0e0;
}

.page-hero-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* =============================================
   标签页
   ============================================= */
.tags-overview {
  margin-bottom: var(--space-10);
}

.all-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

.tag-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tag-btn:hover, .tag-btn.active {
  background: rgba(6,182,212,0.06);
  border-color: rgba(6,182,212,0.3);
  color: var(--primary-400);
}

.tag-btn-count {
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-full);
  padding: 1px 6px;
  font-size: 0.75rem;
}

.tag-btn.active .tag-btn-count {
  background: var(--primary-600);
  color: #fff;
}

/* =============================================
   文章详情页
   ============================================= */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: var(--space-8);
  align-items: start;
  padding: var(--space-8) 0;
}

.post-main {
  min-width: 0;
}

.post-header {
  margin-bottom: var(--space-8);
}

.post-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-5);
  transition: color var(--transition-fast);
}

.post-back:hover { color: var(--primary-400); }

.post-meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.post-meta-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-4);
  color: #e0e0e0;
}

.post-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  padding: var(--space-4);
  border-left: 2px solid var(--primary-500);
  background: rgba(6,182,212,0.03);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: var(--space-6);
}

.post-divider {
  height: 1px;
  background: var(--border-color);
  margin: var(--space-6) 0;
}

/* TOC */
.toc-card { position: sticky; top: 80px; }

.toc-nav { display: flex; flex-direction: column; gap: var(--space-1); }

.toc-link {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: var(--space-1) var(--space-2);
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: all var(--transition-fast);
  display: block;
  line-height: 1.5;
}

.toc-link:hover, .toc-link.active {
  color: var(--primary-400);
  border-left-color: var(--primary-500);
  background: rgba(6,182,212,0.04);
}

.toc-link.h3 { padding-left: var(--space-5); font-size: 0.78rem; }

/* 相关文章 */
.related-posts { display: flex; flex-direction: column; gap: var(--space-3); }

.related-post-item {
  display: block;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.01);
  transition: all var(--transition-fast);
}

.related-post-item:hover {
  border-color: rgba(6,182,212,0.25);
  background: rgba(6,182,212,0.03);
}

.related-post-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  display: block;
  margin-bottom: 4px;
}

.related-post-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* =============================================
   关于页
   ============================================= */
.about-page { padding-top: var(--space-8); }

.about-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-8);
  align-items: start;
  margin-bottom: var(--space-10);
  padding: var(--space-8);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
}

.about-avatar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-avatar {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #0e7490, #06b6d4);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #000;
  position: relative;
  z-index: 1;
}

.about-avatar-ring {
  position: absolute;
  width: 116px;
  height: 116px;
  border: 1px solid transparent;
  border-top-color: rgba(6,182,212,0.5);
  border-right-color: rgba(6,182,212,0.2);
  border-radius: var(--radius-full);
  animation: spin 6s linear infinite;
}

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.about-name {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: #e0e0e0;
}

.about-en {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 400;
}

.about-role {
  color: var(--primary-400);
  font-size: 1rem;
  margin-bottom: var(--space-2);
}

.about-location {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-4);
}

.about-summary {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: var(--space-4);
  max-width: 660px;
}

.about-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.contact-chip:hover {
  border-color: rgba(6,182,212,0.25);
  color: var(--primary-400);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}

.about-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-color);
  color: #d0d0d0;
}

/* 时间线 */
.timeline { display: flex; flex-direction: column; gap: var(--space-5); }

.timeline-item {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: var(--space-4);
}

.timeline-dot {
  width: 10px;
  height: 10px;
  background: var(--primary-500);
  border-radius: var(--radius-full);
  box-shadow: 0 0 6px rgba(6,182,212,0.3);
  margin-top: 4px;
  flex-shrink: 0;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-1);
  flex-wrap: wrap;
}

.timeline-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.timeline-badge {
  padding: 2px var(--space-2);
  background: rgba(6,182,212,0.08);
  border: 1px solid rgba(6,182,212,0.15);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  color: var(--primary-400);
}

.timeline-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
}

.timeline-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.timeline-list {
  list-style: disc;
  padding-left: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.timeline-list li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  list-style: disc;
}

/* 技能组 */
.skills-grid { display: flex; flex-direction: column; gap: var(--space-5); }

.skill-group h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.skill-tag-item {
  padding: var(--space-1) var(--space-3);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  transition: all var(--transition-fast);
}

.skill-tag-item:hover {
  background: rgba(6,182,212,0.06);
  border-color: rgba(6,182,212,0.2);
  color: var(--primary-400);
}

/* 自我评价 */
.about-quote blockquote {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.9;
  padding: var(--space-4) var(--space-5);
  border-left: 2px solid var(--primary-500);
  background: rgba(6,182,212,0.02);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: var(--space-3);
}

.about-motto {
  text-align: right;
  font-size: 0.9rem;
  color: var(--primary-400);
  font-style: italic;
}

/* =============================================
   页脚
   ============================================= */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-8) 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-5);
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  margin-bottom: var(--space-2);
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-2);
  justify-content: flex-end;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-links a:hover { color: var(--primary-400); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
}

/* =============================================
   加载动画
   ============================================= */
.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.post-card {
  animation: fadeIn 0.5s ease forwards;
}

/* =============================================
   响应式
   ============================================= */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .hero { padding: var(--space-12) 0; }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar { position: static; }

  .post-layout {
    grid-template-columns: 1fr;
  }

  .post-sidebar { display: none; }

  .about-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-avatar-wrap { justify-content: center; }
  .about-contacts { justify-content: center; }

  .menu-toggle { display: flex; }

  .site-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-4);
    flex-direction: column;
    align-items: stretch;
    transform: translateY(-110%);
    transition: transform var(--transition-normal);
    z-index: 99;
  }

  .site-nav.open { transform: translateY(0); }

  .nav-link {
    text-align: center;
    padding: var(--space-3) var(--space-4);
  }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .footer-copy { text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-4); }
  .hero-title { font-size: 1.8rem; }
}

/* =============================================
   日/夜模式 — 完整适配
   ============================================= */
[data-theme="light"] {
  --bg-primary: #f8f9fa;
  --bg-secondary: #e9ecef;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f2f5;
  --border-color: #dee2e6;
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-muted: #868e96;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.08);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.06);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.06);
}

/* 网格背景 */
[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
}

/* 导航栏 */
[data-theme="light"] .site-header {
  background: rgba(255,255,255,0.92);
}
[data-theme="light"] .site-header.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* 英雄区 */
[data-theme="light"] .hero-badge {
  background: rgba(6,182,212,0.08);
  border-color: rgba(6,182,212,0.2);
  color: #0891b2;
}
[data-theme="light"] .hero-title { color: #1a1a2e; }
[data-theme="light"] .hero-tag {
  background: rgba(0,0,0,0.04);
  border-color: #dee2e6;
  color: #495057;
}

/* 终端窗口 */
[data-theme="light"] .terminal-window {
  background: #f0f0f0;
  border-color: #dee2e6;
}
[data-theme="light"] .terminal-header {
  background: #e8e8e8;
  border-bottom-color: #dee2e6;
}
[data-theme="light"] .terminal-title { color: #888; }
[data-theme="light"] .prompt { color: #16a34a; }
[data-theme="light"] .cmd { color: #0e7490; }
[data-theme="light"] .output { color: #555; }

/* 文章卡片 */
[data-theme="light"] .post-card { background: #fff; }
[data-theme="light"] .post-card:hover { background: #f8f9fa; }
[data-theme="light"] .post-card-title { color: #1a1a2e; }

/* 区段标题 */
[data-theme="light"] .section-title { color: #1a1a2e; }

/* 标签 */
[data-theme="light"] .tag-mini {
  background: rgba(6,182,212,0.06);
  border-color: rgba(6,182,212,0.15);
}
[data-theme="light"] .tag-cloud-item,
[data-theme="light"] .skill-tag-item {
  background: rgba(0,0,0,0.03);
  border-color: #dee2e6;
  color: #495057;
}

/* 侧边栏 */
[data-theme="light"] .sidebar-card { background: #fff; }
[data-theme="light"] .profile-avatar {
  background: linear-gradient(135deg, #06b6d4, #22d3ee);
}

/* 标签页 */
[data-theme="light"] .tag-btn {
  background: #fff;
  border-color: #dee2e6;
  color: #495057;
}
[data-theme="light"] .tag-btn:hover,
[data-theme="light"] .tag-btn.active {
  background: rgba(6,182,212,0.06);
  border-color: rgba(6,182,212,0.3);
  color: #0891b2;
}
[data-theme="light"] .tag-btn-count {
  background: rgba(0,0,0,0.06);
  color: #495057;
}
[data-theme="light"] .tag-btn.active .tag-btn-count {
  background: #0891b2;
  color: #fff;
}

/* 文章详情 */
[data-theme="light"] .post-title { color: #1a1a2e; }
[data-theme="light"] .post-back { color: #868e96; }
[data-theme="light"] .post-back:hover { color: #0891b2; }
[data-theme="light"] .page-hero-title { color: #1a1a2e; }

/* 关于页 */
[data-theme="light"] .about-hero { background: #fff; }
[data-theme="light"] .about-card { background: #fff; }
[data-theme="light"] .about-card-title { color: #1a1a2e; }
[data-theme="light"] .about-name { color: #1a1a2e; }
[data-theme="light"] .contact-chip {
  background: rgba(0,0,0,0.03);
  border-color: #dee2e6;
  color: #495057;
}
[data-theme="light"] .contact-chip:hover {
  border-color: rgba(6,182,212,0.3);
  color: #0891b2;
}

/* 归档页 */
[data-theme="light"] .archive-item { background: #fff; }
[data-theme="light"] .archive-item:hover { background: #f8f9fa; }
[data-theme="light"] .archive-item-title { color: #212529; }
[data-theme="light"] .archive-year-title { color: #0891b2; }

/* 页脚 */
[data-theme="light"] .site-footer {
  background: #f0f2f5;
  border-top-color: #dee2e6;
}
[data-theme="light"] .footer-logo { color: #212529; }
[data-theme="light"] .footer-desc { color: #868e96; }
[data-theme="light"] .footer-links a { color: #495057; }
[data-theme="light"] .footer-links a:hover { color: #0891b2; }

/* Markdown 渲染 */
[data-theme="light"] .markdown-body { color: #374151; }
[data-theme="light"] .markdown-body pre {
  background: #f6f8fa;
  border-color: #d0d7de;
}
[data-theme="light"] .markdown-body pre code { color: #24292f; }
[data-theme="light"] .markdown-body code {
  background: rgba(6,182,212,0.06);
  border-color: rgba(6,182,212,0.12);
  color: #0e7490;
}
[data-theme="light"] .markdown-body table th {
  background: rgba(6,182,212,0.04);
}
[data-theme="light"] .markdown-body blockquote {
  border-left-color: #06b6d4;
  color: #6b7280;
}
[data-theme="light"] .markdown-body a { color: #0891b2; }
[data-theme="light"] .markdown-body hr { border-color: #dee2e6; }

/* 代码块增强 */
[data-theme="light"] .code-lang-label { color: #6e7781; }
[data-theme="light"] .copy-btn {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.1);
  color: #6e7781;
}
[data-theme="light"] .copy-btn:hover {
  background: rgba(0,0,0,0.1);
  color: #24292f;
}

/* 置顶标识 */
[data-theme="light"] .pin-badge {
  background: rgba(6,182,212,0.08);
  border-color: rgba(6,182,212,0.2);
  color: #0891b2;
}
[data-theme="light"] .post-card.pinned {
  border-color: rgba(6,182,212,0.25);
  background: rgba(6,182,212,0.02);
}

/* 页面过渡 */
[data-theme="light"] .page-transition-overlay { background: #f8f9fa; }

/* 移动端菜单 */
[data-theme="light"] .site-nav {
  background: rgba(255,255,255,0.98);
}
[data-theme="light"] .menu-toggle span { background: #212529; }

/* 搜索 footer */
[data-theme="light"] .search-footer kbd {
  background: rgba(0,0,0,0.04);
  border-color: #dee2e6;
  color: #6b7280;
}

/* 拨动开关 */
[data-theme="light"] .theme-switch {
  background: #cbd5e1;
}
[data-theme="light"] .theme-switch-knob {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* 相关文章 */
[data-theme="light"] .related-post-item {
  background: rgba(0,0,0,0.01);
  border-color: #dee2e6;
}
[data-theme="light"] .related-post-item:hover {
  background: rgba(6,182,212,0.03);
  border-color: rgba(6,182,212,0.25);
}
[data-theme="light"] .related-post-title { color: #212529; }

/* 球状进度条 light */
[data-theme="light"] .reading-progress-orb {
  background: #fff;
  border-color: #dee2e6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
[data-theme="light"] .reading-progress-orb-text { color: #212529; }
[data-theme="light"] .reading-progress-orb-track { stroke: #e5e7eb; }
[data-theme="light"] .reading-progress-orb-bar { stroke: #0891b2; }

/* 选中文字 */
[data-theme="light"] ::selection {
  background: rgba(6,182,212,0.15);
  color: #212529;
}

/* =============================================
   阅读进度球（文章页右下角）
   ============================================= */
.reading-progress-orb {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: default;
}

.reading-progress-orb svg {
  width: 36px;
  height: 36px;
  transform: rotate(-90deg);
}

.reading-progress-orb-track {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 3;
}

.reading-progress-orb-bar {
  fill: none;
  stroke: var(--primary-500);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 100ms linear;
}

.reading-progress-orb-text {
  position: absolute;
  font-size: 0.6rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
  pointer-events: none;
}

/* =============================================
   搜索框
   ============================================= */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  transition: opacity 0.25s ease;
}

[data-theme="light"] .search-overlay {
  background: rgba(255,255,255,0.7);
}

.search-overlay.active {
  display: flex;
  opacity: 1;
}

.search-box {
  width: 90%;
  max-width: 600px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transform: translateY(-10px);
  transition: transform 0.25s ease;
}

.search-overlay.active .search-box {
  transform: translateY(0);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-color);
  gap: var(--space-3);
}

.search-icon {
  color: var(--text-muted);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-family: var(--font-sans);
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-shortcut {
  padding: 2px 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

[data-theme="light"] .search-shortcut {
  background: rgba(0,0,0,0.04);
}

.search-results {
  max-height: 50vh;
  overflow-y: auto;
  padding: var(--space-3);
}

.search-result-item {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.search-result-item:hover,
.search-result-item.active {
  background: rgba(6,182,212,0.06);
}

.search-result-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.search-result-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.search-result-excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-excerpt mark {
  background: rgba(6,182,212,0.2);
  color: var(--primary-300);
  border-radius: 2px;
  padding: 0 2px;
}

.search-empty {
  text-align: center;
  padding: var(--space-8);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-footer {
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--border-color);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-footer kbd {
  padding: 1px 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

/* =============================================
   主题拨动开关
   ============================================= */
.theme-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: #334155;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background 0.3s ease;
  flex-shrink: 0;
}

.theme-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #f8fafc;
  border-radius: 50%;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-switch-knob svg {
  width: 12px;
  height: 12px;
}

/* Dark: 月亮图标靠左 */
.theme-switch .moon-icon { display: block; }
.theme-switch .sun-icon { display: none; }

/* Light: 太阳图标靠右 */
[data-theme="light"] .theme-switch .moon-icon { display: none; }
[data-theme="light"] .theme-switch .sun-icon { display: block; }
[data-theme="light"] .theme-switch-knob {
  transform: translateX(20px);
}

/* 搜索/GitHub 图标按钮 */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
  text-decoration: none;
}

.icon-btn:hover {
  border-color: rgba(6,182,212,0.3);
  color: var(--primary-400);
  background: rgba(6,182,212,0.06);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =============================================
   Tooltip 悬停提示（下方显示）
   ============================================= */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: 6px 12px;
  background: var(--gray-800);
  color: #e0e0e0;
  font-size: 0.78rem;
  white-space: nowrap;
  border-radius: var(--radius-md);
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 10001;
  box-shadow: var(--shadow-md);
}

[data-theme="light"] [data-tooltip]::after {
  background: #24292f;
  color: #f0f0f0;
}

[data-tooltip]::before {
  content: '';
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: var(--gray-800);
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 10001;
}

[data-theme="light"] [data-tooltip]::before {
  border-bottom-color: #24292f;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

[data-tooltip]:hover::before {
  opacity: 1;
}

/* =============================================
   归档页
   ============================================= */
.archive-year {
  margin-bottom: var(--space-8);
}

.archive-year-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-400);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-mono);
}

.archive-month {
  margin-bottom: var(--space-4);
}

.archive-month-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.archive-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.archive-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.archive-item:hover {
  border-color: rgba(6,182,212,0.25);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.archive-item-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  min-width: 60px;
}

.archive-item-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.archive-item-tags {
  display: flex;
  gap: var(--space-1);
  flex-shrink: 0;
}

/* =============================================
   文章置顶标识
   ============================================= */
.pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  color: var(--primary-400);
  font-weight: 500;
  margin-left: var(--space-2);
}

.post-card.pinned {
  border-color: rgba(6,182,212,0.2);
  background: rgba(6,182,212,0.02);
}

/* =============================================
   滚动条美化
   ============================================= */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--gray-700); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--gray-500); }

/* 选中文字 */
::selection {
  background: rgba(6,182,212,0.2);
  color: #fff;
}

/* =============================================
   Header Actions (导航栏右侧按钮组)
   ============================================= */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .header-actions .icon-btn {
    display: none;
  }
  .header-actions .menu-toggle {
    display: flex;
  }
}

/* v5 - full upgrade */
