:root{
  --bg:#03110a;
  --surface:#071a12;
  --surface2:#06130e;
  --accent:#00ff87;
  --gold:#f3af19;

  --text-main:#ffffff;
  --text-dim:#9aa3ab;

  --border:rgba(255,255,255,.08);
  --shadow:0 20px 60px rgba(0,0,0,.45);
  --radius:24px;
}

*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  background:var(--bg);
  color:var(--text-dim);
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  line-height:1.8;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow-x:hidden;

  background-image:
    radial-gradient(at 0% 0%, rgba(0,255,135,.10) 0, transparent 42%),
    radial-gradient(at 100% 0%, rgba(243,175,25,.08) 0, transparent 44%),
    radial-gradient(at 70% 90%, rgba(0,255,135,.06) 0, transparent 45%);
}

a{color:inherit;text-decoration:none}
img,video{max-width:100%;height:auto;display:block}

/* Accessibility */
.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0
}

/* Layout */
.container{max-width:1200px;margin:0 auto;padding:0 24px}
.grid{
  display:grid;
  grid-template-columns:1fr;
  gap:28px;
  padding:48px 0 72px;
}
@media (min-width:1024px){
  .grid{grid-template-columns:2fr 1fr;gap:32px}
}

/* Sticky Nav */
.nav{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter:blur(14px);
  background:rgba(3,17,10,.70);
  border-bottom:1px solid rgba(255,255,255,.06);
}
.nav-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 0;
  flex-wrap:wrap;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:900;
  letter-spacing:-.02em;
  text-transform:uppercase;
}
.brand-badge{
  width:40px;height:40px;border-radius:14px;
  background:#fff;display:grid;place-items:center;color:#000;
  box-shadow:0 12px 30px rgba(0,0,0,.35);
  flex:0 0 auto;
}
.brand span.accent{color:var(--accent)}
.nav-links{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.pill{
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  border-radius:999px;
  padding:10px 14px;
  font-weight:900;
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  transition:.2s;
}
.pill:hover{background:rgba(255,255,255,.08)}
.pill.primary{
  background:#fff;
  color:#000;
  border-color:transparent;
  padding:10px 16px;
}
.pill.primary:hover{background:var(--accent)}

/* Cards */
.card{
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.10);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.card-inner{padding:28px}

/* Typography */
.kicker{
  font-size:10px;
  font-weight:900;
  letter-spacing:.28em;
  text-transform:uppercase;
  color:rgba(154,163,171,.92);
  margin:0 0 12px;
}

h1{
  margin:0 0 14px;
  font-family:Montserrat,Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:clamp(40px,5vw,64px);
  line-height:1.05;
  font-weight:900;
  letter-spacing:-.03em;
  color:var(--text-main);
}
.h1-soft{
  color:#cbd5e1;
  font-style:italic;
  font-weight:900;
  display:inline-block;
}

.lead{
  margin:0 0 18px;
  color:rgba(229,231,235,.88);
  font-size:16px;
  line-height:1.6;
  min-height:4.8em;
}
.lead strong{color:#fff}

/* Buttons */
.btn-row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin:18px 0 10px;
  min-height:56px;
}
.btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  border-radius:14px;
  padding:12px 16px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-size:11px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  transition:.2s;
}
.btn:hover{background:rgba(255,255,255,.08)}
.btn.primary{
  background:#fff;
  color:#000;
  border-color:transparent;
}
.btn.primary:hover{background:var(--accent)}
.btn svg{width:16px;height:16px;flex:0 0 auto}

/* Mini blocks */
.mini-grid{
  display:grid;
  gap:12px;
  margin-top:18px;
  grid-template-columns:1fr;
}
@media (min-width:640px){
  .mini-grid{grid-template-columns:1fr 1fr}
}
.mini{
  background:rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:16px;
}
.mini .mini-title{
  margin:0 0 6px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.28em;
  text-transform:uppercase;
  color:rgba(154,163,171,.92);
}
.mini p{margin:0;color:rgba(229,231,235,.85);font-size:13px}

