:root {
  --ink: #101011;
  --paper: #f0eee7;
  --white: #fff;
  --lime: #c8ff7a;
  --lime-rgb: 200, 255, 122;
  --line: rgba(200, 255, 122, .25);
  --muted: #b9b9bd;
  --mono: "DM Mono", monospace;
  --display: "Space Grotesk", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  overflow-x: hidden;
}

body.is-dragging { user-select: none; }

a { color: inherit; }

.hero {
  min-height: max(760px, 100svh);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 22px clamp(22px, 5vw, 72px) 38px;
  background:
    radial-gradient(circle at 75% 52%, rgba(73, 95, 220, .11), transparent 28%),
    radial-gradient(circle at 92% 12%, rgba(var(--lime-rgb), .07), transparent 22%),
    var(--ink);
  color: var(--white);
}

.nav, footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font: 12px var(--mono);
  text-transform: uppercase;
  letter-spacing: .04em;
  position: relative;
  z-index: 20;
}

.nav a:not(.wordmark) {
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.65);
  padding-bottom: 4px;
}

.wordmark {
  font: 700 30px var(--display);
  letter-spacing: -.11em;
  text-decoration: none;
}

.wordmark .brand-name,
.core .brand-name { color: var(--white); }

.wordmark,
.core > span { text-transform: lowercase; }

.blink {
  color: var(--lime);
  animation: tab-cursor-blink 1.05s step-end infinite;
}

.hero-copy {
  position: relative;
  z-index: 8;
  margin-top: clamp(75px, 13vh, 150px);
  max-width: 620px;
  pointer-events: none;
}

.hero-copy a { pointer-events: auto; }

