/* ============================================================
   贤言碎语 Blog — Complete Stylesheet
   ============================================================ */

/* ---------- CSS Variables (Light Theme) ---------- */
:root {
  --accent:        #c0503a;
  --accent-light:  #e8c4bb;
  --accent-dark:   #a03e2c;
  --bg:            #faf9f7;
  --bg-card:       #ffffff;
  --bg-hover:      #f5f3f0;
  --text-primary:  #1a1a1a;
  --text-secondary:#555;
  --text-muted:    #888;
  --border:        #e8e4de;
  --border-light:  #f0ece6;
  --shadow-sm:     0 1px 4px rgba(0,0,0,.06);
  --shadow-md:     0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.10);
  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --font-serif:    'Noto Serif SC', 'Source Han Serif SC', Georgia, serif;
  --font-sans:     'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  --max-width:     1100px;
  --nav-h:         64px;
  --transition:    0.22s cubic-bezier(.4,0,.2,1);
}

/* ---------- Dark Theme ---------- */
[data-theme="dark"] {
  --accent:        #e07060;
  --accent-light:  #5a2a22;
  --accent-dark:   #f09080;
  --bg:            #141414;
  --bg-card:       #1e1e1e;
  --bg-hover:      #252525;
  --text-primary:  #f0ede8;
  --text-secondary:#aaa;
  --text-muted:    #666;
  --border:        #2e2e2e;
  --border-light:  #282828;
  --shadow-sm:     0 1px 4px rgba(0,0,0,.3);
  --shadow-md:     0 4px 16px rgba(0,0,0,.4);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.5);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }

/* ---------- Progress Bar ---------- */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  width: 0%; z-index: 9999; transition: width .1s linear;
  border-radius: 0 2px 2px 0;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  background: rgba(250,249,247,.92);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  transition: all var(--transition);
}
[data-theme="dark"] .navbar { background: rgba(20,20,20,.92); }
.navbar.scrolled { box-shadow: var(--shadow-md); }

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto; padding: 0 24px;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex; flex-direction: column; line-height: 1.2;
  flex-shrink: 0;
}
.logo-cn {
  font-family: var(--font-serif);
  font-size: 1.25rem; font-weight: 600;
  color: var(--accent);
  letter-spacing: .05em;
}
.logo-sub {
  font-size: .65rem; color: var(--text-muted);
  letter-spacing: .1em;
}

.nav-links {
  display: flex; align-items: center; gap: 4px;
  flex: 1; justify-content: center;
}
.nav-link {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .9rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  font-weight: 400;
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-link.active { color: var(--accent); background: var(--accent-light); font-weight: 500; }

.nav-actions { display: flex; align-items: center; gap: 4px; }
.btn-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-icon svg { width: 18px; height: 18px; }

/* Theme toggle icons */
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"]  .icon-sun  { display: none; }

.nav-hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  border-radius: 50%;
}
.nav-hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
.search-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: none; align-items: flex-start; justify-content: center;
  padding-top: 80px;
  animation: fadeIn .15s ease;
}
.search-overlay.open { display: flex; }

.search-modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: min(640px, 92vw);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.search-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.search-header svg { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; }
#searchInput {
  flex: 1; border: none; outline: none;
  background: transparent;
  font-size: 1rem; color: var(--text-primary);
  font-family: var(--font-sans);
}
#searchClose {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-hover); color: var(--text-muted);
  font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
#searchClose:hover { background: var(--accent); color: #fff; }

.search-results { max-height: 380px; overflow-y: auto; }
.search-result-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}
.search-result-item:hover { background: var(--bg-hover); }
.search-result-item:last-child { border-bottom: none; }
.search-result-title { font-size: .95rem; font-weight: 500; margin-bottom: 4px; }
.search-result-meta { font-size: .8rem; color: var(--text-muted); }
.search-no-result { padding: 40px 20px; text-align: center; color: var(--text-muted); }

