/* ============================================================
   Nova Theme — CSS Design System
   ============================================================ */

:root {
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f3f5;
  --bg-elevated: #e9ecef;
  --border-subtle: rgba(0,0,0,0.04);
  --text-primary: #1a1d20;
  --text-secondary: #495057;
  --text-tertiary: #868e96;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-muted: rgba(59, 130, 246, 0.1);
  --accent-rgb: 59, 130, 246;
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.15);
  --shadow-sm: 0 2px 4px rgba(0,0,0,.02), 0 4px 12px rgba(0,0,0,.04);
  --shadow-md: 0 4px 24px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Fira Code', 'JetBrains Mono', monospace;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 64px;
}

[data-theme="dark"] {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-tertiary: #1c1c1c;
  --bg-elevated: #242424;
  --text-primary: #ededed;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --accent: #3291ff;
  --accent-hover: #52a8ff;
  --accent-muted: rgba(50, 145, 255, 0.12);
  --accent-rgb: 50, 145, 255;
  --accent-gradient: linear-gradient(135deg, #3291ff 0%, #22d3ee 100%);
  --border: rgba(255,255,255,0.09);
  --border-subtle: rgba(255,255,255,0.04);
  --border-hover: rgba(255,255,255,0.16);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.6);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.7);
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#main { flex: 1; padding-top: var(--nav-height); }

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

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

/* ============================================================
   Layout Helpers
   ============================================================ */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  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;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.85);
  transition: background var(--transition), border-color var(--transition);
}

[data-theme="dark"] .nav {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: rgba(255,255,255,0.06);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 0.25rem;
  flex: 1;
}

.nav-link {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--accent);
  background: var(--accent-muted);
}

.nav-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.4rem;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  width: 36px; height: 36px;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

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

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile-link {
  padding: 0.6rem 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}
.nav-mobile-link:last-child { border-bottom: none; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* ============================================================
   Hero / Homepage
   ============================================================ */
.hero {
  padding: 5rem 0 3rem;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-avatar {
  flex-shrink: 0;
}
.hero-avatar img {
  width: 140px; height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.3), var(--shadow-lg);
  animation: breathingGlow 4s ease-in-out infinite;
  transition: transform 0.3s ease;
}
.hero-avatar img:hover {
  transform: rotate(4deg) scale(1.05);
}

@keyframes breathingGlow {
  0%   { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2), 0 0 10px rgba(var(--accent-rgb), 0.1); }
  50%  { box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0.1), 0 0 22px rgba(var(--accent-rgb), 0.25); }
  100% { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2), 0 0 10px rgba(var(--accent-rgb), 0.1); }
}

.hero-info { flex: 1; }

.hero-name {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.hero-name-cn {
  font-size: 1.25rem;
  font-weight: 400;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-tagline {
  margin-top: 0.5rem;
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
}

.hero-bio {
  margin-top: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 520px;
  line-height: 1.8;
}

.hero-meta {
  margin-top: 0.75rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-location {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

.hero-social {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  background: var(--bg-primary);
}
.social-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-muted);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.2);
}
.social-btn:active {
  transform: translateY(0) scale(0.96);
}

@media (max-width: 640px) {
  .hero { padding: 3rem 0 2rem; }
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .hero-avatar img { width: 100px; height: 100px; }
  .hero-name { font-size: 1.75rem; }
}

/* ============================================================
   Sections (Skills, Recent Posts)
   ============================================================ */
.skills-section, .recent-posts-section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  padding-left: 0.875rem;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0; top: 0.2em; bottom: 0.2em;
  width: 3px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

.section-more {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
}
.section-more:hover { color: var(--accent-hover); }

.skills-section .section-title { margin-bottom: 1.5rem; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.skill-group {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.skill-category {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.skill-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--accent-muted);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-mono);
}

/* ============================================================
   Post Cards
   ============================================================ */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.post-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
              box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
              border-color 0.2s ease;
  will-change: transform;
  position: relative;
}

