/* ============================================================
   Sprnt Blog — Clean Magazine Theme
   ============================================================ */

/* ===== Tokens (Dark — default) ===== */
:root {
  --bg: #0a0a0b;
  --bg-elev: #111113;
  --bg-card: #141416;
  --bg-hover: #1c1c20;
  --bg-subtle: #18181b;
  --border: #222226;
  --border-strong: #2e2e34;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #06b6d4;
  --accent-hover: #22d3ee;
  --accent-soft: rgba(6, 182, 212, 0.1);
  --accent-glow: rgba(6, 182, 212, 0.35);
  --link: #22d3ee;
  --code-bg: #0e0e11;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --page-gutter: clamp(16px, 3vw, 48px);
  --header-h: 56px;
  --sidebar-w: 300px;
  --ad-w: 80px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow: 0 2px 8px rgba(0,0,0,.35);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.5);
}

/* ===== Light Theme ===== */
[data-theme="light"] {
  --bg: #fafafa;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f4f4f5;
  --bg-subtle: #f4f4f5;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #09090b;
  --text-muted: #52525b;
  --text-dim: #71717a;
  --accent: #0891b2;
  --accent-hover: #06b6d4;
  --accent-soft: rgba(6,182,212,.08);
  --link: #0891b2;
  --code-bg: #f4f4f5;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.1);
}

/* ===== Reset ===== */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }
::selection { background: var(--accent-soft); }
svg { stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

/* ============================================================
   HEADER — sticky, flex row: brand | nav | actions
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,11,.8);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
[data-theme="light"] .site-header {
  background: rgba(255,255,255,.85);
}

/* .header-inner = the flex row inside header */
.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand .logo {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), #0e7490);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 15px; font-weight: 600; color: var(--text); }
.brand-slogan { font-size: 11px; color: var(--text-dim); margin-top: 1px; }

/* Header Nav (categories dropdown lives here) */
.header-nav {
  display: flex;
  align-items: center;
  margin-left: 24px;
}

/* Header Actions (search + theme toggle) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Category Menu */
.category-menu { position: relative; }
.category-trigger {
  height: 36px; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-muted);
  font-family: inherit; font-size: 13px; cursor: pointer;
  transition: all .15s;
}
.category-trigger:hover,
.category-menu.open .category-trigger {
  background: var(--bg-hover); color: var(--text); border-color: var(--border-strong);
}
.category-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0;
  width: 200px; padding: 6px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .15s, transform .15s, visibility .15s;
  z-index: 110;
}
.category-menu.open .category-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}
.category-dropdown a {
  display: block; padding: 8px 12px; border-radius: 6px;
  color: var(--text-muted); font-size: 13px;
}
.category-dropdown a:hover,
.category-dropdown a.active { background: var(--bg-hover); color: var(--accent); }

/* Search Toggle */
.search-toggle {
  width: 36px; height: 36px;
  display: none; /* desktop: always show search form */
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-muted);
  cursor: pointer; transition: all .15s;
}
.search-toggle:hover { background: var(--bg-hover); color: var(--text); }

/* Header Search (always visible on desktop) */
.header-search {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0 12px; height: 36px;
  transition: border-color .15s;
}
.header-search:hover, .header-search:focus-within {
  border-color: var(--accent);
}
.header-search-icon { color: var(--text-dim); display: flex; align-items: center; flex-shrink: 0; }
.header-search input {
  background: transparent; border: none; color: var(--text);
  font-size: 13px; font-family: inherit; width: 160px; padding: 0;
}
.header-search input:focus { outline: none; }
.header-search input::placeholder { color: var(--text-dim); }

/* Theme Toggle */
.theme-toggle {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-muted);
  cursor: pointer; transition: all .15s;
}
.theme-toggle:hover { background: var(--bg-hover); color: var(--text); }

/* Search Bar (mobile expand) */
.search-bar {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 12px 0;
}
.search-bar.open { display: block; }
.search-bar form {
  max-width: 1280px; margin: 0 auto;
  padding: 0 var(--page-gutter);
}
.search-bar input {
  width: 100%; padding: 10px 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 14px;
}
.search-bar input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ============================================================
   LAYOUT — main-col (left) + sidebar (right)
   ============================================================ */
