
:root{
  --bg:#07111f;
  --card:rgba(10,24,42,.90);
  --panel:rgba(3,10,24,.78);
  --line:rgba(125,211,252,.28);
  --text:#eefaff;
  --muted:#a9c6d7;
  --accent:#38bdf8;
  --cyan:#67e8f9;
  --violet:#a78bfa;
}
*{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,.20),transparent 31%),
    radial-gradient(circle at 88% 18%,rgba(167,139,250,.14),transparent 32%),
    radial-gradient(circle at 50% 92%,rgba(103,232,249,.10),transparent 34%),
    linear-gradient(135deg,#020617 0%,#08111f 45%,#111827 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:42px 42px;
}
.site-shell{max-width:1240px;margin:0 auto;padding:30px 18px 56px}
.hero{
  border:1px solid var(--line);
  border-radius:30px;
  padding:34px;
  background:
    linear-gradient(135deg,rgba(15,23,42,.92),rgba(2,6,23,.76)),
    radial-gradient(circle at 82% 24%,rgba(56,189,248,.09),transparent 35%);
  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:"лучи • зеркало • линзы • фокус • изображение";
  position:absolute;
  right:-72px;
  bottom:12px;
  color:rgba(125,211,252,.14);
  font-size:38px;
  font-weight:900;
  letter-spacing:.04em;
  transform:rotate(-4deg);
  white-space:nowrap;
}
.hero h1{
  margin:0;
  font-size:clamp(34px,5vw,60px);
  line-height:1.04;
  letter-spacing:-.04em;
}
.hero p{color:var(--muted);max-width:860px;margin:16px 0 0;font-size:18px}
.layout{display:grid;grid-template-columns:310px minmax(0,1fr);gap:22px;margin-top:22px}
.sidebar{
  position:sticky;
  top:18px;
  align-self:start;
  border:1px solid var(--line);
  border-radius:24px;
  background:var(--panel);
  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{color:#e0f2fe;background:rgba(56,189,248,.10);border-color:rgba(56,189,248,.26)}
.page-card{
  border:1px solid var(--line);
  border-radius:28px;
  padding:30px;
  background:var(--card);
  box-shadow:0 18px 60px rgba(0,0,0,.30);
  overflow:hidden;
}
.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:#ddd6fe;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:#bbf7d0;
  background:rgba(52,211,153,.10);
  border:1px solid rgba(52,211,153,.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,.22);padding:10px 12px}
th{background:rgba(56,189,248,.13);color:#e0f2fe}

.image-grid 

.grid-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:14px;margin-top:20px}
.tile{
  display:block;
  border:1px solid rgba(125,211,252,.24);
  border-radius:20px;
  padding:16px;
  background:rgba(15,23,42,.55);
  min-height:136px;
}
.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,.10);
  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}
}
