:root {
  --bg: #0b0d12;
  --bg-2: #12151d;
  --card: rgba(20, 24, 33, 0.82);
  --line: rgba(255, 255, 255, 0.09);
  --text: #e9ecf2;
  --muted: #9aa3b5;
  --ug2: #8cff3c;
  --ug2-2: #b046ff;
  --mw: #ffb21c;
  --mw-blue: #2f7bff;
  --mw-red: #ff3b3b;
  --radius: 14px;
  --max: 1080px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ug2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* top bar */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 13, 18, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { font-weight: 800; letter-spacing: 0.04em; font-size: 1.15rem; color: var(--text); }
.brand span { color: var(--ug2); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  color: var(--muted); padding: 6px 12px; border-radius: 999px; font-size: 0.95rem;
}
.nav a:hover { color: var(--text); background: rgba(255,255,255,0.06); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: rgba(140, 255, 60, 0.12); }

/* hero */
.hero {
  position: relative; overflow: hidden;
  min-height: 62vh; display: flex; align-items: flex-end;
  border-bottom: 1px solid var(--line);
}
.hero .bg {
  position: absolute; inset: 0;
  background: center / cover no-repeat;
  filter: saturate(1.2) brightness(1.25);
  transform: scale(1.04);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(1200px 500px at 15% 110%, rgba(176, 70, 255, 0.35), transparent 60%),
    linear-gradient(180deg, rgba(11,13,18,0.1) 0%, rgba(11,13,18,0.5) 60%, var(--bg) 100%);
}
.hero .wrap { position: relative; z-index: 1; padding-top: 80px; padding-bottom: 56px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.78rem; color: var(--ug2); font-weight: 700; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.05; margin: 10px 0 14px; font-weight: 850; letter-spacing: -0.01em; }
.lead { font-size: 1.15rem; color: #cfd5e2; max-width: 640px; margin: 0; }
.hero.small { min-height: 34vh; }
.hero.small h1 { font-size: clamp(1.9rem, 5vw, 3rem); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; font-weight: 700;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn.primary { background: var(--ug2); color: #0b0d12; box-shadow: 0 6px 24px rgba(140,255,60,0.25); }
.btn.ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,0.04); }
.btn[aria-disabled="true"] { background: rgba(255,255,255,0.06); color: var(--muted); cursor: default; box-shadow: none; transform: none; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* sections */
section { padding: 56px 0; }
h2 { font-size: 1.7rem; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0 0 28px; }
h3 { margin: 0 0 6px; font-size: 1.2rem; }

/* project cards */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.project {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg-2); min-height: 360px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.project .art { position: absolute; inset: 0; background: center / cover no-repeat; transition: transform .4s ease; }
.project:hover .art { transform: scale(1.04); }
.project::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,13,18,0.05) 20%, rgba(11,13,18,0.92) 75%); }
.project .body { position: relative; z-index: 1; padding: 24px; }
.project p { color: #c8cfdc; margin: 6px 0 0; }
.tag {
  display: inline-block; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}
.tag.live { background: rgba(140,255,60,0.16); color: var(--ug2); }
.tag.soon { background: rgba(255,178,28,0.16); color: var(--mw); }
/* Most Wanted: no picture of our own yet, its look in colour */
.project.mw .art {
  background:
    radial-gradient(420px 260px at 18% 22%, rgba(47,123,255,0.55), transparent 65%),
    radial-gradient(420px 260px at 82% 26%, rgba(255,59,59,0.5), transparent 65%),
    linear-gradient(160deg, #3a2f12 0%, #1d1a10 45%, #0e0f12 100%);
  animation: siren 3.2s ease-in-out infinite alternate;
}
.project.mw .art::before {
  content: "MOST WANTED"; position: absolute; left: 50%; top: 24%; transform: translate(-50%, -50%);
  font-weight: 900; font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: 0.08em; color: rgba(255,178,28,0.18);
  white-space: nowrap;
}
@keyframes siren { from { filter: hue-rotate(0deg) brightness(1); } to { filter: hue-rotate(-14deg) brightness(1.15); } }
@media (prefers-reduced-motion: reduce) { .project.mw .art { animation: none; } .project .art, .btn { transition: none; } }

/* feature grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card p { margin: 6px 0 0; color: var(--muted); }
.card .ico { font-size: 1.4rem; }

/* docs */
.doc { display: grid; grid-template-columns: 220px 1fr; gap: 40px; }
.toc { position: sticky; top: 84px; align-self: start; }
.toc a { display: block; color: var(--muted); padding: 4px 0; font-size: 0.95rem; }
.toc a:hover { color: var(--text); }
.doc h2 { margin-top: 44px; scroll-margin-top: 80px; }
.doc h2:first-child { margin-top: 0; }
.doc ul { padding-left: 20px; }
.doc li { margin: 4px 0; }
kbd {
  font: 600 0.85em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(255,255,255,0.08); border: 1px solid var(--line); border-bottom-width: 2px;
  padding: 1px 6px; border-radius: 6px;
}
table { width: 100%; border-collapse: collapse; margin: 12px 0 4px; font-size: 0.95rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.note { border-left: 3px solid var(--ug2-2); background: rgba(176,70,255,0.08); padding: 12px 16px; border-radius: 0 10px 10px 0; color: #d6cfe6; }

/* changelog */
.release { position: relative; padding-left: 28px; margin-bottom: 40px; }
.release::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: -40px; width: 2px; background: var(--line); }
.release:last-child::before { display: none; }
.release .dot { position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--ug2); box-shadow: 0 0 0 4px rgba(140,255,60,0.15); }
.release.base .dot { background: var(--muted); box-shadow: none; }
.release h3 { font-size: 1.25rem; }
.release time { color: var(--muted); font-size: 0.9rem; }
.kind { margin-top: 14px; }
.kind h4 { margin: 0 0 4px; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
.kind.content h4 { color: var(--ug2); }
.kind.update h4 { color: #59c2ff; }
.kind.fix h4 { color: var(--mw); }
.kind ul { margin: 0; padding-left: 20px; }
.badge { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255,178,28,0.16); color: var(--mw); margin-left: 6px; vertical-align: middle; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; padding: 28px 0 40px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .doc { grid-template-columns: 1fr; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .hero { min-height: 52vh; }
  section { padding: 40px 0; }
  .top .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
}
.hero.small .bg { filter: saturate(1.2) brightness(1.15) blur(2px); }
/* one page: sections land below the sticky bar, the docs on a band of their own */
section[id], .doc h2 { scroll-margin-top: 76px; }
.band { background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#doku .doc h2 { font-size: 1.3rem; margin-top: 36px; }
#doku .doc h2:first-child { margin-top: 0; }
#doku > .wrap:first-child { margin-bottom: 8px; }
#changelog .release:first-of-type { margin-top: 8px; }
.brand .by { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); margin-left: 6px; }
/* Carbon: no picture of our own yet, its look in colour (the canyons' orange under a night sky) */
.project.carbon .art {
  background:
    radial-gradient(520px 240px at 50% 105%, rgba(255,110,20,0.55), transparent 70%),
    radial-gradient(380px 220px at 85% 15%, rgba(80,120,255,0.25), transparent 70%),
    linear-gradient(170deg, #121722 0%, #1a1410 55%, #0e0f12 100%);
}
.project.carbon .art::before {
  content: "CARBON"; position: absolute; left: 50%; top: 24%; transform: translate(-50%, -50%);
  font-weight: 900; font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: 0.16em; color: rgba(255,130,40,0.2);
}
