/* ============================================================
   Vora — blog (index + article)
   Depends on css/styles.css for brand tokens, nav, buttons, footer.
   Load order in <head>:  styles.css  →  blog.css
   ============================================================ */

/* ---------- shared page top spacing (fixed nav is 72px) ---------- */
.blog-main { padding-top: 72px; }

/* ---------- category colour map (reuse brand accents) ----------
   Fallback MUST come first: [data-cat] and [data-cat="x"] have equal
   specificity, so source order decides — the specific values below win. */
:root, [data-cat] { --cat: var(--orange); }
[data-cat="pronunciation"] { --cat: var(--teal); }
[data-cat="speaking"]      { --cat: var(--orange); }
[data-cat="mindset"]       { --cat: var(--purple); }
[data-cat="strategy"]      { --cat: var(--blue); }
[data-cat="reference"]     { --cat: var(--green); }
[data-cat="conversation"]  { --cat: var(--pink); }
[data-cat="tools"]         { --cat: var(--red); }

/* ============================================================
   COVER  (gradient + emoji — used on cards and article headers,
   so no raster images are required to ship a post)
   ============================================================ */
.cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 15% 10%, color-mix(in srgb, var(--cat) 45%, transparent), transparent 60%),
    linear-gradient(150deg, var(--surface-2), var(--bg-2));
  border-bottom: 1px solid var(--line);
}
.cover::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(90% 90% at 85% 90%, color-mix(in srgb, var(--purple) 28%, transparent), transparent 55%);
  mix-blend-mode: screen;
}
.cover__emoji { position: relative; z-index: 1; font-size: clamp(40px, 8vw, 72px); line-height: 1; filter: drop-shadow(0 8px 22px rgba(0,0,0,.4)); }
.cover__cat {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--cat);
  background: color-mix(in srgb, var(--cat) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat) 45%, transparent);
  padding: 5px 11px; border-radius: 999px; backdrop-filter: blur(6px);
}

/* ============================================================
   BLOG INDEX
   ============================================================ */
.blog-hero { padding: 64px 0 20px; text-align: center; }
.blog-hero .section__title { max-width: 760px; margin: 0 auto; }
.blog-hero p { color: var(--text-2); font-size: clamp(16px, 1.7vw, 19px); max-width: 620px; margin: 18px auto 0; }

.blog-search { /* purely presentational filter row */
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin: 34px auto 0; max-width: 820px;
}
.tag-pill {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .03em;
  color: var(--text-2); background: rgba(255,255,255,.04);
  border: 1px solid var(--line); padding: 8px 15px; border-radius: 999px;
  transition: color .2s, border-color .2s, background .2s;
}
.tag-pill:hover, .tag-pill[aria-current="true"] { color: var(--text); border-color: var(--line-2); background: rgba(255,255,255,.08); }

/* featured post (first, wide) */
.post-featured {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; margin: 48px 0 40px;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.post-featured:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: 0 24px 50px rgba(0,0,0,.4); }
.post-featured .cover { aspect-ratio: auto; height: 100%; min-height: 300px; border-bottom: 0; border-right: 1px solid var(--line); }
.post-featured__body { padding: 34px 36px; display: flex; flex-direction: column; justify-content: center; }
.post-featured__body .post-card__title { font-size: clamp(24px, 3vw, 34px); }
.post-featured__flag { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); margin-bottom: 12px; }

/* card grid */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.post-card:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: 0 24px 50px rgba(0,0,0,.4); }
.post-card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card__title { font-family: var(--font-serif); font-weight: 400; font-size: 21px; line-height: 1.2; color: var(--text); }
.post-card:hover .post-card__title, .post-featured:hover .post-card__title { color: #fff; }
.post-card__excerpt { color: var(--text-2); font-size: 14.5px; margin: 12px 0 18px; flex: 1; }
.post-card__meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); }
.post-card__meta .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

/* ============================================================
   ARTICLE
   ============================================================ */
.article { padding: 40px 0 20px; }
.article__inner { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* breadcrumb */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--text-2); margin-bottom: 26px; }
.crumbs a { color: var(--text-2); transition: color .2s; }
.crumbs a:hover { color: var(--orange); }
.crumbs span { color: var(--muted); }

/* header */
.article__cat {
  display: inline-block; font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--cat);
  margin-bottom: 16px;
}
.article__title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(30px, 5vw, 52px); line-height: 1.08; letter-spacing: -.01em;
  max-width: 900px;
}
.article__standfirst { color: var(--text-2); font-size: clamp(17px, 1.8vw, 20px); line-height: 1.55; margin-top: 20px; max-width: 760px; }
.article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 26px; font-size: 14px; color: var(--text-2); }
.byline { display: inline-flex; align-items: center; gap: 10px; }
.byline__avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--grad-warm); display: grid; place-items: center; font-family: var(--font-serif); color: #fff; font-size: 16px; }
.byline b { color: var(--text); font-weight: 600; }
.article__meta .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

