/* =====================================================================
   Bitwyse Projects — Design System
   Bold modern gradient · dark · AWS cloud portfolio
   Author: Bitwyse
   ===================================================================== */

/* ----- Tokens ----- */
:root {
  /* base surfaces */
  --bg:        #06070f;
  --bg-2:      #0a0c18;
  --surface:   #0e1120;
  --surface-2: #12162a;
  --line:      rgba(255, 255, 255, 0.08);
  --line-2:    rgba(255, 255, 255, 0.14);

  /* text */
  --text:      #eef1fb;
  --muted:     #9aa3c4;
  --muted-2:   #6b7398;
  --ink:       #05060c;

  /* signature Bitwyse gradient (cool → violet, warm accent) */
  --g1: #22e0d0; /* teal   */
  --g2: #37a2ff; /* blue   */
  --g3: #7c5cff; /* violet */
  --g4: #ff5db8; /* pink   */
  --amber: #ffb454; /* AWS-adjacent warm accent, used sparingly */

  --grad:  linear-gradient(100deg, var(--g1), var(--g2) 42%, var(--g3) 74%, var(--g4));
  --grad-soft: linear-gradient(100deg, var(--g2), var(--g3));

  /* type */
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  /* metrics */
  --maxw: 1180px;
  --readw: 760px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 0 1px var(--line), 0 24px 60px -28px rgba(70, 90, 255, 0.55);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }
::selection { background: rgba(124, 92, 255, 0.35); color: #fff; }

/* ----- Ambient background ----- */
.bg-fx {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden;
}
.bg-fx::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 80% -5%, rgba(124, 92, 255, 0.20), transparent 60%),
    radial-gradient(45% 45% at 5% 8%, rgba(34, 224, 208, 0.14), transparent 55%),
    radial-gradient(55% 60% at 50% 110%, rgba(55, 162, 255, 0.14), transparent 60%);
}
.bg-fx::after { /* fine grid */
  content: ""; position: absolute; inset: 0; opacity: 0.5;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 85%);
}
.blob {
  position: fixed; z-index: -1; filter: blur(70px); opacity: 0.5; pointer-events: none;
  border-radius: 50%; will-change: transform;
}
.blob-1 { width: 520px; height: 520px; top: -140px; right: -120px;
  background: radial-gradient(circle, rgba(124,92,255,0.55), transparent 70%); }
.blob-2 { width: 440px; height: 440px; top: 40%; left: -160px;
  background: radial-gradient(circle, rgba(34,224,208,0.4), transparent 70%); }

/* ----- Layout ----- */
.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
section { position: relative; }
.section-pad { padding: clamp(4.5rem, 9vw, 8rem) 0; }

/* ----- Utility type ----- */
.eyebrow {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--g1); font-weight: 500;
  display: inline-flex; align-items: center; gap: 0.6em;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--grad-soft); display: inline-block;
}
.gradient-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }
.section-head { max-width: 620px; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin: 0.9rem 0 0.6rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.lead { font-size: 1.18rem; color: var(--muted); }

/* ----- Buttons ----- */
.btn {
  --pad: 0.85rem 1.4rem;
  display: inline-flex; align-items: center; gap: 0.55rem; padding: var(--pad);
  border-radius: 999px; font-weight: 600; font-size: 0.95rem; border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: var(--ink); background: var(--grad); background-size: 160% 160%;
  box-shadow: 0 12px 34px -12px rgba(124, 92, 255, 0.7); }
.btn-primary:hover { animation: gradShift 3s ease infinite; box-shadow: 0 18px 44px -12px rgba(124,92,255,0.85); }
.btn-ghost { color: var(--text); border-color: var(--line-2); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { border-color: var(--g3); background: rgba(124,92,255,0.08); }
.btn .ar { transition: transform 0.25s var(--ease); }
.btn:hover .ar { transform: translateX(3px); }
@keyframes gradShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ----- Navbar ----- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6, 7, 15, 0.72); backdrop-filter: blur(16px) saturate(150%);
  border-bottom-color: var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; font-family: var(--font-display);
  font-weight: 700; font-size: 1.12rem; letter-spacing: -0.01em; }
.brand .mark { width: 30px; height: 30px; flex: none; }
.brand b { font-weight: 700; }
.brand .dim { color: var(--muted-2); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { color: var(--muted); font-size: 0.92rem; font-weight: 500; position: relative; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--grad-soft); transition: width 0.25s var(--ease); border-radius: 2px; }
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 0.9rem; }
.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.03); color: var(--text); align-items: center; justify-content: center; }
.nav-toggle svg { width: 20px; height: 20px; }

