/* ══════════════════════════════════════════
   KNOWLEDGEPITCH — BLOG POST STYLES
   Shared by all post pages in /blog/
══════════════════════════════════════════ */

/* ── Post Hero ── */
.post-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1040A0 100%);
  padding: 4.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.post-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.post-hero-inner {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; color: rgba(255,255,255,0.6);
  margin-bottom: 1.25rem; flex-wrap: wrap;
}
.breadcrumb a { color: rgba(255,255,255,0.7); text-decoration: none; }
.breadcrumb a:hover { color: #fff; }
.post-cat {
  display: inline-block;
  background: var(--accent); color: #fff;
  font-size: 0.72rem; font-weight: 700;
  padding: 0.2rem 0.75rem; border-radius: 50px;
  margin-bottom: 1rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.post-cat.robotics { background: var(--accent); }
.post-cat.ai       { background: var(--green); }
.post-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.85rem, 5vw, 3rem);
  color: #fff; line-height: 1.15;
  margin-bottom: 1.25rem;
}
.post-meta {
  display: flex; align-items: center;
  gap: 1.25rem; flex-wrap: wrap;
  font-size: 0.85rem; color: rgba(255,255,255,0.65);
}
.post-meta span { display: flex; align-items: center; gap: 0.4rem; }
.post-meta i { color: rgba(255,255,255,0.4); }

/* ── Featured image ── */
.post-featured-img {
  width: 100%; max-height: 420px;
  object-fit: cover;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  display: block;
}

/* ── Two-column layout ── */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  max-width: 1100px;
  margin: 3.5rem auto;
  padding: 0 1.5rem;
  align-items: start;
}

/* ── Article body typography ── */
.post-body { min-width: 0; }
.post-body h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.7rem; color: var(--text);
  margin: 2.25rem 0 0.875rem; line-height: 1.25;
}
.post-body h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem; color: var(--text);
  margin: 1.75rem 0 0.5rem;
}
.post-body p {
  font-size: 1.02rem; color: var(--text-muted);
  line-height: 1.82; margin-bottom: 1.25rem;
}
.post-body ul, .post-body ol {
  padding-left: 1.5rem; margin-bottom: 1.25rem;
}
.post-body li {
  font-size: 1rem; color: var(--text-muted);
  line-height: 1.75; margin-bottom: 0.4rem;
}
.post-body strong { color: var(--text); font-weight: 600; }
.post-body em { color: var(--primary); font-style: italic; }
.post-body a { color: var(--primary); text-decoration: underline; }
.post-body code {
  background: var(--gray-100); border-radius: 4px;
  padding: 0.15rem 0.4rem; font-size: 0.9em;
  font-family: 'Fira Code', 'Courier New', monospace;
  color: var(--primary-dark);
}

/* ── Author box ── */
.author-box {
  background: var(--gray-50);
  border-radius: var(--r-xl);
  padding: 2rem;
  display: flex; gap: 1.5rem; align-items: flex-start;
  margin: 3rem 0;
  border: 1px solid var(--gray-200);
}
.author-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 3px solid var(--primary-light); }
.author-avatar-placeholder {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; flex-shrink: 0;
}
.author-info h4 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem; margin-bottom: 0.2rem;
}
.author-info .author-role {
  font-size: 0.82rem; color: var(--primary);
  font-weight: 600; margin-bottom: 0.6rem;
}
.author-info p {
  font-size: 0.875rem; color: var(--text-muted);
  line-height: 1.7; margin: 0;
}

/* ── Post navigation ── */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; margin: 3rem 0;
}
.post-nav-item {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-lg); padding: 1.25rem;
  text-decoration: none; transition: all 0.2s;
  display: block;
}
.post-nav-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.post-nav-item .nav-label {
  font-size: 0.72rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 600; margin-bottom: 0.4rem;
  display: flex; align-items: center; gap: 0.35rem;
}
.post-nav-item .nav-title {
  font-size: 0.92rem; font-weight: 600;
  color: var(--text); line-height: 1.35;
}
.post-nav-next { text-align: right; }
.post-nav-next .nav-label { justify-content: flex-end; }

/* ── Sidebar ── */
.post-sidebar { position: sticky; top: 5rem; }
.sidebar-card {
  background: var(--white);
  border-radius: var(--r-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  border: 1px solid var(--gray-200);
}
.sidebar-card h4 {
  font-family: 'DM Serif Display', serif;
  font-size: 1rem; color: var(--text);
  margin-bottom: 1rem;
}
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { margin-bottom: 0.6rem; }
.toc-list a {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.875rem;
  display: flex; align-items: center; gap: 0.4rem;
  transition: color 0.2s;
}
.toc-list a:hover { color: var(--primary); }
.related-post {
  display: flex; gap: 0.875rem;
  margin-bottom: 1rem; align-items: flex-start;
}
.related-post:last-child { margin: 0; }
.related-thumb {
  width: 48px; height: 48px; border-radius: var(--r-sm);
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 1.1rem; flex-shrink: 0;
}
.related-info a {
  font-size: 0.85rem; font-weight: 600; color: var(--text);
  text-decoration: none; line-height: 1.35;
  display: block; margin-bottom: 0.2rem;
  transition: color 0.2s;
}
.related-info a:hover { color: var(--primary); }
.related-info span { font-size: 0.75rem; color: var(--text-muted); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .post-layout { grid-template-columns: 1fr; gap: 2rem; }
  .post-sidebar { position: static; }
}
@media (max-width: 768px) {
  .post-hero { padding: 3rem 0 2rem; }
  .post-hero-inner { padding: 0 1rem; }
  .post-title { font-size: 1.75rem; }
  .post-layout { padding: 0 1rem; margin: 2rem auto; }
  .post-body h2 { font-size: 1.4rem; margin-top: 1.75rem; }
  .post-body h3 { font-size: 1.1rem; }
  .post-body p, .post-body li { font-size: 0.97rem; }
}
@media (max-width: 500px) {
  .post-title { font-size: 1.5rem; }
  .post-meta { gap: 0.75rem; font-size: 0.8rem; }
  .author-box { flex-direction: column; padding: 1.5rem; gap: 1rem; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-next { text-align: left; }
  .post-nav-next .nav-label { justify-content: flex-start; }
  .post-featured-img { max-height: 220px; border-radius: 0 0 var(--r-lg) var(--r-lg); }
}
