/* ============================================
   HelloGitHub Theme for Halo
   Based on hellogithub.com design
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f6f8fa;
  --bg-card: #ffffff;
  --bg-hover: #f0f4f8;
  --bg-tag: #eef2ff;
  --bg-nav: #ffffff;
  --bg-sidebar-widget: #f6f8fa;

  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --text-link: #4361ee;
  --text-on-accent: #ffffff;

  --border-color: #e2e8f0;
  --border-hover: #cbd5e0;

  --accent-primary: #4361ee;
  --accent-secondary: #3a0ca3;
  --accent-orange: #f77f00;
  --accent-green: #06d6a0;
  --accent-red: #ef4444;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 8px 24px rgba(67,97,238,0.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --nav-height: 60px;
  --sidebar-width: 280px;
  --content-max: 1200px;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  --transition: all 0.2s ease;
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #161b22;
  --bg-hover: #1f2937;
  --bg-tag: #1e3a5f;
  --bg-nav: #161b22;
  --bg-sidebar-widget: #161b22;

  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --text-link: #79c0ff;

  --border-color: #21262d;
  --border-hover: #30363d;

  --accent-primary: #58a6ff;
  --accent-secondary: #79c0ff;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-card-hover: 0 8px 24px rgba(88,166,255,0.15);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-primary); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---------- Layout Wrapper ---------- */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-container {
  flex: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px 16px;
  width: 100%;
}

.content-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.main-content {
  flex: 1;
  min-width: 0;
}

/* ============================================
   NAVIGATION BAR
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition);
}

.navbar-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 16px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Logo */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
}

.navbar-brand .brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 800;
}

.navbar-brand .brand-text {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Nav Menu */
.navbar-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Search */
.navbar-search {
  flex: 1;
  max-width: 300px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 7px 14px 7px 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.search-input::placeholder { color: var(--text-muted); }

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(67,97,238,0.1);
  background: var(--bg-card);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

/* Navbar Actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Theme Toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: transparent;
  transition: var(--transition);
  font-size: 16px;
}

.theme-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Login/User Button */
.btn-login {
  padding: 6px 16px;
  background: var(--accent-primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}

.btn-login:hover {
  background: var(--accent-secondary);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(67,97,238,0.3);
}

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  padding: 3px;
  border: 1px solid var(--border-color);
}

.filter-tab {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.filter-tab.active,
.filter-tab:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.filter-tab.active {
  color: var(--accent-primary);
  font-weight: 500;
}

.filter-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 4px;
}

/* ============================================
   POST CARDS
   ============================================ */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.post-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-orange));
  opacity: 0;
  transition: opacity 0.2s;
}

.post-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.post-card:hover::before {
  opacity: 1;
}

/* Card Header */
.card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.card-cover {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-primary)20, var(--accent-orange)20);
}

.card-cover-placeholder {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-orange));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
}

.card-title-area {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.card-title a:hover { color: var(--accent-primary); }

.post-card:not(.has-cover) .card-header {
  display: block;
}

.post-card:not(.has-cover) .card-title {
  font-size: 1.1rem;
  margin-bottom: 6px;
  -webkit-line-clamp: 1;
}

/* Card Body */
.card-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}

/* Card Footer */
.card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.card-tag {
  padding: 2px 10px;
  background: var(--bg-tag);
  color: var(--accent-primary);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid transparent;
}

.card-tag:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

[data-theme="dark"] .card-tag {
  background: rgba(88,166,255,0.1);
  color: var(--accent-primary);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-item svg { width: 14px; height: 14px; }

.card-pinned-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 2px 8px;
  background: linear-gradient(135deg, var(--accent-orange), #ff4500);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
}

/* Author avatar */
.card-author {
  display: flex;
  align-items: center;
  gap: 6px;
}

.author-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
  padding: 16px 0;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.page-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--bg-tag);
}

.page-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
  font-weight: 600;
}

.page-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.widget-header {
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.widget-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.widget-title-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-primary);
}

