/*
 * blog.css — scoped styles for /blog, /blog/<slug>, and /blog/authors/<slug>.
 * All rules are contained under .blog-index, .blog-post, or .blog-author.
 * Zero global rules; safe to include on any page without side effects.
 */

/* ── Shared card / chip primitives (used across all three pages) ── */

.bi-chip {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  line-height: 1.4;
}

.bi-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.bi-meta-sep {
  color: var(--border);
  margin: 0 4px;
}

/* ── Shared card grid ── */

.bi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.bi-grid--related { margin-top: 0; }

@media (max-width: 900px) { .bi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .bi-grid { grid-template-columns: 1fr; } }

.bi-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.bi-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  text-decoration: none;
}

.bi-card-cover {
  aspect-ratio: 16 / 9;
  background: var(--bg-warm);
  overflow: hidden;
  flex-shrink: 0;
}
.bi-card-cover img,
.bi-card-cover svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bi-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.bi-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bi-card:hover .bi-card-title { text-decoration: underline; }

.bi-card-dek {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.bi-card-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
}

/* ── Shared pagination ── */

.bi-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 48px 0 0;
}

.bi-pag-btn,
.bi-pag-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--border);
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.bi-pag-btn:hover,
.bi-pag-num:hover {
  background: var(--bg-warm);
  color: var(--text);
  border-color: var(--text-muted);
  text-decoration: none;
}
.bi-pag-num--active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 700;
}
.bi-pag-num--active:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.bi-pag-btn--disabled { opacity: 0.35; pointer-events: none; }
.bi-pag-ellipsis { padding: 0 4px; color: var(--text-muted); font-size: 0.875rem; }

.bi-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 64px 0;
  font-size: 0.9375rem;
}
.bi-empty a { color: var(--primary); }

/* ════════════════════════════════════════════════════════════
   BLOG INDEX  (.blog-index)
   ════════════════════════════════════════════════════════════ */

/* Page header */
.bi-header {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--border-soft);
}
.bi-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
  margin: 0 0 12px;
}
.bi-desc {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 560px;
}

/* Featured post */
.bi-featured { padding: 48px 0 32px; }
.bi-featured-card {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 40px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur) var(--ease-out);
}
.bi-featured-card:hover { box-shadow: var(--shadow-card); text-decoration: none; }

.bi-featured-cover {
  aspect-ratio: 16 / 9;
  background: var(--bg-warm);
  overflow: hidden;
}
.bi-featured-cover img,
.bi-featured-cover svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bi-featured-body {
  padding: 36px 40px 36px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bi-featured-title {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.bi-featured-card:hover .bi-featured-title { text-decoration: underline; }

.bi-featured-dek {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.bi-featured-meta {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.bi-featured-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .bi-featured-card { grid-template-columns: 1fr; }
  .bi-featured-cover { aspect-ratio: 16 / 7; }
  .bi-featured-body { padding: 24px; }
}

/* Filter bar */
.bi-filter-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
  transition: box-shadow var(--dur-fast);
}
.bi-filter-bar--stuck { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.bi-filter-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.bi-filter-search {
  flex: 1;
  min-width: 180px;
  max-width: 320px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color var(--dur-fast);
}
.bi-filter-search:focus { border-color: var(--primary); }

.bi-filter-select {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  cursor: pointer;
  transition: border-color var(--dur-fast);
}
.bi-filter-select:focus { border-color: var(--primary); }

.bi-filter-submit {
  height: 38px;
  padding: 0 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast);
}
.bi-filter-submit:hover { background: var(--primary-hover); }

.bi-filter-clear {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}
.bi-filter-clear:hover { color: var(--text); text-decoration: underline; }

/* Grid section */
.bi-grid-section { padding: 40px 0 80px; }

/* ════════════════════════════════════════════════════════════
   BLOG POST  (.blog-post)
   ════════════════════════════════════════════════════════════ */

/* Breadcrumb */
.bp-breadcrumb { margin-bottom: 20px; }
.bp-breadcrumb-list {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0;
  align-items: center;
  white-space: nowrap;
}
.bp-breadcrumb-list::-webkit-scrollbar { display: none; }
.bp-breadcrumb-list li { display: flex; align-items: center; flex-shrink: 0; }
.bp-breadcrumb-link {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur-fast);
}
.bp-breadcrumb-link:hover { color: var(--primary); }
.bp-breadcrumb-sep {
  font-size: 0.875rem;
  color: var(--border);
  margin: 0 6px;
  line-height: 1;
}
.bp-breadcrumb-current {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Post header — left-aligns with the center column, spans to the right edge */
.bp-header { padding: 32px 0 32px; }
.bp-header > .container {
  display: grid;
  grid-template-columns: 1fr minmax(0, 720px) 260px;
  gap: 40px;
  align-items: start;
}
.bp-header-inner {
  grid-column: 2;
  min-width: 0;
}

.bp-chips { margin-bottom: 16px; }

.bp-title {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 16px;
}

.bp-dek {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 20px;
}

.bp-byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.bp-byline-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
  flex-shrink: 0;
  background: var(--accent-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
}
.bp-byline-avatar--initials { font-size: 0.875rem; }
.bp-byline-author { font-weight: 500; color: var(--text); }
.bp-byline-link { color: inherit; text-decoration: none; }
.bp-byline-link:hover { color: var(--primary); text-decoration: underline; }
.bp-byline-sep { margin: 0 6px; color: var(--border); }

/* 3-col layout */
.bp-layout { padding: 0 0 64px; }
.bp-layout-inner {
  display: grid;
  grid-template-columns: 1fr minmax(0, 720px) 260px;
  gap: 40px;
  align-items: start;
}

@media (max-width: 1100px) {
  .bp-layout-inner { grid-template-columns: 1fr; }
  .bp-header > .container { grid-template-columns: 1fr; }
  .bp-header-inner { grid-column: 1; }
  .bp-left-rail { display: none; }
  .bp-right-rail { display: none; }
}

.bp-left-rail { min-width: 0; }

/* Center article */
.bp-center { min-width: 0; }

.bp-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  margin-bottom: 32px;
}

.bp-embed-wrap { margin-bottom: 32px; }
.bp-embed-iframe {
  width: 100%;
  height: 600px; /* initial; JS overrides via postMessage height reporter */
  border: none;
  display: block;
}

/* Article body prose */
.bp-body {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
}
.bp-body h2 {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 2.5em 0 0.75em;
  color: var(--text);
  scroll-margin-top: 96px;
}
.bp-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2em 0 0.65em;
  color: var(--text);
  scroll-margin-top: 96px;
}
.bp-body p { margin: 0 0 1.2em; }
.bp-body ul, .bp-body ol { padding-left: 1.5em; margin: 0 0 1.2em; }
.bp-body li { margin-bottom: 0.4em; }
.bp-body a { color: var(--primary); text-decoration: underline; }
.bp-body a:hover { color: var(--primary-hover); }
.bp-body code {
  font-size: 0.875em;
  background: var(--bg-warm);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
}
.bp-body pre {
  background: var(--secondary);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 0 0 1.5em;
  font-size: 0.875rem;
  line-height: 1.65;
}
.bp-body pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.bp-body blockquote {
  border-left: 3px solid var(--primary);
  margin: 1.5em 0;
  padding: 1em 1.5em;
  background: var(--bg-tint);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-muted);
}
.bp-body blockquote p { margin: 0; }
.bp-body table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 0 0 1.5em; }
.bp-body th, .bp-body td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.bp-body th { font-weight: 600; background: var(--bg-warm); }

