/* ==========================================================================
   Blog Styles - spureducation.com
   Uses design tokens from styles.css (:root variables)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Category Color Variables
   -------------------------------------------------------------------------- */
:root {
  --cat-teacher-retention: #8b5cf6;
  --cat-teacher-recruitment: #ec4899;
  --cat-substitute-teaching: #10b981;
  --cat-extended-learning: #f59e0b;
  --cat-staffing-operations: #6366f1;
  --cat-leadership-and-culture: #06b6d4;
  --cat-attendance-recovery: #10b981;
}

/* --------------------------------------------------------------------------
   1. Blog Hero
   -------------------------------------------------------------------------- */
.blog-hero {
  padding: 160px 2rem 3rem;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

body.banner-hidden .blog-hero {
  padding-top: 120px;
}

.blog-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.blog-hero h1 .serif {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
}

.blog-hero .blog-hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   2. Category Filters
   -------------------------------------------------------------------------- */
.blog-filters {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0 2rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.blog-filters::-webkit-scrollbar {
  display: none;
}

.blog-filters button {
  flex-shrink: 0;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.blog-filters button:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card);
}

.blog-filters button.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   3. Search Bar
   -------------------------------------------------------------------------- */
.blog-search {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0 2rem;
}

.blog-search-wrapper {
  position: relative;
  max-width: 400px;
}

.blog-search-wrapper svg,
.blog-search-wrapper .blog-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.blog-search input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s;
}

.blog-search input::placeholder {
  color: var(--text-muted);
}

.blog-search input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* --------------------------------------------------------------------------
   4. Post Cards Grid
   -------------------------------------------------------------------------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* --------------------------------------------------------------------------
   5. Post Card
   -------------------------------------------------------------------------- */
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.blog-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Category tag */
.blog-card-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
  width: fit-content;
}

/* Category-specific tag colors */
.blog-card-tag[data-category="teacher-retention"],
.blog-card-tag.cat-teacher-retention {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.blog-card-tag[data-category="teacher-recruitment"],
.blog-card-tag.cat-teacher-recruitment {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
}

.blog-card-tag[data-category="substitute-teaching"],
.blog-card-tag.cat-substitute-teaching {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.blog-card-tag[data-category="extended-learning"],
.blog-card-tag.cat-extended-learning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.blog-card-tag[data-category="staffing-operations"],
.blog-card-tag.cat-staffing-operations {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.blog-card-tag[data-category="leadership-and-culture"],
.blog-card-tag.cat-leadership-and-culture {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
}

.blog-card-tag[data-category="attendance-recovery"],
.blog-card-tag.cat-attendance-recovery {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

/* Title */
.blog-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

/* Summary - clamp to 3 lines */
.blog-card-summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Footer */
.blog-card-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.blog-card-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-card-hover);
  flex-shrink: 0;
}

.blog-card-author-name {
  color: var(--text-secondary);
  font-weight: 500;
}

.blog-card-footer-sep {
  color: var(--border-hover);
}

/* --------------------------------------------------------------------------
   6. Article Page Layout
   -------------------------------------------------------------------------- */
.blog-article-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 140px 2rem 4rem;
}

body.banner-hidden .blog-article-page {
  padding-top: 120px;
}

/* Back link */
.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.blog-back:hover {
  color: var(--accent-secondary);
}

.blog-back svg {
  width: 16px;
  height: 16px;
}

/* Article header */
.blog-article-header {
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.blog-article-header .blog-card-tag {
  margin-bottom: 1rem;
}

.blog-article-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

/* Article meta row */
.blog-article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.blog-article-meta-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-card-hover);
  flex-shrink: 0;
}

