/* ============================================================
   AscendAI Blog — shared stylesheet
   Brand tokens mirror the main site (case-studies / index).
   Used by /blog/index.html and every /blog/<slug>.html article.
   ============================================================ */
:root {
  --teal-dark: #002d2b;
  --teal-deep: #001a18;
  --teal-primary: #02968f;
  --teal-mid: #02807a;
  --teal-bright: #52eae0;
  --berry: #9f0064;
  --berry-soft: #c43d8a;
  --text-dark: #0a1a19;
  --text-mid: #3d5c59;
  --text-light: #7a9a97;
  --bg: #ffffff;
  --bg-soft: #f1f8f7;
  --line: #e3eeec;
  --ease: cubic-bezier(.22,1,.36,1);
  --r2: 18px;
  --r1: 12px;
  --shadow-sm: 0 1px 2px rgba(0,45,43,.04), 0 2px 8px rgba(0,45,43,.05);
  --shadow-md: 0 2px 6px rgba(0,45,43,.05), 0 12px 32px rgba(0,45,43,.08);
  --maxw: 1120px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv11','ss01';
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--teal-primary); text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 28px; }

/* ───────── Nav ───────── */
#nav { background: var(--teal-dark); padding: 18px 0; border-bottom: 1px solid rgba(82,234,224,0.1); position: sticky; top: 0; z-index: 50; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 32px; height: 32px; display: block; }
.logo-text { font-weight: 800; font-size: 15px; color: rgba(255,255,255,0.92); letter-spacing: -0.02em; }
.logo-text em { font-style: normal; color: var(--teal-bright); }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.nav-back { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.6); }
.nav-back:hover { color: rgba(255,255,255,0.9); }
.nav-menu { display: flex; align-items: center; gap: 22px; list-style: none; }
.nav-menu a { font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,0.7); transition: color .15s; }
.nav-menu a:hover, .nav-menu a.active { color: var(--teal-bright); }
.btn-nav {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.9);
  padding: 9px 18px; border: 1px solid rgba(255,255,255,0.18); border-radius: 8px; transition: all .2s;
}
.btn-nav:hover { color: #fff; border-color: rgba(82,234,224,0.4); background: rgba(82,234,224,0.07); }

/* reading-progress bar */
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60;
  background: linear-gradient(90deg, var(--teal-primary), var(--teal-bright)); transition: width .1s linear; }

/* ───────── Blog hub (light hero) ───────── */
.hub-hero { background: linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%); position: relative; overflow: hidden; padding: 64px 0 56px; border-bottom: 1px solid var(--line); }
.hub-hero::before { content:''; position:absolute; top:-45%; right:-6%; width:560px; height:520px;
  background: radial-gradient(ellipse, rgba(2,150,143,0.10), transparent 70%); pointer-events:none; }
.hub-hero::after { content:''; position:absolute; bottom:-55%; left:-8%; width:480px; height:480px;
  background: radial-gradient(ellipse, rgba(159,0,100,0.06), transparent 70%); pointer-events:none; }
.hub-hero .container { position: relative; z-index: 1; }
.hub-eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 700; color: var(--teal-primary); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 16px; }
.hub-eyebrow::before { content:''; width: 26px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--teal-primary), var(--berry)); }
.hub-hero h1 { font-weight: 800; font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -0.035em; line-height: 1.08; color: var(--text-dark); max-width: 760px; margin-bottom: 18px; }
.hub-hero p { font-size: 16.5px; line-height: 1.7; color: var(--text-mid); max-width: 620px; }

