:root {
  --bg: #03080b;
  --bg-2: #071014;
  --ink: #f0f5ee;
  --muted: #8d9995;
  --dim: #54615e;
  --line: rgba(206, 232, 222, 0.14);
  --line-strong: rgba(206, 232, 222, 0.26);
  --green: #a6ff3d;
  --cyan: #52e4ef;
  --copper: #ffae38;
  --white: #f1f5ef;
  --shadow: rgba(0, 0, 0, 0.52);
  --mono: "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  letter-spacing: 0;
  overflow-x: hidden;
}

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

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  display: grid;
  grid-template-columns: 1fr auto 48px;
  align-items: center;
  gap: 24px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 8, 11, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
}

.brand span {
  color: var(--green);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 52px);
  color: #c5cfca;
  font-size: 15px;
}

.nav-links a {
  position: relative;
  padding: 17px 0 15px;
  color: #c6d1cc;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--green);
}

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(166, 255, 61, 0.48);
}

.terminal-link {
  width: 28px;
  height: 24px;
  display: grid;
  place-items: center;
  justify-self: end;
  border: 1px solid rgba(166, 255, 61, 0.45);
  color: var(--green);
  font-size: 14px;
  background: rgba(166, 255, 61, 0.04);
}

.hero {
  position: relative;
  min-height: 570px;
  height: min(72vw, 720px);
  padding: 48px 32px 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 73% 42%, rgba(82, 228, 239, 0.24), transparent 31%),
    radial-gradient(circle at 55% 64%, rgba(166, 255, 61, 0.2), transparent 29%),
    radial-gradient(circle at 88% 36%, rgba(255, 174, 56, 0.13), transparent 22%),
    linear-gradient(180deg, #020507 0%, #061015 58%, #03080b 100%);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  filter: saturate(1.58) contrast(1.14) brightness(1.06);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 8, 11, 0.93) 0%, rgba(3, 8, 11, 0.55) 27%, rgba(3, 8, 11, 0.01) 69%, rgba(3, 8, 11, 0.34) 100%),
    linear-gradient(180deg, rgba(3, 8, 11, 0.06) 0%, rgba(3, 8, 11, 0.02) 54%, rgba(3, 8, 11, 0.62) 100%);
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 780px;
  padding-top: clamp(130px, 17vw, 210px);
}

.hero h1 {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: clamp(64px, 6.4vw, 108px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0;
  color: #f4f8f2;
  text-shadow: 0 0 32px rgba(220, 255, 242, 0.12);
}

.hero-subhead {
  max-width: 520px;
  margin: 0;
  color: #dce4df;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.42;
}

.hero-context {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin: 26px 0 0;
  color: #909d98;
  font-size: 14px;
}

.hero-context span {
  width: 3px;
  height: 3px;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 38px;
}

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 1px solid var(--line-strong);
  padding: 0 26px;
  font-size: 16px;
  color: #dfe8e3;
  background: rgba(2, 6, 8, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(166, 255, 61, 0.7);
  color: var(--green);
  background: rgba(166, 255, 61, 0.06);
}

.button.primary {
  min-width: 250px;
  border-color: rgba(166, 255, 61, 0.88);
  color: var(--green);
}

.button.secondary {
  min-width: 134px;
}

.terminal-stack,
.hero-note,
.node-label,
.scroll-meter {
  position: absolute;
  z-index: 3;
  pointer-events: none;
}

.terminal-stack {
  top: 88px;
  left: 32px;
  display: grid;
  gap: 8px;
  color: rgba(218, 230, 224, 0.62);
  font-size: 12px;
}

.terminal-stack span:last-child {
  color: var(--green);
}

.hero-note {
  right: 40px;
  bottom: 42px;
  display: grid;
  gap: 8px;
  color: rgba(204, 213, 208, 0.72);
  font-size: 12px;
}

.hero-note span::first-letter {
  color: var(--green);
}

.node-label {
  left: var(--label-x, 50%);
  top: var(--label-y, 30%);
  min-width: 142px;
  padding: 11px 13px;
  border: 1px solid currentColor;
  color: var(--label-color, currentColor);
  background: rgba(2, 8, 10, 0.52);
  box-shadow: 0 0 28px rgba(0, 0, 0, 0.42);
  transform: translateX(-50%);
  will-change: left, top, opacity;
}

.node-label::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: var(--label-stem, 54px);
  background: currentColor;
  opacity: 0.78;
  transform: translateX(-50%);
}

.node-label strong,
.node-label span {
  display: block;
}

.node-label strong {
  margin-bottom: 5px;
  font-size: 13px;
  line-height: 1;
}

.node-label span {
  color: rgba(230, 240, 234, 0.68);
  font-size: 11px;
}

.node-trailinggreen {
  color: var(--green);
}

.node-realestate {
  color: var(--cyan);
}

.node-momentum {
  color: var(--copper);
}

.node-sidequests {
  color: #d6e2dd;
}

.scroll-meter {
  left: 50%;
  bottom: 8px;
  display: flex;
  gap: 12px;
  transform: translateX(-50%);
}

.scroll-meter i {
  display: block;
  width: 1px;
  height: 9px;
  background: rgba(218, 230, 224, 0.42);
}

