/* ============================================================
   StopBurnout — blog styles
   Piggybacks on css/styles.css (same :root tokens, nav, footer,
   aurora, buttons, .reveal, .eyebrow, .grad-text). This file only
   adds the blog index + article-reading layer.
   ============================================================ */

/* ---------- shared blog page shell ---------- */
.blog-main { position: relative; z-index: 1; }

.blog-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

/* breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--faint);
  margin-bottom: 22px;
}
.breadcrumb a { color: var(--muted); transition: color 0.15s ease; }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb [aria-current] { color: var(--muted); }

/* ---------- blog index hero ---------- */
.blog-hero {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: 150px 28px 20px;
  text-align: center;
}
.blog-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 800;
  margin-bottom: 20px;
}
.blog-hero .lede {
  color: var(--muted);
  font-size: clamp(17px, 1.7vw, 20px);
  max-width: 60ch;
  margin: 0 auto;
}

/* ---------- post listing grid ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding: 56px 0 30px;
}
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px 28px 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 212, 191, 0.28);
  background: var(--card-hover);
}
/* first post spans full width as a feature */
.post-card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  padding: 40px;
}
.post-card.featured .post-card-body { flex: 1; }
.post-card.featured .post-card-visual {
  flex: 0 0 300px;
  align-self: stretch;
  display: grid;
  place-items: center;
}
.post-card-visual .glyph-ring {
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 40%, rgba(45, 212, 191, 0.16), transparent 68%),
    conic-gradient(from 200deg, rgba(255,107,74,0.22), rgba(255,182,92,0.10), rgba(45,212,191,0.28), rgba(255,107,74,0.22));
  border: 1px solid var(--line);
}
.post-card-visual .glyph-ring svg { width: 78px; height: 78px; color: var(--teal); }

.post-card a.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}
.post-tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-head);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.22);
  padding: 5px 12px;
  border-radius: 999px;
}
.post-card h2 {
  font-size: 23px;
  font-weight: 700;
  line-height: 1.25;
}
.post-card.featured h2 { font-size: clamp(26px, 3vw, 34px); }
.post-card h2 a { transition: color 0.15s ease; }
.post-card:hover h2 a { color: var(--teal); }
.post-excerpt { color: var(--muted); font-size: 15.5px; }
.post-card.featured .post-excerpt { font-size: 17px; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  font-size: 13px;
  color: var(--faint);
}
.post-meta .sep { opacity: 0.5; }
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  color: var(--teal);
}
.read-more svg { width: 15px; height: 15px; transition: transform 0.18s ease; }
.post-card:hover .read-more svg { transform: translateX(3px); }

/* ---------- individual article ---------- */
.article {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 130px 28px 0;
}
.post-header { margin-bottom: 40px; }
.post-header h1 {
  font-size: clamp(30px, 4.6vw, 50px);
  font-weight: 800;
  margin: 18px 0 18px;
}
.post-header .post-standfirst {
  font-size: clamp(18px, 2vw, 21px);
  color: var(--muted);
  line-height: 1.5;
}
.post-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--faint);
}
.post-byline .author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 500;
}
.post-byline .avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(120deg, var(--teal), var(--mint));
  color: #06231d;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 14px;
  flex: 0 0 auto;
}
.post-byline .sep { opacity: 0.5; }

/* table of contents */
.post-toc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 26px;
  margin-bottom: 42px;
}
.post-toc p {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 12px;
}
.post-toc ol {
  list-style: none;
  counter-reset: toc;
  display: grid;
  gap: 9px;
}
.post-toc li { counter-increment: toc; }
.post-toc a {
  display: flex;
  gap: 12px;
  font-size: 15px;
  color: var(--muted);
  transition: color 0.15s ease;
}
.post-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal);
  opacity: 0.7;
}
.post-toc a:hover { color: var(--ink); }