/* Callouts */
.bp-body .callout {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 8px;
  margin: 1.5em 0;
  font-size: 0.9375rem;
}
.bp-body .callout--note    { background: #eff6ff; border-left: 3px solid #3b82f6; }
.bp-body .callout--warning { background: #fffbeb; border-left: 3px solid #f59e0b; }
.bp-body .callout--tip     { background: var(--bg-tint); border-left: 3px solid var(--primary); }
.bp-body .callout-icon { flex-shrink: 0; font-size: 1rem; margin-top: 2px; }
.bp-body .callout-body p { margin: 0; }

/* Inline CTA */
.bp-cta-inline {
  margin-top: 48px;
  padding: 28px 32px;
  background: var(--secondary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.bp-cta-inline p {
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}

/* Author cards */
.bp-author-card {
  display: flex;
  gap: 20px;
  margin-top: 48px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
  align-items: flex-start;
}
.bp-author-avatar {
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-display);
}
.bp-author-avatar--lg { width: 64px; height: 64px; font-size: 1.5rem; }
.bp-author-avatar--md { width: 48px; height: 48px; font-size: 1.125rem; }
.bp-author-avatar--sm { width: 36px; height: 36px; font-size: 0.875rem; }
.bp-author-avatar--initials { border-radius: 50%; }

.bp-author-card-body { flex: 1; min-width: 0; }
.bp-author-name { font-weight: 700; font-size: 0.9375rem; color: var(--text); margin: 0 0 2px; }
.bp-author-link { color: inherit; text-decoration: none; }
.bp-author-link:hover { color: var(--primary); }
.bp-author-role { font-size: 0.8125rem; color: var(--text-muted); margin: 0 0 8px; }
.bp-author-bio { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; margin: 0 0 12px; }
.bp-author-bio--short {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bp-author-all-posts {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.bp-author-all-posts:hover { color: var(--primary-hover); text-decoration: underline; }

/* Right rail */
.bp-right-rail { position: sticky; top: 88px; max-height: calc(100vh - 120px); overflow-y: auto; align-self: start; scrollbar-width: none; margin-top: -220px; }
.bp-right-rail::-webkit-scrollbar { display: none; }
.blog-post--embed .bp-right-rail { margin-top: 0; }
.blog-post--embed .bp-layout { padding-top: 40px; }
.bp-toc-sticky { display: flex; flex-direction: column; gap: 20px; }

/* Right rail: other authors */
.bp-rail-authors { border-top: 1px solid var(--border); padding-top: 20px; }
.bp-rail-author {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: opacity var(--dur-fast);
}
.bp-rail-author:hover { opacity: 0.72; text-decoration: none; }
.bp-rail-author-info { min-width: 0; }
.bp-rail-author-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-rail-author-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right rail: more posts */
.bp-rail-more { border-top: 1px solid var(--border); padding-top: 20px; }
.bp-rail-more-heading {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.bp-rail-post {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: opacity var(--dur-fast);
}
.bp-rail-post:last-child { border-bottom: none; }
.bp-rail-post:hover { opacity: 0.72; text-decoration: none; }
.bp-rail-post-thumb {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--accent-soft);
  display: block;
}
.bp-rail-post-thumb--placeholder {
  width: 100%;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: 8px;
  overflow: hidden;
}
.bp-rail-post-thumb--placeholder svg { width: 100%; height: 100%; display: block; }
.bp-rail-post-body { flex: 1; min-width: 0; }
.bp-rail-post-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 6px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bp-rail-post-meta { font-size: 0.75rem; color: var(--text-muted); }

.bp-toc { display: none !important; }
.bp-toc-mobile { display: none !important; }
.bp-toc-heading {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.bp-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bp-toc-item { padding: 0; }
.bp-toc-item--h3 .bp-toc-link { padding-left: 16px; }
.bp-toc-link {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 8px;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
  line-height: 1.4;
}
.bp-toc-link:hover { color: var(--text); background: var(--bg-warm); }
.bp-toc-item--active .bp-toc-link {
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.bp-toc-author {
  display: flex;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--bg-soft);
  align-items: flex-start;
}

/* Mobile TOC accordion (may be moved inside #bp-article by blog_toc.js) */
.bp-toc-mobile { padding: 0 0 16px; width: 100%; min-width: 0; box-sizing: border-box; }
.bp-center > .bp-toc-mobile > .container {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
.bp-toc-details { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.bp-toc-summary {
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  background: var(--bg-warm);
  color: var(--text);
}
.bp-toc-summary::-webkit-details-marker { display: none; }
.bp-toc-list--mobile { padding: 12px 16px; background: var(--bg); }

/* Related posts */
.bp-related { padding: 56px 0; border-top: 1px solid var(--border-soft); }
.bp-related-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 32px;
}

@media (max-width: 720px) {
  .bp-title { font-size: 1.875rem; }
  .bp-header { padding: 20px 0 28px; }
}

/* ════════════════════════════════════════════════════════════
   BLOG AUTHOR  (.blog-author)
   ════════════════════════════════════════════════════════════ */

.ba-header {
  background: var(--bg-soft);
  padding: 56px 0;
  border-bottom: 1px solid var(--border-soft);
}
.ba-header-inner {
  display: flex;
  gap: 36px;
  align-items: flex-start;
}

.ba-avatar-wrap { flex-shrink: 0; }
.ba-avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.03em;
}
.ba-avatar--initials { border-radius: 50%; }

.ba-info { flex: 1; min-width: 0; }
.ba-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 4px;
}
.ba-role {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.ba-bio {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 620px;
  margin: 0 0 16px;
}

.ba-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.ba-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.ba-link:hover { color: var(--primary); border-color: var(--primary); text-decoration: none; }

@media (max-width: 600px) {
  .ba-header-inner { flex-direction: column; align-items: center; text-align: center; }
  .ba-links { justify-content: center; }
  .ba-avatar { width: 96px; height: 96px; font-size: 2rem; }
  .ba-name { font-size: 1.5rem; }
}

/* Topic pills */
.ba-topics { padding: 24px 0 0; }
.ba-topic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
}
.ba-topic-pill {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  cursor: pointer;
  transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
}
.ba-topic-pill:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--accent-soft);
}
.ba-topic-pill--active {
  color: var(--primary);
  background: var(--accent-soft);
  border-color: var(--primary);
  font-weight: 600;
}

/* Posts list */
.ba-posts-section { padding: 32px 0 64px; }
.ba-post-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }

.ba-post-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-soft);
  text-decoration: none;
  color: var(--text);
}
.ba-post-row:first-child { border-top: 1px solid var(--border-soft); }

.ba-post-thumb {
  flex-shrink: 0;
  width: 96px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-warm);
  display: block;
  text-decoration: none;
}
.ba-post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ba-post-thumb--placeholder {
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.ba-post-info { flex: 1; min-width: 0; }
.ba-post-title {
  display: block;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 4px;
}
.ba-post-title:hover { color: var(--primary); text-decoration: underline; }
.ba-post-dek {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ba-post-meta {
  font-size: 0.78125rem;
  color: var(--text-subtle);
}

/* "More from the blog" */
.ba-more { padding: 0 0 80px; border-top: 1px solid var(--border-soft); padding-top: 48px; }
.ba-more-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 28px;
}
