:root {
  --bg: #04060A;
  --panel: #090D15;
  --panel-2: #0D131F;
  --ink: #F1F5F9;
  --muted: #8492A6;
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(56, 189, 248, 0.34);
  --cyan: #38BDF8;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --ok: #34D399;
  --font-sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 75% 45% at 50% -8%, rgba(56, 189, 248, 0.16), transparent 65%),
    linear-gradient(to right, rgba(56, 189, 248, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(4, 6, 10, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
  flex-shrink: 0;
}

.links {
  display: flex;
  gap: 24px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.links a:hover,
.links a.is-current {
  color: var(--cyan);
}

.pill-btn {
  padding: 7px 14px;
  border: 1px solid rgba(56, 189, 248, 0.38);
  border-radius: 6px;
  color: var(--cyan);
  background: var(--cyan-dim);
  transition: background-color 150ms ease, border-color 150ms ease;
}

.pill-btn:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: var(--cyan);
}

/* Hero */
.hero {
  padding: 58px 0 44px;
}

.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cyan);
  letter-spacing: 0.08em;
}

.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.07);
  border-radius: 4px;
}

.hud-chip.is-pending {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
  display: inline-block;
}

.pulse.is-dim {
  background: var(--muted);
  box-shadow: none;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 4.8vw, 4.1rem);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -0.035em;
  max-width: 920px;
}

.hero-title span {
  background: linear-gradient(90deg, #FFFFFF 0%, #38BDF8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  margin: 0 0 32px;
  max-width: 690px;
  color: var(--muted);
  font-size: 1.08rem;
}

.telemetry {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  overflow: hidden;
}

.tel-cell {
  padding: 15px 18px;
  border-right: 1px solid var(--line);
}

.tel-cell:last-child {
  border-right: none;
}

.tel-k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tel-v {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  word-break: break-word;
}

/* Modules / Projects */
.grid-sec {
  padding: 20px 0 64px;
}

.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.sec-title {
  margin: 6px 0 0;
  font-size: clamp(1.55rem, 2.8vw, 2.05rem);
  letter-spacing: -0.03em;
}

.featured {
  display: grid;
  grid-template-columns: 1.18fr 0.92fr;
  gap: 28px;
  align-items: center;
  padding: 22px;
  background: linear-gradient(145deg, var(--panel), var(--panel-2));
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 12px;
  margin-bottom: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.screen-wrap {
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  overflow: hidden;
  background: #020408;
}

.screen-wrap img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.screen-hud {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 12px;
  font-family: "JetBrains Mono", var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  background: rgba(4, 6, 10, 0.92);
  border-top: 1px solid rgba(56, 189, 248, 0.2);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.mono-idx {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cyan);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 22px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.06);
  padding: 4px 10px;
  border-radius: 4px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  background: var(--cyan);
  color: #04060A;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.35);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.52);
}

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

.card {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card h3 {
  margin: 8px 0 6px;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14.5px;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-links a {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 150ms ease, color 150ms ease;
}

.mini-links a:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* Ethos row */
.ethos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.ethos-box {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(9, 13, 21, 0.72);
}

.ethos-box h4 {
  margin: 8px 0 6px;
  font-size: 1.05rem;
}

.ethos-box p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* Subpages (Support & Privacy) */
.doc-hero {
  padding: 52px 0 30px;
  border-bottom: 1px solid var(--line);
}

.doc-title {
  margin: 10px 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.doc-body {
  padding: 38px 0 64px;
}

.doc-panel {
  max-width: 840px;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.doc-panel h2 {
  margin: 26px 0 10px;
  font-size: 1.2rem;
  color: #fff;
}

.doc-panel h2:first-child {
  margin-top: 0;
}

.doc-panel p,
.doc-panel li {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.doc-panel ul {
  margin: 8px 0 16px;
  padding-left: 20px;
}

.inline-link {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.support-box {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.support-box h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.support-box p {
  margin: 0;
  font-size: 14px;
}

footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.foot-links a:hover {
  color: var(--cyan);
}

@media (max-width: 860px) {
  .featured,
  .lower,
  .telemetry,
  .ethos-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .tel-cell {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .tel-cell:last-child {
    border-bottom: none;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 18px;
  }

  .wrap.nav {
    flex-wrap: wrap;
    padding: 12px 18px;
    gap: 10px;
  }

  .links {
    gap: 14px;
    width: 100%;
    flex-wrap: wrap;
  }

  .hero {
    padding: 38px 0 32px;
  }
}