.article__cover { margin: 34px 0 8px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
.article__cover .cover { aspect-ratio: 21 / 9; border-bottom: 0; }
.article__cover .cover__emoji { font-size: clamp(52px, 10vw, 96px); }

/* body: prose column + optional sticky TOC */
.article__grid { display: grid; grid-template-columns: 1fr; gap: 48px; margin-top: 44px; }
.article__grid.has-toc { grid-template-columns: 240px 1fr; }

.toc { position: sticky; top: 96px; align-self: start; font-size: 14px; }
.toc__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); margin-bottom: 14px; }
.toc a { display: block; color: var(--text-2); padding: 7px 0 7px 14px; border-left: 2px solid var(--line); line-height: 1.35; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--text); border-left-color: var(--orange); }

/* ---------- PROSE ---------- */
.prose { max-width: 720px; color: var(--text); font-size: 17.5px; line-height: 1.75; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 {
  font-family: var(--font-serif); font-weight: 400; font-size: clamp(24px, 3.2vw, 33px);
  line-height: 1.2; letter-spacing: -.01em; margin-top: 2em; scroll-margin-top: 96px;
}
.prose h3 { font-size: clamp(19px, 2.2vw, 23px); font-weight: 600; margin-top: 1.6em; scroll-margin-top: 96px; }
.prose p { color: var(--text); }
.prose a { color: var(--orange); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--orange) 40%, transparent); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.prose a:hover { text-decoration-color: var(--orange); }
.prose strong { color: #fff; font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.35em; display: grid; gap: .55em; }
.prose ul { list-style: none; }
.prose ul li { position: relative; padding-left: 20px; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.prose ol { list-style: decimal; color: var(--text-2); }
.prose ol li { padding-left: 6px; }
.prose ol li::marker { color: var(--orange); font-family: var(--font-mono); font-weight: 600; }
.prose li { color: var(--text); }
.prose blockquote {
  border-left: 3px solid var(--orange); padding: 4px 0 4px 22px; margin-left: 0;
  color: var(--text-2); font-style: italic; font-size: 1.05em;
}
.prose code {
  font-family: var(--font-mono); font-size: .88em;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  padding: 2px 6px; border-radius: 6px; color: var(--orange-2);
}
.prose img { border-radius: var(--radius); border: 1px solid var(--line); margin: 1.6em 0; }
.prose figure figcaption { font-size: 13.5px; color: var(--muted); text-align: center; margin-top: 8px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

/* comparison / data tables */
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 1.6em 0; display: block; overflow-x: auto; }
.prose thead th { text-align: left; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.prose tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: top; }
.prose tbody tr:hover td { background: rgba(255,255,255,.02); }

/* callout / key-takeaway box */
.callout {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line-2); border-left: 3px solid var(--cat, var(--orange));
  border-radius: var(--radius); padding: 20px 22px; margin: 1.8em 0;
}
.callout__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--cat, var(--orange)); margin-bottom: 8px; }
.callout p { font-size: 16px; color: var(--text); }

/* ---------- in-article CTA ---------- */
.post-cta {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--surface-2), var(--bg-2));
  border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  padding: 30px 32px; margin: 2.4em 0; text-align: center;
}
.post-cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 120% at 50% 0%, rgba(245,148,92,.18), transparent 60%); pointer-events: none; }
.post-cta__inner { position: relative; z-index: 1; }
.post-cta h3 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(22px, 3vw, 30px); line-height: 1.15; max-width: 560px; margin: 0 auto; }
.post-cta p { color: var(--text-2); font-size: 15.5px; margin: 12px auto 22px; max-width: 520px; }
.post-cta .hero__cta { justify-content: center; }
/* CTA links live inside .prose — .prose a (0,1,1) would otherwise override the
   button's own colour/decoration. Keep them styled as buttons, not prose links. */
.prose a.btn { text-decoration: none; }
.prose a.btn--primary { color: #fff; }
.prose a.btn--primary:hover { color: #fff; }
.prose a.btn--ghost { color: var(--text); }

/* ---------- FAQ (native <details>, no JS) ---------- */
.faq { margin-top: 1em; display: grid; gap: 12px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: border-color .2s;
}
.faq details[open] { border-color: var(--line-2); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 17px; font-weight: 600; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-size: 22px; color: var(--orange); transition: transform .25s var(--ease); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq__a { padding: 0 22px 20px; color: var(--text-2); font-size: 15.5px; line-height: 1.7; }
.faq .faq__a a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- author bio / share ---------- */
.article__foot { max-width: 720px; margin: 48px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.author-box { display: flex; gap: 16px; align-items: flex-start; }
.author-box .byline__avatar { width: 48px; height: 48px; font-size: 20px; flex: none; }
.author-box h4 { font-size: 16px; font-weight: 600; }
.author-box p { color: var(--text-2); font-size: 14.5px; margin-top: 4px; }

/* ---------- related posts ---------- */
.related { padding: 72px 0 20px; }
.related .section__head { margin-bottom: 36px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .post-featured { grid-template-columns: 1fr; }
  .post-featured .cover { border-right: 0; border-bottom: 1px solid var(--line); min-height: 220px; }
  .article__grid.has-toc { grid-template-columns: 1fr; }
  .toc { display: none; }
}
@media (max-width: 860px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .post-grid { grid-template-columns: 1fr; }
  .article { padding-top: 24px; }
  .prose { font-size: 16.5px; }
  .post-featured__body { padding: 26px 24px; }
}