/* ----- Hero ----- */
.hero { padding: clamp(8rem, 16vh, 11rem) 0 clamp(4rem, 8vw, 7rem); position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255,255,255,0.03); font-size: 0.82rem; color: var(--muted);
  font-family: var(--font-mono); letter-spacing: 0.02em; margin-bottom: 1.8rem;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--g1);
  box-shadow: 0 0 0 4px rgba(34,224,208,0.18); animation: pulse 2.4s ease infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }
.hero h1 { font-size: clamp(2.7rem, 7vw, 5.3rem); line-height: 1.02; max-width: 15ch; }
.hero p.lead { margin: 1.6rem 0 2.4rem; max-width: 56ch; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.hero-stats { display: flex; gap: 2.4rem; margin-top: 3.5rem; flex-wrap: wrap; }
.hero-stats .stat b { font-family: var(--font-display); font-size: 1.9rem; display: block; }
.hero-stats .stat span { color: var(--muted); font-size: 0.85rem; }

/* ----- Marquee of services ----- */
.ticker { border-block: 1px solid var(--line); background: rgba(255,255,255,0.015);
  overflow: hidden; padding: 1.1rem 0; }
.ticker-track { display: flex; gap: 3rem; width: max-content; animation: scrollX 32s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { font-family: var(--font-mono); color: var(--muted-2); font-size: 0.9rem;
  display: inline-flex; align-items: center; gap: 3rem; letter-spacing: 0.04em; }
.ticker-track span::after { content: "◆"; color: var(--g3); font-size: 0.6rem; }
@keyframes scrollX { to { transform: translateX(-50%); } }

/* ----- Roadmap / project list ----- */
.roadmap { display: grid; gap: 1.4rem; }
.pcard {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 1.6rem; align-items: center;
  padding: 1.7rem 1.9rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.pcard::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.35s; }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.pcard:hover::before { opacity: 1; }
.pcard .glow { position: absolute; width: 260px; height: 260px; right: -60px; top: -80px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,255,0.28), transparent 70%); opacity: 0; transition: opacity 0.4s; }
.pcard:hover .glow { opacity: 1; }
.pcard .month {
  font-family: var(--font-mono); text-align: center; min-width: 64px;
}
.pcard .month b { display: block; font-family: var(--font-display); font-size: 1.5rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pcard .month span { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-2); }
.pcard .body h3 { font-size: 1.28rem; margin-bottom: 0.35rem; }
.pcard .body p { color: var(--muted); font-size: 0.95rem; max-width: 62ch; }
.pcard .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }
.chip {
  font-family: var(--font-mono); font-size: 0.72rem; padding: 0.25rem 0.6rem; border-radius: 7px;
  border: 1px solid var(--line-2); color: var(--muted); background: rgba(255,255,255,0.02);
}
.pcard .go { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
  border-radius: 50%; border: 1px solid var(--line-2); color: var(--text); flex: none; transition: 0.3s; }
.pcard:hover .go { background: var(--grad); color: var(--ink); border-color: transparent; transform: rotate(-45deg); }
.pcard .go svg { width: 18px; height: 18px; }
.pcard[data-status="planned"] { opacity: 0.72; }
.status-pill { position: absolute; top: 1.1rem; right: 1.3rem; font-family: var(--font-mono);
  font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }

/* ----- Feature grid (approach) ----- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.feature {
  padding: 1.8rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); transition: 0.35s var(--ease);
}
.feature:hover { transform: translateY(-4px); border-color: var(--line-2); }
.feature .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(124,92,255,0.12); border: 1px solid rgba(124,92,255,0.28); margin-bottom: 1.1rem; }
.feature .ic svg { width: 22px; height: 22px; color: var(--g1); }
.feature h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.feature p { color: var(--muted); font-size: 0.94rem; }

/* ----- About / two-col ----- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.about-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem;
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); position: relative; overflow: hidden; }
.about-card .terminal-head { display: flex; gap: 0.4rem; margin-bottom: 1.2rem; }
.about-card .terminal-head i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.about-card .terminal-head i:nth-child(1) { background: #ff5f57; }
.about-card .terminal-head i:nth-child(2) { background: #febc2e; }
.about-card .terminal-head i:nth-child(3) { background: #28c840; }
.about-card pre { font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.9; color: var(--muted); overflow-x: auto; }
.about-card .k { color: var(--g1); } .about-card .s { color: var(--g4); } .about-card .c { color: var(--muted-2); }
.stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-top: 2rem; }
.stat-row .cell { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem; text-align: center; }
.stat-row .cell b { font-family: var(--font-display); font-size: 1.7rem; display: block; }
.stat-row .cell span { color: var(--muted); font-size: 0.78rem; }

/* ----- CTA band ----- */
.cta {
  border: 1px solid var(--line-2); border-radius: 26px; padding: clamp(2.5rem, 6vw, 4.5rem); text-align: center;
  background:
    radial-gradient(80% 130% at 50% -20%, rgba(124,92,255,0.22), transparent 60%),
    linear-gradient(180deg, var(--surface-2), var(--bg-2));
  position: relative; overflow: hidden;
}
.cta h2 { font-size: clamp(2rem, 5vw, 3.2rem); max-width: 18ch; margin-inline: auto; }
.cta p { color: var(--muted); margin: 1rem auto 2rem; max-width: 48ch; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ----- Footer ----- */
.footer { border-top: 1px solid var(--line); padding: 3.5rem 0 2.5rem; margin-top: 2rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; align-items: flex-start; }
.footer .brand { margin-bottom: 1rem; }
.footer p { color: var(--muted); font-size: 0.92rem; max-width: 34ch; }
.footer-links { display: flex; gap: 3.5rem; flex-wrap: wrap; }
.footer-col h5 { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 1rem; }
.footer-col a { display: block; color: var(--muted); font-size: 0.92rem; margin-bottom: 0.6rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--g1); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 0.85rem; }

