/* ==========================================================================
   RustStorFS Engineering Blog — Editorial Layout
   Inherits color tokens, typography, navbar & responsive table rules from ../styles.css
   ========================================================================== */

.blog-hero {
  padding-block: clamp(3rem, 6vw, 4.75rem) clamp(2rem, 4vw, 3rem);
  border-block-end: 1px solid var(--border-subtle);
}

.article-shell {
  max-inline-size: 48rem;
  margin-inline: auto;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-block-end: 1.25rem;
}

.breadcrumb a {
  color: var(--text-secondary);
}

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

.article-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 1.1rem;
  color: var(--text-primary);
}

.article-subtitle {
  font-size: clamp(1.04rem, 1.7vw, 1.18rem);
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.article-meta strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-block-start: 2rem;
}

@media (width < 760px) {
  .article-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.stat-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.05rem;
}

.stat-pill .val {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.stat-pill .val.accent { color: var(--accent-bright); }
.stat-pill .val.cyan { color: var(--cyan); }
.stat-pill .val.emerald { color: var(--emerald); }

.stat-pill .lbl {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-block-start: 0.3rem;
}

/* Prose body */
.article-body {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.prose {
  max-inline-size: 48rem;
  margin-inline: auto;
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.75;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 2.75rem 0 0.9rem;
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--border-subtle);
}

.prose h2:first-child {
  margin-block-start: 0;
  padding-block-start: 0;
  border-block-start: 0;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.8rem 0 0.6rem;
}

.prose p {
  margin: 0 0 1.15rem;
}

.prose strong {
  color: var(--text-primary);
  font-weight: 600;
}

.prose a {
  color: var(--accent-bright);
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration: underline;
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-inline-start: 1.35rem;
  display: grid;
  gap: 0.5rem;
}

.prose li::marker {
  color: var(--accent-bright);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.09);
  padding: 0.1rem 0.36rem;
  border-radius: 4px;
}

.prose pre {
  margin: 1.25rem 0 1.5rem;
  padding: 1.15rem 1.3rem;
  background: var(--bg-terminal);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.prose pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.callout {
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}

.callout.cyan {
  border-inline-start-color: var(--cyan);
}

.callout.emerald {
  border-inline-start-color: var(--emerald);
}

.callout-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  margin: 0 0 0.45rem;
}

.callout.cyan .callout-title { color: var(--cyan); }
.callout.emerald .callout-title { color: var(--emerald); }

.callout p:last-child {
  margin-block-end: 0;
}

/* Tier flow diagram */
.tier-stack {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 1.75rem;
}

.tier-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
}

.tier-box.highlight {
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.07), rgba(14, 19, 27, 0.92));
}

.tier-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-block-end: 0.45rem;
}

.tier-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-bright);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tier-box.highlight .tier-label {
  color: var(--cyan);
}

.tier-window {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.tier-box p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Blog index cards */
.post-grid {
  display: grid;
  gap: 1.25rem;
  max-inline-size: 56rem;
  margin-inline: auto;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: border-color 0.16s ease;
}

.post-card:hover {
  border-color: rgba(249, 115, 22, 0.45);
}

.post-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.post-card h2 a {
  color: var(--text-primary);
}

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

.post-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.65;
}

.prose .table-wrapper {
  margin: 1.5rem 0 1.75rem;
}

.prose .data-table td strong {
  color: var(--accent-bright);
}

.article-cta {
  margin-block-start: 3rem;
}