.search-hint {
  padding: 10px 20px;
  font-size: .78rem; color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  text-align: right;
}
kbd {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: .75rem;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  margin-top: var(--nav-h);
  padding: 80px 24px 64px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--accent-light) 50%, var(--bg) 100%);
  position: relative; overflow: hidden;
  text-align: center;
}
[data-theme="dark"] .hero {
  background: linear-gradient(135deg, var(--bg) 0%, #3a1a14 50%, var(--bg) 100%);
}
.hero-deco {
  position: absolute; top: -60px; right: -60px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
  opacity: .5;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block;
  padding: 4px 14px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 20px;
  font-size: .8rem;
  letter-spacing: .1em;
  margin-bottom: 20px;
  font-weight: 500;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: .08em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.8;
}
.hero-stats {
  display: inline-flex; align-items: center; gap: 0;
  background: var(--bg-card);
  border-radius: 40px;
  padding: 12px 28px;
  box-shadow: var(--shadow-md);
  gap: 24px;
}
.stat-item { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.5rem; font-weight: 700;
  color: var(--accent);
}
.stat-label { font-size: .75rem; color: var(--text-muted); }
.stat-divider { width: 1px; height: 32px; background: var(--border); }

/* ============================================================
   LAYOUT
   ============================================================ */
.main-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.section { margin-bottom: 60px; }
.section-header {
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  margin-bottom: 28px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 1.3rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.title-dot { color: var(--accent); font-size: .7rem; }

.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* ============================================================
   FEATURED GRID
   ============================================================ */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.featured-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative; overflow: hidden;
  cursor: pointer;
}
.featured-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
}
.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-light);
}
.featured-badge {
  display: inline-block; margin-bottom: 12px;
  padding: 2px 10px;
  background: var(--accent-light); color: var(--accent);
  border-radius: 12px; font-size: .72rem; font-weight: 500;
}
.featured-title {
  font-family: var(--font-serif);
  font-size: 1.1rem; font-weight: 600;
  line-height: 1.5; margin-bottom: 10px;
  color: var(--text-primary);
}
.featured-excerpt {
  font-size: .88rem; color: var(--text-secondary);
  line-height: 1.7; margin-bottom: 16px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.featured-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: .78rem; color: var(--text-muted);
  flex-wrap: wrap;
}
.meta-dot { color: var(--border); }

/* ============================================================
   FILTER TAGS
   ============================================================ */
.filter-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.filter-tag {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: .82rem;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-card);
  transition: all var(--transition);
  cursor: pointer;
}
.filter-tag:hover { border-color: var(--accent); color: var(--accent); }
.filter-tag.active {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
}

/* ============================================================
   ARTICLE LIST (Card style)
   ============================================================ */
.article-list { display: flex; flex-direction: column; gap: 20px; }
.article-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 24px 28px;
  display: flex; gap: 24px;
  transition: all var(--transition);
  cursor: pointer;
}
.article-card:hover {
  border-color: var(--accent-light);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}