/* Gradient cover strip per card, cycling through 6 palettes */
.post-card::before {
  content: '';
  display: block;
  height: 4px;
  background: var(--accent-gradient);
  transition: height 0.3s ease;
}
.post-card:nth-child(6n+1)::before { background: linear-gradient(90deg, #3b82f6, #06b6d4); }
.post-card:nth-child(6n+2)::before { background: linear-gradient(90deg, #8b5cf6, #ec4899); }
.post-card:nth-child(6n+3)::before { background: linear-gradient(90deg, #10b981, #3b82f6); }
.post-card:nth-child(6n+4)::before { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.post-card:nth-child(6n+5)::before { background: linear-gradient(90deg, #06b6d4, #8b5cf6); }
.post-card:nth-child(6n+6)::before { background: linear-gradient(90deg, #ec4899, #f59e0b); }

.post-card:hover {
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(var(--accent-rgb), 0.12), 0 4px 12px rgba(0,0,0,.06);
  transform: translateY(-6px);
}

.post-card:hover::before { height: 5px; }

.post-card-body { padding: 1.5rem 1.5rem 1rem; flex: 1; }

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.post-date {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.post-category {
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
  background: var(--accent-muted);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.post-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.post-card-title a {
  color: var(--text-primary);
  transition: color var(--transition);
}
.post-card-title a:hover { color: var(--accent); }

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  padding: 0.875rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--bg-tertiary);
}

.post-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.post-tag {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  transition: color var(--transition);
}
.post-tag:hover { color: var(--accent); }

.post-read-more {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  transition: gap var(--transition);
}
.post-read-more:hover { gap: 0.4rem; color: var(--accent-hover); }

/* ============================================================
   Blog CTA
   ============================================================ */
.blog-cta {
  padding: 3rem 0;
  text-align: center;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-md);
}
.cta-btn:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ============================================================
   Blog List Page
   ============================================================ */
.blog-page { padding-bottom: 4rem; }

.blog-header {
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.12);
  margin-bottom: 3rem;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.06) 0%, transparent 100%);
  position: relative;
  overflow: hidden;
}

/* Radial glow behind the title */
.blog-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.15) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

[data-theme="dark"] .blog-header {
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.1) 0%, transparent 100%);
}

[data-theme="dark"] .blog-header::before {
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.25) 0%, transparent 70%);
}

.blog-header-inner {
  position: relative;
  z-index: 1;
}

.blog-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

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

.blog-subtitle {
  margin-top: 0.6rem;
  color: var(--text-tertiary);
  font-size: 1rem;
}

.blog-stats {
  margin-top: 1.25rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.blog-stat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.blog-stat-num {
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
}
.pagination-btn {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}
.pagination-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-muted);
}
.pagination-info {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

/* ============================================================
   Post Article Page
   ============================================================ */
.post-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 3.5rem;
  align-items: start;
}

.post-article { min-width: 0; }

.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.post-header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.post-reading-time {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.post-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.post-header .post-tags { margin-top: 0.75rem; }
.post-header .post-tag {
  padding: 0.25rem 0.7rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.post-header .post-tag:hover { background: var(--accent-muted); color: var(--accent); border-color: var(--accent); }

/* Post Content Typography */
.post-content {
  color: var(--text-primary);
  font-size: 1.0625rem;
  line-height: 1.9;
}

.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
  font-weight: 700;
  line-height: 1.3;
  margin: 2.5rem 0 0.875rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.post-content h1 { font-size: 1.875rem; }
.post-content h2 {
  font-size: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.post-content h2::after {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 2.5rem; height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}
.post-content h3 { font-size: 1.2rem; }
.post-content h4 { font-size: 1.05rem; }

.post-content p { margin: 1.25rem 0; }

.post-content a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  background: linear-gradient(to right, var(--accent), var(--accent)) no-repeat;
  background-size: 0 2px;
  background-position: left bottom;
  padding-bottom: 1px;
  transition: background-size 0.3s ease, color var(--transition);
}
.post-content a:hover {
  color: var(--accent-hover);
  background-size: 100% 2px;
}

.post-content ul, .post-content ol { margin: 1.25rem 0; padding-left: 1.75rem; }
.post-content li { margin: 0.4rem 0; }

.post-content blockquote {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background: var(--accent-muted);
  border-left: none;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  color: var(--text-secondary);
  font-style: italic;
  position: relative;
}
.post-content blockquote::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent-gradient);
  border-radius: 4px 0 0 4px;
}
.post-content blockquote p { margin: 0; }

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-tertiary);
  padding: 0.18em 0.45em;
  border-radius: var(--radius-sm);
  color: var(--accent);
  border: 1px solid var(--border);
}

