/* Blog pages — light theme */
.page-blog {
  background: #fafafa;
  color: #1a1a2e;
}

.page-blog .noise,
.page-blog::before,
.page-blog::after {
  display: none;
}

/* Blog layout */
.blog-container {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2rem, 5vh, 4rem) clamp(1.25rem, 4vw, 3rem);
}

/* Blog list page */
.blog-header {
  margin-bottom: 3rem;
}

.blog-header h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: #1a1a2e;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.blog-header p {
  font-size: 1rem;
  color: #64748b;
  line-height: 1.6;
}

/* Post cards on list page */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-card {
  padding-bottom: 2rem;
  border-bottom: 1px solid #e2e8f0;
}

.post-card:last-child {
  border-bottom: none;
}

.post-card-date {
  font-size: 0.78rem;
  font-weight: 500;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.post-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.post-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

.post-card-title a:hover {
  color: #0891b2;
}

.post-card-excerpt {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.post-card-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.post-tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: #0891b2;
  background: rgba(8, 145, 178, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.15s;
}

.post-tag:hover {
  background: rgba(8, 145, 178, 0.15);
}

/* Single post page */
.post-header {
  margin-bottom: 2rem;
}

.post-meta {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.post-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #94a3b8;
}

.post-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: #1a1a2e;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.post-description {
  font-size: 1.1rem;
  color: #64748b;
  line-height: 1.6;
}

/* Post body — markdown content */
.post-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
}

.post-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.02em;
}

.post-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a2e;
  margin: 2rem 0 0.75rem;
}

.post-body p {
  margin-bottom: 1.25rem;
}

.post-body a {
  color: #0891b2;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-body a:hover {
  color: #0e7490;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.post-body blockquote {
  border-left: 3px solid #0891b2;
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: #64748b;
  font-style: italic;
}

.post-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  background: #f1f5f9;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: #0e7490;
}

.post-body pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-body pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.88rem;
}

.post-body ul, .post-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.post-body li {
  margin-bottom: 0.4rem;
}

/* Featured image */
.post-featured-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 2rem;
}

/* Post footer — back link and tags */
.post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.post-back {
  font-size: 0.88rem;
  color: #0891b2;
  text-decoration: none;
  font-weight: 500;
}

.post-back:hover {
  text-decoration: underline;
}

/* Blog footer on light pages */
.site-footer--blog {
  background: var(--bg);
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
}

.site-footer--blog .footer-contact,
.site-footer--blog .legal {
  text-align: center;
}

/* Blog page responsive */
@media (max-width: 560px) {
  .post-title {
    font-size: 1.5rem;
  }
  .post-body {
    font-size: 1rem;
  }
}
