:root {
  color-scheme: dark;
  --bg: #080b16;
  --surface: #10172a;
  --surface-2: #151f37;
  --text: #f6f8ff;
  --muted: #aab7d8;
  --line: #2c385f;
  --blue: #6d7dff;
  --cyan: #00c2a8;
  --gold: #ffd166;
  --danger: #ff6b8a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(8, 11, 22, 0.88), rgba(8, 11, 22, 0.98)),
    var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

#field {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  background: #080b16;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 56px);
  background: rgba(8, 11, 22, 0.78);
  border-bottom: 1px solid rgba(170, 183, 216, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(0, 194, 168, 0.6);
  border-radius: 10px;
  background: rgba(0, 194, 168, 0.12);
  color: var(--cyan);
  font-weight: 800;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy span {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover,
.github-link:hover {
  color: var(--text);
}

.github-link {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 92px 0;
}

.hero {
  min-height: calc(100vh - 77px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.72fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding-top: 58px;
}

.hero-copy,
.split > div,
.section-heading,
.contribute > div {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
  overflow-wrap: break-word;
}

h1 {
  max-width: 850px;
  margin-bottom: 24px;
  font-size: clamp(48px, 8vw, 88px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.12;
}

.hero-text,
.section-heading p,
.split p,
.contribute p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.hero-text {
  max-width: 720px;
  margin-bottom: 30px;
}

.hero-actions,
.contribute-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-weight: 800;
  white-space: nowrap;
}

.button.primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #03110f;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 650px;
  margin: 42px 0 0;
}

.stats div {
  border-top: 1px solid rgba(170, 183, 216, 0.22);
  padding-top: 16px;
}

.stats dt {
  font-size: 34px;
  font-weight: 900;
}

.stats dd {
  margin: 4px 0 0;
  color: var(--muted);
}

.terminal,
.demo-shell {
  max-width: 100%;
  min-width: 0;
  border: 1px solid rgba(170, 183, 216, 0.2);
  border-radius: 18px;
  background: rgba(16, 23, 42, 0.82);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid rgba(170, 183, 216, 0.14);
}

.terminal-bar span {
  width: 11px;
  height: 11px;
  border-radius: 99px;
  background: var(--danger);
}

.terminal-bar span:nth-child(2) {
  background: var(--gold);
}

.terminal-bar span:nth-child(3) {
  background: var(--cyan);
}

pre {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
}

code {
  display: block;
  padding: 22px;
  color: #dce6ff;
  font-family: "Cascadia Code", Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  line-height: 1.8;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.system-card {
  min-height: 260px;
  padding: 24px;
  border: 1px solid rgba(170, 183, 216, 0.16);
  border-radius: 14px;
  background: rgba(16, 23, 42, 0.74);
}

.system-card p {
  color: var(--muted);
  line-height: 1.65;
}

.system-index {
  display: inline-block;
  margin-bottom: 44px;
  color: var(--gold);
  font-weight: 900;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 0.7fr) minmax(280px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.timeline {
  display: grid;
  gap: 8px;
}

.phase {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid rgba(170, 183, 216, 0.14);
  border-radius: 10px;
  background: rgba(16, 23, 42, 0.7);
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.phase span {
  color: var(--gold);
  font-weight: 900;
}

.phase.active {
  border-color: rgba(0, 194, 168, 0.75);
  color: var(--text);
  background: rgba(0, 194, 168, 0.09);
}

.phase-detail {
  min-height: 308px;
  padding: 28px;
  border: 1px solid rgba(170, 183, 216, 0.16);
  border-radius: 14px;
  background: rgba(16, 23, 42, 0.78);
}

.phase-detail p:last-child {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.demo-section {
  width: min(960px, calc(100% - 40px));
}

.demo-tabs {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid rgba(170, 183, 216, 0.14);
}

.demo-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.demo-tab.active {
  border-color: rgba(0, 194, 168, 0.65);
  color: var(--text);
  background: rgba(0, 194, 168, 0.1);
}

.contribute {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid rgba(170, 183, 216, 0.16);
}

.contribute > div:first-child {
  max-width: 720px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 4vw, 56px);
  color: var(--muted);
  border-top: 1px solid rgba(170, 183, 216, 0.14);
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
  }

  .nav {
    display: none;
  }

  .hero,
  .split {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .systems-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contribute,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .section {
    width: min(100% - 28px, 1120px);
    padding: 66px 0;
  }

  .topbar {
    padding: 14px;
  }

  .github-link {
    display: none;
  }

  h1 {
    font-size: 44px;
  }

  .hero-copy,
  .hero-text {
    max-width: calc(100vw - 42px);
  }

  .hero-text,
  .section-heading p,
  .split p,
  .contribute p {
    font-size: 16px;
  }

  pre {
    white-space: pre-wrap;
  }

  code {
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  .stats,
  .systems-grid {
    grid-template-columns: 1fr;
  }

  .system-card {
    min-height: auto;
  }

  .system-index {
    margin-bottom: 24px;
  }

  .demo-tabs {
    overflow-x: auto;
  }
}
