/* =================================================================
   Blog — extends style.css design tokens
   ================================================================= */

.blog-hero {
  padding: calc(var(--nav-height) + 64px) 0 56px;
}

.blog-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 10px;
}

.blog-hero p {
  font-size: 1.05rem;
  max-width: 560px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.blog-card .blog-card-thumb {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.blog-card .blog-card-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card .post-meta {
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.blog-card h4 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.blog-card h4 a {
  color: var(--color-text);
}

.blog-card h4 a:hover {
  color: var(--color-accent-safe);
}

.blog-card p {
  font-size: 0.92rem;
  line-height: 1.55;
  flex: 1;
  margin-bottom: 16px;
}

.blog-card .read-more {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-accent-safe);
}

.blog-card .read-more:hover {
  color: var(--color-accent-dark);
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.blog-tag {
  display: inline-block;
  background: var(--color-accent-soft);
  color: var(--color-accent-safe);
  border-radius: 999px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ------ single post page ------ */
.post-content {
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
}

.post-content p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.post-content h2,
.post-content h3 {
  margin-top: 36px;
  margin-bottom: 16px;
}

.post-content ul,
.post-content ol {
  margin: 0 0 20px 22px;
}

.post-content li {
  margin-bottom: 8px;
  color: var(--color-text-muted);
}

.post-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: 20px;
  color: var(--color-text-muted);
  font-style: italic;
  margin: 28px 0;
}

.post-content .video-container {
  margin: 28px 0;
  border-radius: var(--radius-md);
}

.post-content .video-container video,
.post-content .video-container iframe,
.post-content .video-container a.video-link img {
  height: 420px;
}

.post-nav {
  width: 100%;
  max-width: 740px;
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.post-nav a {
  color: var(--color-accent-safe);
  font-weight: 600;
}

/* code blocks inside a post */
.post-content pre {
  background: #1a1e25;
  color: #eef1f5;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 22px 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.post-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-family: var(--font-mono);
}

.post-content code {
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

@media (max-width: 960px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .post-content .video-container video,
  .post-content .video-container iframe,
  .post-content .video-container a.video-link img {
    height: 220px;
  }
}
