/* =====================================================================
   TalentedHub — single article page styles
   ===================================================================== */

/* Reading progress bar */
.read-progress { position: sticky; top: 70px; z-index: 40; height: 3px; background: transparent; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--accent-grad); transition: width .1s linear; }

.article-wrap { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 48px; padding-top: 40px; padding-bottom: 50px; }
.article { max-width: 760px; }

/* Article header */
.crumbs { font-size: .85rem; color: var(--text-faint); margin-bottom: 16px; display: flex; gap: 8px; }
.crumbs a:hover { color: var(--accent); }
.article-title { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 800; margin: 14px 0 16px; }
.article-dek { font-size: 1.18rem; color: var(--text-soft); line-height: 1.55; }

.article-byline { display: flex; align-items: center; gap: 14px; margin: 28px 0; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.avatar.lg { width: 48px; height: 48px; border-radius: 50%; }
.avatar.xl { width: 84px; height: 84px; border-radius: 20px; }
.article-byline strong { font-family: var(--font-head); }
.byline-meta { color: var(--text-faint); font-size: .88rem; }
.share { display: flex; gap: 8px; margin-left: auto; }
.share-btn { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--text-soft); transition: all .2s; }
.share-btn:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }

.article-hero { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius); margin-bottom: 36px; box-shadow: var(--shadow-md); }

/* Body typography — this is what the editor content maps onto */
.article-body { font-size: 1.12rem; line-height: 1.8; color: var(--text); }
.article-body > * + * { margin-top: 1.35em; }
.article-body h2 { font-size: 1.7rem; font-weight: 700; margin-top: 2em; scroll-margin-top: 90px; }
.article-body h3 { font-size: 1.32rem; font-weight: 700; margin-top: 1.6em; scroll-margin-top: 90px; }
.article-body p { color: var(--text); }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body strong { font-weight: 700; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-top: .5em; }
.article-body li::marker { color: var(--accent); font-weight: 700; }
.article-body blockquote {
  border-left: 4px solid var(--accent); padding: 6px 0 6px 22px; margin-left: 0;
  font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; color: var(--text);
  font-style: normal;
}
.article-body img { border-radius: var(--radius-sm); margin-block: 1.5em; }
.article-body .ad-slot { min-height: 110px; margin-block: 2em; }

/* Tags + author box */
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 30px; }
.article-tags a { font-size: .88rem; color: var(--text-soft); background: var(--surface-2);
  padding: 8px 14px; border-radius: var(--radius-pill); transition: all .2s; }
.article-tags a:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

.author-box { display: flex; gap: 20px; align-items: flex-start; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.author-box h3 { font-size: 1.25rem; margin: 8px 0 8px; }
.author-box p { color: var(--text-soft); }

/* Sidebar TOC */
.article-sidebar { display: flex; flex-direction: column; gap: 26px; }
.toc li { margin: 2px 0; }
.toc a { display: block; padding: 7px 10px; border-radius: var(--radius-sm); font-size: .92rem;
  color: var(--text-soft); border-left: 2px solid transparent; transition: all .2s; }
.toc a:hover, .toc a.active { color: var(--accent); background: var(--surface-2); border-left-color: var(--accent); }
.toc a.sub { padding-left: 22px; font-size: .88rem; }

.related { padding-bottom: 30px; }
.related-grid { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 1000px) {
  .article-wrap { grid-template-columns: 1fr; }
  .article-sidebar { flex-direction: row; flex-wrap: wrap; }
  .article-sidebar > * { flex: 1 1 240px; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .article-sidebar { flex-direction: column; }
  .related-grid { grid-template-columns: 1fr; }
  .share { width: 100%; margin: 12px 0 0; }
}

/* ---- Keep-learning CTA (internal link to courses) ---- */
.learn-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin: 30px 0; padding: 22px 24px; border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); }
.learn-cta-text { flex: 1; min-width: 240px; }
.learn-cta-text strong { display: block; font-family: var(--font-head); font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.learn-cta-text p { color: var(--text-soft); font-size: .95rem; margin: 0; }
.learn-cta .btn { white-space: nowrap; }

/* Updated-date emphasis in byline */
.byline-updated { color: var(--accent); font-weight: 600; }
[data-theme="dark"] .byline-updated { color: var(--accent-2); }

/* ---- Quick Answer box (GEO / AI-search) ---- */
.quick-answer { position: relative; background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border)); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 16px 20px 18px; margin: 0 0 26px; }
.quick-answer .qa-label { display: inline-block; font-size: .68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; color: var(--accent); margin-bottom: 6px; }
[data-theme="dark"] .quick-answer .qa-label { color: var(--accent-2); }
.quick-answer p { margin: 0; font-size: 1.08rem; line-height: 1.6; color: var(--text); font-weight: 500; }

/* ---- "Part of our guide" banner (pillar backlink) ---- */
.pillar-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; padding: 12px 18px;
  background: var(--surface-2); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm); transition: border-color .2s, transform .15s; }
.pillar-banner:hover { border-left-color: var(--accent); transform: translateX(3px); }
.pillar-banner .pb-label { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-faint); white-space: nowrap; }
.pillar-banner .pb-title { font-weight: 700; color: var(--text); flex: 1; }
.pillar-banner .pb-arrow { color: var(--accent); font-weight: 700; }
[data-theme="dark"] .pillar-banner .pb-arrow { color: var(--accent-2); }
