:root {
  color-scheme: dark;
  --bg: #05070a;
  --panel: rgba(9, 14, 18, 0.78);
  --panel-strong: rgba(13, 20, 26, 0.92);
  --text: #e5edf0;
  --muted: #94a3ad;
  --faint: #52616b;
  --line: rgba(125, 211, 252, 0.16);
  --line-strong: rgba(125, 211, 252, 0.3);
  --green: #73f7b2;
  --cyan: #67e8f9;
  --amber: #f3c969;
  --danger: #ff6b6b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::selection {
  background: rgba(115, 247, 178, 0.26);
  color: var(--text);
}

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

.background {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 15%, rgba(103, 232, 249, 0.12), transparent 32rem),
    radial-gradient(circle at 82% 75%, rgba(243, 201, 105, 0.08), transparent 28rem),
    linear-gradient(135deg, #030507 0%, #071015 50%, #040608 100%);
}

.grid,
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grid {
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.12) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 78%);
  animation: grid-drift 38s cubic-bezier(0.16, 1, 0.3, 1) infinite alternate;
}

.scanlines {
  opacity: 0.13;
  background:
    linear-gradient(180deg, transparent 0%, rgba(103, 232, 249, 0.08) 48%, transparent 52%),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 5px,
      rgba(255, 255, 255, 0.08) 6px
    );
  background-size: 100% 34rem, auto;
  animation: scan-sweep 14s ease-in-out infinite;
}

.glow {
  position: absolute;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.16;
}

.glow-cyan {
  top: 10%;
  left: -8rem;
  background: var(--cyan);
}

.glow-amber {
  right: -9rem;
  bottom: 5%;
  background: var(--amber);
}

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

.topbar {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(5, 8, 11, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.24);
}

.mark,
.nav,
.eyebrow,
.section-kicker,
.terminal-body,
.module-meta,
.status-strip,
.footer {
  font-family: var(--mono);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  font-size: 0.86rem;
  letter-spacing: -0.02em;
}

.mark-dot,
.status-light {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 16px rgba(115, 247, 178, 0.72);
  animation: status-pulse 2.8s ease-in-out infinite;
}

.nav {
  display: flex;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
}

.nav a,
.footer a {
  padding: 8px 10px;
  border: 1px solid transparent;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.nav a:hover,
.nav a:focus-visible,
.footer a:hover,
.footer a:focus-visible {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(103, 232, 249, 0.06);
  outline: none;
}

.hero {
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(460px, 0.9fr);
  align-items: center;
  gap: clamp(42px, 5.5vw, 78px);
  padding: 72px 0 56px;
}

.hero-copy,
.terminal-card {
  animation: enter-soft 820ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.terminal-card {
  animation-delay: 120ms;
}

.hero-copy {
  min-width: 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: var(--green);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 20px;
  font-family: var(--mono);
  font-size: clamp(3rem, 8.4vw, 6.35rem);
  line-height: 0.9;
  letter-spacing: -0.075em;
  text-shadow: 0 0 32px rgba(103, 232, 249, 0.16);
}

.subtitle {
  max-width: 680px;
  margin-bottom: 0;
  color: #c8d3d8;
  font-size: clamp(1.12rem, 2.4vw, 1.55rem);
  line-height: 1.55;
  letter-spacing: -0.035em;
}

.terminal-card,
.section-panel,
.module-card,
.status-strip {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-strong), rgba(6, 10, 13, 0.7));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.terminal-card {
  position: relative;
  width: min(100%, 620px);
  justify-self: end;
  overflow: hidden;
}

.terminal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0 42%, rgba(103, 232, 249, 0.12) 50%, transparent 58% 100%);
  transform: translateX(-130%);
  animation: terminal-sheen 9s ease-in-out 1.8s infinite;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.terminal-bar span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--faint);
}

.terminal-bar span:nth-child(1) {
  background: var(--danger);
}

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

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

.terminal-bar strong {
  margin-left: auto;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
}

.terminal-body {
  padding: 24px;
  color: #b8c6cb;
  font-size: clamp(0.82rem, 1.05vw, 0.94rem);
  line-height: 1.65;
}