/* filter tabs */
.hub-filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 30px 0 0; }
.hub-filter {
  font-size: 13px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--text-mid); background: #fff;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; cursor: pointer; transition: all .18s;
}
.hub-filter:hover { color: var(--teal-primary); border-color: var(--teal-primary); }
.hub-filter.active { color: #fff; background: var(--teal-primary); border-color: var(--teal-primary); }

/* featured post */
.hub-featured { padding: 56px 0 0; }
.feat-card {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r2); background: #fff; box-shadow: var(--shadow-md);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.feat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,45,43,.10), 0 20px 50px rgba(0,45,43,.12); }
.feat-media { position: relative; min-height: 320px; background: var(--teal-dark); overflow: hidden; }
.feat-media img { width: 100%; height: 100%; object-fit: cover; }
.feat-body { padding: 40px 44px; display: flex; flex-direction: column; justify-content: center; }
.feat-body .tag-row { margin-bottom: 16px; }
.feat-body h2 { font-weight: 800; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.03em; line-height: 1.18; color: var(--text-dark); margin-bottom: 14px; }
.feat-body p { font-size: 15.5px; color: var(--text-mid); line-height: 1.7; margin-bottom: 20px; }

/* post grid */
.hub-grid-wrap { padding: 48px 0 88px; }
.hub-grid-wrap h2.section-label { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-light); margin-bottom: 22px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-card {
  display: flex; flex-direction: column; overflow: hidden; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card-media { aspect-ratio: 1200/630; background: var(--teal-dark); overflow: hidden; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.post-card:hover .post-card-media img { transform: scale(1.03); }
.post-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; line-height: 1.34; color: var(--text-dark); margin: 12px 0 10px; }
.post-card p { font-size: 13.6px; color: var(--text-mid); line-height: 1.62; margin-bottom: 16px; flex: 1; }
.post-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-light); margin-top: auto; }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-light); }

/* category tag */
.tag { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; }
.tag-linkedin { color: var(--teal-mid); background: rgba(2,150,143,0.10); }
.tag-results  { color: var(--berry);   background: rgba(159,0,100,0.09); }
.tag-ai       { color: #02807a;         background: rgba(2,150,143,0.10); }
.tag-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ───────── Article hero ───────── */
.post-hero { background: var(--teal-dark); position: relative; overflow: hidden; }
.post-hero::before { content:''; position:absolute; top:-25%; left:-8%; width:640px; height:560px;
  background: radial-gradient(ellipse, rgba(2,150,143,0.26), transparent 70%); pointer-events:none; }
.post-hero-inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.55fr 1fr; gap: 40px; align-items: center; padding: 64px 28px 60px; }
.post-hero-text { max-width: 640px; }
.post-eyebrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; font-weight: 700;
  color: var(--teal-bright); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 16px; }
.post-eyebrow .sep { color: rgba(255,255,255,0.3); }
.post-eyebrow .muted { color: rgba(255,255,255,0.5); font-weight: 600; letter-spacing: 0.02em; text-transform: none; }
.post-hero h1 { font-weight: 800; font-size: clamp(27px, 3.5vw, 40px); letter-spacing: -0.035em; line-height: 1.14; color: #fff; margin-bottom: 18px; }
.post-dek { font-size: 16px; line-height: 1.66; color: rgba(255,255,255,0.66); margin-bottom: 26px; }
.post-byline { display: flex; align-items: center; gap: 12px; }
.post-byline-avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: linear-gradient(135deg, var(--teal-primary), var(--berry)); }
.post-byline-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-byline-name { font-weight: 700; font-size: 14px; color: #fff; }
.post-byline-role { font-size: 12.5px; color: rgba(255,255,255,0.5); }
/* decorative right panel */
.post-hero-art { position: relative; height: 100%; min-height: 240px; display: flex; align-items: center; justify-content: center; }
.post-hero-art .art-card {
  width: 100%; max-width: 360px; aspect-ratio: 1200/630; border-radius: var(--r2);
  box-shadow: 0 0 0 1px rgba(82,234,224,0.14), 0 26px 64px rgba(0,0,0,0.5); overflow: hidden;
}
.post-hero-art .art-card img { width: 100%; height: 100%; object-fit: cover; }

/* ───────── Article layout ───────── */
.post-layout { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 56px;
  max-width: var(--maxw); margin: 0 auto; padding: 60px 28px 20px; }
.post-body { max-width: 720px; grid-column: 1; grid-row: 1; }

/* TOC + share aside */
.post-aside { position: relative; grid-column: 2; grid-row: 1; }
.post-aside-sticky { position: sticky; top: 96px; }
.toc-label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-light); margin-bottom: 14px; }
.toc { list-style: none; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 6px 0 6px 16px; margin-left: -2px; border-left: 2px solid transparent;
  font-size: 13px; line-height: 1.45; color: var(--text-mid); transition: all .15s; }
.toc li a:hover { color: var(--teal-primary); }
.toc li a.active { color: var(--teal-primary); border-left-color: var(--teal-primary); font-weight: 600; }
.aside-share { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.aside-share .toc-label { margin-bottom: 12px; }
.share-row { display: flex; gap: 10px; }
.share-row a { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); color: var(--text-mid); border: 1px solid var(--line); transition: all .15s; }
.share-row a:hover { color: var(--teal-primary); border-color: var(--teal-primary); }
.share-row svg { width: 16px; height: 16px; }