.site-main {
  padding: 32px 0 80px;
  min-height: calc(100vh - var(--header-h) - 80px);
}

/* Three-column grid: ad sidebar | content | sidebar */
.content-layout {
  display: grid;
  grid-template-columns: var(--ad-w) 1fr var(--sidebar-w);
  gap: 32px;
  align-items: start;
}

.main-col { min-width: 0; }

/* ============================================================
   LEFT AD SIDEBAR
   ============================================================ */
.ad-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
  align-self: start;
}
.ad-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 8px;
  text-align: center;
}
.ad-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s;
}
.ad-link:hover {
  transform: scale(1.05);
}
.ad-link:hover .ad-icon {
  background: var(--accent-soft);
}
.ad-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: background 0.15s;
}
.ad-text {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
  align-self: start;
}
.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.widget h3 {
  font-size: 13px; font-weight: 600; margin: 0 0 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.widget h3 svg { color: var(--accent); }

/* Friend Link */
.friend-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: var(--bg-subtle);
  border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: var(--text);
  transition: border-color .2s, transform .15s;
}
.friend-link:hover {
  border-color: var(--accent); transform: translateY(-1px);
}
.friend-icon { font-size: 20px; flex-shrink: 0; }
.friend-name { font-size: 13px; font-weight: 600; display: block; }
.friend-desc { font-size: 11px; color: var(--text-dim); }
.friend-link svg { margin-left: auto; color: var(--text-dim); flex-shrink: 0; }

/* Profile Widget */
.profile-widget { text-align: center; padding: 24px 20px; }
.profile-avatar {
  width: 56px; height: 56px; margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #0e7490);
  display: grid; place-items: center;
  color: #fff; font-size: 22px; font-weight: 700;
  box-shadow: 0 6px 20px rgba(6,182,212,.25);
}
.profile-widget h2 { margin: 0; font-size: 16px; }
.profile-widget > p { margin: 4px 0 16px; color: var(--text-muted); font-size: 13px; }
.profile-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding-top: 14px; border-top: 1px solid var(--border);
}
.profile-stats span { color: var(--text-dim); font-size: 11px; }
.profile-stats span + span { border-left: 1px solid var(--border); }
.profile-stats strong { display: block; color: var(--text); font-size: 15px; }

/* Category List */
.category-list { list-style: none; }
.category-list li + li { border-top: 1px dashed var(--border); }
.category-list a {
  display: flex; justify-content: space-between;
  padding: 8px 2px; color: var(--text-muted); font-size: 13px;
}
.category-list a:hover { color: var(--accent); }
.category-count {
  min-width: 22px; height: 20px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--bg-subtle);
  color: var(--text-dim); font-size: 11px;
}

