/* Shared stylesheet for all blog post pages.
   Linked via <link rel="stylesheet" href="/css/blog.css" /> */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:   #0A192F;
  --navy2:  #112240;
  --border: #233554;
  --text:   #CCD6F6;
  --muted:  #8892B0;
  --accent: #64FFDA;
  --red:    #FF6B6B;
  --font:   'Inter', sans-serif;
  --mono:   'JetBrains Mono', monospace;
}

html  { scroll-behavior: smooth; }
body  { background: var(--navy); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.6; }

/* ── NAV ─────────────────────────────────────────────────────── */
#main-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,25,47,.97); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; }
.nav-brand-icon { color: var(--accent); font-size: 1.4rem; }
.nav-brand-text { color: var(--text); font-weight: 600; font-size: 1.1rem; letter-spacing: -.02em; }
.accent { color: var(--accent); }
.nav-links { display: flex; gap: 2rem; }
.nav-link {
  color: var(--muted); text-decoration: none;
  font-size: .85rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  transition: color .2s;
}
.nav-link:hover, .nav-link--active { color: var(--accent); }
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--muted); transition: all .3s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile {
  display: none; flex-direction: column;
  padding: .75rem 1.5rem 1rem; border-top: 1px solid var(--border); gap: .75rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile-link { color: var(--muted); text-decoration: none; font-size: .9rem; }
.nav-mobile-link.nav-link--active { color: var(--accent); }

/* ── FOOTER ──────────────────────────────────────────────────── */
#site-footer { background: #020C1B; border-top: 1px solid var(--border); margin-top: 6rem; }
.footer-inner { max-width: 1200px; margin: auto; padding: 2.5rem 1.5rem; }
.disclaimer-box {
  background: rgba(202,138,4,.08); border: 1px solid rgba(202,138,4,.3);
  border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.5rem;
}
.disclaimer-text { color: #FCD34D; font-size: .78rem; line-height: 1.7; font-weight: 500; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-brand { display: flex; align-items: center; gap: .5rem; }
.muted { color: var(--muted); font-size: .85rem; }
.footer-nav { display: flex; gap: 1.5rem; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: .8rem; transition: color .2s; }
.footer-nav a:hover { color: var(--accent); }
.footer-legal { color: #4A5568; font-size: .73rem; text-align: center; margin-top: 1rem; }

/* ── ARTICLE LAYOUT ──────────────────────────────────────────── */
.pt-nav { padding-top: 64px; }
.section-divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* Three-column grid centres the prose column at a readable width */
.article-layout {
  display: grid;
  grid-template-columns: 1fr min(720px, 100%) 1fr;
  padding: 3rem 0;
  gap: 0;
}
.article-layout > * { grid-column: 2; padding: 0 1.5rem; }
.article-layout .full-bleed { grid-column: 1 / -1; padding: 0; }

/* ── BREADCRUMB ──────────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: .5rem;
  padding-bottom: 1.5rem;
  font-family: var(--mono); font-size: .78rem; color: var(--muted);
}
.breadcrumb a { color: var(--muted); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--border); }

/* ── ARTICLE HEADER ──────────────────────────────────────────── */
.article-header { margin-bottom: 2.5rem; }
.article-category {
  font-family: var(--mono); font-size: .72rem; color: var(--accent);
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem;
}
.article-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700;
  letter-spacing: -.03em; line-height: 1.15; margin-bottom: 1rem;
}
.article-deck { color: var(--muted); font-size: 1.05rem; line-height: 1.7; margin-bottom: 1.5rem; }
.article-byline {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  font-family: var(--mono); font-size: .75rem; color: var(--muted);
  padding: 1rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.article-byline span { color: var(--text); }

/* ── ARTICLE BODY PROSE ──────────────────────────────────────── */
.article-body { font-size: .95rem; line-height: 1.85; }

.article-body h2 {
  font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em;
  margin: 2.5rem 0 .875rem;
}
.article-body h3 {
  font-size: 1.05rem; font-weight: 600;
  margin: 2rem 0 .75rem;
}
.article-body p { color: var(--muted); margin-bottom: 1.25rem; }
.article-body p:last-child { margin-bottom: 0; }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body em { font-style: italic; }
.article-body ul, .article-body ol { color: var(--muted); padding-left: 1.5rem; margin-bottom: 1.25rem; }
.article-body li { margin-bottom: .4rem; line-height: 1.75; }
.article-body a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(100,255,218,.3); transition: border-color .2s; }
.article-body a:hover { border-color: var(--accent); }

/* ── PULL QUOTE ──────────────────────────────────────────────── */
.pull-quote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem; margin: 2rem 0;
  background: var(--navy2); border-radius: 0 6px 6px 0;
}
.pull-quote p {
  font-size: 1.05rem; line-height: 1.7;
  color: var(--text) !important; font-style: italic; margin: 0 !important;
}

/* ── INLINE DATA TABLE ───────────────────────────────────────── */
.data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5rem 0; }
.data-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.data-table th {
  font-family: var(--mono); font-size: .72rem; color: var(--muted);
  text-align: left; padding: .6rem .9rem;
  border-bottom: 2px solid var(--border);
  text-transform: uppercase; letter-spacing: .08em; background: var(--navy2);
}
.data-table th:not(:first-child) { text-align: right; }
.data-table td { padding: .75rem .9rem; font-size: .875rem; border-bottom: 1px solid var(--border); }
.data-table td:not(:first-child) { text-align: right; font-family: var(--mono); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--navy2); }
.pos { color: var(--accent); }
.neg { color: var(--red); }
.na  { color: var(--muted); }

