:root {
  color-scheme: dark;
  --bg: #07110f;
  --surface: #0d1b18;
  --surface-2: #10231f;
  --line: #254a42;
  --text: #edf7f3;
  --muted: #a8bbb3;
  --accent: #36f2a2;
  --accent-2: #78d7ff;
  --warning: #ffd166;
  --shadow: 0 24px 80px rgba(0, 0, 0, .35);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(54, 242, 162, .08), transparent 420px),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 215, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 215, 255, .04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(7, 17, 15, .86);
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.hero-actions,
.stats,
.terminal-form,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--bg);
  background: var(--accent);
  font-family: "JetBrains Mono", Consolas, monospace;
}

.site-nav {
  gap: 22px;
}

.site-nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
}

.section-band,
.section,
.stats,
.site-footer {
  width: min(1120px, calc(100% - 36px));
  margin-inline: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 80px);
  padding: 64px 0 44px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  max-width: 820px;
  font-size: clamp(44px, 7vw, 86px);
}

h2 {
  font-size: clamp(32px, 4vw, 52px);
}

h3 {
  font-size: 22px;
}

.hero-text {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 20px;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  color: #04110d;
  background: var(--accent);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #7cffc7;
}

.button-ghost {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, .04);
}

.button-ghost:hover,
.button-ghost:focus-visible {
  border-color: var(--accent-2);
}

.visual-lab {
  overflow: hidden;
  border: 1px solid rgba(120, 215, 255, .28);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #0b1916, #112a25);
  box-shadow: var(--shadow);
}

.lab-toolbar {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.lab-toolbar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--warning);
}

.lab-toolbar span:nth-child(2) {
  background: var(--accent);
}

.lab-toolbar span:nth-child(3) {
  background: var(--accent-2);
}

.lab-screen {
  position: relative;
  min-height: 420px;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 45%, rgba(120, 215, 255, .16), transparent 36%),
    linear-gradient(rgba(54, 242, 162, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(54, 242, 162, .05) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
}

.signal-grid span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  animation: pulse 2.8s ease-in-out infinite;
  animation-delay: var(--d);
}

.signal-grid span::after {
  content: "";
  position: absolute;
  inset: 5px auto auto 12px;
  width: 110px;
  height: 2px;
  transform: rotate(18deg);
  transform-origin: left;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.lab-screen pre {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: min(360px, calc(100% - 48px));
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(54, 242, 162, .38);
  border-radius: var(--radius);
  color: #dfffee;
  background: rgba(4, 13, 11, .84);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 14px;
  white-space: pre-wrap;
}

.stats {
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 58px;
}

.stats article {
  flex: 1;
  min-width: 0;
  padding: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats strong {
  display: block;
  color: var(--accent);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 34px;
}

.stats span {
  color: var(--muted);
}

.section {
  padding: 72px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 30px;
}

.program-grid,
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.program-card,
.project-list article,
.resource-grid a,
.terminal,
.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 27, 24, .86);
}

.program-card {
  padding: 24px;
}

.card-icon {
  display: inline-grid;
  min-width: 44px;
  height: 34px;
  margin-bottom: 24px;
  place-items: center;
  border: 1px solid rgba(54, 242, 162, .45);
  border-radius: var(--radius);
  color: var(--accent);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-weight: 700;
}

.program-card p,
.project-list p,
.contact-section p {
  color: var(--muted);
}

.program-card ul {
  display: grid;
  gap: 8px;
  margin: 22px 0 0;
  padding-left: 20px;
  color: var(--text);
}

.section-split,
.contact-section {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.project-list {
  display: grid;
  gap: 14px;
}

.project-list article {
  padding: 22px;
}

.project-list span,
.resource-grid span,
.terminal-output span {
  color: var(--accent-2);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

.terminal {
  overflow: hidden;
  max-width: 860px;
}

.terminal-output {
  min-height: 190px;
  max-height: 320px;
  overflow-y: auto;
  padding: 22px;
  color: #dfffee;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 14px;
  background: #040d0b;
}

.terminal-output p {
  margin: 0 0 10px;
}

.terminal-form {
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.terminal-form label {
  color: var(--accent);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-weight: 700;
}

.terminal-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  outline: 0;
}

.terminal-form button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
}

.resource-grid a {
  display: grid;
  gap: 12px;
  min-height: 150px;
  padding: 22px;
  text-decoration: none;
}

.resource-grid a:hover,
.program-card:hover,
.project-list article:hover {
  border-color: rgba(54, 242, 162, .7);
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text);
  background: #07110f;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(54, 242, 162, .18);
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--accent);
  font-weight: 700;
}

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

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

@keyframes pulse {
  0%,
  100% {
    opacity: .45;
    transform: scale(.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 18px;
    right: 18px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .site-nav.is-open {
    display: flex;
  }

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

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

  .program-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .site-header {
    padding-inline: 16px;
  }

  .brand span:last-child {
    display: none;
  }

  .section-band,
  .section,
  .stats,
  .site-footer {
    width: min(100% - 28px, 1120px);
  }

  h1 {
    font-size: 40px;
  }

  .hero-text {
    font-size: 18px;
  }

  .visual-lab {
    min-width: 0;
  }

  .lab-screen {
    min-height: 340px;
    padding: 18px;
  }

  .lab-screen pre {
    right: 14px;
    bottom: 14px;
    width: calc(100% - 28px);
  }

  .hero-actions,
  .terminal-form,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .terminal-form button {
    width: 100%;
  }
}
