:root {
  --bg: #090b0f;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f4f7fb;
  --muted: #9aa7b8;
  --soft: #d5dde8;
  --lime: #b6f36b;
  --cyan: #65d8ff;
  --rose: #ff7a70;
  --amber: #ffd166;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(101, 216, 255, 0.14), transparent 26rem),
    radial-gradient(circle at 86% 16%, rgba(255, 122, 112, 0.12), transparent 28rem),
    linear-gradient(180deg, #090b0f 0%, #111722 52%, #0c1017 100%);
  font-family: Geist, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

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

#signal {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1240px, calc(100% - 32px));
  min-height: 74px;
  margin: 14px auto 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 11, 15, 0.72);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(22px);
}

.brand,
.nav,
.hero-kicker,
.hero-bottom,
.footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-glyph {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(182, 243, 107, 0.38);
  border-radius: 8px;
  color: var(--bg);
  background: var(--lime);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 800;
}

.nav {
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.nav a,
.topbar-link {
  min-height: 36px;
  padding: 9px 13px;
  border-radius: 7px;
  color: var(--soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.nav a:hover,
.topbar-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.topbar-link {
  justify-self: end;
  border: 1px solid var(--line);
}

main,
.footer {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 88px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 34px;
  padding: 58px 0 34px;
}

.hero-kicker {
  flex-wrap: wrap;
  gap: 8px;
}

.hero-kicker span,
.section-number,
.deck-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-kicker span {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.045);
}

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

h1 {
  max-width: 1120px;
  margin: 0;
  font-size: clamp(4.2rem, 11.6vw, 10.4rem);
  line-height: 0.88;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4.5vw, 5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.14rem;
}

.hero-bottom {
  justify-content: space-between;
  gap: 28px;
}

.hero-bottom p {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.45rem);
  line-height: 1.58;
}

.command-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  min-width: 220px;
  padding: 17px 20px;
  border: 1px solid rgba(182, 243, 107, 0.5);
  border-radius: 8px;
  color: var(--bg);
  background: var(--lime);
  box-shadow: 0 20px 44px rgba(182, 243, 107, 0.16);
  font-weight: 850;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.command-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 52px rgba(182, 243, 107, 0.22);
}

.command-deck {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  margin: 18px 0 110px;
}

.deck-sidebar,
.deck-tile,
.contact-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.deck-sidebar {
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

.deck-label,
.section-number {
  color: var(--lime);
}

.deck-sidebar strong {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 3.6rem;
  line-height: 0.9;
}

.deck-sidebar p {
  color: var(--muted);
  line-height: 1.7;
}

.deck-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.deck-tile {
  min-height: 210px;
  grid-column: span 3;
  padding: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.045)),
    var(--panel);
}

.deck-tile.large {
  grid-column: span 4;
  grid-row: span 2;
}

.deck-tile.wide {
  grid-column: span 6;
}

.deck-tile span {
  color: var(--cyan);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
}

.deck-tile h2 {
  margin-top: 34px;
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 4.2rem);
}

.deck-tile p,
.work-list p,
.lab-track p,
.contact-section p {
  color: var(--muted);
  line-height: 1.7;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr);
  gap: 72px;
  align-items: start;
  padding: 92px 0;
  border-top: 1px solid var(--line);
}

.section-copy {
  position: sticky;
  top: 110px;
}

.work-list {
  display: grid;
  gap: 16px;
}

.work-list article {
  min-height: 170px;
  padding: 28px;
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.work-list article:nth-child(2) {
  border-left-color: var(--rose);
}

.work-list article:nth-child(3) {
  border-left-color: var(--amber);
}

.lab-section {
  padding: 92px 0;
  border-top: 1px solid var(--line);
}

.lab-header {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  margin-bottom: 34px;
}

.lab-header h2 {
  max-width: 820px;
  margin-bottom: 0;
}

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

.lab-track article {
  min-height: 260px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.06);
}

.lab-track span {
  display: block;
  margin-bottom: 80px;
  color: var(--lime);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.68fr);
  gap: 42px;
  align-items: end;
  margin: 70px 0 90px;
  padding: 42px;
  background:
    linear-gradient(145deg, rgba(182, 243, 107, 0.11), transparent),
    rgba(255, 255, 255, 0.07);
}

.contact-section p {
  max-width: 680px;
  font-size: 1.08rem;
}

.contact-panel {
  display: grid;
  gap: 10px;
}

.contact-panel a {
  min-height: 54px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 11, 15, 0.44);
  color: var(--soft);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.contact-panel a:hover {
  color: var(--text);
  background: var(--panel-strong);
}

.footer {
  min-height: 82px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .nav {
    order: 3;
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .hero-bottom,
  .command-deck,
  .split-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-copy {
    position: static;
  }

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

@media (max-width: 640px) {
  main,
  .topbar,
  .footer {
    width: min(100% - 22px, 1240px);
  }

  .topbar {
    margin-top: 8px;
  }

  .topbar-link {
    display: none;
  }

  .nav a {
    flex: 1;
    padding: 9px 8px;
    text-align: center;
  }

  .hero {
    min-height: auto;
    padding-top: 46px;
  }

  h1 {
    font-size: clamp(3.65rem, 19vw, 6.8rem);
  }

  .command-button {
    width: 100%;
  }

  .command-deck {
    margin-bottom: 62px;
  }

  .deck-sidebar {
    min-height: 280px;
  }

  .deck-grid,
  .lab-track {
    grid-template-columns: 1fr;
  }

  .deck-tile,
  .deck-tile.large,
  .deck-tile.wide {
    grid-column: auto;
    grid-row: auto;
  }

  .split-section,
  .lab-section {
    padding: 62px 0;
  }

  .lab-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .lab-track span {
    margin-bottom: 36px;
  }

  .contact-section {
    margin: 46px 0 72px;
    padding: 24px;
  }

  .footer {
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
  }
}

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