/* ─── blog-post.css — Individual blog article pages ─── */

/* ═══ POST HERO ════════════════════════════════════════════ */
.post-hero {
  padding: 8rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s ease, gap 0.2s ease;
}

.post-back:hover {
  color: var(--teal);
  gap: 0.65rem;
}

.post-back svg {
  transform: rotate(180deg);
}

.post-hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.post-tag {
  display: inline-block;
  padding: 0.28rem 0.8rem;
  background: rgba(0,194,168,0.12);
  color: var(--teal);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
}

.post-date,
.post-readtime {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.post-dot {
  width: 3px;
  height: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  display: inline-block;
}

.post-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  max-width: 860px;
  margin-bottom: 1.5rem;
}

.post-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 720px;
  font-weight: 300;
}

/* ═══ POST BODY ════════════════════════════════════════════ */
.post-body {
  padding: 5rem 0;
}

.post-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 5rem;
  align-items: start;
}

/* ─── Article content ─── */
.post-article {
  max-width: 720px;
}

.post-article h2 {
  font-family: var(--font-head);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
  line-height: 1.25;
}

.post-article h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 0.75rem;
}

.post-article p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 1.5rem;
}

.post-article ul,
.post-article ol {
  margin: 0 0 1.5rem 1.25rem;
  padding: 0;
}

.post-article li {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 0.5rem;
}

.post-article li::marker {
  color: var(--teal);
}

.post-article strong {
  color: var(--text-primary);
  font-weight: 600;
}

.post-article blockquote {
  border-left: 3px solid var(--teal);
  padding: 1rem 0 1rem 1.5rem;
  margin: 2rem 0;
  background: rgba(0,194,168,0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.post-article blockquote p {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-secondary);
  margin: 0;
}

.post-article code {
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.88em;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15em 0.4em;
  color: var(--teal);
}

.post-article pre {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
}

.post-article pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Callout box */
.post-callout {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.post-callout-label {
  font-size: 0.7rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.post-callout p {
  margin: 0;
  font-size: 0.95rem;
}

/* Stat highlight */
.post-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.post-stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.post-stat-value {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.post-stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  line-height: 1.4;
}

/* Divider */
.post-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* ─── Sidebar ─── */
.post-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-sidebar-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.post-sidebar-title {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* Table of contents */
.post-toc {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-toc a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-body);
  transition: color 0.2s ease;
  display: block;
  padding: 0.25rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  transition: border-color 0.2s, color 0.2s;
}

.post-toc a:hover {
  color: var(--teal);
  border-left-color: var(--teal);
}

/* CTA card */
.post-cta-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.post-cta-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad);
}

.post-cta-card h4 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.post-cta-card p {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.post-cta-card .btn-primary {
  width: 100%;
  justify-content: center;
  font-size: 0.88rem;
  padding: 11px 20px;
}

/* ═══ RELATED POSTS ════════════════════════════════════════ */
.post-related {
  padding: 4rem 0 6rem;
  border-top: 1px solid var(--border);
}

.post-related-title {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.post-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ═══ RESPONSIVE ════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .post-layout {
    grid-template-columns: 1fr 240px;
    gap: 3rem;
  }
}

@media (max-width: 900px) {
  .post-layout {
    grid-template-columns: 1fr;
  }
  .post-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .post-sidebar-card {
    flex: 1;
    min-width: 240px;
  }
  .post-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .post-stat-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .post-hero { padding: 7rem 0 3rem; }
  .post-related-grid { grid-template-columns: 1fr; }
  .post-stat-row { grid-template-columns: 1fr; gap: 1rem; }
  .post-sidebar { flex-direction: column; }
  .post-sidebar-card { min-width: 0; }
}