.scroll-meter i:nth-child(2),
.scroll-meter i:nth-child(3) {
  background: var(--green);
}

.section {
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: 28px 50px 0;
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 28px;
  margin-bottom: 16px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.section-heading h2,
.split-section h2,
.about-section h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(25px, 2.2vw, 32px);
  font-weight: 500;
  line-height: 1.1;
}

.section-heading h2::first-letter,
.split-section h2::first-letter,
.about-section h2::first-letter {
  color: var(--green);
}

.section-heading p,
.section-heading a {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.section-heading a {
  margin-left: auto;
  color: var(--green);
}

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

.work-item {
  position: relative;
  min-height: 168px;
  display: grid;
  grid-template-columns: 132px 1fr 36px;
  gap: 20px;
  align-items: center;
  padding: 26px 26px 22px 14px;
  border-right: 1px dashed var(--line);
}

.work-item:last-child {
  border-right: 0;
}

.item-number {
  position: absolute;
  top: 16px;
  left: 14px;
  color: currentColor;
  font-size: 13px;
}

.project-icon {
  width: 96px;
  height: 96px;
  object-fit: contain;
  justify-self: center;
  image-rendering: auto;
  filter: drop-shadow(0 0 14px color-mix(in srgb, currentColor 24%, transparent));
}

.project-icon.wide {
  width: 112px;
}

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

.item-label {
  margin: 0 0 5px;
  color: #aab5b0;
  font-size: 13px;
}

.item-copy h3,
.quest h3 {
  margin: 0;
  color: currentColor;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.12;
}

.item-copy h3::after,
.quest h3::after {
  content: "";
  display: block;
  width: 30px;
  height: 1px;
  margin: 14px 0;
  background: currentColor;
}

.item-copy p:not(.item-label),
.quest p,
.split-section p,
.about-section p,
.note-list {
  color: #b1bbb6;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.58;
}

.item-copy p:not(.item-label),
.quest p {
  margin: 0;
}

.item-arrow {
  align-self: end;
  justify-self: end;
  color: currentColor;
  font-size: 24px;
}

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

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

.accent-copper {
  color: var(--copper);
}

.accent-offwhite {
  color: var(--white);
}

.side-section {
  padding-top: 24px;
}

.side-heading {
  margin-bottom: 16px;
}

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

.quest {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  min-height: 146px;
  padding: 22px 24px 22px 0;
  border-right: 1px dashed var(--line);
}

.quest:last-child {
  border-right: 0;
}

.quest img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  image-rendering: auto;
}

.quest a,
.quest-status {
  display: inline-flex;
  margin-top: 12px;
  color: currentColor;
  font-size: 13px;
}

.quest-status {
  color: rgba(230, 240, 234, 0.72);
}

.split-section,
.about-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 48px;
  padding-top: 52px;
  padding-bottom: 18px;
}

.split-section {
  border-top: 1px solid var(--line);
  margin-top: 46px;
}

.note-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.note-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.note-list li::before {
  content: ">";
  margin-right: 12px;
  color: var(--green);
}

.about-section {
  padding-bottom: 80px;
}

.about-section p {
  margin: 0;
  max-width: 760px;
}

@media (max-width: 1180px) {
  .hero {
    height: auto;
    min-height: 720px;
  }

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

  .work-item,
  .quest {
    border-right: 0;
    border-bottom: 1px dashed var(--line);
  }

  .work-item:last-child,
  .quest:last-child {
    border-bottom: 0;
  }

  .quest {
    grid-template-columns: 108px 1fr;
  }
}

@media (max-width: 900px) {
  .node-label {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-header {
    height: 56px;
    grid-template-columns: 1fr auto;
    padding: 0 16px;
  }

  .nav-links {
    display: none;
  }

  .terminal-link {
    display: grid;
  }

  .hero {
    min-height: 700px;
    padding: 56px 20px 0;
  }

  .terminal-stack,
  .hero-note,
  .scroll-meter {
    display: none;
  }

  .hero-vignette {
    background:
      linear-gradient(90deg, rgba(3, 8, 11, 0.95) 0%, rgba(3, 8, 11, 0.5) 75%, rgba(3, 8, 11, 0.72) 100%),
      linear-gradient(180deg, rgba(3, 8, 11, 0.2) 0%, rgba(3, 8, 11, 0.12) 42%, rgba(3, 8, 11, 0.94) 100%);
  }

  .hero-copy {
    padding-top: 150px;
  }

  .hero h1 {
    font-size: clamp(50px, 15vw, 78px);
  }

  .hero-subhead {
    max-width: 95%;
  }

  .hero-actions {
    gap: 12px;
  }

  .button,
  .button.primary,
  .button.secondary {
    width: 100%;
    min-width: 0;
  }

  .section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .section-heading,
  .side-heading {
    display: grid;
    gap: 9px;
  }

  .section-heading a {
    margin-left: 0;
  }

  .work-item {
    grid-template-columns: 96px 1fr 24px;
    gap: 16px;
    padding: 24px 14px 22px 4px;
  }

  .project-icon {
    width: 82px;
    height: 82px;
  }

  .quest {
    grid-template-columns: 88px 1fr;
    padding-right: 4px;
  }

  .quest img {
    width: 74px;
    height: 74px;
  }

  .split-section,
  .about-section {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }
}
