/* =============================================
   AppTriage Blog — Stylesheet
   ============================================= */

/* ── Blog article hero ── */
.blog-hero {
  padding-top: 8rem;
  padding-bottom: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  background: radial-gradient(ellipse at 50% 20%, #e0ecff, transparent 65%);
  opacity: .3;
  pointer-events: none;
}
.blog-hero > * { position: relative; z-index: 1; }

.blog-title {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--at-slate);
  margin: 0 auto .75rem;
  max-width: 780px;
}

.blog-meta {
  font-size: .875rem;
  color: var(--at-muted);
  letter-spacing: -0.005em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.blog-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--at-border);
}

/* ── Hero photo ── */
.blog-hero-photo {
  display: block;
  max-width: 720px;
  width: 100%;
  height: auto;
  margin: 2.5rem auto 0;
  border-radius: 14px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.10);
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

/* ── Inline illustrations ── */
figure.blog-illustration {
  text-align: center;
  margin: 2.5rem auto 3rem;
  padding: 1.5rem 0;
}
figure.blog-illustration img {
  display: block;
  max-width: 420px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  opacity: .85;
}

/* ── Article body ── */
.blog-article {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.blog-article p {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--at-slate);
  margin: 0 0 1.5rem;
  letter-spacing: -0.005em;
}

.blog-article h2 {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--at-slate);
  margin: 3rem 0 1.25rem;
}

.blog-article h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--at-slate);
  margin: 2.5rem 0 1rem;
}

.blog-article a {
  color: var(--at-navy);
  text-decoration: none;
  font-weight: 500;
}
.blog-article a:hover {
  text-decoration: underline;
}

.blog-article strong {
  font-weight: 600;
  color: var(--at-slate);
}

.blog-article em {
  font-style: italic;
}

.blog-article blockquote {
  border-left: 3px solid var(--at-navy);
  padding: .75rem 0 .75rem 1.25rem;
  margin: 2rem 0;
  background: transparent;
}
.blog-article blockquote p {
  font-style: italic;
  color: var(--at-muted);
  margin: 0;
}

.blog-article ul,
.blog-article ol {
  padding-left: 1.5rem;
  margin: 0 0 1.5rem;
}
.blog-article li {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--at-slate);
  margin-bottom: .5rem;
  letter-spacing: -0.005em;
}

.blog-article hr {
  border: none;
  border-top: 1px solid var(--at-border);
  margin: 3rem 0;
}

/* ── Code blocks ── */
.blog-article pre {
  background: var(--at-slate);
  color: #e2e4e8;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-size: .8125rem;
  line-height: 1.65;
  margin: 1.5rem 0 2rem;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}
.blog-article code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: .875em;
}
.blog-article p code,
.blog-article li code {
  background: var(--at-surface);
  padding: .125rem .375rem;
  border-radius: 4px;
  color: var(--at-navy-deep);
  font-size: .8125rem;
}

/* ── Blog footer CTA ── */
.blog-cta {
  font-style: italic;
  color: var(--at-muted);
  font-size: 1rem;
  line-height: 1.7;
  padding-top: 1rem;
}
.blog-cta a {
  color: var(--at-navy);
  font-weight: 500;
}

/* ── Related posts ── */
.blog-related {
  max-width: 680px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}
.blog-related h3 {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--at-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .6875rem;
  margin-bottom: 1rem;
}
.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.blog-related-card {
  display: block;
  background: #fff;
  border: 1px solid var(--at-border);
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none !important;
  transition: border-color .2s, box-shadow .2s;
}
.blog-related-card:hover {
  border-color: var(--at-navy);
  box-shadow: 0 2px 12px rgba(0,84,166,0.08);
}
.blog-related-card h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .9375rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--at-slate);
  margin: 0 0 .375rem;
}
.blog-related-card p {
  font-size: .8125rem;
  color: var(--at-muted);
  line-height: 1.5;
  margin: 0;
}

/* ── Blog index page ── */
.blog-index-hero {
  padding-top: 8rem;
  padding-bottom: 2rem;
  text-align: center;
}
.blog-index-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  background: radial-gradient(ellipse at 50% 20%, #e0ecff, transparent 65%);
  opacity: .3;
  pointer-events: none;
}
.blog-index-title {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--at-slate);
  margin: 0 0 .75rem;
  position: relative;
  z-index: 1;
}
.blog-index-sub {
  font-size: 1.125rem;
  color: var(--at-muted);
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.blog-grid {
  max-width: 880px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.blog-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--at-border);
  text-decoration: none !important;
  transition: opacity .15s;
}
.blog-card:first-child { padding-top: 0; }
.blog-card:last-child { border-bottom: none; }
.blog-card:hover { opacity: .8; }
.blog-card-date {
  font-size: .75rem;
  font-weight: 500;
  color: var(--at-muted);
  letter-spacing: -0.01em;
  min-width: 70px;
  padding-top: .25rem;
}
.blog-card-img {
  width: 120px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.blog-card-body { flex: 1; min-width: 0; }
.blog-card-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--at-slate);
  margin: 0 0 .375rem;
}
.blog-card-excerpt {
  font-size: .9375rem;
  color: var(--at-muted);
  line-height: 1.6;
  letter-spacing: -0.005em;
  margin: 0;
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .blog-hero-photo {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 1.5rem;
  }
  figure.blog-illustration img {
    max-width: 280px;
  }
  .blog-card { flex-direction: column; gap: .5rem; }
  .blog-card-date { min-width: auto; }
  .blog-card-img { width: 100%; height: 160px; border-radius: 8px; }
}