/* Hexo highlight.js code blocks */
.post-content figure.highlight {
  position: relative;
  margin: 2rem 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  font-family: var(--font-mono);
  background: var(--bg-secondary);
}

/* Language label top-right via ::before */
.post-content figure.highlight::before {
  content: "CODE";
  position: absolute;
  top: 0; right: 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  line-height: 2.5rem;
  z-index: 3;
  pointer-events: none;
}
.post-content figure.highlight.javascript::before,
.post-content figure.highlight.js::before    { content: "JS"; }
.post-content figure.highlight.typescript::before,
.post-content figure.highlight.ts::before    { content: "TS"; }
.post-content figure.highlight.html::before  { content: "HTML"; }
.post-content figure.highlight.css::before   { content: "CSS"; }
.post-content figure.highlight.python::before,
.post-content figure.highlight.py::before    { content: "Python"; }
.post-content figure.highlight.java::before  { content: "Java"; }
.post-content figure.highlight.bash::before,
.post-content figure.highlight.sh::before    { content: "Shell"; }
.post-content figure.highlight.json::before  { content: "JSON"; }
.post-content figure.highlight.yaml::before,
.post-content figure.highlight.yml::before   { content: "YAML"; }
.post-content figure.highlight.go::before    { content: "Go"; }
.post-content figure.highlight.rust::before  { content: "Rust"; }
.post-content figure.highlight.cpp::before,
.post-content figure.highlight.c::before     { content: "C/C++"; }
.post-content figure.highlight.sql::before   { content: "SQL"; }
.post-content figure.highlight.ejs::before   { content: "EJS"; }

/* figcaption (optional filename) */
.post-content figure.highlight figcaption {
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-tertiary);
  padding-right: 4rem;
}

/* Table: flex row so gutter + code sit side by side */
.post-content figure.highlight table {
  display: flex;
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.post-content figure.highlight tbody {
  display: flex;
  width: 100%;
}
.post-content figure.highlight tr {
  display: flex;
  width: 100%;
}
.post-content figure.highlight td {
  padding: 0;
  border: none;
  background: none;
  display: flex;
}

/* Scrollbar */
.post-content figure.highlight table::-webkit-scrollbar { height: 6px; }
.post-content figure.highlight table::-webkit-scrollbar-track { background: transparent; }
.post-content figure.highlight table::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 3px;
}

/* Gutter (line numbers) */
.post-content figure.highlight .gutter {
  flex-shrink: 0;
  padding: 1.25rem 0.75rem;
  text-align: right;
  background: var(--bg-tertiary);
  border-right: 1px solid var(--border);
  user-select: none;
  -webkit-user-select: none;
}
.post-content figure.highlight .gutter pre {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-tertiary);
}

/* Code area */
.post-content figure.highlight .code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding: 1.25rem 1.5rem;
  background: var(--bg-secondary);
}
.post-content figure.highlight .code pre {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre;
}

/* Neutralise the <br> Hexo injects after each line */
.post-content figure.highlight .line br { display: none; }