.eyebrow {
  margin: 0 0 18px;
  color: inherit;
  opacity: .72;
  font: 11px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero h1,
.projects h2 {
  margin: 0;
  font-size: clamp(56px, 8vw, 125px);
  line-height: .82;
  letter-spacing: -.09em;
}

.hero h1 em {
  color: var(--lime);
  font-weight: 400;
}

.intro {
  max-width: 370px;
  margin: 38px 0 25px;
  color: #dedede;
  font-size: 16px;
  line-height: 1.45;
}

.round-link {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  border: 1px solid #555;
  border-radius: 99px;
  padding: 11px 13px 11px 17px;
  color: var(--white);
  text-decoration: none;
  font-size: 13px;
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.round-link:hover,
.round-link:focus-visible {
  border-color: var(--lime);
  background: rgba(var(--lime-rgb), .06);
  transform: translateY(-2px);
}

.round-link span { color: var(--lime); font-size: 18px; }

.network {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  touch-action: none;
  contain: layout paint;
}

.network::before,
.network::after {
  content: "";
  position: absolute;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(75px);
  opacity: .09;
  pointer-events: none;
}

.network::before {
  left: 55%;
  top: 26%;
  background: #5168ff;
}

.network::after {
  left: 76%;
  top: 62%;
  background: var(--lime);
  opacity: .055;
}

.network-glow {
  position: absolute;
  width: 18rem;
  height: 18rem;
  left: 69%;
  top: 48%;
  border-radius: 50%;
  background: var(--lime);
  filter: blur(100px);
  opacity: .035;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

.network.is-dragging .network-glow {
  opacity: .10;
  transform: scale(1.35);
}

.connections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.connection {
  fill: none;
  stroke: rgba(125, 146, 255, .36);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transition: stroke .2s ease, stroke-width .2s ease, opacity .2s ease;
}

.connection.is-near {
  stroke: rgba(var(--lime-rgb), .9);
  stroke-width: 1.8;
}

.connection.is-dragged {
  stroke: rgba(var(--lime-rgb), .75);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 50%;
  pointer-events: none;
  transform: rotate(-18deg);
}

.orbit-a {
  left: 56%;
  top: 19%;
  width: min(470px, 42vw);
  aspect-ratio: 1;
}

.orbit-b {
  left: 50%;
  top: 35%;
  width: min(350px, 32vw);
  aspect-ratio: 1;
  border-color: rgba(var(--lime-rgb), .10);
}

.node {
  position: absolute;
  z-index: 5;
  border: 1px solid rgba(111, 128, 224, .7);
  border-radius: 999px;
  background: rgba(20, 20, 25, .9);
  color: #e8e9fa;
  box-shadow: 0 0 24px rgba(75, 95, 220, .08);
  font: 10px var(--mono);
  will-change: transform, left, top;
}

.core {
  left: 68%;
  top: 45%;
  width: 155px;
  height: 155px;
  display: grid;
  place-content: center;
  text-align: center;
  border-color: var(--lime);
  border-radius: 50%;
  background: rgba(25, 28, 37, .94);
  box-shadow:
    0 0 0 12px rgba(22,22,27,.75),
    0 0 65px rgba(108,134,255,.22),
    inset 0 0 35px rgba(var(--lime-rgb), .04);
  animation: none;
  cursor: default;
}

.core span {
  font-size: 35px;
  font-weight: 700;
  letter-spacing: -.12em;
}

.core small {
  margin-top: 4px;
  color: var(--lime);
  font: 9px var(--mono);
}

.project-node {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  text-decoration: none;
  cursor: grab;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.project-node:active,
.project-node.is-dragging { cursor: grabbing; }

.project-node:hover,
.project-node:focus-visible {
  border-color: var(--lime);
  box-shadow: 0 0 24px rgba(var(--lime-rgb), .18);
  background: rgba(22, 27, 25, .96);
}

.project-node.is-dragging {
  z-index: 30;
  border-color: var(--lime);
  box-shadow:
    0 0 0 1px rgba(var(--lime-rgb), .2),
    0 0 18px rgba(var(--lime-rgb), .55),
    0 0 60px rgba(var(--lime-rgb), .15);
}

.node-code { color: var(--lime); }
.node-name { color: #e8e9fa; }

.project-nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.project-node { pointer-events: auto; }

.network-status {
  position: absolute;
  left: 50%;
  bottom: clamp(28px, 5vh, 55px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 8;
  color: rgba(255,255,255,.42);
  font: 9px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}

.network.is-dragging .status-dot {
  animation: status-pulse .7s ease-in-out infinite alternate;
}

.hero-footer {
  position: absolute;
  right: clamp(22px, 5vw, 72px);
  bottom: 38px;
  z-index: 8;
  margin: 0;
  color: var(--muted);
  text-align: right;
  font-size: 12px;
  line-height: 1.3;
  pointer-events: none;
}

.projects {
  padding: 110px clamp(22px, 5vw, 72px);
  background: var(--paper);
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: end;
  gap: 30px;
  margin-bottom: 60px;
}

.projects h2 { font-size: clamp(48px, 7vw, 98px); }

.section-heading > p:last-child {
  max-width: 250px;
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.45;
}

.tabs-container {
  max-width: 1280px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tab-row {
  height: 255px;
  display: flex;
  gap: 9px;
  overflow: hidden;
}

.panel {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  cursor: pointer;
  border-radius: 4px;
  isolation: isolate;
  transition: flex .75s cubic-bezier(.77,0,.18,1), filter .4s ease;
}

.panel:hover { filter: brightness(1.06); }

.panel.active {
  flex: 14;
  cursor: default;
}

.panel:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--thumb);
  background-size: cover;
  background-position: var(--pos, center);
  filter: saturate(.9);
  transition: transform .8s ease;
}

.panel.active::before { transform: scale(1.06); }

.panel-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #101011e8 0%, #101011a8 47%, #10101118 100%);
  z-index: -1;
}

.panel:not(.active) .panel-shade { background: #10101145; }

.tab-label {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  color: var(--white);
  white-space: nowrap;
  font: 500 10px var(--mono);
  letter-spacing: .12em;
  writing-mode: vertical-rl;
}

.panel.active .tab-label {
  left: auto;
  right: 19px;
  transform: none;
  color: var(--lime);
  writing-mode: initial;
}

.panel-content {
  position: absolute;
  z-index: 2;
  left: clamp(22px, 4vw, 55px);
  top: 50%;
  right: 42%;
  color: var(--white);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity .38s ease .18s;
}

.panel.active .panel-content { opacity: 1; }

.project-number {
  margin: 0 0 13px;
  color: var(--lime);
  font: 10px var(--mono);
  letter-spacing: .09em;
}

.panel h3 {
  margin: 0 0 9px;
  font-size: clamp(31px, 4vw, 58px);
  line-height: .9;
  letter-spacing: -.07em;
}

.project-type {
  margin: 0 0 22px;
  font-size: 15px;
}

.description {
  max-width: 400px;
  margin: 0 0 21px;
  color: #f3f3f3;
  font-size: 13px;
  line-height: 1.45;
}

.panel-content a {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--lime);
  text-decoration: none;
  font: 11px var(--mono);
}

.panel-content a span { color: var(--lime); font-size: 15px; }

footer {
  padding: 30px clamp(22px, 5vw, 72px);
  background: var(--ink);
  color: var(--white);
}

footer p { opacity: .65; }
footer > a:last-child { color: var(--lime); }

@keyframes tab-cursor-blink {
  50% { opacity: 0; }
}

@keyframes status-pulse {
  to { transform: scale(1.8); opacity: .45; }
}

@media (max-width: 1000px) {
  .hero { min-height: 720px; }
  .hero-copy { max-width: 500px; }
  .core { left: 68%; top: 47%; }
  .orbit-a { left: 51%; }
  .orbit-b { left: 46%; }
}

@media (max-width: 800px) {
  .hero { min-height: 760px; }
  .network { opacity: .98; }
  .network-glow { opacity: .025; }
  .hero-copy { margin-top: 82px; }
  .hero h1 { font-size: clamp(54px, 10vw, 78px); }
  .core {
    left: 50%;
    top: 52%;
    width: 132px;
    height: 132px;
    transform: translate(-50%, -50%);
  }
  .core span { font-size: 30px; }
  .orbit-a {
    left: 50%;
    top: 34%;
    width: 430px;
    transform: translateX(-50%) rotate(-18deg);
  }
  .orbit-b {
    left: 50%;
    top: 42%;
    width: 300px;
    transform: translateX(-50%) rotate(14deg);
  }
  .network-status { bottom: 72px; }
  .hero-footer { bottom: 28px; }
  .section-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .section-heading > p:last-child { margin: 0; }
  .tab-row { height: 310px; }
  .panel.active { flex: 12; }
  .panel-content { right: 14px; }
  .description { max-width: 310px; }
  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 760px;
    padding-top: 19px;
  }
  .nav a:not(.wordmark) { font-size: 9px; }
  .hero-copy {
    margin-top: 72px;
    max-width: 100%;
  }
  .hero h1 {
    font-size: clamp(48px, 15vw, 65px);
  }
  .intro {
    max-width: 290px;
    margin-top: 28px;
    font-size: 14px;
  }
  .core {
    top: 55%;
    width: 116px;
    height: 116px;
  }
  .core span { font-size: 26px; }
  .core small { font-size: 8px; }
  .orbit-a {
    top: 39%;
    width: 340px;
  }
  .orbit-b {
    top: 47%;
    width: 245px;
  }
  .project-node {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 9px;
  }
  .project-node .node-name { display: none; }
  .network-status { bottom: 78px; }
  .hero-footer {
    right: 18px;
    bottom: 28px;
    font-size: 10px;
  }
  .projects { padding-block: 75px; }
  .tabs-container,
  .tab-row { gap: 5px; }
  .tab-row { height: 300px; }
  .panel.active { flex: 10; }
  .panel:not(.active) { flex: .45; }
  .panel-content { left: 20px; }
  .panel h3 { font-size: 34px; }
  .project-type {
    margin-bottom: 13px;
    font-size: 13px;
  }
  .description {
    margin-bottom: 15px;
    font-size: 12px;
  }
  .tab-label { top: 12px; }
}

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

@media (pointer: coarse) {
  .project-node {
    min-height: 38px;
    padding-inline: 11px;
  }
}
