/* ==========================================================================
   Blog-specific styles
   ========================================================================== */

.blog-hero {
  padding: 72px 0 48px;
  background:
    radial-gradient(800px 400px at 50% 0%, rgba(28, 94, 251, 0.12), transparent 60%),
    linear-gradient(180deg, #F6F8FD, #FFFFFF);
  text-align: center;
}
.blog-hero h1 {
  font-size: clamp(40px, 5.5vw, 60px);
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin-bottom: 18px;
}
.blog-hero p {
  max-width: 560px;
  margin: 0 auto;
  color: var(--ink-3);
  font-size: 18px;
  line-height: 1.5;
}

/* Blog list grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 48px 0 96px;
}
.blog-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(28,94,251,0.35); }
.blog-card-image {
  aspect-ratio: 16/9;
  background: var(--mist);
  background-size: cover;
  background-position: center;
}
.blog-card-body {
  padding: 22px 22px 24px;
  display: flex; flex-direction: column; gap: 10px; flex: 1;
}
.blog-card-cat {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.blog-card h3 {
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.blog-card p {
  font-size: 14.5px;
  color: var(--ink-3);
  line-height: 1.5;
  flex: 1;
}
.blog-card-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.blog-card-meta .author-av {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--ink));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 11px;
}

/* Featured (first) */
.blog-grid > a:first-child {
  grid-column: span 3;
  flex-direction: row;
}
.blog-grid > a:first-child .blog-card-image {
  flex: 1.1;
  aspect-ratio: auto;
  min-height: 360px;
}
.blog-grid > a:first-child .blog-card-body { flex: 1; padding: 40px; justify-content: center; gap: 14px; }
.blog-grid > a:first-child h3 { font-size: 30px; }
.blog-grid > a:first-child p { font-size: 16px; }

@media (max-width: 920px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid > a:first-child { grid-column: span 2; flex-direction: column; }
  .blog-grid > a:first-child .blog-card-image { min-height: 220px; }
  .blog-grid > a:first-child .blog-card-body { padding: 26px; }
  .blog-grid > a:first-child h3 { font-size: 24px; }
}
@media (max-width: 620px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-grid > a:first-child { grid-column: span 1; }
}

.blog-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 15px;
}

/* ==========================================================================
   Single post
   ========================================================================== */
.post-hero {
  padding: 72px 0 40px;
  background: linear-gradient(180deg, #F6F8FD, #fff);
}
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 26px;
}
.post-back:hover { color: var(--brand); }
.post-cat {
  display: inline-block;
  padding: 5px 12px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}
.post-hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  max-width: 820px;
  margin-bottom: 22px;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
}
.post-meta .author {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink);
  font-weight: 600;
}
.post-meta .author-av {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--ink));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px;
}
.post-meta .sep { opacity: 0.5; }

.post-cover {
  max-width: 960px;
  margin: 0 auto 56px;
  padding: 0 var(--gutter);
}
.post-cover img {
  width: 100%;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* Article body */
.post-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gutter) 96px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-2);
}
.post-body h2 {
  font-size: 30px;
  letter-spacing: -0.03em;
  margin: 48px 0 16px;
}
.post-body h3 {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 36px 0 12px;
}
.post-body p { margin: 0 0 20px; }
.post-body a { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.post-body a:hover { color: var(--brand-2); }
.post-body img {
  width: 100%;
  border-radius: var(--r-md);
  margin: 28px 0;
}
.post-body ul, .post-body ol { margin: 0 0 24px; padding-left: 24px; }
.post-body li { margin-bottom: 10px; }
.post-body blockquote {
  border-left: 4px solid var(--brand);
  margin: 28px 0;
  padding: 8px 0 8px 22px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink);
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  font-weight: 500;
  font-style: italic;
}
.post-body code {
  background: var(--mist);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 15px;
  font-family: "SF Mono", Menlo, monospace;
}
.post-body pre {
  background: var(--ink);
  color: #E4ECFA;
  padding: 20px;
  border-radius: var(--r-md);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  margin: 28px 0;
}
.post-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 48px 0;
}

/* CTA card embedded in post */
.post-cta {
  background: linear-gradient(135deg, #0A1628, #0B3FD1);
  color: #fff;
  padding: 40px;
  border-radius: var(--r-xl);
  margin: 56px 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
}
.post-cta img {
  width: 80px; height: 80px; border-radius: 50%;
  border: 3px solid #1C5EFB;
  margin: 0;
}
.post-cta h4 { color: #fff; font-size: 20px; letter-spacing: -0.02em; margin-bottom: 6px; }
.post-cta p { color: rgba(255,255,255,0.78); font-size: 15px; margin-bottom: 14px; }
.post-cta .btn { padding: 12px 20px; font-size: 14px; }
@media (max-width: 620px) {
  .post-cta { grid-template-columns: 1fr; text-align: center; padding: 28px; }
  .post-cta img { margin: 0 auto; }
}

/* Related posts */
.post-related {
  background: var(--mist);
  padding: 72px 0;
}
.post-related h3 {
  font-size: 28px;
  text-align: center;
  margin-bottom: 36px;
  letter-spacing: -0.02em;
}