.article-card-left { flex: 1; min-width: 0; }
.article-card-date {
  font-size: .78rem; color: var(--text-muted);
  margin-bottom: 8px; letter-spacing: .05em;
}
.article-card-title {
  font-family: var(--font-serif);
  font-size: 1.1rem; font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5; margin-bottom: 10px;
  transition: color var(--transition);
}
.article-card:hover .article-card-title { color: var(--accent); }
.article-card-excerpt {
  font-size: .88rem; color: var(--text-secondary);
  line-height: 1.7; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card-meta {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.article-tag {
  padding: 2px 10px;
  border-radius: 12px;
  font-size: .75rem;
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.article-card:hover .article-tag { background: var(--accent-light); color: var(--accent); border-color: var(--accent-light); }
.article-read-time {
  font-size: .78rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.article-card-num {
  font-family: var(--font-serif);
  font-size: 2.8rem; font-weight: 700;
  color: var(--border);
  flex-shrink: 0; align-self: center;
  user-select: none;
  line-height: 1;
}

.load-more-wrap { text-align: center; margin-top: 32px; }
.btn-load-more {
  padding: 10px 36px;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  font-size: .9rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  transition: all var(--transition);
}
.btn-load-more:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 84px; }
.sidebar-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 20px;
}
.sidebar-title {
  font-family: var(--font-serif);
  font-size: .95rem; font-weight: 600;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.sidebar-author { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.author-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.2rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.author-name { font-size: .95rem; font-weight: 600; margin-bottom: 4px; }
.author-bio { font-size: .8rem; color: var(--text-muted); line-height: 1.5; }

.btn-outline {
  display: block; text-align: center;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: .82rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
  padding: 4px 12px;
  border-radius: 14px;
  font-size: .78rem;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.tag-chip:hover { background: var(--accent-light); color: var(--accent); border-color: var(--accent-light); }
.tag-chip .tag-count { color: var(--accent); margin-left: 4px; font-weight: 600; }

.recent-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.recent-item a {
  display: block;
  font-size: .85rem;
  color: var(--text-secondary);
  transition: color var(--transition);
  line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.recent-item a:hover { color: var(--accent); }
.recent-item-date { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }

.newsletter-card { background: linear-gradient(135deg, var(--bg-card), var(--accent-light)); }
.newsletter-desc { font-size: .83rem; color: var(--text-secondary); margin-bottom: 12px; }
.newsletter-form { display: flex; flex-direction: column; gap: 8px; }
.newsletter-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  background: var(--bg-card);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
}
.newsletter-input:focus { border-color: var(--accent); }
.btn-primary {
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 500;
  transition: all var(--transition);
  border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }

/* ============================================================
   PAGE HERO (Tags / Archive)
   ============================================================ */
.page-hero {
  margin-top: var(--nav-h);
  padding: 60px 24px 48px;
  text-align: center;
  background: linear-gradient(180deg, var(--accent-light) 0%, transparent 100%);
}
[data-theme="dark"] .page-hero {
  background: linear-gradient(180deg, #3a1a14 0%, transparent 100%);
}
.page-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 12px;
}
.page-hero-desc { font-size: 1rem; color: var(--text-secondary); }

/* ============================================================
   TAGS PAGE
   ============================================================ */
.tags-page-cloud {
  display: flex; flex-wrap: wrap; gap: 12px;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.tag-big {
  padding: 8px 20px;
  border-radius: 24px;
  border: 1.5px solid var(--border);
  background: var(--bg-hover);
  cursor: pointer;
  transition: all var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.tag-big:hover, .tag-big.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.tag-big .tag-name { font-family: var(--font-serif); font-weight: 500; }
.tag-big .tag-count-badge {
  background: rgba(255,255,255,.25);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: .72rem;
}
.tag-big:not(:hover):not(.active) .tag-count-badge {
  background: var(--bg-card);
  color: var(--accent);
  font-weight: 600;
}

/* ============================================================
   ARCHIVE PAGE
   ============================================================ */
.archive-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}
.archive-timeline { display: flex; flex-direction: column; gap: 40px; }
.archive-year-group {}
.archive-year-label {
  font-family: var(--font-serif);
  font-size: 2rem; font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.archive-year-label::after {
  content: '';
  flex: 1; height: 2px;
  background: linear-gradient(90deg, var(--accent-light), transparent);
}
.archive-month-group { margin-bottom: 24px; }
.archive-month-label {
  font-size: .85rem; color: var(--text-muted);
  margin-bottom: 12px; letter-spacing: .08em;
}
.archive-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition);
}
.archive-item:last-child { border-bottom: none; }
.archive-item-date {
  font-size: .78rem; color: var(--text-muted);
  width: 48px; flex-shrink: 0;
  padding-top: 3px;
}
.archive-item-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  margin-top: 8px;
  transition: background var(--transition);
}
.archive-item:hover .archive-item-dot { background: var(--accent); }
.archive-item-title {
  font-size: .95rem; color: var(--text-secondary);
  transition: color var(--transition);
  cursor: pointer; flex: 1;
  line-height: 1.5;
}
.archive-item:hover .archive-item-title { color: var(--accent); }
.archive-item-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

.stats-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stat-box {
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}
.stat-box .num { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.stat-box .label { font-size: .72rem; color: var(--text-muted); }

.year-jumper { display: flex; flex-wrap: wrap; gap: 8px; }
.year-btn {
  padding: 4px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  font-size: .85rem;
  color: var(--text-secondary);
  background: var(--bg-hover);
  cursor: pointer;
  transition: all var(--transition);
}
.year-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article-page { margin-top: var(--nav-h); }

.article-hero {
  padding: 60px 24px 48px;
  background: linear-gradient(180deg, var(--accent-light) 0%, var(--bg) 100%);
  text-align: center;
}
[data-theme="dark"] .article-hero {
  background: linear-gradient(180deg, #3a1a14 0%, var(--bg) 100%);
}
.article-hero-content { max-width: 720px; margin: 0 auto; }
.article-meta-top { margin-bottom: 20px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.article-main-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 20px;
  color: var(--text-primary);
}
.article-meta-bottom {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; flex-wrap: wrap;
  font-size: .85rem; color: var(--text-muted);
}

.article-body-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

.toc-sidebar { position: sticky; top: 84px; }
.toc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
}
.toc-title { font-size: .9rem; font-weight: 600; margin-bottom: 12px; color: var(--text-secondary); }
.toc-nav { display: flex; flex-direction: column; gap: 4px; }
.toc-item {
  font-size: .83rem; color: var(--text-muted);
  padding: 4px 8px; border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  border-left: 2px solid transparent;
  line-height: 1.4;
}
.toc-item:hover { color: var(--accent); background: var(--bg-hover); }
.toc-item.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-light); }
.toc-item.h3 { padding-left: 18px; }

.share-card {}
.share-btns { display: flex; flex-direction: column; gap: 8px; }
.share-btn {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .82rem;
  color: var(--text-secondary);
  background: var(--bg-hover);
  text-align: center;
  transition: all var(--transition);
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Article content typography */
.article-content {
  min-width: 0;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-primary);
}
.article-content h2 {
  font-size: 1.5rem; font-weight: 600;
  margin: 2em 0 .8em;
  padding-bottom: .4em;
  border-bottom: 2px solid var(--accent-light);
  color: var(--text-primary);
}
.article-content h3 {
  font-size: 1.2rem; font-weight: 600;
  margin: 1.6em 0 .6em;
  color: var(--text-primary);
}
.article-content p { margin-bottom: 1.2em; }
.article-content blockquote {
  margin: 1.5em 0;
  padding: 14px 20px;
  border-left: 4px solid var(--accent);
  background: var(--accent-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
}
.article-content ul, .article-content ol {
  margin: 1em 0 1em 1.5em;
}
.article-content li { margin-bottom: .5em; }
.article-content code {
  font-family: 'Courier New', monospace;
  background: var(--bg-hover);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .88em;
}
.article-content pre {
  background: var(--bg-hover);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 1.5em 0;
}
.article-content a { color: var(--accent); border-bottom: 1px solid var(--accent-light); transition: all var(--transition); }
.article-content a:hover { border-bottom-color: var(--accent); }
.article-content img { border-radius: var(--radius-sm); margin: 1em 0; }
.article-content hr { border: none; border-top: 2px dashed var(--border); margin: 2em 0; }

.article-footer {
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.article-tags-footer { display: flex; gap: 8px; flex-wrap: wrap; }

/* Prev / Next navigation */
.article-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.nav-prev, .nav-next {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  transition: all var(--transition);
  cursor: pointer;
}
.nav-prev:hover, .nav-next:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.nav-direction { font-size: .75rem; color: var(--text-muted); margin-bottom: 6px; }
.nav-title { font-family: var(--font-serif); font-size: .95rem; color: var(--text-secondary); line-height: 1.5; }
.nav-next { text-align: right; }

/* Comments */
.comment-section {
  background: var(--bg-hover);
  padding: 48px 24px;
}
.comment-container {
  max-width: 720px;
  margin: 0 auto;
}
.comment-title {
  font-family: var(--font-serif);
  font-size: 1.3rem; font-weight: 600;
  margin-bottom: 24px;
}
.comment-form { margin-bottom: 32px; }
.comment-form-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 12px;
}
.comment-input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: .9rem;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}
.comment-input:focus { border-color: var(--accent); }
.comment-textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: .9rem;
  line-height: 1.7;
  min-height: 120px; resize: vertical;
  outline: none; margin-bottom: 12px;
  transition: border-color var(--transition);
}
.comment-textarea:focus { border-color: var(--accent); }
.comment-placeholder { text-align: center; color: var(--text-muted); padding: 32px 0; font-size: .9rem; }
.comment-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.comment-author { font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.comment-date { font-size: .75rem; color: var(--text-muted); margin-left: 8px; font-weight: 400; }
.comment-text { font-size: .9rem; color: var(--text-secondary); line-height: 1.7; }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-page { margin-top: var(--nav-h); }

.about-hero {
  padding: 60px 24px 48px;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg) 100%);
}
[data-theme="dark"] .about-hero {
  background: linear-gradient(135deg, #3a1a14 0%, var(--bg) 100%);
}
.about-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex; align-items: center; gap: 32px;
  flex-wrap: wrap;
}
.about-avatar-wrap { position: relative; flex-shrink: 0; }
.about-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 2.5rem; font-weight: 700; color: #fff;
}
.about-avatar-ring {
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 2px dashed var(--accent-light);
  animation: spin 10s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.about-name {
  font-family: var(--font-serif);
  font-size: 1.8rem; font-weight: 700;
  margin-bottom: 8px;
}
.about-tagline { color: var(--text-secondary); margin-bottom: 16px; }
.about-social { display: flex; gap: 10px; flex-wrap: wrap; }
.social-badge {
  padding: 5px 14px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  font-size: .82rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.social-badge:hover { border-color: var(--accent); color: var(--accent); }

.about-content-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}
.about-article {
  font-family: var(--font-serif);
  font-size: 1.02rem; line-height: 1.9;
  color: var(--text-primary);
}
.about-article h2 {
  font-size: 1.3rem; font-weight: 600;
  margin: 2em 0 .8em;
  color: var(--accent);
  display: flex; align-items: center; gap: 8px;
}
.about-article p { margin-bottom: 1.2em; color: var(--text-secondary); }
.about-article ul { margin: .5em 0 1.5em 1.5em; }
.about-article li { margin-bottom: .5em; color: var(--text-secondary); }
.about-article a { color: var(--accent); }

.about-topics {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; margin: 1em 0 1.5em;
}
.topic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: grid; grid-template-rows: auto auto auto;
  gap: 4px;
  transition: all var(--transition);
}
.topic-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.topic-icon { font-size: 1.5rem; }
.topic-name { font-weight: 600; font-size: .9rem; color: var(--text-primary); }
.topic-desc { font-size: .78rem; color: var(--text-muted); font-family: var(--font-sans); }

