:root {
  --bg: #061614;
  --bg-2: #0b211d;
  --ink: #f4f1df;
  --muted: #a8baae;
  --quiet: #789184;
  --line: rgba(159, 255, 207, 0.18);
  --line-strong: rgba(159, 255, 207, 0.34);
  --cyan: #50e7ff;
  --mint: #70ffb1;
  --amber: #ffd76d;
  --orange: #ff8a5b;
  --panel: rgba(8, 31, 27, 0.76);
  --panel-strong: rgba(10, 43, 36, 0.92);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 5%, rgba(80, 231, 255, 0.18), transparent 25rem),
    radial-gradient(circle at 82% 18%, rgba(112, 255, 177, 0.11), transparent 28rem),
    radial-gradient(circle at 50% 74%, rgba(255, 215, 109, 0.07), transparent 30rem),
    linear-gradient(135deg, #061614 0%, #081b18 42%, #101d17 100%);
  color: var(--ink);
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(112, 255, 177, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 255, 177, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 82%);
}

main {
  scroll-margin-top: 150px;
}

section[id] {
  scroll-margin-top: 132px;
}

a {
  color: inherit;
}

code,
pre {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.site-header,
.section-shell,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 22, 19, 0.76);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
}

.brand,
.site-header nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  color: #06211d;
}

.brand-mark svg {
  width: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.7;
}

.site-header nav {
  gap: 6px;
}

.site-header nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.site-header nav a:hover {
  background: rgba(112, 255, 177, 0.1);
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  padding: 54px 0 38px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--amber);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 30px;
  height: 2px;
  background: currentColor;
  content: "";
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 700px;
  margin-bottom: 20px;
  font-size: clamp(2.7rem, 5vw, 4.85rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 3.35vw, 3.4rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.hero-lede,
.section-heading p,
.install-card p {
  color: var(--muted);
  font-size: clamp(1.04rem, 1.7vw, 1.22rem);
  line-height: 1.6;
}

.hero-lede {
  max-width: 660px;
}

.hero-lede code,
.section-heading code,
.support-table code,
.architecture-notes code {
  color: var(--ink);
  font-size: 0.9em;
}

.hero-actions,
.install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.button-primary {
  background: var(--mint);
  color: #061614;
  box-shadow: 0 18px 48px rgba(112, 255, 177, 0.2);
}

.button-secondary {
  border-color: var(--line);
  background: rgba(244, 241, 223, 0.05);
  color: var(--ink);
}

.button:hover {
  transform: translateY(-1px);
}

.api-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 720px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.api-index li {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border: 1px solid rgba(159, 255, 207, 0.13);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(80, 231, 255, 0.055), transparent 60%),
    rgba(244, 241, 223, 0.035);
}

.api-index code {
  color: var(--ink);
  font-size: 0.78rem;
}

.api-index span {
  color: var(--quiet);
  font-size: 0.86rem;
}

.runtime-facts {
  display: grid;
  gap: 0;
  max-width: 720px;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.runtime-facts div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(159, 255, 207, 0.11);
}

.runtime-facts div:last-child {
  border-bottom: 0;
}

.runtime-facts dt {
  color: var(--amber);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.runtime-facts dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.quickstart-card,
.code-window,
.topology-card,
.install-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quickstart-card::before,
.code-window::before,
.topology-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--mint), var(--cyan), var(--amber));
  content: "";
  opacity: 0.72;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.window-bar span:nth-child(1) {
  background: var(--orange);
}

.window-bar span:nth-child(2) {
  background: var(--amber);
}

.window-bar span:nth-child(3) {
  background: var(--mint);
}

