/* ===========================
   CSS 变量 - 主题系统
   =========================== */
:root {
  /* 亮色主题 */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fb;
  --bg-card: #ffffff;
  --bg-hover: #f1f3f5;
  --bg-overlay: rgba(0, 0, 0, 0.04);
  
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a68;
  --text-tertiary: #8e8ea0;
  --text-inverse: #ffffff;
  
  --accent: #6366f1;
  --accent-hover: #5558e3;
  --accent-light: rgba(99, 102, 241, 0.1);
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  
  --border: #e8e8ef;
  --border-strong: #d1d1e0;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --max-width: 1080px;
  --nav-height: 64px;
  
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  
  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

[data-theme="dark"] {
  --bg-primary: #0f0f1a;
  --bg-secondary: #16162a;
  --bg-card: #1a1a2e;
  --bg-hover: #22223e;
  --bg-overlay: rgba(255, 255, 255, 0.05);
  
  --text-primary: #e8e8f0;
  --text-secondary: #a0a0b8;
  --text-tertiary: #6b6b85;
  --text-inverse: #0f0f1a;
  
  --accent: #818cf8;
  --accent-hover: #6366f1;
  --accent-light: rgba(129, 140, 248, 0.12);
  
  --border: #2a2a44;
  --border-strong: #3a3a5a;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ===========================
   Reset & Base
   =========================== */
*, *::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;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

::selection {
  background: var(--accent-light);
  color: var(--accent);
}

/* ===========================
   滚动条
   =========================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ===========================
   阅读进度条
   =========================== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent-gradient);
  z-index: 1000;
  transition: width 0.1s ease-out;
  opacity: 0;
}

.reading-progress.active {
  opacity: 1;
}

/* ===========================
   导航栏
   =========================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: box-shadow var(--transition), background-color var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 800;
}

.logo-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  margin-right: 16px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-search-btn,
.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.nav-search-btn:hover,
.theme-toggle:hover {
  background: var(--bg-hover);
  color: var(--accent);
}

.icon-moon {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: block;
}

.nav-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

/* ===========================
   搜索栏
   =========================== */
.search-bar {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
  background: var(--bg-primary);
  border-bottom: 1px solid transparent;
}

.search-bar.open {
  max-height: 500px;
  border-bottom-color: var(--border);
}

.search-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-icon {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

#searchInput {
  flex: 1;
  font-size: 1rem;
  font-family: inherit;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  padding: 8px 0;
}

#searchInput::placeholder {
  color: var(--text-tertiary);
}

.search-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-tertiary);
  transition: all var(--transition);
}

.search-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.search-results {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  max-height: 350px;
  overflow-y: auto;
}

.search-result-item {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  transition: background var(--transition);
}

.search-result-item:hover {
  background: var(--bg-hover);
}

.search-result-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.search-result-excerpt {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-no-result {
  text-align: center;
  padding: 24px;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

/* ===========================
   主内容区
   =========================== */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 48px) 24px 80px;
  min-height: 100vh;
}

/* ===========================
   首页 - Hero
   =========================== */
.hero {
  text-align: center;
  padding: 40px 0 56px;
  animation: fadeInUp 0.6s ease-out;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero-title .gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ===========================
   分类标签栏
   =========================== */
.category-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
  display: none;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: all var(--transition);
  cursor: pointer;
}

.category-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.category-chip.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.category-chip .cat-icon {
  font-size: 0.9rem;
}

/* ===========================
   文章卡片网格
   =========================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.5s ease-out both;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.post-card-cover {
  height: 180px;
  position: relative;
  overflow: hidden;
}

.post-card-cover-bg {
  position: absolute;
  inset: 0;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card-cover-bg {
  transform: scale(1.05);
}

.post-card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: #1a1a2e;
  z-index: 2;
}

.post-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-date {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.post-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--text-primary);
  transition: color var(--transition);
}

.post-card:hover .post-card-title {
  color: var(--accent);
}

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-card-tag {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-tertiary);
  font-weight: 500;
  transition: all var(--transition);
}

.post-card-tag:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* 精选文章 */
.post-card.featured {
  grid-column: span 2;
}

.post-card.featured .post-card-cover {
  height: 240px;
}

.post-card.featured .post-card-title {
  font-size: 1.5rem;
}

.post-card.featured .post-card-excerpt {
  font-size: 0.95rem;
  -webkit-line-clamp: 4;
}