.blog-article-meta-author {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.blog-article-meta-author-name {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.blog-article-meta-author-title {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.blog-article-meta-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Article Content Typography
   -------------------------------------------------------------------------- */
.blog-content {
  max-width: 720px;
  margin: 0 auto;
}

.blog-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.blog-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.blog-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.blog-content p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.blog-content a {
  color: var(--accent-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.blog-content a:hover {
  color: var(--accent-tertiary);
}

.blog-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.blog-content img {
  max-width: 100%;
  border-radius: 12px;
  margin: 1.5rem 0;
  display: block;
}

/* Blockquotes */
.blog-content blockquote {
  border-left: 3px solid var(--accent-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 0 10px 10px 0;
}

.blog-content blockquote p {
  color: var(--text-secondary);
  margin-bottom: 0;
  font-style: italic;
}

/* Lists */
.blog-content ul,
.blog-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.blog-content ul {
  list-style-type: disc;
}

.blog-content ol {
  list-style-type: decimal;
}

.blog-content li {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.4rem;
}

.blog-content li::marker {
  color: var(--accent-primary);
}

/* Direct answer callout */
.direct-answer {
  background: rgba(139, 92, 246, 0.08);
  border-left: 3px solid var(--accent-primary);
  padding: 1.25rem 1.5rem;
  border-radius: 0 12px 12px 0;
  margin: 1.5rem 0;
}

.direct-answer p {
  color: var(--text-secondary);
  margin-bottom: 0;
}

.direct-answer p:not(:last-child) {
  margin-bottom: 0.75rem;
}

.direct-answer strong {
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   7. Author Info Bar
   -------------------------------------------------------------------------- */
.blog-author-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  flex-wrap: wrap;
}

.blog-author-bar-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-card-hover);
  flex-shrink: 0;
}

.blog-author-bar-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.blog-author-bar-name {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.blog-author-bar-title {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.blog-author-bar-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.blog-author-bar-meta .blog-article-meta-sep {
  width: 3px;
  height: 3px;
}

/* --------------------------------------------------------------------------
   8. Recommended Reading
   -------------------------------------------------------------------------- */
.blog-recommended {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  border-top: 1px solid var(--border-color);
}

.blog-recommended h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.blog-recommended-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.blog-recommended .blog-card-title {
  font-size: 1.05rem;
}

.blog-recommended .blog-card-summary {
  -webkit-line-clamp: 2;
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   9. Email Capture
   -------------------------------------------------------------------------- */
.blog-email-capture {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 720px;
  margin: 3rem auto;
  text-align: center;
}

.blog-email-capture h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.blog-email-capture .blog-email-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.blog-email-form {
  display: flex;
  gap: 0.75rem;
  max-width: 440px;
  margin: 0 auto;
}

.blog-email-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s;
}

.blog-email-form input::placeholder {
  color: var(--text-muted);
}

.blog-email-form input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.blog-email-form button {
  padding: 0.75rem 1.5rem;
  background: var(--gradient-purple);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.blog-email-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

/* --------------------------------------------------------------------------
   10. Author Page
   -------------------------------------------------------------------------- */
.author-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 160px 2rem 4rem;
}

body.banner-hidden .author-page {
  padding-top: 120px;
}

.author-page-header {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 3rem;
  max-width: 720px;
}

.author-page-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-card-hover);
  flex-shrink: 0;
  border: 2px solid var(--border-color);
}

.author-page-info {
  flex: 1;
}

.author-page-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.author-page-title {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.author-page-bio {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.author-page-focus {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.author-page-focus-tag {
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: var(--accent-secondary);
  font-size: 0.8rem;
  font-weight: 500;
}

.author-page-posts-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   11. Category / Tag Page
   -------------------------------------------------------------------------- */
.category-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 160px 2rem 4rem;
}

body.banner-hidden .category-page {
  padding-top: 120px;
}

.category-page-header {
  margin-bottom: 2.5rem;
}

.category-page-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.category-page-header p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   12. Metrics Box
   -------------------------------------------------------------------------- */
.metrics-box {
  background: rgba(16, 185, 129, 0.08);
  border-left: 3px solid var(--success);
  padding: 1.25rem 1.5rem;
  border-radius: 0 12px 12px 0;
  margin: 1.5rem 0;
}

.metrics-box h4,
.metrics-box strong {
  color: var(--text-primary);
}

.metrics-box p {
  color: var(--text-secondary);
  margin-bottom: 0;
}

.metrics-box p:not(:last-child) {
  margin-bottom: 0.75rem;
}

.metrics-box ul,
.metrics-box ol {
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}

.metrics-box li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.3rem;
}

.metrics-box li::marker {
  color: var(--success);
}

/* --------------------------------------------------------------------------
   13. Mistakes Box
   -------------------------------------------------------------------------- */
.mistakes-box {
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #f59e0b;
  padding: 1.25rem 1.5rem;
  border-radius: 0 12px 12px 0;
  margin: 1.5rem 0;
}

.mistakes-box h4,
.mistakes-box strong {
  color: var(--text-primary);
}

.mistakes-box p {
  color: var(--text-secondary);
  margin-bottom: 0;
}

.mistakes-box p:not(:last-child) {
  margin-bottom: 0.75rem;
}

.mistakes-box ul,
.mistakes-box ol {
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}

.mistakes-box li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.3rem;
}

.mistakes-box li::marker {
  color: #f59e0b;
}

/* --------------------------------------------------------------------------
   14. Sources Section
   -------------------------------------------------------------------------- */
.sources-list {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.sources-list h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.sources-list ol {
  padding-left: 1.25rem;
  list-style-type: decimal;
}

.sources-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.4rem;
}

.sources-list a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.sources-list a:hover {
  color: var(--accent-secondary);
}

/* --------------------------------------------------------------------------
   15. Pagination
   -------------------------------------------------------------------------- */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-pagination a,
.blog-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.blog-pagination a {
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.blog-pagination a:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card);
}

.blog-pagination span.active {
  background: var(--accent-primary);
  color: #ffffff;
  border: 1px solid var(--accent-primary);
}

/* ==========================================================================
   Responsive - Mobile (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .blog-hero {
    padding: 130px 1.25rem 2rem;
  }

  body.banner-hidden .blog-hero {
    padding-top: 100px;
  }

  .blog-hero h1 {
    font-size: 2rem;
  }

  .blog-hero .blog-hero-subtitle {
    font-size: 1rem;
  }

  .blog-filters {
    padding: 0 1.25rem 1.25rem;
  }

  .blog-search {
    padding: 0 1.25rem;
    margin-bottom: 1.5rem;
  }

  .blog-search-wrapper {
    max-width: 100%;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    padding: 0 1.25rem 3rem;
  }

  .blog-card-body {
    padding: 1.25rem;
  }

  .blog-card-title {
    font-size: 1.1rem;
  }

  .blog-article-page {
    padding: 120px 1.25rem 3rem;
  }

  body.banner-hidden .blog-article-page {
    padding-top: 100px;
  }

  .blog-article-header h1 {
    font-size: 1.75rem;
  }

  .blog-article-meta {
    font-size: 0.8rem;
  }

  .blog-author-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .blog-author-bar-meta {
    margin-left: 0;
  }

  .blog-recommended {
    padding: 2rem 1.25rem 3rem;
  }

  .blog-recommended-grid {
    grid-template-columns: 1fr;
  }

  .blog-email-capture {
    padding: 1.75rem 1.25rem;
    margin: 2rem 1.25rem;
    max-width: none;
  }

  .blog-email-form {
    flex-direction: column;
  }

  .blog-email-form button {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .author-page {
    padding: 130px 1.25rem 3rem;
  }

  body.banner-hidden .author-page {
    padding-top: 100px;
  }

  .author-page-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-page-avatar {
    width: 80px;
    height: 80px;
  }

  .author-page-name {
    font-size: 1.5rem;
  }

  .author-page-focus {
    justify-content: center;
  }

  .category-page {
    padding: 130px 1.25rem 3rem;
  }

  body.banner-hidden .category-page {
    padding-top: 100px;
  }

  .category-page-header h1 {
    font-size: 1.75rem;
  }

  .direct-answer,
  .metrics-box,
  .mistakes-box {
    padding: 1rem 1.25rem;
  }

  .blog-content h2 {
    font-size: 1.3rem;
  }

  .blog-content h3 {
    font-size: 1.1rem;
  }
}

/* Tablet tweaks */
@media (max-width: 1024px) and (min-width: 769px) {
  .blog-recommended-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .author-page-avatar {
    width: 80px;
    height: 80px;
  }
}

/* Animations */
@keyframes blogFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-hero,
.blog-article-header {
  animation: blogFadeIn 0.5s ease-out;
}

.blog-card {
  animation: blogFadeIn 0.5s ease-out both;
}

.blog-card:nth-child(1) { animation-delay: 0s; }
.blog-card:nth-child(2) { animation-delay: 0.05s; }
.blog-card:nth-child(3) { animation-delay: 0.1s; }
.blog-card:nth-child(4) { animation-delay: 0.15s; }
.blog-card:nth-child(5) { animation-delay: 0.2s; }
.blog-card:nth-child(6) { animation-delay: 0.25s; }

/* --------------------------------------------------------------------------
   16. Table of Contents
   -------------------------------------------------------------------------- */
.blog-toc {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.75rem 2rem;
  margin: 2rem 0;
}

.blog-toc-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-secondary);
  margin-bottom: 0.875rem;
}

.blog-toc ol {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.blog-toc li {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.blog-toc li:last-child {
  margin-bottom: 0;
}

.blog-toc li a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.blog-toc li a:hover {
  color: var(--accent-secondary);
}

/* --------------------------------------------------------------------------
   17. Pipeline Visual
   -------------------------------------------------------------------------- */
.pipeline-visual {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem 1.5rem 2.5rem;
  margin: 2rem 0;
  overflow-x: auto;
}

.pipeline-caption {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-secondary);
  margin-bottom: 2rem;
  text-align: center;
}

.pipeline-track {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  position: relative;
}

.pipeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 90px;
  position: relative;
}

.pipeline-node-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
}