/* Post List (sidebar) */
.post-list { list-style: none; }
.post-list li {
  padding: 8px 0; border-bottom: 1px dashed var(--border);
  display: flex; align-items: flex-start; gap: 10px;
}
.post-list li:last-child { border-bottom: 0; }
.post-list .rank {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--bg-subtle); color: var(--text-dim);
  font-size: 12px; font-weight: 700; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.post-list li:nth-child(1) .rank { background: var(--accent); color: #fff; }
.post-list li:nth-child(2) .rank { background: var(--border-strong); color: #fff; }
.post-list li:nth-child(3) .rank { background: var(--bg-hover); color: var(--text); }
.post-list a { color: var(--text); font-size: 13px; line-height: 1.5; display: block; font-weight: 500; }
.post-list a:hover { color: var(--accent-hover); }
.post-list .meta { color: var(--text-dim); font-size: 11px; margin-top: 2px; display: block; }

/* Tag Cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud .tag {
  background: var(--bg-subtle); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 6px;
  color: var(--text-muted); transition: all .15s;
}
.tag-cloud .tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ============================================================
   PAGE HEADING
   ============================================================ */
.page-heading {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.page-heading .eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent);
}
.page-heading h1 { font-size: 22px; font-weight: 700; margin: 0; }
.page-heading .count { font-size: 12px; color: var(--text-dim); margin-left: auto; }

/* ============================================================
   POST GRID
   ============================================================ */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

/* ============================================================
   POST CARD
   ============================================================ */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .3s, border-color .2s, box-shadow .3s;
}
.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-glow), 0 4px 20px rgba(6,182,212,.12);
}
.post-card .cover {
  aspect-ratio: 16/9; background: var(--bg-subtle); overflow: hidden; display: block;
}
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.post-card:hover .cover img { transform: scale(1.04); }
.post-card .body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.post-card .category {
  font-size: 11px; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
}
.post-card .category a { color: inherit; }
.post-card .title { font-size: 16px; font-weight: 600; line-height: 1.4; margin: 0 0 8px; }
.post-card .title a { color: var(--text); }
.post-card .title a:hover { color: var(--accent-hover); }
.post-card .excerpt {
  color: var(--text-muted); font-size: 13px; line-height: 1.6; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card .meta {
  margin-top: 14px; font-size: 12px; color: var(--text-dim);
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 10px; border-top: 1px solid var(--border);
}
.post-card .meta span { display: inline-flex; align-items: center; gap: 4px; }

/* Featured Card — full width hero */
.post-card.featured {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
}
.post-card.featured .cover {
  aspect-ratio: 21/9;
  width: 100%;
  height: auto;
  max-height: 420px;
}
.post-card.featured .body {
  padding: 24px 28px;
}
.post-card.featured .title {
  font-size: 20px;
}
.post-card.featured .excerpt {
  -webkit-line-clamp: 3;
}

/* ============================================================
   BLOG EMPTY
   ============================================================ */
.blog-empty {
  padding: 64px 24px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  text-align: center;
}
.blog-empty-icon { color: var(--text-muted); margin-bottom: 12px; }
.blog-empty h2 { margin: 0 0 6px; font-size: 18px; }
.blog-empty p { color: var(--text-muted); font-size: 13px; }

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-post {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px;
  position: relative;
}
.post-cover {
  margin: -40px -40px 24px; height: 360px; overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
}
.post-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, var(--bg-card));
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.post-title { font-size: 28px; font-weight: 700; line-height: 1.25; margin: 0 0 14px; letter-spacing: -.02em; }
.post-meta {
  color: var(--text-muted); font-size: 13px;
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
}
.post-meta span { display: inline-flex; align-items: center; gap: 5px; }
.post-meta a { color: var(--link); }
.cat-pill {
  background: var(--accent-soft); color: var(--accent);
  padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 600;
}

/* Post Content */
.post-content { font-size: 16px; line-height: 1.85; }
.post-content h1, .post-content h2, .post-content h3 { margin-top: 32px; margin-bottom: 14px; }
.post-content h1 { font-size: 26px; }
.post-content h2 { font-size: 22px; border-left: 3px solid var(--accent); padding-left: 12px; }
.post-content h3 { font-size: 18px; }
.post-content p { margin: 16px 0; }
.post-content blockquote {
  border-left: 3px solid var(--accent); margin: 18px 0;
  padding: 12px 20px; color: var(--text-muted);
  background: var(--bg-subtle); border-radius: 0 8px 8px 0;
}
.post-content pre {
  background: var(--code-bg); padding: 16px 18px;
  border-radius: 10px; overflow-x: auto; border: 1px solid var(--border);
  font-size: 13px; margin: 18px 0; font-family: var(--font-mono);
}
.post-content code {
  background: var(--code-bg); padding: 2px 6px;
  border-radius: 4px; font-size: .88em; color: var(--accent);
  font-family: var(--font-mono);
}
.post-content pre code { background: none; padding: 0; color: var(--text); }
.post-content ul, .post-content ol { margin: 16px 0; padding-left: 24px; }
.post-content li { margin: 4px 0; }
.post-content img { display: block; margin: 20px auto; border-radius: var(--radius-lg); }
.post-content a { border-bottom: 1px solid var(--accent); color: var(--link); }
.post-content hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.post-content th, .post-content td { padding: 8px 12px; border: 1px solid var(--border); }
.post-content th { background: var(--bg-subtle); font-weight: 600; }

/* Post Tags */
.post-tags {
  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 8px;
}
.post-tags a {
  background: var(--bg-subtle); border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 16px; font-size: 13px;
  color: var(--text-muted); display: inline-flex; align-items: center; gap: 4px;
}
.post-tags a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Reading Progress */
.reading-progress {
  position: fixed; top: var(--header-h); left: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), #0e7490);
  z-index: 99; width: 0; transition: width .1s;
}