@media (max-width: 768px) {
  .post-card.featured {
    grid-column: span 1;
  }
}

/* ===========================
   文章详情页
   =========================== */
.post-detail {
  max-width: 760px;
  margin: 0 auto;
  animation: fadeInUp 0.5s ease-out;
}

.post-detail-header {
  margin-bottom: 40px;
}

.post-detail-category {
  display: inline-block;
  padding: 4px 14px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.post-detail-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.post-detail-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.875rem;
  color: var(--text-tertiary);
  flex-wrap: wrap;
}

.post-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-detail-cover {
  height: 280px;
  border-radius: var(--radius-lg);
  margin-bottom: 40px;
  overflow: hidden;
}

.post-detail-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.post-detail-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.post-detail-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--text-primary);
}

.post-detail-content p {
  margin-bottom: 16px;
}

.post-detail-content ul,
.post-detail-content ol {
  margin: 12px 0 20px;
  padding-left: 24px;
}

.post-detail-content li {
  margin-bottom: 6px;
}

.post-detail-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

.post-detail-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  overflow-x: auto;
  margin: 20px 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.post-detail-content pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.post-detail-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
}

.post-detail-content blockquote p {
  margin: 0;
}

.post-detail-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
}

.post-detail-content th,
.post-detail-content td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}

.post-detail-content th {
  background: var(--bg-secondary);
  font-weight: 600;
}

.post-detail-content tr:nth-child(even) {
  background: var(--bg-secondary);
}

.post-detail-content strong {
  font-weight: 700;
  color: var(--text-primary);
}

.post-detail-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 文章底部标签 */
.post-detail-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.post-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.post-detail-tag {
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.post-detail-tag:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.post-detail-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.post-nav-btn {
  flex: 1;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.post-nav-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.post-nav-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.post-nav-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-nav-btn.next {
  text-align: right;
}

/* ===========================
   归档页
   =========================== */
.archive-page {
  max-width: 800px;
  margin: 0 auto;
  animation: fadeInUp 0.5s ease-out;
}

.page-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.page-subtitle {
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-size: 1rem;
}

.archive-group {
  margin-bottom: 40px;
}

.archive-year {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 16px;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 12px;
}

.archive-year::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.archive-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
}

.archive-item:hover {
  padding-left: 8px;
}

.archive-item:last-child {
  border-bottom: none;
}

.archive-date {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  flex-shrink: 0;
  width: 60px;
}

.archive-item-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: color var(--transition);
}

.archive-item:hover .archive-item-title {
  color: var(--accent);
}

.archive-item-category {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-tertiary);
  flex-shrink: 0;
  margin-left: auto;
}

/* ===========================
   关于页
   =========================== */
.about-page {
  max-width: 720px;
  margin: 0 auto;
  animation: fadeInUp 0.5s ease-out;
}

.about-hero {
  text-align: center;
  margin-bottom: 48px;
}

.about-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin: 0 auto 20px;
}

.about-name {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.about-tagline {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.about-section {
  margin-bottom: 40px;
}

.about-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-section p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.about-skill {
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.about-links {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.about-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.about-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* ===========================
   空状态
   =========================== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-desc {
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

/* ===========================
   回到顶部
   =========================== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  box-shadow: var(--shadow-md);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-2px);
}

/* ===========================
   页脚
   =========================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 24px 32px;
  margin-top: 40px;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-logo {
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-desc {
  font-size: 0.825rem;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  width: 100%;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.footer-copy p {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* ===========================
   动画
   =========================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.2s; }
.post-card:nth-child(5) { animation-delay: 0.25s; }
.post-card:nth-child(6) { animation-delay: 0.3s; }

/* ===========================
   响应式
   =========================== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 12px 16px;
  }

  .nav-menu-btn {
    display: flex;
  }

  .hero-stats {
    gap: 24px;
  }

  .posts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .post-detail-cover {
    height: 200px;
  }

  .post-detail-nav {
    flex-direction: column;
  }

  .post-nav-btn.next {
    text-align: left;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: calc(var(--nav-height) + 24px) 16px 60px;
  }

  .hero {
    padding: 20px 0 32px;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 16px;
  }

  .post-detail-content {
    font-size: 1rem;
  }

  .post-detail-content pre {
    padding: 14px;
    font-size: 0.8rem;
  }
}