/* =====================================================================
   ARTICLE / ESSAY (project pages)
   ===================================================================== */
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200;
  background: var(--grad); box-shadow: 0 0 12px rgba(124,92,255,0.6); transition: width 0.1s linear; }

.article-hero { padding: clamp(7rem, 12vh, 9rem) 0 2.5rem; position: relative; }
.crumbs { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted-2); margin-bottom: 1.6rem; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.crumbs a { color: var(--muted); transition: color 0.2s; } .crumbs a:hover { color: var(--g1); }
.crumbs .sep { color: var(--line-2); }
.article-hero .month-tag { font-family: var(--font-mono); color: var(--g1); font-size: 0.82rem;
  letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 1rem; display: block; }
.article-hero h1 { font-size: clamp(2.3rem, 5.5vw, 3.9rem); max-width: 20ch; }
.article-hero .summary { font-size: 1.2rem; color: var(--muted); margin-top: 1.3rem; max-width: 64ch; }
.meta-row { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 2.2rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.meta-row .m span { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); display: block; margin-bottom: 0.3rem; }
.meta-row .m b { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }

/* glance panel */
.glance { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.4rem; margin: 2.5rem 0; }
.glance .panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.8rem;
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); }
.glance .panel h4 { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--g1); margin-bottom: 1rem; font-weight: 500; }
.glance .panel p { color: var(--muted); font-size: 0.98rem; }
.glance .stack { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.glance .outcomes { display: grid; gap: 0.7rem; }
.glance .outcomes li { display: flex; gap: 0.7rem; color: var(--muted); font-size: 0.92rem; align-items: flex-start; }
.glance .outcomes li svg { width: 17px; height: 17px; color: var(--g1); flex: none; margin-top: 3px; }

/* article layout: sticky TOC + prose */
.article-body { display: grid; grid-template-columns: 220px 1fr; gap: 3.5rem; align-items: start;
  padding-bottom: 4rem; }
.toc { position: sticky; top: 100px; font-size: 0.9rem; }
.toc h5 { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 1rem; }
.toc a { display: block; color: var(--muted-2); padding: 0.4rem 0 0.4rem 0.9rem; border-left: 2px solid var(--line);
  transition: 0.2s; line-height: 1.35; }
.toc a:hover { color: var(--text); border-color: var(--line-2); }
.toc a.active { color: var(--text); border-color: var(--g3); }

.prose { max-width: var(--readw); }
.prose h2 { font-size: clamp(1.6rem, 3.4vw, 2.15rem); margin: 3.2rem 0 1.1rem; scroll-margin-top: 100px;
  display: flex; align-items: baseline; gap: 0.8rem; }
.prose h2 .num { font-family: var(--font-mono); font-size: 0.9rem; color: var(--g3); font-weight: 500; }
.prose h3 { font-size: 1.3rem; margin: 2.2rem 0 0.8rem; }
.prose p { margin-bottom: 1.15rem; color: #c9cfe6; }
.prose p:first-of-type { margin-top: 0; }
.prose a.link { color: var(--g1); border-bottom: 1px solid rgba(34,224,208,0.35); transition: 0.2s; }
.prose a.link:hover { border-color: var(--g1); }
.prose strong { color: var(--text); font-weight: 650; }
.prose ul.bullets { margin: 0 0 1.3rem; display: grid; gap: 0.6rem; }
.prose ul.bullets li { position: relative; padding-left: 1.5rem; color: #c9cfe6; }
.prose ul.bullets li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px;
  border-radius: 2px; background: var(--grad-soft); }
.prose ol.steps { counter-reset: s; display: grid; gap: 1rem; margin: 0 0 1.4rem; }
.prose ol.steps li { position: relative; padding-left: 2.6rem; counter-increment: s; color: #c9cfe6; }
.prose ol.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 30px; height: 30px;
  border-radius: 9px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--g1); border: 1px solid rgba(124,92,255,0.3); background: rgba(124,92,255,0.08); }

.prose figure { margin: 2rem 0; }
.prose figcaption { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted-2); text-align: center; margin-top: 0.9rem; }