/* ---------- article prose ---------- */
.post-body { font-size: 18px; line-height: 1.75; color: #dfe4ea; }
.post-body > * + * { margin-top: 26px; }
.post-body h2 {
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 700;
  margin-top: 56px;
  scroll-margin-top: 100px;
}
.post-body h2 + p { margin-top: 18px; }
.post-body h3 {
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 40px;
  scroll-margin-top: 100px;
}
.post-body p { color: #d5dbe2; }
.post-body strong { color: var(--ink); font-weight: 700; }
.post-body em { color: #eef2f5; }
.post-body a {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: rgba(45, 212, 191, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}
.post-body a:hover { text-decoration-color: var(--teal); }
.post-body ul, .post-body ol { list-style: none; padding-left: 4px; display: grid; gap: 12px; }
.post-body li {
  position: relative;
  padding-left: 30px;
  color: #d5dbe2;
}
.post-body ul li::before {
  content: "";
  position: absolute;
  left: 6px; top: 12px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
}
.post-body ol { counter-reset: li; }
.post-body ol li { counter-increment: li; }
.post-body ol li::before {
  content: counter(li);
  position: absolute;
  left: 0; top: 1px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.25);
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  line-height: 1;
}
.post-body li strong { color: var(--ink); }
.post-body blockquote {
  border-left: 3px solid var(--teal);
  padding: 6px 0 6px 24px;
  margin-left: 2px;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.post-body blockquote cite {
  display: block;
  margin-top: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  font-style: normal;
  color: var(--faint);
}
.post-body code {
  font-size: 0.86em;
}
.post-body h2 code, .post-body h3 code { font-size: 0.8em; }

/* key-takeaways / callout box */
.callout {
  background: linear-gradient(160deg, rgba(45, 212, 191, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 18px;
  padding: 26px 28px;
}
.callout p:first-child {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}
.callout ul { margin-top: 0; }

/* pull-figure (screenshot inside article) */
.post-figure { margin: 44px 0; }
.post-figure .winframe { margin: 0 auto; }
.post-figure figcaption {
  text-align: center;
  font-size: 13.5px;
  color: var(--faint);
  margin-top: 14px;
}

/* ---------- inline product CTA ---------- */
.post-cta {
  position: relative;
  overflow: hidden;
  margin: 60px 0 10px;
  padding: 40px;
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(255,107,74,0.10), rgba(45,212,191,0.10));
  border: 1px solid var(--line);
}
.post-cta h2 {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 12px;
  line-height: 1.2;
}
.post-cta p { color: var(--muted); font-size: 16px; margin-bottom: 22px; }
.post-cta .post-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.post-cta .cta-meta { margin-top: 16px; font-size: 12.5px; color: var(--faint); }

/* ---------- read next ---------- */
.read-next {
  max-width: 1160px;
  margin: 80px auto 0;
  padding: 0 28px;
}
.read-next-head {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 24px;
}
.read-next-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ---------- tag/footer utility ---------- */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 50px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.post-tags .chip-tag {
  font-size: 13px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
}

/* subtle back-to-blog link */
.blog-backlink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.15s ease;
}
.blog-backlink:hover { color: var(--teal); }
.blog-backlink svg { width: 16px; height: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .post-grid { grid-template-columns: 1fr; gap: 20px; padding-top: 44px; }
  .post-card.featured { flex-direction: column; align-items: flex-start; gap: 24px; padding: 32px 26px; }
  .post-card.featured .post-card-visual { flex-basis: auto; width: 100%; }
  .post-card-visual .glyph-ring { width: 140px; height: 140px; }
  .post-card-visual .glyph-ring svg { width: 58px; height: 58px; }
  .read-next-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .blog-hero { padding-top: 128px; }
  .article { padding-top: 116px; }
  .post-body { font-size: 17px; }
  .post-cta { padding: 30px 24px; }
  .post-cta-actions .btn { width: 100%; }
  .blog-wrap, .read-next { padding-inline: 20px; }
  .blog-hero { padding-inline: 20px; }
  .article { padding-inline: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .post-card, .read-more svg { transition: none; }
}