.terminal-body p {
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(4px);
  animation: line-in 520ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.terminal-body > p:nth-child(1) {
  animation-delay: 260ms;
}

.terminal-body > p:nth-child(2) {
  animation-delay: 520ms;
}

.terminal-body > p:nth-child(3) {
  animation-delay: 780ms;
}

.terminal-run {
  min-height: 22em;
  max-height: 22em;
  margin: 0 0 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(103, 232, 249, 0.18);
  color: #8fa1a8;
  overflow: hidden;
  scroll-behavior: smooth;
}

.terminal-run[hidden] {
  display: none;
}

.terminal-output-line {
  margin-bottom: 2px !important;
  white-space: nowrap;
  opacity: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: line-in 520ms cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.terminal-output-line.is-old {
  opacity: 0.56 !important;
}

.active-prompt {
  min-height: 3.8em;
  color: #d6e2e6;
  animation-delay: 180ms !important;
}

.active-prompt [data-command] {
  overflow-wrap: anywhere;
}

.prompt {
  color: var(--green);
}

.path {
  color: var(--cyan);
}

.cursor {
  color: var(--green);
  animation: blink 1.1s steps(2, start) infinite;
}

.section-panel {
  padding: clamp(24px, 5vw, 44px);
}

.signal {
  max-width: 860px;
  margin: 0 0 72px auto;
}

.signal h2,
.section-heading h2 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(1.55rem, 4vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.signal p,
.section-heading p,
.module-card p {
  color: var(--muted);
  line-height: 1.75;
}

.signal p {
  max-width: 730px;
  font-size: 1.02rem;
}

.modules {
  padding: 16px 0 58px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading p {
  max-width: 330px;
  margin-bottom: 8px;
}

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

.module-card {
  position: relative;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.module-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(115, 247, 178, 0.08), transparent),
    radial-gradient(circle at 20% 0%, rgba(103, 232, 249, 0.12), transparent 38%);
  transform: translateX(-20%);
  transition: opacity 180ms ease, transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.module-card:hover {
  transform: translateY(-3px);
  border-color: rgba(115, 247, 178, 0.34);
  background: linear-gradient(180deg, rgba(13, 22, 27, 0.96), rgba(6, 10, 13, 0.76));
}

.module-card:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.module-meta {
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font-size: 0.75rem;
}

.module-state {
  color: var(--amber);
}

.module-card h3 {
  margin: auto 0 12px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.05em;
}

.module-card p {
  min-height: 56px;
  margin-bottom: 0;
  font-size: 0.94rem;
}

.status-strip {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.78rem;
}

.status-strip div:first-child {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.footer {
  width: min(1120px, calc(100% - 32px));
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  padding: 0 0 28px;
  color: var(--faint);
  font-size: 0.75rem;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes enter-soft {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes line-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes terminal-sheen {
  0%, 68%, 100% {
    transform: translateX(-130%);
    opacity: 0;
  }
  74% {
    opacity: 1;
  }
  88% {
    transform: translateX(130%);
    opacity: 0;
  }
}

@keyframes status-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 12px rgba(115, 247, 178, 0.58);
  }
  50% {
    transform: scale(1.35);
    box-shadow: 0 0 22px rgba(115, 247, 178, 0.86);
  }
}

@keyframes scan-sweep {
  0%, 100% {
    background-position: 0 -36rem, 0 0;
  }
  50% {
    background-position: 0 36rem, 0 0;
  }
}

@keyframes grid-drift {
  from {
    transform: translate3d(-10px, -8px, 0);
  }
  to {
    transform: translate3d(10px, 8px, 0);
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 58px;
  }

  .terminal-card {
    max-width: 640px;
  }

  .section-heading {
    display: block;
  }

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

@media (max-width: 620px) {
  .shell {
    width: min(100% - 22px, 1120px);
    padding-top: 12px;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .nav a {
    padding-inline: 6px;
  }

  .hero {
    gap: 24px;
    padding: 46px 0 44px;
  }

  h1 {
    font-size: clamp(2.65rem, 17vw, 4.6rem);
  }

  .terminal-body {
    padding: 16px;
    font-size: 0.78rem;
  }

  .module-grid,
  .status-strip {
    grid-template-columns: 1fr;
  }

  .module-card {
    min-height: 170px;
  }

  .footer {
    width: min(100% - 22px, 1120px);
    flex-direction: column;
  }
}

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