/* ── Blog Listing ── */
.blog-hero {
  padding-top: calc(var(--nav-h) + 5rem);
  padding-bottom: 3rem;
  text-align: center;
  position: relative;
  z-index: 1;
}
.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  animation: fadeUp 0.8s ease-out 0.1s both;
}
.blog-hero p {
  color: var(--text-dim);
  font-weight: 300;
  font-size: 1.05rem;
  max-width: 520px;
  margin: 1rem auto 0;
  animation: fadeUp 0.8s ease-out 0.2s both;
}

.blog-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
  opacity: 0;
  animation: fadeUp 0.6s ease-out forwards;
}
.blog-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--brand-dim);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(216, 192, 255, 0.08);
  color: var(--text);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.blog-card-tag {
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: rgba(216, 192, 255, 0.08);
  color: var(--brand-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.blog-card h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.01em;
}
.blog-card p {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.6;
  font-weight: 300;
}
.blog-card-read {
  margin-top: auto;
  padding-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.blog-card-read svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
}
.blog-card:hover .blog-card-read svg {
  transform: translateX(3px);
}

/* ── Blog Post Article ── */
.post-header {
  padding-top: calc(var(--nav-h) + 5rem);
  padding-bottom: 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  transition: color var(--transition);
  opacity: 0;
  animation: fadeUp 0.6s ease-out 0.05s both;
}
.post-back:hover {
  color: var(--brand);
}
.post-back svg {
  width: 14px;
  height: 14px;
}
.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease-out 0.1s both;
}
.post-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}
.post-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: 0.01em;
  opacity: 0;
  animation: fadeUp 0.8s ease-out 0.15s both;
}
.post-header .post-subtitle {
  color: var(--text-dim);
  font-size: 1.1rem;
  font-weight: 300;
  margin-top: 1rem;
  line-height: 1.6;
  opacity: 0;
  animation: fadeUp 0.8s ease-out 0.25s both;
}

/* ── Article Body ── */
.post-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.post-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin-top: 3rem;
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
  color: var(--text);
}
.post-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--brand);
}
.post-body p {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.8;
  font-weight: 300;
  margin-bottom: 1.25rem;
}
.post-body strong {
  color: var(--text);
  font-weight: 500;
}
.post-body a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(216, 192, 255, 0.3);
}
.post-body a:hover {
  text-decoration-color: var(--brand);
}

.post-body ul,
.post-body ol {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.8;
  font-weight: 300;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}
.post-body li {
  margin-bottom: 0.4rem;
}
.post-body li strong {
  color: var(--text);
}

.post-body blockquote {
  border-left: 3px solid var(--brand-dim);
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: rgba(216, 192, 255, 0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.post-body blockquote p {
  color: var(--text);
  font-style: italic;
  margin-bottom: 0;
}

.post-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(216, 192, 255, 0.08);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--brand);
}

.post-body pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  position: relative;
}
.post-body pre code {
  background: none;
  padding: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text);
}

.post-body .install-block {
  margin: 2rem 0;
}

.post-body hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 2.5rem 0;
  opacity: 0.5;
}

/* Divider between sections */
.post-divider {
  width: 40px;
  height: 2px;
  background: var(--brand-dim);
  margin: 3rem auto;
  border-radius: 1px;
  opacity: 0.5;
}

/* Post CTA */
.post-cta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  margin-top: 3rem;
}
.post-cta h3 {
  font-family: var(--font-display);
  font-weight: 400;
  margin-top: 0;
  color: var(--text);
}
.post-cta p {
  margin-bottom: 1.5rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .post-header {
    padding-top: calc(var(--nav-h) + 3rem);
  }
  .post-body h2 {
    font-size: 1.3rem;
  }
  .post-body pre {
    padding: 1rem;
  }
  .post-body code {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
