:root {
  --void: #070604;
  --ink: #f4f0df;
  --muted: rgba(244, 240, 223, 0.68);
  --line: rgba(244, 240, 223, 0.16);
  --acid: #c4ff3f;
  --ember: #ff6b2f;
  --aqua: #41f4d1;
  --violet: #a77cff;
  --blood: #ff3d68;
  --panel: rgba(13, 12, 9, 0.74);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--void);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 107, 47, 0.12), transparent 32%),
    radial-gradient(circle at 82% 12%, rgba(65, 244, 209, 0.1), transparent 30%),
    linear-gradient(180deg, #070604 0%, #11100c 46%, #070604 100%);
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
  overflow-x: hidden;
}

#agent-world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: #070604;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.17;
  background-image:
    repeating-radial-gradient(circle at 17% 29%, rgba(255,255,255,0.18) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 5px);
  mix-blend-mode: overlay;
}

a { color: inherit; }

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 52px);
  background: linear-gradient(180deg, rgba(7,6,4,0.9), rgba(7,6,4,0));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-mark {
  width: 25px;
  height: 25px;
  border: 1.5px solid var(--ink);
  display: inline-block;
  position: relative;
  transform: rotate(45deg);
  box-shadow: 0 0 22px rgba(196,255,63,0.3);
}

.brand-mark:after {
  content: "";
  position: absolute;
  inset: 6px;
  background: var(--acid);
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}

nav a {
  text-decoration: none;
}

nav a:hover {
  color: var(--acid);
}

main,
.site-footer {
  position: relative;
  z-index: 5;
}

.hero {
  min-height: 112vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: center;
  gap: 42px;
  padding: 112px clamp(18px, 5vw, 70px) 120px;
}

.hero-copy {
  max-width: 880px;
}

.kicker,
.label {
  margin: 0 0 14px;
  color: var(--acid);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(78px, 16vw, 190px);
  line-height: 0.78;
  letter-spacing: 0;
  margin-bottom: 32px;
  text-shadow:
    0 0 38px rgba(244,240,223,0.16),
    0 0 90px rgba(196,255,63,0.1);
}

.hero-line {
  max-width: 780px;
  font-size: clamp(22px, 4vw, 44px);
  line-height: 1.04;
  font-weight: 700;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--line);
  text-decoration: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 240, 223, 0.44);
}

.button.primary {
  background: var(--acid);
  color: #101006;
  border-color: var(--acid);
}

.button.ghost {
  background: rgba(244,240,223,0.04);
}

.live-console {
  align-self: end;
  margin-bottom: 10vh;
  border: 1px solid rgba(244,240,223,0.22);
  background:
    linear-gradient(180deg, rgba(244,240,223,0.06), rgba(244,240,223,0.015)),
    rgba(7,6,4,0.72);
  box-shadow: 0 30px 100px rgba(0,0,0,0.38), inset 0 1px 0 rgba(255,255,255,0.1);
  backdrop-filter: blur(18px);
  transform: rotate(-1deg);
}

.console-head,
.console-body p,
.meta {
  font-family: "IBM Plex Mono", monospace;
}

.console-head {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--aqua);
  font-size: 11px;
  text-transform: uppercase;
}

.console-body {
  padding: 14px;
  min-height: 250px;
}

.console-body p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.console-body span {
  color: var(--ember);
}

.translation-band {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 1px;
  margin: -58px clamp(18px, 5vw, 70px) 96px;
  border: 1px solid var(--line);
  background: var(--line);
}

.translation-band > div {
  background: rgba(7,6,4,0.82);
  padding: clamp(22px, 4vw, 40px);
}

.translation-band p {
  margin: 0;
  font-size: clamp(20px, 3vw, 32px);
  line-height: 1.12;
  font-weight: 800;
}

.stack-section,
.spooky-section,
.work-section {
  padding: 82px clamp(18px, 5vw, 70px);
}

.section-title {
  max-width: 760px;
  margin-bottom: 36px;
}

h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(48px, 8vw, 108px);
  line-height: 0.88;
  letter-spacing: 0;
  margin-bottom: 0;
}

.stack-grid {
  display: grid;
  border-top: 1px solid var(--line);
}

.stack-row {
  display: grid;
  grid-template-columns: 80px minmax(190px, 0.8fr) minmax(260px, 1.1fr) minmax(260px, 0.8fr);
  gap: 24px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.row-index {
  color: var(--acid);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

h3 {
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1;
  margin-bottom: 0;
}

.stack-row p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

code {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--aqua);
  background: rgba(65,244,209,0.07);
  border: 1px solid rgba(65,244,209,0.18);
  padding: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.spooky-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 44px;
  align-items: center;
  min-height: 80vh;
}

.dialogue-lab {
  display: grid;
  gap: 18px;
}

.speaker {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
  border: 1px solid var(--line);
  padding: 18px;
  background: rgba(7,6,4,0.7);
  backdrop-filter: blur(14px);
}

.speaker:nth-child(2) {
  margin-left: 8%;
  border-color: rgba(196,255,63,0.34);
}

.speaker:nth-child(3) {
  margin-left: 18%;
  border-color: rgba(255,61,104,0.34);
}

.avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 800;
  color: var(--acid);
}

.speaker p {
  margin: 0;
  color: var(--ink);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.3;
  font-weight: 700;
}

.trace p {
  color: var(--blood);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.work-item {
  min-height: 280px;
  padding: 24px;
  background: rgba(7,6,4,0.86);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.work-item span {
  color: var(--acid);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
}

.work-item strong {
  display: block;
  margin: auto 0 18px;
  font-size: clamp(23px, 2.3vw, 34px);
  line-height: 1;
}

.work-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 34px clamp(18px, 5vw, 70px);
  border-top: 1px solid var(--line);
  font-family: "IBM Plex Mono", monospace;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--acid);
}

@media (max-width: 920px) {
  nav {
    display: none;
  }

  .hero,
  .spooky-section,
  .translation-band {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 118vh;
  }

  .live-console {
    align-self: auto;
    margin-bottom: 0;
    transform: none;
  }

  .stack-row {
    grid-template-columns: 52px 1fr;
    align-items: start;
  }

  .stack-row p,
  .stack-row code {
    grid-column: 2;
  }

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

@media (max-width: 620px) {
  .hero {
    padding-top: 94px;
  }

  h1 {
    font-size: clamp(72px, 23vw, 112px);
  }

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

  .speaker:nth-child(2),
  .speaker:nth-child(3) {
    margin-left: 0;
  }

  .site-footer {
    flex-direction: column;
  }
}
