:root {
  --bg: #07081a;
  --bg-2: #0c0e24;
  --card: rgba(255, 255, 255, 0.035);
  --card-hi: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --text: #eceeff;
  --muted: #9ea2c8;
  --faint: #6b6f96;
  --cyan: #4fe3ff;
  --violet: #7b61ff;
  --pink: #ff5db1;
  --grad: linear-gradient(90deg, #2ec5e8, #7b61ff 50%, #e5489c);
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI Variable", "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Nebula and stars behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -20vw auto;
  height: 120vh;
  z-index: -2;
  background:
    radial-gradient(40vw 30vw at 15% 10%, rgba(123, 97, 255, 0.28), transparent 70%),
    radial-gradient(35vw 28vw at 85% 5%, rgba(229, 72, 156, 0.18), transparent 70%),
    radial-gradient(40vw 30vw at 60% 45%, rgba(46, 197, 232, 0.10), transparent 70%);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 120px 80px, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 200px 160px, rgba(159, 243, 255, 0.9), transparent),
    radial-gradient(1px 1px at 300px 40px, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 360px 220px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 60px 260px, rgba(255, 180, 230, 0.8), transparent);
  background-size: 400px 300px;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }

.wrap { width: min(1160px, 100% - 48px); margin-inline: auto; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(7, 8, 26, 0.6);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.18em; }
.brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.links { display: flex; gap: 26px; margin-left: auto; font-size: 15px; color: var(--muted); }
.nav-btns { display: flex; gap: 8px; }
.links a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--line);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
  border: 0;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 10px 30px -10px rgba(123, 97, 255, 0.8);
}
.btn.ghost { background: var(--card); }
.btn.ghost:hover { background: var(--card-hi); border-color: rgba(255, 255, 255, 0.16); }
.btn.small { height: 36px; padding: 0 16px; font-size: 14px; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 56px;
  padding: 88px 0 72px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #3ee6a0; box-shadow: 0 0 10px #3ee6a0; }
h1 { font-size: clamp(38px, 4.6vw, 62px); font-weight: 800; margin: 22px 0 20px; }
.lead { font-size: 19px; color: var(--muted); max-width: 30em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 18px; }
.meta { color: var(--faint); font-size: 14px; letter-spacing: 0.02em; }
.hero-shot {
  margin: 0;
  position: relative;
  border-radius: 22px;
  padding: 1px;
  background: linear-gradient(140deg, rgba(79, 227, 255, 0.6), rgba(123, 97, 255, 0.3) 40%, rgba(255, 93, 177, 0.5));
  box-shadow: 0 40px 120px -30px rgba(123, 97, 255, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
  transform: perspective(1600px) rotateY(-6deg) rotateX(2deg);
}
.hero-shot img { border-radius: 21px; }

/* Sections */
.section { padding: 72px 0; }
.head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.head h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; }
.head p { color: var(--muted); max-width: 34em; text-align: right; }

/* Showcase */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
  gap: 14px;
}
.shot {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-2);
  aspect-ratio: 16 / 9;
}
.shot.big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.shot:hover img { transform: scale(1.03); }
.shot figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(7, 8, 26, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card {
  padding: 26px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.card:hover { background: var(--card-hi); border-color: rgba(123, 97, 255, 0.35); }
.card h3 { font-size: 19px; margin: 18px 0 8px; }
.card p { color: var(--muted); font-size: 15px; }
.ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(79, 227, 255, 0.18), rgba(255, 93, 177, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}
.ico::after, .os::after {
  content: "";
  position: absolute;
  inset: 10px;
  background: var(--grad);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.i-cpu { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='6' y='6' width='12' height='12' rx='2'/%3E%3Crect x='10' y='10' width='4' height='4'/%3E%3Cpath d='M9 2v3M15 2v3M9 19v3M15 19v3M2 9h3M2 15h3M19 9h3M19 15h3'/%3E%3C/svg%3E"); }
.i-jit { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M13 2 4 14h7l-1 8 9-12h-7z'/%3E%3C/svg%3E"); }
.i-gpu { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 2 21 7v10l-9 5-9-5V7z'/%3E%3Cpath d='M12 22V12M21 7l-9 5-9-5'/%3E%3C/svg%3E"); }
.i-os { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='m12 3 9 5-9 5-9-5z'/%3E%3Cpath d='m3 13 9 5 9-5M3 17.5l9 5 9-5'/%3E%3C/svg%3E"); }
.i-media { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='3'/%3E%3Cpath d='m10 9 5 3-5 3z'/%3E%3C/svg%3E"); }
.i-home { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='3' width='8' height='8' rx='2'/%3E%3Crect x='13' y='3' width='8' height='8' rx='2'/%3E%3Crect x='3' y='13' width='8' height='8' rx='2'/%3E%3Crect x='13' y='13' width='8' height='8' rx='2'/%3E%3C/svg%3E"); }

/* Progress */
.progress { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panel {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}
.panel h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); margin-bottom: 16px; }
.roadmap ul, .recent ul { list-style: none; margin: 0; padding: 0; }
.roadmap li {
  display: grid;
  grid-template-columns: 78px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.roadmap li:first-child { border-top: 0; padding-top: 0; }
.roadmap .st { grid-row: span 2; align-self: center; }
.roadmap b { font-weight: 600; }
.roadmap small { color: var(--muted); font-size: 13.5px; }
.st {
  display: inline-block;
  text-align: center;
  padding: 3px 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.st.done { color: #3ee6a0; background: rgba(62, 230, 160, 0.1); border: 1px solid rgba(62, 230, 160, 0.25); }
.st.wip { color: var(--cyan); background: rgba(79, 227, 255, 0.08); border: 1px solid rgba(79, 227, 255, 0.25); }
.side { display: grid; gap: 14px; align-content: start; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}
.stat b { display: block; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 13.5px; }
.activity svg { width: 100%; height: auto; display: block; }
.activity .lbl { fill: var(--faint); font-size: 11px; }
.recent li { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.recent li:first-child { border-top: 0; padding-top: 0; }
.recent a:hover .msg { color: var(--text); }
.recent a { display: flex; gap: 10px; align-items: baseline; min-width: 0; flex: 1; }
.tag {
  flex: none;
  font: 600 11.5px/1.6 ui-monospace, "Cascadia Code", Consolas, monospace;
  padding: 1px 8px;
  border-radius: 6px;
  color: #c9bfff;
  background: rgba(123, 97, 255, 0.14);
}
.msg { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.when { flex: none; margin-left: auto; color: var(--faint); font-size: 12.5px; }
.more { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--cyan); }

/* Home screen trio */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.trio figure { margin: 0; }
.trio img { border-radius: 14px; border: 1px solid var(--line); }
.trio figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; }

/* Download */
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dl-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.dl-card:hover { background: var(--card-hi); border-color: rgba(123, 97, 255, 0.45); transform: translateY(-2px); }
.dl-card b { display: block; font-size: 19px; }
.dl-card span { color: var(--muted); font-size: 14px; }
.dl-card .arrow {
  margin-left: auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 18px;
}
.os { position: relative; width: 48px; height: 48px; flex: none; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.os-win { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5.5 10.5 4.5v7H3zM11.5 4.4 21 3v8.5h-9.5zM3 12.5h7.5v7L3 18.5zM11.5 12.5H21V21l-9.5-1.4z'/%3E%3C/svg%3E"); }
.os-linux { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='3'/%3E%3Cpath d='m6 9 3 3-3 3M12 15h5'/%3E%3C/svg%3E"); }
.dl-links { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 20px; font-size: 15px; }
.dl-links a { color: var(--cyan); }
.dl-links a:hover { text-decoration: underline; }
.note { margin-top: 14px; color: var(--faint); font-size: 14px; }

/* Footer */
.foot { margin-top: 48px; border-top: 1px solid var(--line); padding: 30px 0 40px; }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.foot nav { display: flex; gap: 20px; color: var(--muted); font-size: 14px; }
.foot nav a:hover { color: var(--text); }
.foot p { margin-left: auto; color: var(--faint); font-size: 13px; }

/* Small screens */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 56px; }
  .hero-shot { transform: none; }
  .progress { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .head { flex-direction: column; align-items: start; }
  .head p { text-align: left; }
}
@media (max-width: 680px) {
  .links { display: none; }
  .nav-btns { margin-left: auto; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .shot.big, .gallery .shot:last-child { grid-column: span 2; grid-row: auto; aspect-ratio: 16 / 9; }
  .cards, .trio, .dl { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr 1fr; }
  .stat { padding: 14px; }
  .stat b { font-size: 24px; }
  .foot p { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* 404 */
.lost { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; }
.lost h1 { margin-top: 18px; }
.progress > *, .side > *, .gallery > *, .cards > * { min-width: 0; }

/* Friends strip: three emulators, one scene */
.scene {
  position: relative;
  z-index: 11;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(46, 197, 232, 0.09), rgba(123, 97, 255, 0.12), rgba(229, 72, 156, 0.09));
}
.scene-inner { display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 7px 0; }
.tri { position: relative; width: 62px; height: 48px; flex: none; }
.tri svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tri path { fill: none; stroke-linejoin: round; }
.tri-base { stroke: rgba(255, 255, 255, 0.14); stroke-width: 1.5; }
.tri-flow {
  stroke: url(#tri-g);
  stroke-width: 2;
  stroke-dasharray: 22 78;
  filter: drop-shadow(0 0 3px rgba(123, 97, 255, 0.9));
  animation: tri-flow 3.2s linear infinite;
}
@keyframes tri-flow { to { stroke-dashoffset: -100; } }
.tri .v {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  object-fit: cover;
  background: #0c0e24;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 12px rgba(123, 97, 255, 0.55);
}
.tri .top { left: 21px; top: 0; }
.tri .left { left: 0; bottom: 0; }
.tri .right { right: 0; bottom: 0; }
.scene p { color: var(--muted); }
.scene p b { color: var(--text); font-weight: 600; }
.scene-links { display: flex; gap: 8px; margin-left: auto; flex: none; }
.pill-link {
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 8, 26, 0.45);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pill-link span { color: var(--cyan); }
.pill-link:hover { border-color: rgba(123, 97, 255, 0.6); background: rgba(123, 97, 255, 0.15); }
@media (max-width: 860px) { .scene .long { display: none; } }
@media (max-width: 520px) {
  .scene-inner { flex-wrap: wrap; gap: 8px 12px; }
  .scene-links { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .tri-flow { animation: none; } }
