/* ══════════════════════════════════════════════
   BLOG HERO
══════════════════════════════════════════════ */
.blog-hero {
  background: var(--muted, #f8fafc);
  border-bottom: 1px solid var(--border, #e2e8f0);
  padding: 56px 0 48px;
}
.blog-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.blog-hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.03em;
  margin: 12px 0 10px;
}
.blog-hero-desc {
  font-size: 1.05rem;
  color: var(--muted-fg, #64748b);
  max-width: 500px;
  line-height: 1.65;
}

/* Search */
.blog-search-wrap {
  position: relative;
  max-width: 520px;
}
.blog-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-fg, #94a3b8);
  pointer-events: none;
}
.blog-search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border-radius: 10px;
  border: 1.5px solid var(--border, #e2e8f0);
  background: var(--bg, #fff);
  color: var(--fg, #0f172a);
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.blog-search-input:focus {
  border-color: var(--primary, #6366f1);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #6366f1) 12%, transparent);
}
.blog-search-input::placeholder { color: var(--muted-fg, #94a3b8); }

/* ══════════════════════════════════════════════
   BLOG MAIN LAYOUT
══════════════════════════════════════════════ */
.blog-main {
  padding: 48px 24px 80px;
  max-width: 1100px;
}
.blog-section { margin-bottom: 52px; }
.blog-section-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted-fg, #64748b);
  margin-bottom: 20px;
}

/* Tags */
.blog-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  background: color-mix(in srgb, var(--primary, #6366f1) 10%, transparent);
  color: var(--primary, #6366f1);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
}

/* Date / read time */
.blog-date { font-size: .8rem; color: var(--muted-fg, #64748b); }
.blog-dot  { color: var(--muted-fg, #64748b); font-size: .8rem; }
.blog-rt   { font-size: .8rem; color: var(--muted-fg, #64748b); }

/* ══════════════════════════════════════════════
   FEATURED CARD
══════════════════════════════════════════════ */
.blog-feat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 16px;
  border: 1.5px solid var(--border, #e2e8f0);
  background: var(--card, #fff);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, transform .2s;
  min-height: 280px;
}
.blog-feat:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,.1);
  transform: translateY(-2px);
}
.blog-feat-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-feat-placeholder {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary, #6366f1) 8%, transparent), color-mix(in srgb, var(--primary, #6366f1) 3%, transparent));
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.blog-feat-body {
  padding: 36px 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.blog-feat-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.blog-feat-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.blog-feat-excerpt {
  font-size: .93rem;
  color: var(--muted-fg, #64748b);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-feat-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; }

/* ══════════════════════════════════════════════
   REGULAR CARDS GRID
══════════════════════════════════════════════ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1.5px solid var(--border, #e2e8f0);
  background: var(--card, #fff);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, transform .2s;
}
.blog-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.09);
  transform: translateY(-2px);
}
.blog-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.blog-card-placeholder {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary, #6366f1) 8%, transparent), color-mix(in srgb, var(--primary, #6366f1) 3%, transparent));
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-card-body {
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.blog-card-tags  { display: flex; gap: 6px; flex-wrap: wrap; }
.blog-card-title { font-size: 1rem; font-weight: 700; line-height: 1.4; }
.blog-card-excerpt {
  font-size: .86rem;
  color: var(--muted-fg, #64748b);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border, #e2e8f0);
}

/* Empty states */
.blog-empty { color: var(--muted-fg, #64748b); padding: 40px 0; }
.blog-empty-search {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 0;
  color: var(--muted-fg, #64748b);
  text-align: center;
}
.blog-empty-search p { font-size: .95rem; }

/* ══════════════════════════════════════════════
   POST PAGE
══════════════════════════════════════════════ */
.post-wrap { max-width: 760px; margin: 0 auto; padding: 52px 24px 100px; }

.post-cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 36px;
  display: block;
}
.post-header { margin-bottom: 36px; }
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.post-title {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.025em;
  margin-bottom: 16px;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1.5px solid var(--border, #e2e8f0);
}

/* Prose */
.post-body { line-height: 1.8; }
.post-body h1,.post-body h2,.post-body h3 { font-weight: 700; margin: 2em 0 .6em; line-height: 1.3; }
.post-body h1 { font-size: 1.8rem; }
.post-body h2 { font-size: 1.35rem; padding-bottom: .4em; border-bottom: 1px solid var(--border, #e2e8f0); }
.post-body h3 { font-size: 1.1rem; }
.post-body p  { margin: 1em 0; }
.post-body ul,.post-body ol { padding-left: 1.5em; margin: 1em 0; }
.post-body li { margin: .45em 0; }
.post-body a  { color: var(--primary, #6366f1); text-underline-offset: 3px; }
.post-body strong { font-weight: 700; }
.post-body code {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: .875em;
  background: var(--muted, #f1f5f9);
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--border, #e2e8f0);
}
.post-body pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 22px 24px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 1.8em 0;
  border: 1px solid #1e293b;
}
.post-body pre code { background: none; padding: 0; font-size: .875rem; border: none; }
.post-body blockquote {
  border-left: 3px solid var(--primary, #6366f1);
  padding: 4px 0 4px 18px;
  margin: 1.8em 0;
  color: var(--muted-fg, #64748b);
  font-style: italic;
}
.post-body img  { max-width: 100%; border-radius: 10px; margin: 1.8em 0; display: block; }
.post-body hr   { border: none; border-top: 1.5px solid var(--border, #e2e8f0); margin: 2.5em 0; }
.post-body table { border-collapse: collapse; width: 100%; margin: 1.8em 0; font-size: .9rem; }
.post-body th { background: var(--muted, #f8fafc); font-weight: 600; }
.post-body th,.post-body td { border: 1px solid var(--border, #e2e8f0); padding: 10px 14px; text-align: left; }
.post-body tr:nth-child(even) td { background: color-mix(in srgb, var(--muted, #f8fafc) 60%, transparent); }

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 52px;
  color: var(--primary, #6366f1);
  text-decoration: none;
  font-weight: 500;
  font-size: .9rem;
}
.post-back:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 700px) {
  .blog-hero-title { font-size: 1.8rem; }
  .blog-feat { grid-template-columns: 1fr; }
  .blog-feat-placeholder { min-height: 180px; }
  .blog-feat-body { padding: 24px; }
  .blog-feat-title { font-size: 1.2rem; }
  .blog-grid { grid-template-columns: 1fr; }
  .post-title { font-size: 1.6rem; }
}
