/* Styles for /blog (posts + index). Loaded after style.css. */

.blog-banner {
  width: 100%;
  padding: 2.5rem 1rem;
}
.blog-banner-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.blog-banner-text { flex: 1 1 60%; }
.blog-banner-img { flex: 0 1 35%; text-align: center; }
.blog-banner-img img { max-width: 100%; max-height: 260px; }
.blog-banner h1 {
  font-weight: 300;
  font-size: 2.3rem;
  margin: 0.3rem 0 0.6rem;
}
.blog-back {
  color: inherit;
  opacity: 0.75;
  font-size: 0.9rem;
}
.blog-back:hover { color: inherit; opacity: 1; }
.blog-subtitle { font-style: italic; font-size: 1.1rem; margin-bottom: 0.5rem; }
.blog-series-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 0.5rem;
}
.blog-meta { font-size: 0.9rem; opacity: 0.8; }
.blog-draft, .blog-draft-inline {
  display: inline-block;
  background: #b00020;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.5rem;
}
/* unlisted label: subtle, since anyone with the link sees it */
.blog-unlisted {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border: 1px dashed currentColor;
  border-radius: 3px;
  margin-bottom: 0.5rem;
  opacity: 0.8;
}
.blog-draft-inline { vertical-align: middle; margin: 0 0 0 0.5rem; }

/* Reading column */
.blog-post {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
}
.blog-content {
  font-size: 1.1rem;
  line-height: 1.7;
  font-weight: 400;
  color: #222;
}
.blog-content h2, .blog-content h3, .blog-content h4,
.blog-content h5, .blog-content h6 {
  font-weight: 600;
  margin-top: 2rem;
  scroll-margin-top: 1rem;
}
.blog-content h2 { font-size: 1.6rem; }
.blog-content h3 { font-size: 1.3rem; }
.blog-content h4 { font-size: 1.1rem; }
.blog-content h5 { font-size: 1rem; }
.blog-content h6 { font-size: 1rem; font-style: italic; font-weight: 500; }
.blog-content img { max-width: 100%; }
.blog-content blockquote {
  border-left: 3px solid #ccc;
  padding-left: 1rem;
  color: #555;
}
.blog-content table { margin: 1rem 0; }
.blog-content td, .blog-content th { border: 1px solid #ddd; padding: 0.3rem 0.6rem; }
.blog-content .good { color: #053061; }
.blog-content .bad { color: #67001f; }

.blog-tags { margin-bottom: 1rem; }
/* tag badges: Bootstrap .badge, colored inline from the publications-page palette */
.blog-tag { color: #333; margin: 0 0.15rem 0.3rem 0; }
.blog-tag:hover { color: #000; text-decoration: none; filter: brightness(0.92); }
.blog-tag-filter label.tag-badge { margin: 0 0.15rem 0.3rem 0; }
.blog-tag-filter label.tag-badge.active:not(.badge-dark) { box-shadow: 0 0 0 2px #343a40; }

.blog-series, .blog-toc {
  background: #f7f5f0;
  border-radius: 6px;
  padding: 0.8rem 1.2rem;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}
.blog-series ol { margin: 0.4rem 0 0; }
.blog-toc summary { font-weight: 600; cursor: pointer; }
.blog-toc ul { list-style: none; padding-left: 0; margin: 0.4rem 0 0; }
.blog-toc .toc-l1 { font-weight: 500; margin-top: 0.3rem; }
.blog-toc .toc-l2 { padding-left: 1.2rem; font-size: 0.9rem; }
.blog-toc .toc-l3 { padding-left: 2.4rem; font-size: 0.85rem; color: #666; }

.blog-series-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid #ddd;
  margin-top: 2rem;
  padding-top: 1rem;
}
.blog-feedback {
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  background: #f7f5f0;
  border-radius: 6px;
  font-style: italic;
}

/* Index */
.blog-index h1 { font-weight: 300; font-size: 2.5rem; }
.blog-intro { font-size: 1.1rem; }
.blog-tag-filter { margin: 1rem 0 1.5rem; }
.blog-tag-filter .btn-group { flex-wrap: wrap; }
.blog-item { padding: 1.2rem 0; border-bottom: 1px solid #eee; }
.blog-item h2 { font-size: 1.4rem; font-weight: 600; margin: 0.2rem 0; }
.blog-item p { margin: 0.4rem 0; }
.blog-item .blog-series-label { margin-top: 0; }

@media (max-width: 768px) {
  .blog-banner-inner { flex-direction: column-reverse; text-align: center; gap: 1rem; }
  .blog-banner h1 { font-size: 1.7rem; }
  .blog-banner-img img { max-height: 160px; }
}
