
:root{
  --bg:#070b14;
  --bg2:#0f172a;
  --card:rgba(15,23,42,.86);
  --line:rgba(125,211,252,.26);
  --text:#edf7ff;
  --muted:#a6bbcf;
  --accent:#38bdf8;
  --accent2:#facc15;
  --red:#fb7185;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  color:var(--text);
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  line-height:1.72;
  background:
    radial-gradient(circle at 12% 8%, rgba(56,189,248,.18), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(250,204,21,.13), transparent 34%),
    linear-gradient(135deg,#050816 0%,#08111f 50%,#020617 100%);
}
body:before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(125,211,252,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125,211,252,.045) 1px, transparent 1px);
  background-size:40px 40px;
}
.site-shell{
  max-width:1200px;
  margin:0 auto;
  padding:30px 18px 56px;
}
.hero{
  border:1px solid var(--line);
  border-radius:28px;
  padding:34px;
  background:linear-gradient(135deg,rgba(15,23,42,.92),rgba(2,6,23,.78));
  box-shadow:0 24px 80px rgba(0,0,0,.38), inset 0 0 42px rgba(56,189,248,.05);
  overflow:hidden;
  position:relative;
}
.hero:after{
  content:"F = ma • инерция • масса • ускорение • взаимодействие";
  position:absolute;
  right:-58px;
  bottom:14px;
  color:rgba(56,189,248,.12);
  font-size:38px;
  font-weight:900;
  letter-spacing:.04em;
  transform:rotate(-4deg);
  white-space:nowrap;
}
.badge{
  display:inline-flex;
  padding:7px 12px;
  border:1px solid rgba(56,189,248,.36);
  background:rgba(14,165,233,.11);
  color:#cffafe;
  border-radius:999px;
  text-transform:uppercase;
  font-weight:700;
  font-size:12px;
  letter-spacing:.08em;
  margin-bottom:16px;
}
.hero h1{
  margin:0 0 12px;
  font-size:clamp(34px,5vw,60px);
  line-height:1.04;
  letter-spacing:-.04em;
}
.hero p{
  color:var(--muted);
  max-width:820px;
  margin:0;
  font-size:18px;
}
.layout{
  display:grid;
  grid-template-columns:300px 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 42px rgba(0,0,0,.28);
}
.sidebar h2{
  margin:0 0 12px;
  color:#bae6fd;
  font-size:15px;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.navlink{
  display:block;
  padding:9px 11px;
  color:var(--text);
  text-decoration:none;
  border:1px solid transparent;
  border-radius:14px;
}
.navlink:hover,.navlink.active{
  color:#7dd3fc;
  background:rgba(56,189,248,.09);
  border-color:rgba(56,189,248,.25);
}
.page-card{
  border:1px solid var(--line);
  border-radius:26px;
  padding:30px;
  background:var(--card);
  box-shadow:0 18px 60px rgba(0,0,0,.30);
}
.page-card h1{
  margin:0 0 18px;
  font-size:clamp(30px,4vw,48px);
  line-height:1.12;
}
.page-card h2{
  margin-top:30px;
  padding-top:14px;
  border-top:1px solid rgba(125,211,252,.18);
  color:#bae6fd;
}
.page-card h3{color:#fde68a;margin-top:24px}
p{margin:13px 0}
a{color:#7dd3fc;text-decoration:none;border-bottom:1px solid rgba(125,211,252,.35)}
a:hover{color:#e0f2fe;border-bottom-color:#e0f2fe}
.unresolved-link{color:#fbbf24}
.content-list{padding-left:24px}
.content-list li{margin:8px 0}
code{
  color:#fde68a;
  background:rgba(250,204,21,.10);
  border:1px solid rgba(250,204,21,.22);
  padding:2px 6px;
  border-radius:7px;
}
pre{
  overflow:auto;
  padding:16px;
  border-radius:16px;
  border:1px solid rgba(125,211,252,.18);
  background:rgba(2,6,23,.70);
}
blockquote{
  margin:18px 0;
  padding:14px 18px;
  border-left:4px solid var(--accent);
  background:rgba(56,189,248,.08);
  border-radius:12px;
}
.math-block{
  overflow-x:auto;
  margin:18px 0;
  padding:16px;
  border:1px solid rgba(56,189,248,.25);
  background:rgba(15,23,42,.72);
  border-radius:16px;
}
.table-scroll{overflow-x:auto;margin:18px 0}
table{
  border-collapse:collapse;
  min-width:520px;
  width:100%;
  background:rgba(15,23,42,.50);
}
td,th{
  border:1px solid rgba(125,211,252,.20);
  padding:10px 12px;
}
th{background:rgba(56,189,248,.12);color:#dff6ff}
.image-missing{
  display:inline-block;
  padding:4px 8px;
  color:#fbbf24;
  border:1px dashed rgba(251,191,36,.5);
  border-radius:8px;
}
.grid-cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,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,.55);
  min-height:140px;
}
.tile h3{margin:0 0 8px;color:#bae6fd}
.tile p{color:var(--muted)}
.back{
  display:inline-flex;
  margin-bottom:18px;
  color:#e0f2fe;
  background:rgba(56,189,248,.08);
  border:1px solid rgba(56,189,248,.30);
  border-radius:999px;
  padding:8px 12px;
}
@media(max-width:900px){
  .layout{grid-template-columns:1fr}
  .sidebar{position:static}
  .page-card{padding:22px}
}
