/* Blog — extends landing.css design system */

/* ========================================
   Blog Hero (index page header)
   ======================================== */
.blog-hero {
  text-align: center;
  padding: 80px 64px 48px;
}

.blog-hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 48px;
  margin-bottom: 12px;
}

.blog-hero p {
  color: var(--muted);
  font-size: 18px;
  max-width: 560px;
  margin: 0 auto;
}

/* ========================================
   Blog Grid — post listing cards
   ======================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 0 64px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  text-decoration: none;
  color: var(--fg);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(45, 91, 255, 0.08);
}

.blog-card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
}

.blog-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.blog-card-tag {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
}

.blog-card h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  line-height: 1.3;
  margin-bottom: 12px;
}

.blog-card-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ========================================
   Blog Article — show page layout
   ======================================== */
.blog-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

.blog-article-header {
  margin-bottom: 48px;
}

.blog-article-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 32px;
}

.blog-article-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 40px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.blog-article-meta {
  color: var(--muted);
  font-size: 14px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.blog-article-tags {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.blog-article-tag {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
}

/* ========================================
   Blog Content — full prose styling
   ======================================== */
.blog-content h1 { font-size: 32px; margin: 48px 0 16px; font-family: 'DM Serif Display', serif; }
.blog-content h2 { font-size: 26px; margin: 40px 0 14px; font-family: 'DM Serif Display', serif; }
.blog-content h3 { font-size: 20px; margin: 32px 0 12px; font-weight: 600; }
.blog-content h4 { font-size: 17px; margin: 24px 0 10px; font-weight: 600; }

.blog-content p {
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 20px;
  color: #333;
}

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

.blog-content a:hover { text-decoration-thickness: 2px; }

.blog-content ul,
.blog-content ol {
  margin: 16px 0 20px 24px;
  line-height: 1.75;
  font-size: 16px;
}

.blog-content li { margin-bottom: 6px; }

.blog-content code {
  background: #f0eeed;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.blog-content pre {
  margin: 20px 0;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}

.blog-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

.blog-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--accent-light);
  border-radius: 0 8px 8px 0;
  color: #555;
  font-style: italic;
}

.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15px;
}

.blog-content th,
.blog-content td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.blog-content th {
  background: #f5f4f2;
  font-weight: 600;
}

.blog-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.blog-content strong { font-weight: 600; }

/* ========================================
   Syntax Highlighting (Rouge — dark theme)
   ======================================== */
.highlight {
  background: #1e1e2e;
  border-radius: 12px;
  padding: 20px 24px;
  overflow-x: auto;
}

.highlight pre {
  margin: 0;
  color: #cdd6f4;
  background: none;
}

.highlight .c, .highlight .cm, .highlight .c1, .highlight .cs { color: #6c7086; font-style: italic; } /* comments */
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr { color: #cba6f7; } /* keywords */
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sc, .highlight .sh { color: #a6e3a1; } /* strings */
.highlight .mi, .highlight .mf, .highlight .mh, .highlight .mo { color: #fab387; } /* numbers */
.highlight .na { color: #89b4fa; } /* attributes */
.highlight .nb { color: #89dceb; } /* builtins */
.highlight .nc { color: #f9e2af; } /* class names */
.highlight .nf, .highlight .fm { color: #89b4fa; } /* functions */
.highlight .nn { color: #f9e2af; } /* namespaces */
.highlight .o, .highlight .ow { color: #94e2d5; } /* operators */
.highlight .p { color: #cdd6f4; } /* punctuation */
.highlight .vi, .highlight .vg, .highlight .vs { color: #f38ba8; } /* variables */
.highlight .nt { color: #89b4fa; } /* tags */
.highlight .err { color: #f38ba8; } /* errors */

/* ========================================
   Blog CTA — end-of-article call-to-action
   ======================================== */
.blog-article-cta {
  background: var(--fg);
  color: #fff;
  border-radius: 16px;
  padding: 48px;
  text-align: center;
  margin-top: 64px;
}

.blog-article-cta h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  margin-bottom: 12px;
}

.blog-article-cta p {
  color: #aaa;
  margin-bottom: 24px;
  font-size: 16px;
}

.blog-article-cta .btn-blue {
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.3s;
}

.blog-article-cta .btn-blue:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(45, 91, 255, 0.3);
}

/* ========================================
   Back link
   ======================================== */
.blog-back {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
  margin-bottom: 32px;
  transition: color 0.2s;
}

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

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 32px 64px;
    gap: 24px;
  }

  .blog-hero { padding: 64px 32px 40px; }
  .blog-hero h1 { font-size: 36px; }
  .blog-article-header h1 { font-size: 32px; }
}

@media (max-width: 480px) {
  .blog-grid {
    grid-template-columns: 1fr;
    padding: 0 20px 48px;
  }

  .blog-hero { padding: 48px 20px 32px; }
  .blog-hero h1 { font-size: 28px; }
  .blog-article { padding: 40px 20px 60px; }
  .blog-article-header h1 { font-size: 26px; }
  .blog-article-cta { padding: 32px 24px; }
}
