.blog-hero {
  padding-top: clamp(32px, 6vw, 56px);
  padding-bottom: clamp(20px, 4vw, 32px);
}

.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
}

.blog-hero .lede {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 640px;
  margin: 0 0 24px;
  line-height: 1.6;
}

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-btn {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.tag-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tag-btn[aria-pressed="true"] {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 600;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

@media (max-width: 640px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
}

.post-card {
  min-width: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--r-tile);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-tile);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.post-card:hover {
  box-shadow: var(--shadow-tile-up);
  transform: translateY(-2px);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.post-tag {
  background: var(--bg-panel-2);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  color: var(--accent-dark);
  font-family: var(--font-body);
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.post-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
}

.post-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.post-card h3 a:hover {
  color: var(--accent);
}

.post-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.post-empty {
  color: var(--text-muted);
  font-size: 14px;
  padding: 24px 0;
}

.crumbs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  font-size: 13px;
  color: var(--text-muted);
}

.crumbs li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.crumbs li + li::before {
  content: "/";
  color: var(--border);
  margin-right: 6px;
}

.crumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--accent);
}

.crumbs .crumb-here {
  color: var(--text);
  font-weight: 500;
}

.article-hero {
  padding-top: clamp(24px, 4vw, 40px);
  padding-bottom: clamp(20px, 4vw, 32px);
}

.article-hero .post-meta {
  margin-bottom: 14px;
}

.article-hero .read-time {
  font-family: var(--font-mono);
}

.article-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.4vw, 40px);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px;
  line-height: 1.3;
}

.article-hero .article-summary {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
  max-width: 680px;
  margin: 0;
}

.prose {
  max-width: 720px;
}

.prose h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
}

.prose h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 12px;
}

.prose p {
  color: var(--text);
  line-height: 1.8;
  margin: 0 0 16px;
}

.prose ul,
.prose ol {
  color: var(--text);
  line-height: 1.8;
  margin: 0 0 16px;
  padding-left: 22px;
}

.prose li {
  margin-bottom: 6px;
}

.prose pre {
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-tile);
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  margin: 0 0 20px;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-panel-2);
  padding: 2px 6px;
  border-radius: 4px;
}

.prose pre code {
  background: none;
  padding: 0;
}

.prose blockquote {
  margin: 0 0 20px;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
}

.dl-outro {
  margin-top: 48px;
  padding: 32px clamp(20px, 4vw, 36px);
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-tile);
}

.dl-outro h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  border: none;
  padding: 0;
}

.dl-outro p {
  color: var(--text-muted);
  margin: 0 0 20px;
  line-height: 1.6;
}

.dl-outro .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

#related-posts {
  margin-top: 48px;
}

#related-posts h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 20px;
  border: none;
  padding: 0;
}

.related-grid {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 760px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}

#post-nav {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  #post-nav {
    grid-template-columns: 1fr;
  }
}

.post-nav-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--r-tile);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.post-nav-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.post-nav-next {
  text-align: right;
  align-items: flex-end;
}

.post-nav-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-dark);
}

.post-nav-title {
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
}