/* ======================================================
   Virtual CTO For Hire
   BLOG ARTICLE CSS (Standard)
   v=20260219-5
   Single source of truth for /blog/* article pages
====================================================== */

/* ---------- Theme tokens ---------- */
:root{
  --bg-body:#050816;
  --bg-section-dark:#050816;
  --bg-section-mid:#0b1120;
  --bg-section-light:#0f172a;

  --accent:#fbbf24;
  --accent-soft:rgba(251,191,36,0.15);
  --accent-strong:#f59e0b;

  --text-main:#e5e7eb;
  --text-muted:#9ca3af;

  --border-subtle:#1f2937;
  --card-bg:#020617;

  --radius-lg:18px;
  --radius-md:12px;
  --radius-pill:999px;

  --shadow-soft:0 18px 40px rgba(15,23,42,0.7);
  --transition-fast:0.18s ease-out;

  --max-width:1160px;
  --header-offset:86px;
}

/* ---------- Base reset ---------- */
*{box-sizing:border-box;margin:0;padding:0;}
html{scroll-padding-top:var(--header-offset);}
body{
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:radial-gradient(circle at top,#111827 0,#020617 40%,#000 100%);
  color:var(--text-main);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
a{color:inherit;text-decoration:none;}
img{max-width:100%;display:block;}

:focus-visible{
  outline:3px solid rgba(251,191,36,0.85);
  outline-offset:3px;
  border-radius:10px;
}
@media (prefers-reduced-motion: reduce){
  *{scroll-behavior:auto !important;transition:none !important;animation:none !important;}
}

/* ---------- Skip link (hidden until focus) ---------- */
.skip-link{
  position:absolute;
  left:16px;
  top:10px;
  padding:10px 12px;
  background:#fbbf24;
  color:#050816;
  border-radius:10px;
  transform:translateY(-140%);
  transition:transform 0.18s ease-out;
  z-index:9999;
  font-weight:800;
}
.skip-link:focus{transform:translateY(0);}

/* ======================================================
   HEADER / NAV
====================================================== */
header{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter:blur(20px);
  background:linear-gradient(to bottom,rgba(15,23,42,0.96),rgba(15,23,42,0.82),transparent);
  border-bottom:1px solid rgba(31,41,55,0.7);
}
.nav-bar{
  max-width:var(--max-width);
  margin:0 auto;
  padding:14px 16px 10px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.nav-left{display:flex;align-items:center;gap:12px;min-width:0;}
.brand-logo{
  height:69px;
  width:auto;
  max-width:340px;
  object-fit:contain;
  filter:drop-shadow(0 10px 18px rgba(15,23,42,0.65));
}
.nav-brand-text{display:flex;flex-direction:column;min-width:0;}
.logo-text-main{font-weight:700;font-size:15px;letter-spacing:0.03em;white-space:nowrap;}
.logo-text-sub{font-size:11px;color:var(--text-muted);white-space:nowrap;}

/* Gold byline only */
.logo-byline{
  margin-top:2px;
  font-size:12px;
  color:var(--accent);
  font-weight:800;
  line-height:1;
  max-width:280px;
  white-space:nowrap;
}

.nav-right{display:flex;align-items:center;gap:14px;}
.nav-links{
  display:flex;
  align-items:center;
  gap:18px;
  font-size:14px;
  color:var(--text-muted);
  white-space:nowrap;
}
.nav-links a{position:relative;padding:4px 0;white-space:nowrap;}
.nav-links a::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-4px;
  height:2px;
  border-radius:999px;
  transform:scaleX(0);
  transform-origin:center;
  background:linear-gradient(to right,#fbbf24,#f97316);
  transition:transform var(--transition-fast);
}
.nav-links a:hover{color:#e5e7eb;}
.nav-links a:hover::after{transform:scaleX(1);}

.nav-search-link{
  background:transparent;
  border:none;
  padding:4px 0;
  cursor:pointer;
  font:inherit;
  color:var(--accent);
  font-weight:800;
  position:relative;
  white-space:nowrap;
}
.nav-search-link:hover{color:var(--accent-strong);}

.nav-toggle{
  display:none;
  background:none;
  border:none;
  color:#e5e7eb;
  cursor:pointer;
  position:relative;
  z-index:10001;
  padding:10px;
  width:44px;
  height:44px;
}
.nav-toggle span{
  display:block;
  width:20px;
  height:2px;
  background:#e5e7eb;
  margin:4px 0;
  border-radius:999px;
}
.nav-links-mobile{
  display:none;
  flex-direction:column;
  gap:10px;
  padding:10px 16px 16px 16px;
  background:radial-gradient(circle at top,#111827 0,#020617 55%);
  border-bottom:1px solid rgba(31,41,55,0.8);
  z-index:10000;
}
.nav-links-mobile a{font-size:14px;color:var(--text-muted);}
.nav-links-mobile a:hover{color:#e5e7eb;}
.nav-links-mobile .nav-search-link{width:fit-content;color:var(--accent);font-size:14px;padding:6px 0;}

@media (max-width: 920px){
  .nav-links{display:none;}
  .nav-toggle{display:block;}
  .nav-brand-text{display:none;}
  .brand-logo{max-width:300px;height:66px;}
}

/* ======================================================
   SITE SEARCH MODAL (header only)
   Defensive: keep it hidden unless .is-open is present
====================================================== */
body.modal-open{overflow:hidden;}

/* Force hidden by default no matter what other CSS does */
#siteSearchModal{display:none !important;}
#siteSearchModal.is-open{display:flex !important;}

#siteSearchModal{
  position:fixed;
  inset:0;
  z-index:9999;
  align-items:center;
  justify-content:center;
}
#siteSearchModal .search-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.66);
}
#siteSearchModal .search-panel{
  position:relative;
  width:min(860px,calc(100% - 28px));
  max-height:min(78vh,780px);
  overflow:auto;
  border-radius:16px;
  background:rgba(15,23,42,0.98);
  border:1px solid rgba(251,191,36,0.18);
  box-shadow:0 18px 70px rgba(0,0,0,0.55);
  padding:16px;
}
#siteSearchModal .search-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
#siteSearchModal .search-top h3{margin:0;font-size:18px;color:#fff;}
#siteSearchModal .search-close{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(251,191,36,0.35);
  background:rgba(251,191,36,0.08);
  color:#fff;
  font-weight:800;
  cursor:pointer;
}
#siteSearchModal .search-input{
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.16);
  background:rgba(5,8,22,0.55);
  color:#fff;
  outline:none;
}
#siteSearchModal .search-input:focus{
  border-color:rgba(251,191,36,0.55);
  box-shadow:0 0 0 4px rgba(251,191,36,0.14);
}
#siteSearchModal .search-filters{margin-top:10px;display:flex;flex-wrap:wrap;gap:8px;}
#siteSearchModal .chip{
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:800;
  border:1px solid rgba(148,163,184,0.45);
  background:rgba(15,23,42,0.55);
  color:#e5e7eb;
  cursor:pointer;
}
#siteSearchModal .chip[aria-pressed="true"]{
  border-color:rgba(251,191,36,0.85);
  background:rgba(251,191,36,0.14);
  color:#fef3c7;
}
#siteSearchModal .search-results{margin-top:12px;display:grid;gap:10px;}
#siteSearchModal .result-item{
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(5,8,22,0.35);
}
#siteSearchModal .result-item a{color:#fff;font-weight:800;text-decoration:none;}
#siteSearchModal .result-item a:hover{text-decoration:underline;}
#siteSearchModal .result-item p{margin:6px 0 0 0;color:rgba(255,255,255,0.78);}

