/* Blog post page: layout, TOC, article */
.blog-post-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 80px;
  position: relative;
}

.blog-post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  padding: 32px 0 24px;
  transition: color 0.2s;
}
.blog-post-back:hover { color: var(--text); }
.blog-post-back::before { content: '‹'; font-size: 18px; }

.blog-post-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  align-items: start;
}

.blog-post-toc {
  width: 280px;
  position: sticky;
  top: 80px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}
.blog-post-toc-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 600;
}
.blog-post-toc ul {
  list-style: none;
}
.blog-post-toc li {
  margin-bottom: 10px;
}
.blog-post-toc a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
  transition: color 0.2s;
  display: block;
}
.blog-post-toc a:hover { color: var(--text); }
.blog-post-toc a.is-active {
  color: #4dcfbe;
  font-weight: 500;
}

.blog-post-main {
  max-width: 680px;
  min-width: 0;
}

.blog-post-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 400;
  line-height: 1.2;
  color: #fff;
  margin: 0 0 12px;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.blog-post-meta .sep { color: var(--text-muted); opacity: 0.7; }
.blog-post-meta .read-badge {
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 3px 12px;
  font-size: 13px;
  text-transform: none;
}

.blog-post-hero {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin: 32px 0;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}
.blog-post-hero img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 12px;
}

.blog-post-body {
  font-size: 17px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.85);
}
.blog-post-body p {
  margin-bottom: 20px;
}
.blog-post-body h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  color: #fff;
  margin-top: 48px;
  margin-bottom: 16px;
  scroll-margin-top: 100px;
}
.blog-post-body h2:first-of-type { margin-top: 0; }
.blog-post-body img {
  width: 100%;
  border-radius: 12px;
  margin: 32px 0;
  display: block;
}
.blog-post-body pre,
.blog-post-body code {
  font-family: ui-monospace, monospace;
  font-size: 14px;
}
.blog-post-body pre {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
}

@media (max-width: 1024px) {
  .blog-post-layout { grid-template-columns: 1fr; }
  .blog-post-toc { display: none; }
  .blog-post-main { max-width: 100%; }
}

/* Related Articles */
.blog-related {
  margin-top: 80px;
  padding-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.blog-related-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 24px;
}
.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.blog-related-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s;
}
.blog-related-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}
.blog-related-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.blog-related-title {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.4;
  flex: 1;
}
.blog-related-cta {
  font-size: 13px;
  color: var(--accent);
  margin-top: auto;
}
@media (max-width: 768px) {
  .blog-related-grid {
    grid-template-columns: 1fr;
  }
  .blog-post-wrap { padding: 0 16px 60px; }
  .blog-post-back { padding: 24px 0 20px; }
}
