
:root{
  --bg:#070b14;
  --bg2:#0f172a;
  --card:rgba(15,23,42,.88);
  --card2:rgba(2,6,23,.75);
  --text:#e5eefc;
  --muted:#9fb1cc;
  --line:rgba(125,211,252,.28);
  --accent:#22d3ee;
  --accent2:#818cf8;
  --green:#34d399;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(34,211,238,.22), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(129,140,248,.20), transparent 34%),
    linear-gradient(135deg,#050816 0%,#08111f 50%,#020617 100%);
  color:var(--text);
  line-height:1.72;
}
body:before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(125,211,252,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125,211,252,.055) 1px, transparent 1px);
  background-size:38px 38px;
  mask-image:linear-gradient(to bottom,rgba(0,0,0,.9),rgba(0,0,0,.25));
}
.site-shell{
  max-width:1180px;
  margin:0 auto;
  padding:32px 18px 56px;
}
.hero{
  border:1px solid var(--line);
  border-radius:28px;
  padding:32px;
  background:linear-gradient(135deg,rgba(15,23,42,.92),rgba(8,13,26,.75));
  box-shadow:0 20px 70px rgba(0,0,0,.35), inset 0 0 36px rgba(34,211,238,.06);
  position:relative;
  overflow:hidden;
}
.hero:after{
  content:"DATA STRUCTURES / KNOWLEDGE GRAPH";
  position:absolute;
  right:-40px;
  bottom:18px;
  color:rgba(34,211,238,.12);
  font-size:44px;
  font-weight:900;
  letter-spacing:.08em;
  transform:rotate(-4deg);
}
.hero h1{
  margin:0 0 10px;
  font-size:clamp(32px,5vw,60px);
  line-height:1.05;
  letter-spacing:-.04em;
}
.hero p{max-width:760px;color:var(--muted);font-size:18px}
.badge{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:7px 12px;
  border:1px solid rgba(34,211,238,.35);
  border-radius:999px;
  color:#cffafe;
  background:rgba(8,145,178,.12);
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-bottom:18px;
}
.layout{
  display:grid;
  grid-template-columns:280px minmax(0,1fr);
  gap:22px;
  margin-top:22px;
}
.sidebar{
  position:sticky;
  top:18px;
  align-self:start;
  border:1px solid var(--line);
  border-radius:22px;
  background:rgba(2,6,23,.76);
  padding:16px;
  box-shadow:0 12px 40px rgba(0,0,0,.25);
}
.sidebar h2{
  font-size:15px;
  margin:0 0 12px;
  color:#cffafe;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.navlink{
  display:block;
  color:var(--text);
  text-decoration:none;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid transparent;
}
.navlink:hover,.navlink.active{
  border-color:rgba(34,211,238,.25);
  background:rgba(34,211,238,.08);
  color:#67e8f9;
}
.page-card{
  border:1px solid var(--line);
  border-radius:26px;
  background:var(--card);
  padding:30px;
  box-shadow:0 18px 60px rgba(0,0,0,.28);
}
.page-card h1,.page-card h2,.page-card h3{
  line-height:1.2;
  letter-spacing:-.02em;
}
.page-card h1{
  font-size:clamp(30px,4vw,48px);
  margin:0 0 18px;
  color:#ecfeff;
}
.page-card h2{
  margin-top:30px;
  padding-top:14px;
  border-top:1px solid rgba(125,211,252,.18);
  color:#a5f3fc;
}
.page-card h3{color:#c4b5fd;margin-top:24px}
p{margin:14px 0}
a{color:#67e8f9;text-decoration:none;border-bottom:1px solid rgba(103,232,249,.35)}
a:hover{color:#cffafe;border-bottom-color:#cffafe}
.unresolved-link{color:#fbbf24}
.content-list{padding-left:22px}
.content-list li{margin:8px 0}
code{
  color:#bae6fd;
  background:rgba(14,165,233,.12);
  border:1px solid rgba(14,165,233,.18);
  padding:2px 6px;
  border-radius:7px;
}
.math-block{
  overflow-x:auto;
  margin:18px 0;
  padding:16px;
  border:1px solid rgba(129,140,248,.28);
  background:rgba(15,23,42,.68);
  border-radius:16px;
}
.diagram{
  margin:20px 0;
  border:1px solid rgba(34,211,238,.24);
  background:linear-gradient(135deg,rgba(14,165,233,.08),rgba(129,140,248,.08));
  border-radius:20px;
  padding:16px;
  overflow:hidden;
}
.diagram svg{width:100%;height:auto;display:block}
.diagram text{
  fill:#e0f2fe;
  font-weight:700;
  text-anchor:middle;
  font-size:18px;
  dominant-baseline:middle;
}
.edge{stroke:#67e8f9;stroke-width:3;opacity:.75}
.dashed{stroke-dasharray:8 8}
.node-root{fill:#0e7490;stroke:#67e8f9;stroke-width:3}
.node{fill:#312e81;stroke:#a5b4fc;stroke-width:3}
.leaf{fill:#064e3b;stroke:#6ee7b7;stroke-width:3}
.caption{color:var(--muted);font-size:14px;text-align:center;margin-top:8px}
.image-missing{
  border:1px dashed rgba(251,191,36,.45);
  border-radius:16px;
  padding:18px;
  background:rgba(251,191,36,.06);
  color:#fde68a;
}
.image-missing span{display:block;color:#fbbf24;margin-top:6px;font-family:monospace}
.grid-cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:14px;
  margin-top:20px;
}
.tile{
  border:1px solid rgba(125,211,252,.24);
  border-radius:18px;
  padding:16px;
  background:rgba(15,23,42,.65);
  min-height:130px;
}
.tile h3{margin:0 0 8px;color:#a5f3fc}
.footer{
  color:var(--muted);
  margin-top:26px;
  font-size:14px;
  text-align:center;
}
.back{
  display:inline-flex;
  margin-bottom:18px;
  color:#cffafe;
  border:1px solid rgba(34,211,238,.28);
  border-radius:999px;
  padding:8px 12px;
  background:rgba(34,211,238,.08);
}
@media(max-width:860px){
  .layout{grid-template-columns:1fr}
  .sidebar{position:static}
  .page-card{padding:22px}
}