/* code blocks */
.code { background: #080a14; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 1.6rem 0; }
.code .code-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted-2); }
.code .code-head .fn { margin-left: auto; }
.code pre { padding: 1.15rem 1.3rem; overflow-x: auto; font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.75; }
.code code { color: #d7dcf0; }
.code .cm { color: var(--muted-2); } /* comment */
.code .kw { color: var(--g4); }      /* keyword */
.code .st { color: var(--g1); }      /* string  */
.code .fn2 { color: var(--g2); }     /* fn/flag */
.code .nm { color: var(--amber); }   /* number/resource */

/* callouts */
.callout { border: 1px solid var(--line); border-left: 3px solid var(--g3); border-radius: 12px;
  padding: 1.2rem 1.4rem; margin: 1.6rem 0; background: rgba(124,92,255,0.05); }
.callout.warn { border-left-color: var(--amber); background: rgba(255,180,84,0.06); }
.callout.win { border-left-color: var(--g1); background: rgba(34,224,208,0.05); }
.callout .ct { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.callout .ct svg { width: 15px; height: 15px; }
.callout p { margin: 0; color: #c9cfe6; font-size: 0.96rem; }

/* curveball cards */
.curveballs { display: grid; gap: 1rem; margin: 1.5rem 0; }
.cb { border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem 1.5rem; background: var(--surface); }
.cb .cb-q { display: flex; gap: 0.7rem; align-items: flex-start; margin-bottom: 0.8rem; }
.cb .cb-q .tag { font-family: var(--font-mono); font-size: 0.68rem; color: var(--amber); border: 1px solid rgba(255,180,84,0.3);
  padding: 0.15rem 0.5rem; border-radius: 6px; flex: none; letter-spacing: 0.1em; }
.cb .cb-q b { font-family: var(--font-display); font-size: 1.02rem; }
.cb .cb-a { color: var(--muted); font-size: 0.94rem; padding-left: 0.2rem; }
.cb .cb-a b { color: var(--g1); font-weight: 600; }

/* stat strip inside article */
.metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin: 2rem 0; }
.metrics .cell { border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem 1rem; text-align: center;
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); }
.metrics .cell b { font-family: var(--font-display); font-size: 1.7rem; display: block; background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.metrics .cell span { color: var(--muted); font-size: 0.78rem; }

/* pull quote */
.pull { font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 1.7rem); line-height: 1.35;
  border-left: 3px solid transparent; border-image: var(--grad) 1; padding-left: 1.6rem; margin: 2.5rem 0;
  color: var(--text); }

/* diagram styling (inline svg) */
.diagram { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem 1.4rem;
  background: radial-gradient(120% 120% at 50% 0%, rgba(124,92,255,0.06), transparent 60%), var(--bg-2); }
.diagram svg { width: 100%; height: auto; }

/* article footer nav */
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 3rem 0; }
.article-nav a { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.6rem;
  transition: 0.3s var(--ease); background: var(--surface); }
.article-nav a:hover { border-color: var(--line-2); transform: translateY(-3px); }
.article-nav a span { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted-2); letter-spacing: 0.1em; text-transform: uppercase; }
.article-nav a b { display: block; font-family: var(--font-display); font-size: 1.08rem; margin-top: 0.4rem; }
.article-nav a.next { text-align: right; }
.article-nav a.disabled { opacity: 0.4; pointer-events: none; }

/* ----- Reveal animation ----- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }

/* ----- Responsive ----- */
@media (max-width: 940px) {
  .grid-3 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .glance { grid-template-columns: 1fr; }
  .article-body { grid-template-columns: 1fr; gap: 1.5rem; }
  .toc { display: none; }
  .metrics { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links { display: flex; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column;
    gap: 0; padding: 1rem 1.25rem 1.5rem; background: rgba(6,7,15,0.97); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line); }
  .nav.open .nav-links a { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  .pcard { grid-template-columns: auto 1fr; }
  .pcard .go { display: none; }
  .pcard .month { min-width: 52px; }
  .hero-stats { gap: 1.6rem; }
  .stat-row { grid-template-columns: 1fr; }
  .article-nav { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; }
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
  .ticker-track { animation: none; }
}