/* Hide any legacy article-level search UIs */
main .article-search,
main .search-inline,
main #article-search,
main #searchModal,
main .modal-backdrop,
main .search-overlay{display:none !important;}

/* ======================================================
   ARTICLE LAYOUT + TYPOGRAPHY
====================================================== */
main{display:block;}
.article-page-wrap{
  max-width:980px;
  margin:0 auto;
  padding:0 24px 56px;
}
/* Some articles wrap content with .article-container. Keep it neutral. */
.article-container{max-width:980px;margin:0 auto;}

/* Topbar / breadcrumbs */
.article-topbar{
  padding:14px 0 10px 0;
  border-bottom:1px solid rgba(31,41,55,0.55);
  margin-bottom:18px;
}
.article-breadcrumbs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  color:var(--text-muted);
  font-size:12px;
}
.article-breadcrumbs a{color:var(--accent);font-weight:800;}
.article-breadcrumbs a:hover{color:var(--accent-strong);}
.article-breadcrumbs .sep{color:rgba(255,255,255,0.35);}

/* Page title */
h1{font-size:32px;line-height:1.15;font-weight:800;margin:18px 0 8px 0;}
.article-meta{font-size:12px;color:var(--text-muted);margin-bottom:10px;}

/* Download brief pill: gold text */
.article-pdf-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:var(--radius-pill);
  padding:9px 14px;
  font-size:12px;
  font-weight:800;
  border:1px solid rgba(148,163,184,0.45);
  background:rgba(15,23,42,0.55);
  color:var(--accent);
  margin-bottom:14px;
}
.article-pdf-link:hover{
  border-color:rgba(251,191,36,0.55);
  background:rgba(15,23,42,0.85);
  color:var(--accent-strong);
}

