/* ============================================================
   BLOG & STATIC PAGES
   ============================================================ */

/* ── SHARED PAGE HEADER ── */
.page-header {
  max-width: 780px;
  margin: 2.5rem auto 2rem;
  padding: 0 1.25rem;
}
.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: #111827;
}
.page-intro {
  font-size: 1.1rem;
  color: #4b5563;
  margin-top: 0;
}

/* ── BLOG INDEX ── */
.blog-index {
  max-width: 780px;
  margin: 0 auto 4rem;
  padding: 0 1.25rem;
}
.article-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.article-card {
  border-top: 2px solid #e5e7eb;
  padding-top: 1.5rem;
}
.article-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.82rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}
.post-category {
  background: #2563eb;
  color: #fff;
  border-radius: 3px;
  padding: 0.15em 0.55em;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.article-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}
.article-card h2 a {
  color: #111827;
  text-decoration: none;
}
.article-card h2 a:hover { text-decoration: underline; }
.article-excerpt {
  color: #4b5563;
  font-size: 0.97rem;
  line-height: 1.65;
  margin-bottom: 0.75rem;
}
.read-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}
.read-more:hover { text-decoration: underline; }

/* ── BLOG POST ── */
.blog-post {
  max-width: 780px;
  margin: 0 auto 4rem;
  padding: 0 1.25rem;
}
.post-header {
  margin-bottom: 2.5rem;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 1.5rem;
}
.post-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
}
.post-author { font-style: italic; }

.post-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: #111827;
}
.post-intro {
  font-size: 1.1rem;
  color: #4b5563;
  line-height: 1.7;
  margin: 0;
}

/* Post body */
.blog-post article section { margin-bottom: 2rem; }

.blog-post h2 {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 2rem 0 0.6rem;
  color: #111827;
}
.blog-post h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.4rem;
  color: #1f2937;
}
.blog-post p {
  font-size: 1rem;
  line-height: 1.75;
  color: #374151;
  margin: 0 0 1rem;
}
.blog-post ul,
.blog-post ol {
  padding-left: 1.5rem;
  margin: 0 0 1rem;
}
.blog-post li {
  font-size: 1rem;
  line-height: 1.7;
  color: #374151;
  margin-bottom: 0.4rem;
}
.blog-post code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.88em;
  background: #f1f5f9;
  color: #1e293b;
  border-radius: 3px;
  padding: 0.15em 0.4em;
}
.code-block {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  overflow-x: auto;
}
.code-block pre {
  margin: 0;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #1e293b;
  white-space: pre-wrap;
}
.code-example {
  background: #f8fafc;
  border-left: 4px solid #2563eb;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  border-radius: 0 4px 4px 0;
}
.code-example p {
  margin: 0.25rem 0;
  font-size: 0.97rem;
  color: #374151;
}

.post-conclusion {
  border-top: 2px solid #e5e7eb;
  padding-top: 1.5rem;
  margin-top: 2.5rem;
}
.cta-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 700;
  color: #2563eb;
  font-size: 1rem;
  text-decoration: none;
}
.cta-link:hover { text-decoration: underline; }

.blog-nav {
  margin-top: 2.5rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem;
}
.blog-nav a {
  font-size: 0.95rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}
.blog-nav a:hover { text-decoration: underline; }

/* ── DARK MODE — matches your [data-theme="dark"] system ── */
[data-theme="dark"] .page-header h1,
[data-theme="dark"] .post-header h1,
[data-theme="dark"] .blog-post h2,
[data-theme="dark"] .blog-post h3,
[data-theme="dark"] .article-card h2 a {
  color: #f3f4f6;
}

[data-theme="dark"] .page-intro,
[data-theme="dark"] .post-intro,
[data-theme="dark"] .article-excerpt,
[data-theme="dark"] .blog-post p,
[data-theme="dark"] .blog-post li,
[data-theme="dark"] .code-example p {
  color: #d1d5db;
}

[data-theme="dark"] .article-meta,
[data-theme="dark"] .post-meta {
  color: #9ca3af;
}

[data-theme="dark"] .article-card,
[data-theme="dark"] .post-header {
  border-color: #374151;
}

[data-theme="dark"] .post-conclusion,
[data-theme="dark"] .blog-nav {
  border-color: #374151;
}

[data-theme="dark"] .blog-post code,
[data-theme="dark"] .code-block,
[data-theme="dark"] .code-example {
  background: #1e293b;
  color: #e2e8f0;
}

[data-theme="dark"] .code-block pre {
  color: #e2e8f0;
}

[data-theme="dark"] .read-more,
[data-theme="dark"] .cta-link,
[data-theme="dark"] .blog-nav a {
  color: #60a5fa;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .post-meta { gap: 0.5rem; }
  .blog-post h2 { font-size: 1.25rem; }
  .post-header h1 { font-size: 1.5rem; }
}