/* TOC pills */
.toc{
  margin-top:16px;
  display:grid;
  gap:10px;
  grid-template-columns:1fr;
}
@media (min-width:640px){
  .toc{grid-template-columns:1fr 1fr}
}
.toc a{
  display:block;
  background:rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.08);
  border-radius:999px;
  padding:10px 14px;
  font-size:11px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:rgba(0,255,135,.95);
  transition:.2s;
}
.toc a:hover{
  background:rgba(255,255,255,.06);
  color:#fff;
  border-color:rgba(0,255,135,.35);
}

/* Headings inside sections */
section{margin-top:26px}
h2{
  margin:0 0 10px;
  font-family:Montserrat,Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:24px;
  font-weight:900;
  letter-spacing:-.02em;
  text-transform:uppercase;
  font-style:italic;
  color:var(--text-main);
}
h3{
  margin:18px 0 10px;
  font-family:Montserrat,Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:13px;
  font-weight:900;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:rgba(243,175,25,.95);
}
p,li{color:rgba(229,231,235,.86)}
p{margin:0 0 14px}
ul,ol{margin:0;padding-left:18px}
strong{color:var(--text-main);font-weight:700}
.card a{color:rgba(0,255,135,.95)}
.card a:hover{color:#fff}

/* Note */
.note{
  border:1px solid rgba(0,255,135,.30);
  background:rgba(0,255,135,.06);
  border-radius:18px;
  padding:14px 16px;
  color:#e2e8f0;
  margin-top:14px;
}

/* Sidebar */
.aside-stack{
  position:sticky;
  top:92px;
  display:flex;
  flex-direction:column;
  gap:18px;
  width:100%;
  min-width:0;
}
.aside-card{width:100%;min-width:0}

/* Media card */
.media{
  width:100%;
  min-width:0;
  overflow:hidden;
  border-radius:var(--radius);
  border:1px solid rgba(255,255,255,.1);
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow:var(--shadow);
}
.media-figure{
  width:100%;
  aspect-ratio:3/2;
  background:rgba(0,0,0,.25);
  position:relative;
}
.media-figure img{
  position:absolute;inset:0;width:100%;height:100%;
  object-fit:cover;display:block;
}
.media-body{
  padding:16px 18px;
  border-top:1px solid rgba(255,255,255,.08);
}
.media-label{
  margin:0 0 8px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.28em;
  text-transform:uppercase;
  color:rgba(154,163,171,.92);
}
.media-body p{margin:0;color:rgba(229,231,235,.85);font-size:13px}
.media-actions{margin-top:12px}

/* Knowledge Nodes */
.nodes-title{
  margin:0 0 12px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.28em;
  text-transform:uppercase;
  color:rgba(154,163,171,.92);
  display:flex;
  align-items:center;
  gap:10px;
}
.nodes-title:before{
  content:"";
  width:34px;height:1px;
  background:rgba(255,255,255,.14);
  display:inline-block;
}
.node{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-radius:16px;
  background:rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.08);
  transition:.2s;
  font-size:11px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:rgba(154,163,171,.95);
  margin-top:10px;
}
.node:hover{
  background:rgba(255,255,255,.06);
  border-color:rgba(0,255,135,.35);
  color:#fff;
}

/* Footer */
footer{
  border-top:1px solid rgba(255,255,255,.06);
  padding:46px 0 56px;
  text-align:center;
}
.foot-kicker{
  margin:0 0 14px;
  color:rgba(154,163,171,.70);
  font-size:10px;
  font-weight:900;
  letter-spacing:.32em;
  text-transform:uppercase;
}
.foot-links{
  display:flex;
  gap:14px;
  justify-content:center;
  flex-wrap:wrap;
  font-size:11px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:rgba(154,163,171,.75);
}
.foot-links a:hover{color:#fff}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{transition:none!important;animation:none!important}
}

/* Responsive tweaks */
@media (max-width:768px){
  .card-inner{padding:22px}
  .container{padding:0 18px}
  .grid{padding:34px 0 58px}
}
