:root {
  color-scheme: dark;
  --bg: #060910;
  --bg-soft: #0a1019;
  --panel: rgba(12, 19, 30, .82);
  --panel-strong: rgba(14, 24, 38, .96);
  --card: rgba(16, 29, 45, .78);
  --line: rgba(111, 255, 231, .18);
  --line-strong: rgba(0, 245, 212, .44);
  --text: #eefcff;
  --muted: #92a7b4;
  --dim: #657885;
  --cyan: #00f5d4;
  --turquoise: #2cebd0;
  --blue: #64b5ff;
  --magenta: #ff4fd8;
  --yellow: #f9d66b;
  --green: #65f5a6;
  --orange: #ffae57;
  --red: #ff6f8a;
  --radius: 14px;
  --radius-small: 8px;
  --shadow: 0 24px 90px rgba(0, 0, 0, .38);
  --glow: 0 0 36px rgba(0, 245, 212, .24);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 6%, rgba(0, 245, 212, .22), transparent 30rem),
    radial-gradient(circle at 88% 14%, rgba(255, 79, 216, .13), transparent 26rem),
    linear-gradient(140deg, #060910 0%, #07111a 48%, #04060b 100%);
  color: var(--text);
}

body.light {
  color-scheme: light;
  --bg: #eefcff;
  --bg-soft: #dff8fb;
  --panel: rgba(255, 255, 255, .86);
  --panel-strong: rgba(255, 255, 255, .96);
  --card: rgba(255, 255, 255, .84);
  --line: rgba(0, 126, 140, .2);
  --line-strong: rgba(0, 126, 140, .4);
  --text: #06121a;
  --muted: #46616f;
  --dim: #657885;
}

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

button,
input,
select {
  font: inherit;
}

.site-noise,
.scanline {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
}

.site-noise {
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 78%);
}

.scanline {
  background: linear-gradient(to bottom, transparent, rgba(0, 245, 212, .06), transparent);
  animation: scan 9s linear infinite;
}

@keyframes scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

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

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 9, 16, .78);
  backdrop-filter: blur(18px);
}

body.light .header {
  background: rgba(238, 252, 255, .78);
}

.nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0,245,212,.2), rgba(255,79,216,.14));
  box-shadow: var(--glow);
  color: var(--cyan);
}

.brand-mark::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.nav-links a,
.icon-button,
.menu-button {
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
}

.nav-links a {
  padding: 10px 12px;
  font-weight: 750;
  font-size: .94rem;
}

.nav-links a:hover,
.nav-links a.active,
.icon-button:hover,
.menu-button:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, .05);
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.icon-button,
.menu-button {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  cursor: pointer;
}

.menu-button {
  display: none;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .86fr);
  gap: 28px;
  align-items: center;
  padding: 56px 0 36px;
  min-height: calc(100vh - 76px);
}

.hero-panel,
.visual-console,
.surface,
.project-card,
.download-card,
.video-card,
.gallery-card,
.result-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: clamp(26px, 5vw, 46px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--cyan);
  font-weight: 900;
  text-transform: uppercase;
  font-size: .82rem;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 18px currentColor;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(3.4rem, 8vw, 7.6rem);
  line-height: .9;
  letter-spacing: 0;
}

.lead {
  margin: 22px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  line-height: 1.75;
}

.hero-actions,
.actions,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.button.primary {
  border-color: rgba(0, 245, 212, .5);
  color: #03100f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: var(--glow);
}

.button.disabled {
  cursor: not-allowed;
  color: var(--dim);
  background: rgba(255,255,255,.03);
}

.visual-console {
  overflow: hidden;
  padding: 20px;
  min-height: 520px;
  background:
    linear-gradient(135deg, rgba(0,245,212,.1), transparent 38%),
    rgba(8, 14, 24, .82);
}

.console-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: .86rem;
}

.orbital {
  position: relative;
  display: grid;
  place-items: center;
  height: 320px;
  margin-top: 28px;
}

.orbital::before,
.orbital::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(0,245,212,.32);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}

.orbital::before {
  width: 270px;
  height: 270px;
}

.orbital::after {
  width: 190px;
  height: 190px;
  border-color: rgba(255,79,216,.26);
  animation-duration: 14s;
  animation-direction: reverse;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.core-logo {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 142px;
  height: 142px;
  border: 1px solid var(--line-strong);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(0,245,212,.3), rgba(255,79,216,.12)),
    #07131d;
  box-shadow: 0 0 72px rgba(0,245,212,.32);
  font-size: 3rem;
  font-weight: 950;
  color: var(--cyan);
}

.waveform {
  display: grid;
  grid-template-columns: repeat(28, 1fr);
  gap: 4px;
  align-items: end;
  height: 74px;
  margin-top: 34px;
}

.waveform span {
  border-radius: 999px;
  background: linear-gradient(to top, var(--cyan), var(--magenta));
  opacity: .7;
  animation: pulse 1.8s ease-in-out infinite;
}