.pipeline-node-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 3px solid rgba(139, 92, 246, 0.3);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.pipeline-node-emoji {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.pipeline-node-leak {
  font-size: 0.6rem;
  font-weight: 600;
  color: #ef4444;
  text-align: center;
  opacity: 0.9;
}

.pipeline-connector {
  height: 2px;
  flex: 1;
  min-width: 20px;
  background: linear-gradient(90deg, var(--accent-primary), rgba(139, 92, 246, 0.3));
  margin-top: calc(0.75rem + 0.5rem + 0.75rem);
  position: relative;
}

.pipeline-connector::after {
  content: '';
  position: absolute;
  right: -3px;
  top: -3px;
  width: 0;
  height: 0;
  border-left: 6px solid var(--accent-primary);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

/* --------------------------------------------------------------------------
   18. Stat Cards
   -------------------------------------------------------------------------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stat-card {
  background: var(--accent-primary);
  color: #ffffff;
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.375rem;
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  opacity: 0.85;
  line-height: 1.4;
  display: block;
}

/* --------------------------------------------------------------------------
   19. Callout Box
   -------------------------------------------------------------------------- */
.blog-callout {
  background: rgba(139, 92, 246, 0.08);
  border-left: 3px solid var(--accent-primary);
  border-radius: 0 10px 10px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.blog-callout p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.blog-callout p:last-child {
  margin-bottom: 0;
}

.blog-callout strong {
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   20. Insight Blocks (Numbered Action Items)
   -------------------------------------------------------------------------- */
.insight-block {
  display: flex;
  gap: 1.25rem;
  margin: 1.25rem 0;
  align-items: flex-start;
}

.insight-number {
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--accent-primary);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.insight-content {
  flex: 1;
}

.insight-content strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
}

.insight-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   21. Blog CTA Section
   -------------------------------------------------------------------------- */
.blog-cta-section {
  background: var(--accent-primary);
  color: #ffffff;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  margin: 3rem 0 0;
  text-align: center;
}

.blog-cta-section h2 {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.blog-cta-section p {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  color: #ffffff;
  line-height: 1.6;
}

.blog-cta-button {
  display: inline-block;
  background: #ffffff;
  color: var(--accent-primary);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.blog-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* --------------------------------------------------------------------------
   22. References / Footnotes
   -------------------------------------------------------------------------- */
.blog-references {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.blog-references h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.blog-references ol {
  padding-left: 1.5rem;
  list-style-type: decimal;
}

.blog-references li {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 0.625rem;
  padding-left: 0.25rem;
}

.blog-references li em {
  font-style: italic;
}

.blog-post-body sup {
  font-size: 0.7em;
  line-height: 0;
  position: relative;
  top: -0.4em;
}

.blog-post-body sup a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
}

.blog-post-body sup a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Responsive overrides for new components
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .stat-row {
    grid-template-columns: 1fr 1fr;
  }

  .pipeline-track {
    flex-wrap: wrap;
    gap: 0.5rem 0;
  }

  .pipeline-node {
    min-width: 70px;
  }

  .pipeline-node-label {
    font-size: 0.65rem;
  }

  .pipeline-connector {
    min-width: 10px;
  }

  .blog-toc {
    padding: 1.25rem 1.5rem;
  }

  .blog-callout {
    padding: 1rem 1.25rem;
  }

  .insight-block {
    gap: 1rem;
  }

  .blog-cta-section {
    padding: 2rem 1.25rem;
  }
}
