/**
 * 摸鱼观察室博客 - 极简现代扁平化风格 (Minimal Modern Flat)
 * Cyan-600 主色 + 白底卡片 + 大留白 + 微阴影
 * Design System: Minimal Modern Flat
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* 背景 */
  --bg-primary: #FAFBFC;
  --bg-secondary: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FFFFFF;

  /* 品牌配色 */
  --color-primary: #0891B2;
  --color-primary-light: #22D3EE;
  --color-cta: #22C55E;
  --color-cta-light: #DCFCE7;

  /* 文字颜色 */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  /* 边框 */
  --border-color: #E2E8F0;
  --border-light: #F1F5F9;

  /* 间距 */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 5rem;

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.08);

  /* 过渡 */
  --transition: 0.2s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* 滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

::selection {
  background: #CFFAFE;
  color: var(--color-primary);
}

/* ===== Navigation ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
}

.nav-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  transition: color var(--transition);
}

.logo:hover { color: var(--color-primary); }

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.375rem 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--color-primary);
  background: #ECFEFF;
}

.nav-link.active {
  color: var(--color-primary);
  background: #ECFEFF;
  font-weight: 600;
}

/* ===== Hero ===== */
.blog-hero {
  padding: var(--space-4xl) var(--space-xl) var(--space-3xl);
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-title {
  font-family: 'Inter', sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  font-weight: 400;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-number {
  font-family: 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== Divider ===== */
.divider {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}
.divider::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--border-light);
}

/* ===== Filter Bar ===== */
.filter-bar {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

.filter-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Inter', sans-serif;
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* ===== Search ===== */
.search-container {
  max-width: 480px;
  margin: 0 auto var(--space-xl);
  padding: 0 var(--space-xl);
}

.search-box { position: relative; }

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  transition: all var(--transition);
}

.search-input::placeholder { color: var(--text-muted); }

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px #ECFEFF;
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* ===== Posts Grid ===== */
.posts-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-xl) var(--space-3xl);
}

.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  font-family: 'Inter', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
}

.section-icon { color: var(--color-primary); }

.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: var(--shadow-sm);
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-primary-light);
}

.post-card.pinned {
  border: 2px solid #CFFAFE;
}