/* ───────── Article typography ───────── */
.post-body h2 { font-weight: 800; font-size: clamp(21px,2.2vw,26px); letter-spacing: -0.025em; line-height: 1.25;
  color: var(--text-dark); margin: 44px 0 16px; scroll-margin-top: 90px; }
.post-body h2:first-child { margin-top: 0; }
.post-body h3 { font-weight: 700; font-size: 18.5px; letter-spacing: -0.02em; color: var(--text-dark);
  margin: 30px 0 12px; scroll-margin-top: 90px; }
.post-body h4 { font-weight: 700; font-size: 15.5px; color: var(--teal-mid); margin: 24px 0 8px; }
.post-body p { font-size: 16.5px; color: var(--text-mid); line-height: 1.8; margin-bottom: 18px; }
.post-body a:not(.btn-primary):not(.callout-btn) { color: var(--teal-primary); font-weight: 500; border-bottom: 1px solid rgba(2,150,143,0.3); transition: border-color .15s; }
.post-body a:not(.btn-primary):not(.callout-btn):hover { border-bottom-color: var(--teal-primary); }
.post-body strong { color: var(--text-dark); font-weight: 700; }
.post-body em { font-style: italic; }
.post-body ul, .post-body ol { margin: 4px 0 22px; padding-left: 0; list-style: none; }
.post-body ol { counter-reset: li; }
.post-body li { position: relative; font-size: 16.5px; color: var(--text-mid); line-height: 1.7; margin-bottom: 11px; padding-left: 30px; }
.post-body ul li::before { content: ''; position: absolute; left: 4px; top: 11px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--teal-primary); }
.post-body ol li { counter-increment: li; }
.post-body ol li::before { content: counter(li); position: absolute; left: 0; top: 1px; width: 21px; height: 21px;
  border-radius: 50%; background: rgba(2,150,143,0.12); color: var(--teal-mid); font-size: 11.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; }
.post-body blockquote { margin: 26px 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--berry);
  font-size: 18px; line-height: 1.6; color: var(--text-dark); font-weight: 500; }
.post-body blockquote p { font-size: 18px; color: var(--text-dark); }
.post-body figure { margin: 28px 0; }
.post-body figure img { border-radius: var(--r2); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.post-body figcaption { font-size: 12.5px; color: var(--text-light); margin-top: 9px; text-align: center; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }

/* key-takeaways box (AEO answer-up-front) */
.takeaways { background: var(--bg-soft); border: 1px solid var(--line); border-left: 3px solid var(--teal-primary);
  border-radius: var(--r1); padding: 24px 26px; margin: 0 0 34px; }
.takeaways .tk-label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal-mid); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.takeaways ul { margin: 0; padding: 0; list-style: none; }
.takeaways li { position: relative; font-size: 15px; color: var(--text-dark); line-height: 1.6; margin-bottom: 9px; padding-left: 26px; }
.takeaways li:last-child { margin-bottom: 0; }
.takeaways li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--teal-primary); font-weight: 800; font-size: 14px; }

/* inline callout (replaces Substack CTAs) */
.callout { background: linear-gradient(135deg, rgba(2,150,143,0.07), rgba(159,0,100,0.05));
  border: 1px solid var(--line); border-radius: var(--r2); padding: 26px 28px; margin: 34px 0; }
.callout p { font-size: 15.5px; color: var(--text-dark); margin-bottom: 16px; }
.callout-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 24px; border-radius: 9px;
  font-weight: 700; font-size: 13.5px; background: linear-gradient(135deg, var(--teal-primary), var(--berry)); color: #fff;
  box-shadow: 0 4px 16px rgba(2,150,143,0.28); transition: transform .14s var(--ease), filter .2s; }
.callout-btn:hover { filter: brightness(1.08); transform: translateY(-2px); }

/* FAQ */
.post-faq { margin: 48px 0 8px; }
.post-faq h2 { margin-bottom: 18px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--r1); margin-bottom: 12px; overflow: hidden; background: #fff; }
.faq-item summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 16px;
  color: var(--text-dark); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 22px; font-weight: 400; color: var(--teal-primary); transition: transform .2s; flex-shrink: 0; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 22px 20px; }