.about-stats { display: flex; flex-direction: column; gap: 10px; }
.about-stat-row {
  display: flex; justify-content: space-between;
  font-size: .88rem;
  padding: 8px 0; border-bottom: 1px solid var(--border-light);
}
.about-stat-row:last-child { border-bottom: none; }
.about-stat-label { color: var(--text-muted); }
.about-stat-val { font-weight: 600; color: var(--accent); }

.reading-list { display: flex; flex-direction: column; gap: 12px; }
.reading-item { display: flex; gap: 12px; align-items: flex-start; }
.reading-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.reading-title { font-size: .9rem; font-weight: 500; }
.reading-author { font-size: .78rem; color: var(--text-muted); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed; bottom: 32px; right: 32px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transition: all var(--transition);
  z-index: 50;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); background: var(--accent-dark); }
.back-to-top svg { width: 20px; height: 20px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}
.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 24px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 24px;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.15rem; font-weight: 600;
  color: var(--accent);
  display: block; margin-bottom: 6px;
}
.footer-tagline { font-size: .8rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: .88rem; color: var(--text-secondary); transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-social { display: flex; gap: 12px; }
.social-link {
  font-size: .82rem; color: var(--text-muted);
  padding: 4px 10px; border-radius: 12px;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.social-link:hover { color: var(--accent); border-color: var(--accent); }
.footer-bottom {
  text-align: center;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  font-size: .78rem; color: var(--text-muted);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.article-card, .featured-card, .sidebar-card {
  animation: slideUp .4s ease both;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .article-body-wrap { grid-template-columns: 1fr; }
  .toc-sidebar { display: none; }
  .archive-layout { grid-template-columns: 1fr; }
  .about-content-wrap { grid-template-columns: 1fr; }
  .article-nav { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    gap: 4px;
    box-shadow: var(--shadow-md);
  }
  .hero { padding: 60px 16px 48px; }
  .hero-stats { flex-direction: column; gap: 8px; padding: 16px 24px; }
  .stat-divider { width: 40px; height: 1px; }
  .main-container { padding: 32px 16px 60px; }
  .article-card { flex-direction: column; }
  .article-card-num { display: none; }
  .comment-form-row { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .about-topics { grid-template-columns: 1fr 1fr; }
}