.section-lead{
  font-size:13px;
  color:var(--text-muted);
  width:100%;
  line-height:1.55;
  margin:10px 0 18px 0;
}

/* Executive cards (shared) */
.exec-takeaway,
.quick-answers,
.executive-definitions,
.what-you-leave-with,
.exec-definitions,
.leave-with{
  border-radius:14px;
  border:1px solid rgba(55,65,81,0.9);
  background:rgba(2,6,23,0.65);
  box-shadow:var(--shadow-soft);
  padding:12px 12px 10px 12px;
  margin:16px 0 18px 0;
}
/* Card headers: gold */
.exec-takeaway h3,
.quick-answers h3,
.executive-definitions h3,
.what-you-leave-with h3,
.exec-definitions h3,
.leave-with h3{
  font-size:12px;
  font-weight:900;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:var(--accent);
  margin:0 0 8px 0;
}

/* Card lists: align with article lists (not too far left) */
.exec-takeaway ul,
.quick-answers ul,
.executive-definitions ul,
.what-you-leave-with ul,
.exec-definitions ul,
.leave-with ul{
  margin:0;
  padding-left:18px;
  font-size:12px;
  color:#e5e7eb;
  line-height:1.45;
}
.exec-takeaway li,
.quick-answers li,
.executive-definitions li,
.what-you-leave-with li,
.exec-definitions li,
.leave-with li{margin-bottom:6px;}
.exec-takeaway li:last-child,
.quick-answers li:last-child,
.executive-definitions li:last-child,
.what-you-leave-with li:last-child,
.exec-definitions li:last-child,
.leave-with li:last-child{margin-bottom:0;}

/* ======================================================
   MAIN ARTICLE BODY
====================================================== */
.article-body{margin-top:12px;}