/* Dark mode */
[data-theme="dark"] .post-content figure.highlight {
  background: #000000;
  border-color: rgba(255,255,255,0.06);
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}
[data-theme="dark"] .post-content figure.highlight .gutter {
  background: #0a0a0a;
  border-right-color: rgba(255,255,255,0.06);
  color: #4b5563;
}
[data-theme="dark"] .post-content figure.highlight .code { background: #000000; }
[data-theme="dark"] .post-content figure.highlight .code pre { color: #e4e4e7; }
[data-theme="dark"] .post-content figure.highlight figcaption {
  background: #0a0a0a;
  border-bottom-color: rgba(255,255,255,0.06);
}

/* Plain pre/code (no highlight wrapper) */
.post-content pre {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
}
.post-content pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
  font-size: inherit;
  border: none;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.post-content th, .post-content td {
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
}
.post-content th {
  background: var(--bg-tertiary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
.post-content tr:nth-child(even) td { background: var(--bg-tertiary); }
.post-content tr:hover td { background: var(--accent-muted); }

.post-content img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin: 2rem auto;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Post Footer Nav */
.post-footer { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}
.post-nav-item:hover {
  border-color: var(--accent);
  background: var(--accent-muted);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.1);
}
.post-nav-next { text-align: right; }

.post-nav-label { font-size: 0.72rem; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; }
.post-nav-title { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); line-height: 1.4; }

/* TOC Sidebar */
.post-toc {
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
  max-height: calc(100vh - var(--nav-height) - 4rem);
  overflow-y: auto;
}

.toc-inner {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
}

.toc-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.post-toc .toc { list-style: none; padding: 0; }
.post-toc .toc li { margin: 0.15rem 0; }
.post-toc .toc a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: block;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  line-height: 1.5;
  border-left: 2px solid transparent;
}
.post-toc .toc a:hover {
  color: var(--accent);
  background: var(--accent-muted);
  border-left-color: var(--accent);
}
.post-toc .toc a.active {
  color: var(--accent);
  background: var(--accent-muted);
  border-left-color: var(--accent);
  font-weight: 600;
}
.post-toc .toc-level-2 { padding-left: 0.75rem; }
.post-toc .toc-level-3 { padding-left: 1.5rem; }

@media (max-width: 900px) {
  .post-layout { grid-template-columns: 1fr; gap: 2rem; }
  .post-toc { display: none; }
  .post-title { font-size: 1.75rem; }
}

/* ============================================================
   Projects Page
   ============================================================ */
.projects-page { padding-bottom: 4rem; }

.projects-header {
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.12);
  margin-bottom: 3rem;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.06) 0%, transparent 100%);
  position: relative;
  overflow: hidden;
}
.projects-header::before {
  content: '';
  position: absolute;
  top: -50%; left: 50%;
  transform: translateX(-50%);
  width: 60%; height: 200%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.15) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
[data-theme="dark"] .projects-header {
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.08) 0%, transparent 100%);
}
.projects-header-inner { position: relative; z-index: 1; }

.projects-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.projects-title-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.projects-subtitle {
  margin-top: 0.6rem;
  color: var(--text-tertiary);
  font-size: 1rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(var(--accent-rgb), 0.12);
}

.project-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.project-icon { color: var(--accent); flex-shrink: 0; }
.project-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  font-family: var(--font-mono);
}
.project-arrow {
  color: var(--text-tertiary);
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}
.project-card:hover .project-arrow {
  transform: translate(2px, -2px);
  color: var(--accent);
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
  margin: 0;
}

.project-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.project-users {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  margin-right: 0.25rem;
}

.project-stars {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  margin-left: auto;
  margin-right: 0.25rem;
}

.project-card-featured {
  border-color: rgba(var(--accent-rgb), 0.3);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(var(--accent-rgb), 0.04) 100%);
}
.project-card-featured:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(var(--accent-rgb), 0.18);
}

.project-lang {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-tertiary);
}
.project-lang-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.project-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.project-tag {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  background: var(--accent-muted);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-weight: 500;
}

/* ============================================================
   Static Page
   ============================================================ */
.page-layout {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.page-header { margin-bottom: 2rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }

.page-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  background: var(--bg-secondary);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}
.footer-copy a { color: var(--text-tertiary); }
.footer-copy a:hover { color: var(--accent); }

.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.footer-social a:hover { color: var(--accent); }

