/* ══════════════════════════════════════
   BLOG — Listing & Post Pages
══════════════════════════════════════ */

/* ── Shared hero ── */
.blog-hero {
  position: relative;
  padding-top: calc(var(--section-padding) + 80px);
  padding-bottom: 80px;
  overflow: hidden;
  text-align: center;
}
.blog-hero-glow {
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 480px;
  background: radial-gradient(ellipse, rgba(139,92,246,.18) 0%, transparent 70%);
  pointer-events: none;
}

/* ══════════════════════════════════════
   BLOG LISTING
══════════════════════════════════════ */

/* Filter bar (reuse cs-filter-btn pattern) */
.blog-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 52px;
}
.blog-filter-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.blog-filter-btn:hover,
.blog-filter-btn.active {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
  background: rgba(139,92,246,.08);
}

/* Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

/* Card (extends .blog-card from main.css) */
.blog-card-full {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
  text-decoration: none;
}
.blog-card-full:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
  text-decoration: none;
}
.blog-card-full .blog-tag { margin-bottom: 14px; }
.blog-card-full .blog-title {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.blog-card-full .blog-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  flex-grow: 1;
  margin-bottom: 20px;
}
.blog-card-full .blog-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 20px;
}
.blog-card-full .blog-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent-blue);
  margin-top: auto;
  transition: gap 0.3s;
}
.blog-card-full:hover .blog-link { gap: 12px; }

/* ══════════════════════════════════════
   BLOG POST
══════════════════════════════════════ */

/* Post hero */
.post-hero {
  position: relative;
  padding-top: calc(var(--section-padding) + 80px);
  padding-bottom: 60px;
  overflow: hidden;
}
.post-hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(79,124,255,.14) 0%, transparent 70%);
  pointer-events: none;
}

/* Breadcrumb */
.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.post-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.post-breadcrumb a:hover { color: var(--accent-blue); }
.post-breadcrumb .sep { opacity: 0.4; }

/* Post meta row */
.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}
.post-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-purple);
  background: rgba(139,92,246,.1);
  border: 1px solid rgba(139,92,246,.25);
  padding: 4px 12px;
  border-radius: 100px;
}
.post-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* Title */
.post-title {
  font-size: clamp(30px, 4.5vw, 54px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

/* Summary box */
.post-summary {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-blue);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 24px 28px;
  margin-bottom: 48px;
}
.post-summary-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 10px;
}
.post-summary p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

/* Article body layout */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 56px;
  align-items: start;
}

/* Body content */
.post-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
}
.post-body h2 {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 48px 0 16px;
}
.post-body h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 32px 0 12px;
}
.post-body p { margin-bottom: 20px; }
.post-body ul, .post-body ol {
  padding-left: 24px;
  margin-bottom: 20px;
}
.post-body li { margin-bottom: 8px; }
.post-body strong { color: var(--text-primary); font-weight: 600; }
.post-body a { color: var(--accent-blue); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { color: var(--accent-cyan); }
.post-body blockquote {
  border-left: 3px solid var(--accent-purple);
  padding: 16px 24px;
  margin: 28px 0;
  background: var(--bg-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-secondary);
}
.post-body code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--accent-cyan);
}

/* Stat callout */
.post-stat-callout {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 32px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  text-align: center;
}
.post-stat-callout .stat-val {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-cyan);
  line-height: 1;
  margin-bottom: 6px;
  font-family: var(--font-heading);
}
.post-stat-callout .stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* Sidebar */
.post-sidebar { position: sticky; top: 100px; }

.post-toc {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.post-toc-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.post-toc ol {
  padding-left: 16px;
  margin: 0;
}
.post-toc li { margin-bottom: 10px; }
.post-toc a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  line-height: 1.4;
}
.post-toc a:hover { color: var(--accent-blue); }

.post-author-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.post-author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}
.post-author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.post-author-role {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.post-author-bio {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Related posts */
.related-posts-section {
  border-top: 1px solid var(--border);
}
.related-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-decoration: none;
  display: block;
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
}
.related-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-3px);
  text-decoration: none;
}
.related-card .blog-tag { margin-bottom: 10px; }
.related-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 8px;
}
.related-card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

@media (max-width: 991px) {
  .post-layout {
    grid-template-columns: 1fr;
  }
  .post-sidebar { position: static; }
  .blog-grid { grid-template-columns: 1fr; }
}