/* ============================================================
   COMMENTS
   ============================================================ */
.comments { margin-top: 40px; }
.comments h3 {
  margin: 0 0 16px; font-size: 18px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.comment {
  display: flex; gap: 12px; margin: 16px 0; padding: 16px;
  background: var(--bg-subtle); border-radius: var(--radius);
  border: 1px solid var(--border);
}
.comment .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #0e7490);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.comment .c-body { flex: 1; min-width: 0; }
.comment .c-head { display: flex; justify-content: space-between; margin-bottom: 4px; gap: 10px; }
.comment .c-author { font-weight: 600; font-size: 14px; }
.comment .c-meta { font-size: 12px; color: var(--text-dim); display: inline-flex; align-items: center; gap: 4px; }
.comment .c-content { color: var(--text-muted); font-size: 14px; line-height: 1.6; word-break: break-word; }
.comment-reply { margin-top: 8px; }
.comment-reply a { font-size: 13px; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; }

.comment-form {
  margin-top: 24px; background: var(--bg-subtle);
  padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--border);
}
.comment-form h4 { margin: 0 0 14px; font-size: 15px; }
.comment-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.comment-form input, .comment-form textarea {
  width: 100%; padding: 10px 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius); font-size: 14px;
  font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
.comment-form input:focus, .comment-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.comment-form textarea { min-height: 100px; resize: vertical; }
.comment-form button {
  padding: 10px 20px; background: var(--accent); color: #fff;
  border: 0; border-radius: var(--radius); cursor: pointer;
  font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px;
}
.comment-form button:hover { background: var(--accent-hover); }
.reply-notice {
  background: var(--bg-card); padding: 10px 14px;
  border-radius: var(--radius); margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text-muted);
}
.reply-notice .cancel-reply { color: var(--danger); }

/* ============================================================
   SEARCH RESULTS
   ============================================================ */
mark {
  background: rgba(6,182,212,.25); color: var(--text);
  padding: 1px 3px; border-radius: 3px;
}

/* ============================================================
   PAGE TITLE (category/tag/search header)
   ============================================================ */
.page-title {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 32px; margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.page-title::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), #0e7490, transparent);
}
.page-title h1 { margin: 0; font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.page-title h1 svg { color: var(--accent); }
.page-title .desc { color: var(--text-muted); font-size: 14px; margin-top: 6px; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex; justify-content: center; gap: 6px;
  margin: 32px 0 0; flex-wrap: wrap;
}
.pagination a, .pagination span {
  padding: 7px 13px; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-muted); font-size: 14px;
  background: var(--bg-card); font-weight: 500;
  display: inline-flex; align-items: center; gap: 5px;
}
.pagination a:hover { background: var(--bg-hover); color: var(--text); border-color: var(--accent); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .disabled { opacity: .35; cursor: not-allowed; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
  background: var(--bg-card); border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}
.empty-state .big { font-size: 48px; margin-bottom: 10px; opacity: .6; }
.empty-state p { font-size: 15px; margin-bottom: 14px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-elev); border-top: 1px solid var(--border);
  padding: 24px 0; color: var(--text-muted); font-size: 13px;
}
.footer-inner {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}
.footer-sep { color: var(--text-dim); }
.footer-rss {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent); font-size: 12px; margin-left: 12px;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed; top: 72px; right: 20px;
  background: var(--success); color: #fff;
  padding: 10px 16px; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 9999;
  font-size: 14px; font-weight: 500;
  animation: toastIn .3s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.toast.error { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
  .sidebar, .ad-sidebar {
    position: static;
  }
  .ad-sidebar { display: none; }
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-nav { display: none; }
  .header-search { display: none; } /* mobile: hide inline search */
  .search-toggle { display: flex; } /* mobile: show search icon */
  .post-grid {
    grid-template-columns: 1fr;
  }
  .single-post { padding: 20px; }
  .post-cover { margin: -20px -20px 16px; height: 200px; }
  .post-title { font-size: 22px; }
  .comment-form .row { grid-template-columns: 1fr; }
  .page-heading { flex-wrap: wrap; }
}