.window-bar strong {
  margin-left: 8px;
  color: var(--muted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quickstart-card pre,
.code-window pre,
.install-card pre {
  margin: 0;
  overflow: auto;
  color: #d8ffe8;
  font-size: 0.9rem;
  line-height: 1.65;
}

.quickstart-card pre {
  min-height: 350px;
  padding: 24px;
}

.support-section,
.examples-section,
.architecture-section,
.install-section {
  padding: 64px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

.section-heading a {
  color: var(--mint);
  text-decoration: none;
}

.table-caption {
  margin: 0;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-bottom: 1px solid rgba(159, 255, 207, 0.12);
  border-radius: 24px 24px 0 0;
  background: rgba(8, 31, 27, 0.68);
  color: var(--muted);
  line-height: 1.45;
}

.support-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 24px 24px;
  background: rgba(8, 31, 27, 0.68);
  box-shadow: var(--shadow);
}

.support-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.support-table th,
.support-table td {
  padding: 15px 16px;
  border-bottom: 1px solid rgba(159, 255, 207, 0.11);
  text-align: left;
  vertical-align: top;
}

.support-table th {
  position: sticky;
  top: 0;
  color: var(--amber);
  background: rgba(6, 22, 20, 0.96);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.support-table td {
  color: var(--muted);
  line-height: 1.45;
}

.support-table td:first-child {
  color: var(--ink);
  font-weight: 700;
}

.support-table tbody tr:hover td {
  background: rgba(112, 255, 177, 0.035);
}

.support-table tr:last-child td {
  border-bottom: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 700;
}

.status::before {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.status.done {
  border-color: rgba(112, 255, 177, 0.42);
  color: var(--mint);
}

.status.planned {
  border-color: rgba(255, 215, 109, 0.36);
  color: var(--amber);
}

.status.blocked {
  border-color: rgba(255, 138, 91, 0.36);
  color: var(--orange);
}

.example-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.38fr) minmax(0, 0.62fr);
  gap: 18px;
  align-items: stretch;
}

.example-tabs {
  display: grid;
  gap: 8px;
  align-content: start;
}

.tab {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(244, 241, 223, 0.04);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.tab::before {
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.tab span {
  color: var(--amber);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74rem;
}

.tab.active,
.tab:hover {
  border-color: rgba(112, 255, 177, 0.42);
  background: rgba(112, 255, 177, 0.08);
  color: var(--ink);
}

.tab.active::before {
  background: var(--mint);
}

.example-note {
  margin: 10px 0 0;
  padding: 14px;
  border: 1px solid rgba(255, 215, 109, 0.2);
  border-radius: 16px;
  background: rgba(255, 215, 109, 0.045);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.example-note code {
  color: var(--ink);
}

.copy-button {
  margin-left: auto;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(244, 241, 223, 0.05);
  color: var(--muted);
  cursor: pointer;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8rem;
}

.copy-button:hover {
  border-color: rgba(112, 255, 177, 0.42);
  color: var(--ink);
}

.code-window pre {
  min-height: 540px;
  padding: 22px;
}

.architecture-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
}

.topology-card {
  align-self: start;
}

.network-map {
  display: block;
  width: 100%;
  aspect-ratio: 1.52;
  background:
    linear-gradient(90deg, rgba(80, 231, 255, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(80, 231, 255, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
}

.network-map text {
  fill: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  text-anchor: middle;
}

.mesh-orbit {
  fill: none;
  stroke: rgba(80, 231, 255, 0.14);
  stroke-width: 1.2;
  transform-origin: 326px 210px;
}

.mesh-orbit-a {
  stroke-dasharray: 2 12;
  animation: spin-slow 32s linear infinite;
}

.mesh-orbit-b {
  stroke: rgba(112, 255, 177, 0.16);
  stroke-dasharray: 28 12;
  animation: spin-slow 20s linear infinite reverse;
}

.core-aura {
  fill: url("#coreGlow");
  animation: breathe 4s ease-in-out infinite;
}

.mesh-route {
  fill: none;
  stroke: url("#meshGradient");
  stroke-linecap: round;
  stroke-width: 2.8;
  stroke-dasharray: 12 12;
  opacity: 0.64;
  animation: route-drift 9s linear infinite;
}

.route-tcp {
  animation-duration: 11s;
  opacity: 0.56;
}

.route-udp {
  stroke-dasharray: 3 10;
  animation-duration: 6s;
  opacity: 0.5;
}

.route-funnel {
  stroke: rgba(255, 215, 109, 0.68);
  stroke-dasharray: 24 14;
  animation-duration: 13s;
  opacity: 0.48;
}

.packet {
  fill: var(--mint);
  filter: url("#softGlow");
  opacity: 0.3;
  transform-box: fill-box;
  transform-origin: center;
  animation: packet-pulse 2.6s ease-in-out infinite;
}

.packet-two {
  fill: var(--cyan);
  animation-delay: -0.9s;
}

.packet-three {
  fill: var(--amber);
  animation-delay: -1.8s;
}

.app-window rect,
.runtime-core circle,
.peer circle {
  fill: rgba(6, 22, 20, 0.72);
  stroke-width: 2;
}

.app-window rect {
  stroke: rgba(112, 255, 177, 0.56);
  filter: url("#softGlow");
}

.app-window path {
  fill: none;
  stroke: rgba(244, 241, 223, 0.42);
  stroke-linecap: round;
  stroke-width: 5;
}

.app-window text {
  fill: var(--mint);
  font-size: 17px;
}

.runtime-core {
  filter: url("#softGlow");
}

.runtime-core circle:first-child {
  fill: rgba(7, 28, 30, 0.86);
  stroke: rgba(80, 231, 255, 0.7);
}

.runtime-core circle:nth-child(2) {
  fill: rgba(80, 231, 255, 0.08);
  stroke: rgba(112, 255, 177, 0.18);
  stroke-dasharray: 6 10;
  transform-origin: 326px 210px;
  animation: spin-slow 18s linear infinite;
}

.runtime-core path {
  fill: none;
  stroke: rgba(112, 255, 177, 0.68);
  stroke-linecap: round;
  stroke-width: 5;
}

.runtime-core text {
  font-size: 20px;
}

.peer circle {
  stroke: rgba(255, 215, 109, 0.58);
  filter: url("#softGlow");
}

.peer text {
  font-size: 15px;
}

.peer-http circle {
  stroke: rgba(112, 255, 177, 0.58);
}

.peer-udp circle {
  stroke: rgba(80, 231, 255, 0.58);
}

.architecture-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.architecture-notes article {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(244, 241, 223, 0.04);
}

.architecture-notes article::before {
  display: block;
  width: 34px;
  height: 2px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, var(--mint), transparent);
  content: "";
}

.architecture-notes p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.install-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 0.62fr);
  gap: 24px;
  align-items: center;
  padding: 28px;
}

.install-card pre {
  padding: 22px;
  border: 1px solid rgba(159, 255, 207, 0.14);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.24);
}

.install-actions {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 32px 0 42px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

.site-footer a {
  color: var(--mint);
  text-decoration: none;
}

@keyframes drift {
  to {
    transform: translate3d(4rem, 2rem, 0) scale(1.08);
  }
}

@keyframes spin-slow {
  to {
    transform: rotate(360deg);
  }
}

@keyframes breathe {
  50% {
    opacity: 0.65;
    transform: scale(1.08);
  }
}

@keyframes route-drift {
  to {
    stroke-dashoffset: -96;
  }
}

@keyframes packet-pulse {
  50% {
    opacity: 1;
    transform: scale(1.65);
  }
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    border-radius: 24px;
    flex-direction: column;
  }

  .site-header nav {
    flex-wrap: wrap;
  }

  .hero,
  .example-layout,
  .architecture-grid,
  .install-card {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 680px) {
  .site-header,
  .section-shell,
  .site-footer {
    width: min(100% - 22px, 1180px);
  }

  h1 {
    font-size: clamp(2.65rem, 16vw, 4.35rem);
  }

  .hero {
    padding-top: 40px;
  }

  .api-index {
    grid-template-columns: 1fr;
  }

  .runtime-facts div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .architecture-notes {
    grid-template-columns: 1fr;
  }

  .code-window pre {
    min-height: 440px;
    font-size: 0.78rem;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
