/* ============================================
   BLOG STYLES — Listing + Article
   ============================================ */

/* --- Blog Hero --- */
.blog-hero {
  padding-top: 160px;
  padding-bottom: 48px;
}

.blog-hero-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 12px;
}

.blog-hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 500px;
}

/* --- Blog Filters --- */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
}

.blog-filter-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--tag-text);
  background: var(--tag-bg);
  padding: 8px 16px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}

.blog-filter-tag:hover,
.blog-filter-tag.active {
  background: var(--accent);
  color: white;
}

/* --- Blog Grid --- */
.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* --- Blog Card --- */
.blog-card {
  padding: 32px 0;
  border-bottom: 1px solid var(--border-light);
  transition: all 0.3s var(--ease);
}

.blog-card:first-child {
  padding-top: 0;
}

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

.blog-card-link {
  display: block;
  transition: transform 0.3s var(--ease);
}

.blog-card-link:hover {
  transform: translateX(8px);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

.blog-card-dot {
  color: var(--accent);
}

.blog-card-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.blog-card-link:hover .blog-card-title {
  color: var(--accent);
}

.blog-card-excerpt {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.blog-card-tags {
  display: flex;
  gap: 8px;
}

/* --- Blog Empty State --- */
.blog-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--text-tertiary);
  font-size: 16px;
}

/* ============================================
   ARTICLE PAGE
   ============================================ */

/* --- Reading Progress Bar --- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 101;
  transition: transform 0.1s linear;
  pointer-events: none;
}

/* --- Article Header --- */
.article {
  padding-top: 140px;
  padding-bottom: var(--section-padding);
}

.article-back {
  margin-bottom: 40px;
}

.article-back a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.article-back a:hover {
  color: var(--accent);
}

.article-header {
  margin-bottom: 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-light);
}

.article-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.article-tags {
  display: flex;
  gap: 8px;
}

/* ============================================
   PROSE TYPOGRAPHY
   ============================================ */
.prose {
  max-width: 100%;
}

.prose h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-top: 56px;
  margin-bottom: 16px;
}

.prose h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin-top: 40px;
  margin-bottom: 12px;
}

.prose p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.prose a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.prose a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.prose strong {
  font-weight: 600;
  color: var(--text);
}

.prose ul,
.prose ol {
  padding-left: 24px;
  margin-bottom: 24px;
}

.prose li {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.prose li::marker {
  color: var(--accent);
}

.prose img {
  border-radius: 12px;
  margin: 32px 0;
  border: 1px solid var(--border-light);
  width: 100%;
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 24px;
  margin: 32px 0;
  font-size: 18px;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.7;
}

.prose hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

/* --- Code Blocks --- */
.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--tag-bg);
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--tag-text);
}

.prose pre {
  background: var(--code-bg);
  color: #E7E5E4;
  border-radius: 12px;
  padding: 24px;
  overflow-x: auto;
  margin: 32px 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  border: 1px solid var(--border);
}

.prose pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
  border-radius: 0;
}

/* Syntax token colors — warm theme */
.token-keyword  { color: #C4B5A4; }
.token-string   { color: #A8C4A0; }
.token-comment  { color: #78716C; font-style: italic; }
.token-function { color: #D4A574; }
.token-number   { color: #B8A9D4; }
.token-property { color: #E7C4A0; }
.token-tag      { color: #D4A574; }
.token-attr     { color: #A8C4A0; }
.token-punct    { color: #78716C; }

/* --- Article Navigation --- */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
}

.article-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s var(--ease);
}

.article-nav-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.article-nav-next {
  text-align: right;
}

.article-nav-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

.article-nav-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

/* ============================================
   RESPONSIVE — Blog
   ============================================ */
@media (max-width: 768px) {
  .blog-hero {
    padding-top: 120px;
  }

  .article {
    padding-top: 100px;
  }

  .article-title {
    font-size: clamp(28px, 6vw, 40px);
  }

  .article-meta {
    flex-wrap: wrap;
    gap: 8px;
  }

  .article-nav {
    grid-template-columns: 1fr;
  }

  .article-nav-next {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .blog-hero {
    padding-top: 100px;
  }

  .blog-hero-title {
    font-size: 28px;
  }

  .blog-card-title {
    font-size: 18px;
  }

  .article-title {
    font-size: 28px;
  }

  .prose h2 {
    font-size: 20px;
  }

  .prose h3 {
    font-size: 18px;
  }

  .prose p,
  .prose li {
    font-size: 16px;
  }

  .prose pre {
    font-size: 13px;
    padding: 16px;
    border-radius: 8px;
  }
}