/* ============================================================
   Scrollbar
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* ============================================================
   Selection
   ============================================================ */
::selection { background: var(--accent-muted); color: var(--accent); }

/* ============================================================
   Academic Homepage Layout
   ============================================================ */
.academic-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem clamp(1.25rem, 5vw, 3rem) 5rem;
  display: flex;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: flex-start;
  position: relative;
}

/* Decorative blurred blobs behind the academic layout */
.academic-wrapper::before,
.academic-wrapper::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.07;
  pointer-events: none;
  z-index: -1;
}
.academic-wrapper::before {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #3b82f6, #06b6d4);
  top: 10%; left: -10%;
  animation: blobFloat 12s ease-in-out infinite;
}
.academic-wrapper::after {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #8b5cf6, #ec4899);
  bottom: 10%; right: -5%;
  animation: blobFloat 16s ease-in-out infinite reverse;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -20px) scale(1.05); }
  66%       { transform: translate(-20px, 15px) scale(0.97); }
}

[data-theme="dark"] .academic-wrapper::before,
[data-theme="dark"] .academic-wrapper::after {
  opacity: 0.12;
}

/* Sidebar */
.academic-sidebar {
  width: 240px;
  flex-shrink: 0;
}

.profile-sticky {
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
}

.profile-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 1.25rem;
  box-shadow: 0 0 0 4px var(--bg-secondary), 0 0 0 6px var(--border), var(--shadow-lg);
  animation: breathingGlow 4s ease-in-out infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.profile-avatar:hover {
  transform: scale(1.03) rotate(2deg);
  box-shadow: 0 0 0 4px var(--bg-secondary), 0 0 0 6px var(--accent), var(--shadow-lg);
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin: 0 0 0.2rem;
  line-height: 1.2;
}

.profile-name-cn {
  text-align: center;
  font-size: 0.95rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin: 0 0 0.4rem;
}

.profile-tagline {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.profile-meta {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.profile-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin: 0;
}
.profile-meta-item svg { flex-shrink: 0; color: var(--text-tertiary); }

.profile-social {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  font-weight: 500;
}
.social-link:hover {
  color: var(--accent);
  background: var(--accent-muted);
}

.social-link-cv {
  margin-top: 0.5rem;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 0.45rem 0.75rem;
}
.social-link-cv:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* Main content */
.academic-content {
  flex: 1;
  min-width: 0;
}

.ac-section {
  margin-bottom: 3rem;
}

.ac-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.ac-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.ac-section-header .ac-section-title { margin-bottom: 0; }

.ac-section-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 3rem;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

.ac-more-link {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
}

.ac-bio p {
  color: var(--text-secondary);
  line-height: 1.85;
  margin: 0 0 0.75rem;
  font-size: 0.975rem;
}

/* Skills */
.ac-skills { display: flex; flex-direction: column; gap: 0.6rem; }

.ac-skill-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ac-skill-cat {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: 60px;
  flex-shrink: 0;
}

.ac-skill-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.ac-skill-tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.ac-skill-tag:hover {
  background: var(--accent-muted);
  color: var(--accent);
  border-color: var(--accent);
}

/* Post list */
.ac-post-list { display: flex; flex-direction: column; gap: 0; }

.ac-post-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.ac-post-item:last-child { border-bottom: none; }

.ac-post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.ac-post-date {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.ac-post-cat {
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  background: var(--accent-muted);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-weight: 500;
}

.ac-post-title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  transition: color var(--transition);
  text-decoration: none;
  background: none;
}
.ac-post-title:hover { color: var(--accent); background: none; }

.ac-post-excerpt {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin: 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Education */
.ac-edu-list { display: flex; flex-direction: column; gap: 0.75rem; }

.ac-edu-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  align-items: flex-start;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.ac-edu-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent-gradient);
}
.ac-edu-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.1);
}

/* Logo container — works for both emoji and <img> */
.ac-edu-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  overflow: hidden;
  margin-top: 0.1rem;
}

.ac-edu-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