.faq-item .faq-a p { font-size: 15.5px; color: var(--text-mid); line-height: 1.72; margin: 0; }

/* author bio */
.author-bio { display: flex; gap: 18px; align-items: flex-start; margin: 48px 0 0; padding: 26px 28px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r2); }
.author-bio-avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: linear-gradient(135deg, var(--teal-primary), var(--berry)); }
.author-bio-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-bio h3 { font-size: 15px; font-weight: 700; color: var(--text-dark); margin-bottom: 4px; }
.author-bio .ab-role { font-size: 12.5px; color: var(--teal-mid); font-weight: 600; margin-bottom: 8px; }
.author-bio p { font-size: 13.8px; color: var(--text-mid); line-height: 1.62; margin: 0; }

/* ───────── Related ───────── */
.related-wrap { background: var(--bg-soft); padding: 64px 0; border-top: 1px solid var(--line); }
.related-wrap h2 { font-weight: 800; font-size: 22px; color: var(--text-dark); letter-spacing: -0.025em; margin-bottom: 26px; }
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }

/* ───────── CTA bar ───────── */
.cta-bar { background: var(--teal-dark); padding: 64px 0; position: relative; overflow: hidden; }
.cta-bar::before { content:''; position:absolute; top:0; right:0; width:500px; height:100%;
  background: radial-gradient(ellipse at right, rgba(159,0,100,0.2), transparent 70%); pointer-events:none; }
.cta-bar-inner { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 32px; align-items: center;
  max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }
.cta-bar h2 { font-weight: 800; font-size: clamp(24px,3vw,34px); letter-spacing: -0.03em; line-height: 1.15; color: #fff; }
.cta-bar p { font-size: 14.5px; color: rgba(255,255,255,0.6); line-height: 1.65; }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px; border-radius: 10px;
  font-weight: 700; font-size: 14px; letter-spacing: -0.01em; background: linear-gradient(135deg, var(--teal-primary), var(--berry));
  color: #fff; box-shadow: 0 4px 18px rgba(2,150,143,0.32); transition: transform .14s var(--ease), filter .2s, box-shadow .22s; white-space: nowrap; }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(2,150,143,0.4); }

/* ───────── Footer ───────── */
#footer { background: var(--teal-deep); border-top: 1px solid rgba(82,234,224,0.1); padding: 28px 0; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.footer-logo { font-weight: 800; font-size: 14px; color: rgba(255,255,255,0.35); letter-spacing: -0.02em; }
.footer-logo em { font-style: normal; color: rgba(82,234,224,0.5); }
.footer-copy { font-size: 12.5px; color: rgba(255,255,255,0.25); }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { font-size: 12.5px; color: rgba(255,255,255,0.28); transition: color .15s; }
.footer-links a:hover { color: rgba(255,255,255,0.65); }

/* related card (shared) */
.related-card { background:#fff; border:1px solid var(--line); border-radius: var(--r2); padding: 22px 24px; display:block;
  transition: transform .2s var(--ease), box-shadow .2s; box-shadow: var(--shadow-sm); }
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.related-card h3 { font-weight:700; font-size:16px; color:var(--text-dark); line-height:1.4; letter-spacing:-0.02em; margin:12px 0 8px; }
.related-card p { font-size:13.5px; color:var(--text-mid); line-height:1.6; }
.related-arrow { display:inline-flex; align-items:center; gap:6px; margin-top:12px; font-size:13px; font-weight:600; color:var(--teal-primary); }

/* ───────── Responsive ───────── */
@media (max-width: 940px) {
  .post-layout { grid-template-columns: 1fr; gap: 0; }
  .post-aside { display: none; }
  .post-body { max-width: 720px; margin: 0 auto; }
  .post-hero-inner { grid-template-columns: 1fr; }
  .post-hero-art { display: none; }
  .feat-card { grid-template-columns: 1fr; }
  .feat-media { min-height: 220px; }
  .post-grid { grid-template-columns: repeat(2,1fr); }
  .related-grid { grid-template-columns: 1fr; }
  .cta-bar-inner { grid-template-columns: 1fr; text-align: center; }
}
@media (max-width: 620px) {
  .nav-menu { display: none; }
  .post-grid { grid-template-columns: 1fr; }
  .feat-body { padding: 30px 26px; }
  .post-layout { padding: 40px 22px 10px; }
  .footer-row { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}