.waveform span:nth-child(2n) { animation-delay: .15s; }
.waveform span:nth-child(3n) { animation-delay: .3s; }
.waveform span:nth-child(5n) { animation-delay: .45s; }

@keyframes pulse {
  0%, 100% { transform: scaleY(.55); opacity: .45; }
  50% { transform: scaleY(1); opacity: .95; }
}

.section {
  padding: 54px 0;
}

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

h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1;
}

.section-head p {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.project-card,
.download-card,
.video-card,
.gallery-card,
.surface {
  overflow: hidden;
}

.project-card,
.download-card,
.video-card,
.gallery-card {
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.project-card:hover,
.download-card:hover,
.video-card:hover,
.gallery-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 70px rgba(0, 245, 212, .12);
}

.thumb {
  position: relative;
  min-height: 180px;
  background:
    linear-gradient(135deg, rgba(0,245,212,.28), rgba(255,79,216,.12)),
    linear-gradient(160deg, #07131d, #0d2135);
}

.thumb::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(238, 252, 255, .16);
  border-radius: 12px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(0,245,212,.26) 49%, transparent 50%),
    linear-gradient(0deg, transparent 48%, rgba(0,245,212,.18) 49%, transparent 50%);
}

.thumb::after {
  content: attr(data-title);
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  color: #fff;
  font-weight: 950;
  font-size: 1.25rem;
  text-shadow: 0 6px 26px rgba(0,0,0,.52);
}

.card-body {
  padding: 20px;
}

.card-body h3 {
  margin: 12px 0 10px;
  font-size: 1.28rem;
}

.card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.meta-line,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag-row {
  margin-top: 14px;
}

.badge,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  font-weight: 800;
  font-size: .82rem;
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tone, var(--cyan));
  box-shadow: 0 0 14px var(--tone, var(--cyan));
}

.tone-green { --tone: var(--green); }
.tone-yellow { --tone: var(--yellow); }
.tone-blue { --tone: var(--blue); }
.tone-orange { --tone: var(--orange); }
.tone-red { --tone: var(--red); }
.tone-gray { --tone: var(--dim); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: rgba(255,255,255,.04);
}

.stat strong {
  display: block;
  font-size: 1.5rem;
}

.stat span {
  color: var(--muted);
  font-size: .9rem;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  margin-bottom: 18px;
}

.input,
.select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255,255,255,.05);
  padding: 0 12px;
}

.input:focus,
.select:focus,
.button:focus,
.icon-button:focus,
.menu-button:focus {
  outline: 2px solid rgba(0,245,212,.7);
  outline-offset: 2px;
}

.featured {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 18px;
  padding: 18px;
}

.feature-visual {
  min-height: 340px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 30% 30%, rgba(0,245,212,.34), transparent 22rem),
    linear-gradient(135deg, #07131d, #12233a);
}

.feature-content {
  padding: 18px;
}

.feature-content h2 {
  margin-top: 12px;
}

.progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--magenta));
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-item,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: rgba(255,255,255,.04);
}

.list-item strong,
.timeline-item strong {
  display: block;
  margin-bottom: 6px;
}

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

.empty {
  padding: 34px;
  text-align: center;
  color: var(--muted);
}

.search-popover {
  position: fixed;
  inset: 84px 16px auto;
  z-index: 40;
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  padding: 14px;
}

.search-popover[hidden],
.modal[hidden] {
  display: none;
}

.search-results {
  display: grid;
  gap: 8px;
  max-height: 54vh;
  overflow: auto;
  margin-top: 12px;
}

.search-result {
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255,255,255,.04);
}

.search-result small {
  color: var(--cyan);
  font-weight: 900;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,.72);
}

.modal-card {
  width: min(880px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--panel-strong);
  padding: 20px;
  box-shadow: var(--shadow);
}

.modal-visual {
  min-height: 360px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(0,245,212,.28), rgba(255,79,216,.16)),
    #07131d;
}

.footer {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 42px;
}

@media (max-width: 980px) {
  .nav {
    grid-template-columns: auto auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    display: none;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-bottom: 14px;
  }

  .nav-links.open {
    display: flex;
  }

  .menu-button {
    display: grid;
  }

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

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

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

@media (max-width: 680px) {
  .shell {
    width: min(100% - 22px, 1240px);
  }

  .hero {
    padding-top: 30px;
  }

  h1 {
    font-size: clamp(3rem, 18vw, 4.8rem);
  }

  .visual-console {
    min-height: 380px;
  }

  .orbital {
    height: 230px;
  }

  .orbital::before {
    width: 210px;
    height: 210px;
  }

  .orbital::after {
    width: 150px;
    height: 150px;
  }

  .core-logo {
    width: 112px;
    height: 112px;
    font-size: 2.4rem;
  }

  .section-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid,
  .grid.two,
  .stats,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}
