:root {
  color-scheme: dark;
  --bg: #050607;
  --panel: #0c1010;
  --panel-2: #111819;
  --text: #f4f1e8;
  --muted: #9ea7a4;
  --line: rgba(244, 241, 232, 0.14);
  --cyan: #40e1cf;
  --gold: #ffd34d;
  --pink: #ff7aa8;
  --mint: #8ff2a0;
  --blue: #76a8ff;
  --lilac: #c9a4ff;
  --red: #ff785f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(64, 225, 207, 0.13), transparent 26rem),
    radial-gradient(circle at 84% 28%, rgba(255, 211, 77, 0.11), transparent 22rem),
    linear-gradient(180deg, #080909 0%, var(--bg) 45%, #020303 100%);
  color: var(--text);
  font-family: "Trebuchet MS", "Malgun Gothic", sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 70%);
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.035),
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px,
    transparent 5px
  );
  mix-blend-mode: soft-light;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 6, 7, 0.82);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--cyan);
  box-shadow: 0 0 22px rgba(64, 225, 207, 0.28) inset;
  color: var(--cyan);
  font-weight: 900;
}

.brand strong,
h2,
h3 {
  margin: 0;
  font-family: "Courier New", "Malgun Gothic", monospace;
}

h1 {
  margin: 0;
  font-family: "Malgun Gothic", "Trebuchet MS", sans-serif;
  font-weight: 900;
}

.brand small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.72rem;
}

nav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 58vw;
}

nav a,
.button,
footer button {
  border: 1px solid var(--line);
  background: #0a0d0e;
  color: var(--text);
  padding: 0.72rem 0.9rem;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

nav a:hover,
.button:hover,
footer button:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: end;
  min-height: calc(100vh - 78px);
  padding: 4rem 0 2rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--cyan);
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(3rem, 7.2vw, 6.4rem);
  line-height: 1.02;
  white-space: nowrap;
  text-shadow: 6px 6px 0 #171d1e;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 38rem;
  color: #d7ddd8;
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.button.primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #031112;
  font-weight: 800;
}

.hero-panel {
  min-height: 520px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.05), transparent 35%),
    var(--panel);
  box-shadow: 0 24px 80px rgba(0,0,0,0.42);
  overflow: hidden;
}

.board-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
}

.pixel-stage {
  display: grid;
  min-height: 462px;
  place-items: center;
  padding: 2rem;
  position: relative;
}

.terminal-card {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: min(270px, calc(100% - 2rem));
  padding: 1rem;
  border: 1px solid rgba(64, 225, 207, 0.35);
  background: rgba(5, 8, 8, 0.78);
}

.terminal-card p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0 0 5rem;
  background: var(--line);
  border: 1px solid var(--line);
}

.metrics article {
  padding: 1.2rem;
  background: #070909;
}

.metrics strong {
  display: block;
  color: var(--gold);
  font-family: "Courier New", monospace;
  font-size: 2.2rem;
}

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

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

.section-title {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.4rem;
}

.section-title h2 {
  font-size: clamp(2rem, 5vw, 4.3rem);
}

.section-title > p:not(.eyebrow) {
  max-width: 42rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.member-card {
  min-height: 310px;
  display: grid;
  align-content: end;
  justify-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #090b0c 0%, #050606 100%);
  position: relative;
  overflow: hidden;
}

.member-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 56px;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 44%, transparent));
}

.member-card h3,
.member-card p,
.member-card small {
  position: relative;
  z-index: 1;
  text-align: center;
}

.member-card h3 {
  margin-top: 1rem;
  font-size: 1.2rem;
}

.member-card p {
  margin: 0.2rem 0 0.5rem;
  color: var(--accent);
  font-size: 0.86rem;
}

.member-card small {
  max-width: 15rem;
  color: var(--muted);
  line-height: 1.5;
}

.accent-cyan { --accent: var(--cyan); }
.accent-gold { --accent: var(--gold); }
.accent-pink { --accent: var(--pink); }
.accent-mint { --accent: var(--mint); }
.accent-blue { --accent: var(--blue); }
.accent-lilac { --accent: var(--lilac); }
.accent-red { --accent: var(--red); }

.pixel-buddy {
  --c: var(--cyan);
  width: 88px;
  aspect-ratio: 1;
  position: relative;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--c) 34%, transparent));
  image-rendering: pixelated;
}

.pixel-buddy.large {
  width: min(260px, 58vw);
}

.pixel-buddy::before,
.pixel-buddy::after,
.pixel-buddy span {
  content: "";
  position: absolute;
  background: var(--c);
}

.pixel-buddy::before {
  left: 20%;
  top: 18%;
  width: 60%;
  height: 64%;
  box-shadow:
    -12px 12px 0 rgba(255,255,255,0.06),
    12px 12px 0 rgba(255,255,255,0.06);
}

.pixel-buddy::after {
  left: 31%;
  top: 8%;
  width: 38%;
  height: 16%;
  box-shadow: -26px 6px 0 #151819, 26px 6px 0 #151819;
}

.pixel-buddy span:nth-child(1) {
  left: 32%;
  top: 38%;
  width: 9%;
  height: 9%;
  background: #f7fff9;
  box-shadow: 32px 0 0 #f7fff9;
}

.pixel-buddy span:nth-child(2) {
  left: 38%;
  top: 41%;
  width: 4%;
  height: 4%;
  background: #061112;
  box-shadow: 32px 0 0 #061112;
}

.pixel-buddy span:nth-child(3) {
  left: 40%;
  top: 56%;
  width: 20%;
  height: 7%;
  background: #061112;
}

.pixel-buddy span:nth-child(4) {
  left: 22%;
  bottom: 8%;
  width: 16%;
  height: 18%;
  box-shadow: 36px 0 0 var(--c);
}

.pixel-buddy.cyan { --c: var(--cyan); }
.pixel-buddy.gold { --c: var(--gold); }
.pixel-buddy.pink { --c: var(--pink); }
.pixel-buddy.mint { --c: var(--mint); }
.pixel-buddy.blue { --c: var(--blue); }
.pixel-buddy.lilac { --c: var(--lilac); }
.pixel-buddy.red { --c: var(--red); }

.split {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(1rem, 4vw, 3rem);
}

.lesson-list {
  display: grid;
  gap: 0.8rem;
}

.lesson-list article,
.logs article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.lesson-list span {
  grid-row: span 2;
  color: var(--gold);
  font-family: "Courier New", monospace;
  font-size: 1.35rem;
}

.lesson-list p,
.logs p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.logs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.logs article {
  grid-template-columns: 1fr;
}

time {
  color: var(--cyan);
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
}

footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.spark {
  animation: pulse 560ms ease-out;
}

@keyframes pulse {
  0% { filter: saturate(1); }
  50% { filter: saturate(1.8) brightness(1.25); }
  100% { filter: saturate(1); }
}

@media (max-width: 860px) {
  .topbar,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .hero {
    min-height: auto;
    padding-top: 3rem;
  }

  h1 {
    font-size: clamp(3rem, 14vw, 5.5rem);
    white-space: normal;
  }

  nav {
    max-width: 100%;
  }

  .hero-panel {
    min-height: 440px;
  }

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

  .metrics,
  .logs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  main,
  footer {
    width: min(100% - 1rem, 1180px);
  }

  nav a,
  .button,
  footer button {
    padding: 0.62rem 0.7rem;
  }

  .member-grid {
    grid-template-columns: 1fr;
  }

  .board-head {
    flex-direction: column;
  }
}