/* Keep white bg in dark mode so dark logos stay visible */
[data-theme="dark"] .ac-edu-icon {
  background: #ffffff;
  border-color: rgba(255,255,255,0.1);
}

.ac-edu-body { flex: 1; min-width: 0; }

.ac-edu-header {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}

.ac-edu-school {
  font-weight: 700;
  font-size: 0.975rem;
  color: var(--text-primary);
}

.ac-edu-school-en {
  font-size: 0.825rem;
  color: var(--text-tertiary);
}

.ac-edu-period {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  white-space: nowrap;
  background: var(--bg-tertiary);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}

.ac-edu-detail {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .academic-wrapper {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 1.25rem 3rem;
  }
  .academic-sidebar { width: 100%; }
  .profile-sticky { position: static; }
  .profile-social { flex-direction: row; flex-wrap: wrap; }
  .social-link { flex: 1; min-width: 120px; justify-content: center; }
  .social-link-cv { flex: 100%; }
}

/* ============================================================
   Unified Dark Mode Overrides
   ============================================================ */

/* Cards */
[data-theme="dark"] .post-card {
  background: var(--bg-secondary);
  border-color: var(--border);
}
[data-theme="dark"] .post-card:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-hover);
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}
[data-theme="dark"] .post-card-footer {
  background: var(--bg-tertiary);
  border-top-color: var(--border);
}

/* TOC */
[data-theme="dark"] .toc-inner {
  background: var(--bg-secondary);
  border-color: var(--border);
}

/* Post nav items */
[data-theme="dark"] .post-nav-item {
  background: var(--bg-secondary);
  border-color: var(--border);
}
[data-theme="dark"] .post-nav-item:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-hover);
}

/* Academic sidebar */
[data-theme="dark"] .academic-sidebar .profile-card {
  background: var(--bg-secondary);
  border-color: var(--border);
}
[data-theme="dark"] .social-link {
  background: var(--bg-tertiary);
  border-color: var(--border);
}
[data-theme="dark"] .social-link:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
}

/* Education cards */
[data-theme="dark"] .ac-edu-item {
  background: var(--bg-secondary);
  border-color: var(--border);
}
[data-theme="dark"] .ac-edu-item:hover {
  border-color: var(--accent);
  background: var(--bg-tertiary);
}

/* Skills */
[data-theme="dark"] .skill-tag {
  background: var(--bg-tertiary);
  border-color: var(--border);
  color: var(--text-secondary);
}

/* Blog header glow — more subtle on dark */
[data-theme="dark"] .blog-header {
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.08) 0%, transparent 100%);
}
[data-theme="dark"] .blog-header::before {
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.18) 0%, transparent 70%);
}

/* Inline code */
[data-theme="dark"] .post-content code {
  background: #1c1c1c;
  border-color: rgba(255,255,255,0.08);
  color: #93c5fd;
}

/* Blockquote */
[data-theme="dark"] .post-content blockquote {
  background: rgba(50, 145, 255, 0.06);
  color: var(--text-secondary);
}

/* Tables */
[data-theme="dark"] .post-content th {
  background: var(--bg-tertiary);
}
[data-theme="dark"] .post-content tr:nth-child(even) td {
  background: rgba(255,255,255,0.02);
}
[data-theme="dark"] .post-content tr:hover td {
  background: rgba(50, 145, 255, 0.06);
}

/* Footer */
[data-theme="dark"] .footer {
  background: var(--bg-secondary);
  border-top-color: var(--border);
}

/* Pagination */
[data-theme="dark"] .page-number,
[data-theme="dark"] .prev,
[data-theme="dark"] .next {
  background: var(--bg-secondary);
  border-color: var(--border);
  color: var(--text-secondary);
}
[data-theme="dark"] .page-number:hover,
[data-theme="dark"] .prev:hover,
[data-theme="dark"] .next:hover,
[data-theme="dark"] .page-number.current {
  background: var(--bg-tertiary);
  border-color: var(--accent);
  color: var(--accent);
}