/* ── STOCK CALLOUT BOX ───────────────────────────────────────── */
.stock-callout {
  background: var(--navy2); border: 1px solid var(--border);
  border-radius: 8px; padding: 1.25rem 1.5rem; margin: 1.5rem 0;
}
.stock-callout-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.stock-callout-name { font-weight: 700; font-size: 1rem; }
.stock-callout-ticker { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.stock-callout-price { font-family: var(--mono); font-size: 1.1rem; color: var(--accent); }
.stock-callout-body { color: var(--muted); font-size: .875rem; line-height: 1.7; }
.stock-callout-link {
  display: inline-block; margin-top: .75rem;
  font-family: var(--mono); font-size: .75rem; color: var(--accent);
  text-decoration: none; border: 1px solid rgba(100,255,218,.3) !important;
  padding: .25rem .65rem; border-radius: 3px; transition: background .2s;
}
.stock-callout-link:hover { background: rgba(100,255,218,.08); }

/* ── TOC ─────────────────────────────────────────────────────── */
.toc {
  background: var(--navy2); border: 1px solid var(--border);
  border-radius: 8px; padding: 1.25rem 1.5rem; margin-bottom: 2rem;
}
.toc-title {
  font-family: var(--mono); font-size: .72rem; color: var(--muted);
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: .75rem;
}
.toc ol { padding-left: 1.25rem; }
.toc li { margin-bottom: .4rem; }
.toc a { color: var(--muted); text-decoration: none; font-size: .875rem; transition: color .2s; border: none !important; }
.toc a:hover { color: var(--accent); }

/* ── INLINE DISCLAIMER ───────────────────────────────────────── */
.article-disclaimer {
  background: rgba(202,138,4,.06); border: 1px solid rgba(202,138,4,.25);
  border-radius: 8px; padding: 1.25rem; margin: 2rem 0;
  font-size: .82rem; color: rgba(252,211,77,.85); line-height: 1.7;
}
.article-disclaimer strong { color: #FCD34D; }

/* ── BACK LINK ───────────────────────────────────────────────── */
.back-link {
  display: inline-block; padding: 2rem 0 0;
  font-family: var(--mono); font-size: .8rem; color: var(--muted);
  text-decoration: none; transition: color .2s; border: none !important;
}
.back-link:hover { color: var(--accent); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .article-layout > * { padding: 0 1rem; }
}