.post-card.pinned::before {
  content: '\u{1F4CC} \u7F6E\u9876';
  display: inline-block;
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0.25rem 0.625rem;
  background: var(--color-primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  z-index: 1;
}

.post-card.pinned { position: relative; }

.post-cover {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 2.5rem;
}

.post-content {
  padding: var(--space-lg);
}

.post-category {
  display: inline-block;
  padding: 0.2rem 0.625rem;
  background: #ECFEFF;
  color: var(--color-primary);
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

.post-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.post-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

.page-btn {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Inter', sans-serif;
}

.page-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.page-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* ===== Post Detail ===== */
.post-detail {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
}

.post-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.post-header .post-category { margin-bottom: var(--space-md); }

.post-header-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.post-header-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.post-tags {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.post-tag {
  padding: 0.25rem 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-decoration: none;
  transition: all var(--transition);
}

.post-tag:hover {
  background: #ECFEFF;
  color: var(--color-primary);
}

.post-cover-full {
  width: 100%;
  margin: 0 auto var(--space-2xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.post-cover-full img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Post Content (Markdown) ===== */
.post-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

.post-content {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  line-height: 1.4;
}

.post-content h1 { font-size: 1.6rem; }
.post-content h2 {
  font-size: 1.375rem;
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-light);
}
.post-content h3 { font-size: 1.125rem; }
.post-content p { margin-bottom: var(--space-lg); }

.post-content a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px dashed var(--color-primary);
  transition: all var(--transition);
}

.post-content a:hover { border-bottom-style: solid; }

.post-content blockquote {
  margin: var(--space-xl) 0;
  padding: var(--space-md) var(--space-lg);
  background: #ECFEFF;
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
  font-style: normal;
}

.post-content ul, .post-content ol {
  margin-bottom: var(--space-lg);
  padding-left: var(--space-xl);
}

.post-content li { margin-bottom: var(--space-sm); }

.post-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875em;
  padding: 0.15em 0.4em;
  background: var(--bg-secondary);
  border-radius: 4px;
  color: var(--color-primary);
}

.post-content pre {
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

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

/* Code block */
.code-block {
  margin: var(--space-xl) 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
}

.code-lang {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}

.code-copy-btn {
  padding: 0.25rem 0.625rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Inter', sans-serif;
}

.code-copy-btn:hover {
  background: #ECFEFF;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.code-copy-btn.copied {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.code-content {
  padding: var(--space-md);
  background: var(--bg-secondary);
  overflow-x: auto;
}

.code-content pre { margin: 0; padding: 0; background: none; border: none; border-radius: 0; }

/* Syntax highlighting - 柔和配色 */
.hl-keyword { color: #7C3AED; font-weight: 500; }
.hl-string { color: #059669; }
.hl-comment { color: var(--text-muted); font-style: italic; }
.hl-number { color: #D97706; }
.hl-function { color: var(--color-primary); }

.post-content table {
  width: 100%;
  margin: var(--space-xl) 0;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.post-content th, .post-content td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

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

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
}

.post-content hr {
  margin: var(--space-2xl) 0;
  border: none;
  height: 1px;
  background: var(--border-light);
}

/* ===== TOC ===== */
.toc-sidebar { display: none; }

/* ===== Share ===== */
.share-section {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
}

.share-title { font-size: 0.8rem; color: var(--text-muted); margin-bottom: var(--space-sm); }

.share-btn {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Inter', sans-serif;
}

.share-btn:hover {
  background: #ECFEFF;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ===== Author Box ===== */
.author-box {
  margin-top: var(--space-2xl);
  padding: var(--space-xl);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.author-info h4 {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.author-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ===== Post Nav ===== */
.post-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-light);
}

.post-nav-item {
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition);
}

.post-nav-item:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-sm);
}

.post-nav-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.post-nav-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== Related ===== */
.related-posts { margin-top: var(--space-2xl); }
.related-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

/* ===== Category / Tag Pages ===== */
.category-header {
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
}
.category-icon { font-size: 2.5rem; margin-bottom: var(--space-sm); }
.category-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}
.category-count { color: var(--text-muted); font-size: 0.875rem; }

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  padding: var(--space-xl);
}

.tag-cloud-item {
  padding: 0.375rem 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: all var(--transition);
}

.tag-cloud-item:hover {
  background: #ECFEFF;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ===== About ===== */
.about-page {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
}

.about-avatar {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin: 0 auto var(--space-xl);
}

.about-name {
  font-family: 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.about-bio {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.about-social {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

.social-link {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1.1rem;
  transition: all var(--transition);
}

.social-link:hover {
  background: #ECFEFF;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: var(--space-2xl) var(--space-xl) var(--space-xl);
  margin-top: var(--space-3xl);
}

.footer-container {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-xl);
}

.footer-brand .logo { margin-bottom: var(--space-sm); }
.footer-brand p { color: var(--text-muted); font-size: 0.8rem; }

.footer-links h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.footer-links a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  padding: 0.2rem 0;
  transition: color var(--transition);
}

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

.footer-bottom {
  max-width: 720px;
  margin: var(--space-xl) auto 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.back-to-top.visible { opacity: 1; visibility: visible; }

.back-to-top:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: var(--space-sm) var(--space-lg);
  color: var(--text-primary);
  font-size: 0.85rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 1000;
  box-shadow: var(--shadow-hover);
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

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

.post-card {
  opacity: 0;
  animation: fadeInUp 0.4s ease forwards;
}
.post-card:nth-child(1) { animation-delay: 0s; }
.post-card:nth-child(2) { animation-delay: 0.06s; }
.post-card:nth-child(3) { animation-delay: 0.12s; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-title { font-size: 1.75rem; }
  .hero-stats { gap: var(--space-md); }
  .stat-number { font-size: 1.25rem; }
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .footer-container { grid-template-columns: 1fr; text-align: center; gap: var(--space-lg); }
  .post-header-title { font-size: 1.5rem; }
  .author-box { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.5rem; }
  .filter-bar { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: var(--space-sm); }
  .filter-btn { flex-shrink: 0; font-size: 0.75rem; padding: 0.375rem 0.75rem; }
  .post-content { font-size: 0.875rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

[hidden] { display: none !important; }
@media(max-width:768px) { .header .nav-links { display:flex; flex-wrap:wrap; } .header .nav-container { flex-wrap:wrap; height:auto; } }

/* ===== 基础重置与离线可用样式 ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #FAFBFC;
  color: #0F172A;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ===== 导航栏 ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid #F1F5F9;
  padding: 0 24px;
}
.nav-container {
  max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: #0F172A; font-family: 'Inter', sans-serif; }
.logo-icon { font-size: 20px; }
.nav-links { display: flex; gap: 4px; }
.nav-link {
  padding: 6px 12px; border-radius: 9999px; font-size: 13px; font-weight: 500;
  color: #475569; transition: all 0.2s;
}
.nav-link:hover { color: #0891B2; background: #ECFEFF; }
.nav-link.active { color: #0891B2; background: #ECFEFF; font-weight: 600; }

/* ===== 页脚 ===== */
.footer {
  background: #F8FAFC; border-top: 1px solid #F1F5F9;
  padding: 40px 24px 20px; margin-top: 48px;
}
.footer-container {
  max-width: 720px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px;
}
.footer-logo { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: #0F172A; font-family: 'Inter', sans-serif; }
.footer-brand p { color: #94A3B8; font-size: 13px; }
.footer-links h4 { color: #0F172A; margin-bottom: 12px; font-size: 13px; font-weight: 600; font-family: 'Inter', sans-serif; }
.footer-links a { display: block; color: #94A3B8; font-size: 13px; padding: 3px 0; transition: color 0.2s; }
.footer-links a:hover { color: #0891B2; }
.footer-bottom {
  max-width: 720px; margin: 24px auto 0; padding-top: 16px;
  border-top: 1px solid #F1F5F9; text-align: center;
}
.footer-bottom p { color: #94A3B8; font-size: 12px; }

/* ===== 容器 ===== */
.container { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ===== 代码块 ===== */
.code-block {
  background: #F8FAFC; border-radius: 12px; margin: 24px 0;
  overflow: hidden; border: 1px solid #E2E8F0;
}
.code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; background: #F8FAFC; border-bottom: 1px solid #F1F5F9;
}
.code-lang { font-size: 11px; color: #94A3B8; font-family: 'JetBrains Mono', monospace; text-transform: uppercase; }
.code-copy-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 10px; border: 1px solid #E2E8F0; border-radius: 8px;
  background: #fff; color: #475569; font-size: 11px; cursor: pointer;
  transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.code-copy-btn:hover { background: #ECFEFF; color: #0891B2; border-color: #0891B2; }
.code-body { display: flex; overflow-x: auto; }
.code-line-numbers {
  padding: 16px 0; min-width: 40px; text-align: right;
  color: #94A3B8; font-family: 'JetBrains Mono', monospace; font-size: 12px;
  line-height: 1.7; user-select: none; border-right: 1px solid #F1F5F9;
  padding-right: 10px; padding-left: 10px;
}
.code-line-number { display: block; }
.code-content {
  padding: 16px; flex: 1; overflow-x: auto;
  font-family: 'JetBrains Mono', monospace; font-size: 12px; line-height: 1.7;
  color: #0F172A;
}
.code-content code { font-family: inherit; }

/* 语法高亮颜色 - 柔和 */
.hl-keyword { color: #7C3AED; font-weight: 500; }
.hl-string { color: #059669; }
.hl-comment { color: #94A3B8; font-style: italic; }
.hl-number { color: #D97706; }
.hl-function { color: #0891B2; }

/* ===== 文章正文样式 ===== */
.post-content { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
  margin: 2em 0 0.8em; font-weight: 700; line-height: 1.4; color: #0F172A;
  font-family: 'Inter', sans-serif;
}
.post-content h1 { font-size: 1.6em; }
.post-content h2 { font-size: 1.375em; border-bottom: 1px solid #F1F5F9; padding-bottom: 0.3em; }
.post-content h3 { font-size: 1.125em; }
.post-content p { margin: 1em 0; color: #475569; font-size: 0.9375rem; }
.post-content a { color: #0891B2; text-decoration: none; border-bottom: 1px dashed #0891B2; }
.post-content a:hover { border-bottom-style: solid; }
.post-content ul, .post-content ol { margin: 1em 0; padding-left: 2em; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin: 0.5em 0; }
.post-content blockquote {
  border-left: 3px solid #0891B2; padding: 12px 20px; margin: 1.5em 0;
  background: #ECFEFF; border-radius: 0 12px 12px 0;
  color: #475569;
}
.post-content blockquote p { margin: 0.5em 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.post-content th, .post-content td {
  border: 1px solid #F1F5F9; padding: 10px 14px; text-align: left;
}
.post-content th { background: #F8FAFC; font-weight: 600; color: #0F172A; }
.post-content tr:nth-child(even) { background: #F8FAFC; }
.post-content img { border-radius: 12px; margin: 1.5em 0; }
.post-content hr { border: none; border-top: 1px solid #F1F5F9; margin: 2em 0; }
.post-content code {
  background: #F8FAFC; padding: 2px 6px; border-radius: 4px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.875em; color: #0891B2;
}
.post-content pre code { background: none; padding: 0; color: #0F172A; }
.post-content input[type="checkbox"] { margin-right: 8px; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .nav-links { gap: 0; }
  .nav-link { padding: 6px 10px; font-size: 12px; }
  .footer-container { grid-template-columns: 1fr; gap: 24px; }
  .post-content { padding: 0 16px; }
}