.widget-more {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.widget-more:hover { color: var(--accent-primary); }

.widget-body { padding: 12px 18px 14px; }

/* Stats Widget */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-item {
  text-align: center;
  padding: 12px 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Tag Cloud Widget */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-pill {
  padding: 4px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}

.tag-pill:hover {
  background: var(--bg-tag);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.tag-count {
  font-size: 0.72rem;
  background: var(--border-color);
  padding: 1px 5px;
  border-radius: 10px;
  color: var(--text-muted);
}

/* Categories Widget */
.category-list { display: flex; flex-direction: column; gap: 2px; }

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.category-item:hover {
  background: var(--bg-hover);
}

.category-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.category-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  flex-shrink: 0;
}

.category-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

/* Recent Posts Widget */
.recent-post-list { display: flex; flex-direction: column; gap: 0; }

.recent-post-item {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-color);
  align-items: flex-start;
}

.recent-post-item:last-child { border-bottom: none; }

.recent-post-num {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.recent-post-item:nth-child(1) .recent-post-num { background: #ffb700; color: white; }
.recent-post-item:nth-child(2) .recent-post-num { background: #c0c0c0; color: white; }
.recent-post-item:nth-child(3) .recent-post-num { background: #cd7f32; color: white; }

.recent-post-title {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-post-title:hover { color: var(--accent-primary); }

/* ============================================
   POST DETAIL PAGE
   ============================================ */
.post-detail {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.post-header {
  padding: 32px 40px 24px;
  border-bottom: 1px solid var(--border-color);
}

.post-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--bg-tag);
  color: var(--accent-primary);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 14px;
}

.post-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-cover-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.post-body {
  padding: 32px 40px;
}

/* Markdown / Post Content */
.post-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  font-weight: 700;
  line-height: 1.4;
  margin: 2em 0 0.75em;
  color: var(--text-primary);
  border-bottom: none;
}

.post-content h1 { font-size: 1.75rem; }
.post-content h2 {
  font-size: 1.35rem;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
}
.post-content h3 { font-size: 1.15rem; }

.post-content p { margin: 1em 0; }

.post-content a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-content ul,
.post-content ol {
  margin: 1em 0;
  padding-left: 1.75em;
  list-style: revert;
}

.post-content li { margin: 0.4em 0; }

.post-content blockquote {
  margin: 1.5em 0;
  padding: 12px 18px;
  border-left: 4px solid var(--accent-primary);
  background: var(--bg-secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 2px 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--accent-orange);
}

.post-content pre {
  margin: 1.5em 0;
  padding: 18px 20px;
  background: #1e2030;
  border-radius: var(--radius-md);
  overflow-x: auto;
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .post-content pre { background: #0d1117; }

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: #e6edf3;
  font-size: 0.875rem;
}

.post-content img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 1em auto;
  border: 1px solid var(--border-color);
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.9rem;
}

.post-content th {
  background: var(--bg-secondary);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.post-content td {
  padding: 9px 14px;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.post-content tr:hover td { background: var(--bg-hover); }

.post-content hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2.5em 0;
}

/* Post Footer */
.post-footer {
  padding: 20px 40px 28px;
  border-top: 1px solid var(--border-color);
}

.post-tags-area {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.tags-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Navigation Prev/Next */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 4px;
}

.nav-post-card {
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.nav-post-card:hover {
  border-color: var(--accent-primary);
  background: var(--bg-tag);
}

.nav-post-direction {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-post-title {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nav-post-card:hover .nav-post-title { color: var(--accent-primary); }

/* ============================================
   TAGS PAGE
   ============================================ */
.page-title-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.page-count-badge {
  padding: 3px 10px;
  background: var(--bg-tag);
  color: var(--accent-primary);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.tags-full-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-full-item {
  padding: 7px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tag-full-item:hover {
  background: var(--bg-tag);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   ARCHIVES PAGE
   ============================================ */
.archive-year-section { margin-bottom: 32px; }

.archive-year-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-primary);
  display: inline-block;
}

.archive-month-group { margin-bottom: 16px; }

.archive-month-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.archive-month-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.archive-post-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.archive-post-item:hover {
  background: var(--bg-hover);
}

.archive-post-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  width: 50px;
}

.archive-post-title {
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-post-title:hover { color: var(--accent-primary); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--bg-nav);
  border-top: 1px solid var(--border-color);
  padding: 24px 16px;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-link:hover { color: var(--accent-primary); }

.footer-social {
  display: flex;
  gap: 12px;
}

.social-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  transition: var(--transition);
}

.social-btn:hover {
  background: var(--bg-tag);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-copyright a { color: var(--accent-primary); }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-text { font-size: 1rem; color: var(--text-secondary); }

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.breadcrumb-item a { color: var(--text-muted); }
.breadcrumb-item a:hover { color: var(--accent-primary); }
.breadcrumb-sep { color: var(--border-color); }
.breadcrumb-item.active { color: var(--text-secondary); }

/* ============================================
   LOADING / SKELETON
   ============================================ */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-hover) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  background: var(--accent-secondary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .content-layout { flex-direction: column; }
}

@media (max-width: 640px) {
  .navbar-search { display: none; }
  .navbar-menu { display: none; }
  .post-header { padding: 20px 20px 16px; }
  .post-body { padding: 20px; }
  .post-footer { padding: 16px 20px 20px; }
  .post-navigation { grid-template-columns: 1fr; }
  .post-title { font-size: 1.35rem; }
  .main-container { padding: 12px 10px; }
  .post-card { padding: 16px; }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--accent-primary); }
.hidden { display: none; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