.article-body h2{font-size:20px;font-weight:800;margin:22px 0 10px 0;color:#e5e7eb;}
.article-body h3{font-size:16px;font-weight:800;margin:18px 0 8px 0;color:#e5e7eb;}
.article-body p{margin:0 0 12px 0;color:rgba(255,255,255,0.86);line-height:1.6;font-size:14px;}

.article-body ul,
.article-body ol{margin:10px 0 12px 0;padding-left:18px;color:rgba(255,255,255,0.86);line-height:1.6;font-size:14px;}
.article-body li{margin-bottom:6px;}
.article-body li:last-child{margin-bottom:0;}

.article-body strong{color:#fff;font-weight:800;}

/* Tighten stacked margins (fixes wide gaps between blocks) */
.article-body h2 + ul,
.article-body h2 + ol,
.article-body h3 + ul,
.article-body h3 + ol{margin-top:6px;}
.article-body ul + h2,
.article-body ol + h2{margin-top:18px;}
.article-body ul + h3,
.article-body ol + h3{margin-top:14px;}

.article-figure{
  margin:16px 0 16px 0;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(148,163,184,0.18);
  background:rgba(15,23,42,0.35);
}
.article-figure img{width:100%;height:auto;display:block;}
.article-figure figcaption{
  padding:10px 12px;
  font-size:12px;
  color:var(--text-muted);
  border-top:1px solid rgba(148,163,184,0.14);
}
/* Standardized article image sizing */
.article-figure {
  text-align: center;
}

.article-figure img {
  width: 100%;
  max-width: 1050px; /* 25% reduction from 1400px baseline */
  height: auto;
  display: block;
  margin: 0 auto;
}

/* CTA panel */
.cta-panel{
  margin:18px 0 8px 0;
  border-radius:18px;
  border:1px solid rgba(251,191,36,0.22);
  background:rgba(251,191,36,0.08);
  padding:14px 14px 12px 14px;
}
.cta-panel h3{margin:0 0 6px 0;font-size:16px;font-weight:900;color:#fff;}
.cta-panel p{margin:0 0 10px 0;color:rgba(255,255,255,0.85);font-size:13px;line-height:1.55;}
.cta-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:10px 14px;
  border-radius:12px;
  background:#fbbf24;
  color:#050816;
  font-weight:900;
  text-decoration:none;
}
.cta-button:hover{background:var(--accent-strong);}

/* Related articles: gold + bold links including Browse all */
.related-articles a,
.article-body a.btn-ghost,
.article-body a[href="/blog.php"]{
  color:var(--accent);
  font-weight:800;
}
.related-articles a:hover,
.article-body a.btn-ghost:hover,
.article-body a[href="/blog.php"]:hover{
  color:var(--accent-strong);
}

/* ======================================================
   FOOTER
====================================================== */
footer{
  background:#020617;
  border-top:1px solid var(--border-subtle);
  padding:24px 16px 16px 16px;
}
.footer-main{
  max-width:var(--max-width);
  margin:0 auto 14px auto;
  display:grid;
  grid-template-columns:2fr 1.2fr 1.1fr 1.4fr;
  gap:18px;
  font-size:12px;
  align-items:start;
}
.footer-brand{display:flex;flex-direction:column;gap:10px;}
.footer-logo{
  height:63px;
  width:auto;
  max-width:340px;
  object-fit:contain;
  filter:drop-shadow(0 10px 18px rgba(15,23,42,0.65));
}
.footer-main h4{font-size:13px;margin-bottom:6px;}
.footer-main p,
.footer-main li{color:var(--text-muted);line-height:1.55;}
.footer-main ul{list-style:none;display:grid;gap:4px;}
.footer-cta-text{margin-bottom:8px;color:var(--text-muted);}

.footer-bottom{
  max-width:var(--max-width);
  margin:0 auto;
  border-top:1px solid rgba(31,41,55,0.9);
  padding-top:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:11px;
  color:var(--text-muted);
  gap:10px;
  flex-wrap:wrap;
}
.footer-links{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.footer-links a{color:var(--text-muted);}
.footer-links a:hover{color:#e5e7eb;}

.footer-cta-gold{color:var(--accent);font-weight:800;}
.footer-cta-gold:hover{color:var(--accent-strong);}

@media (max-width: 960px){.footer-main{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width: 640px){.footer-main{grid-template-columns:minmax(0,1fr);}}

/* ======================================================
   Responsive article tweaks
====================================================== */
@media (max-width: 768px){
  .article-page-wrap{padding:0 16px 48px;}
  h1{font-size:28px;}
}

/* ======================================================
   Mid-article Q&A callout (distinct from top executive cards)
====================================================== */
.exec-qa-callout{
  margin:18px 0 18px 0;
  border-radius:14px;
  border:1px solid rgba(55,65,81,0.9);
  background:rgba(15,23,42,0.55);
  box-shadow:var(--shadow-soft);
  padding:12px 12px 10px 12px;
  position:relative;
}
.exec-qa-callout::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:var(--accent);
  border-top-left-radius:14px;
  border-bottom-left-radius:14px;
}
.exec-qa-callout h3{
  margin:0 0 10px 0;
  padding-left:10px;
  font-size:12px;
  font-weight:900;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:var(--accent);
}
.exec-qa-callout .qa-item{
  padding:10px 10px 10px 10px;
  border-top:1px solid rgba(148,163,184,0.16);
}
.exec-qa-callout .qa-item:first-of-type{
  border-top:none;
  padding-top:0;
}
.exec-qa-callout .qa-q{
  font-size:12px;
  font-weight:900;
  color:#e5e7eb;
  margin:0 0 4px 0;
}
.exec-qa-callout .qa-a{
  font-size:13px;
  color:rgba(255,255,255,0.78);
  line-height:1.55;
  margin:0;
}
