:root {
  --bg: #04070d;
  --panel: rgba(8, 14, 22, 0.56);
  --panel-strong: rgba(10, 17, 27, 0.78);
  --line: rgba(135, 183, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.08);
  --text: #f5f7fb;
  --muted: #9eafc7;
  --accent: #71f6c9;
  --accent-2: #ff8f43;
  --accent-3: #73a7ff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Sora", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, rgba(113, 246, 201, 0.12), transparent 24%),
    radial-gradient(circle at 80% 14%, rgba(255, 143, 67, 0.14), transparent 22%),
    radial-gradient(circle at 50% 60%, rgba(115, 167, 255, 0.12), transparent 26%),
    linear-gradient(180deg, #04070d 0%, #07101a 45%, #04070d 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.4;
  pointer-events: none;
  mask-image: radial-gradient(circle at center, black, transparent 85%);
}

.noise,
.cursor-glow,
.orbital-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.noise {
  opacity: 0.06;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0.7px, transparent 0.9px);
  background-size: 14px 14px;
  mix-blend-mode: soft-light;
}

.cursor-glow {
  z-index: 2;
  background: radial-gradient(circle at var(--cursor-x, 50%) var(--cursor-y, 50%), rgba(113, 246, 201, 0.1), transparent 160px);
  opacity: 0;
}

.orbital-canvas {
  z-index: 0;
}

.intro-cinematic,
.intro-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  transition: opacity 500ms ease, visibility 500ms ease;
}

.intro-cinematic {
  z-index: 30;
  background:
    radial-gradient(circle at center, rgba(115, 167, 255, 0.08), transparent 28%),
    rgba(3, 7, 13, 0.94);
}

.intro-cinematic.is-hidden,
.intro-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.cinematic-rings {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.cinematic-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: pulseRing 1.7s ease-out infinite;
}

.ring-1 {
  width: 120px;
  height: 120px;
}

.ring-2 {
  width: 220px;
  height: 220px;
  animation-delay: 0.2s;
}

.ring-3 {
  width: 360px;
  height: 360px;
  animation-delay: 0.4s;
}

.cinematic-copy {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  text-align: center;
}

.cinematic-title {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(1.35rem, 3.4vw, 2.1rem);
  line-height: 1.08;
}

.cinematic-text,
.intro-copy,
.hero-text,
.section-copy,
.manifesto-card p,
.layer-card p,
#project-description,
.brand-copy small,
.project-status {
  color: var(--muted);
}

.cinematic-text {
  max-width: 30ch;
  margin: 10px auto 0;
  font-size: 0.8rem;
  line-height: 1.55;
}

.intro-screen {
  z-index: 20;
  background: linear-gradient(180deg, rgba(3, 7, 13, 0.58), rgba(3, 7, 13, 0.42));
  backdrop-filter: blur(8px);
}

.intro-screen.is-active {
  visibility: visible;
  opacity: 1;
}

.intro-panel {
  width: min(680px, 100%);
  padding: 12px 8px;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.intro-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.intro-state {
  color: rgba(158, 175, 199, 0.72);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.intro-copy {
  max-width: 40ch;
  margin-top: 10px;
  font-size: 0.88rem;
  line-height: 1.55;
}

.intro-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 18px;
}

.intro-option {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  column-gap: 14px;
  row-gap: 2px;
  padding: 12px 0;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 220ms ease, border-color 220ms ease, opacity 220ms ease;
}

.intro-option:hover,
.intro-option:focus-visible {
  transform: translateX(6px);
  border-color: rgba(113, 246, 201, 0.32);
  outline: 0;
}

.intro-option span,
.skip-intro,
.eyebrow,
.core-badge,
.card-index,
.layer-card span,
.meta-label,
.node-index {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.intro-option strong {
  display: block;
  margin-top: 0;
  font-size: 0.96rem;
  font-weight: 700;
  grid-column: 2;
  grid-row: 1;
}

.intro-option small {
  display: block;
  margin-top: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  grid-column: 2;
  grid-row: 2;
}

.skip-intro {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(113, 246, 201, 0.84);
  cursor: pointer;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0 80px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.page-shell.is-ready {
  opacity: 1;
  transform: translateY(0);
}

.topbar,
.manifesto-card,
.layer-card,
.projects-sidebar,
.network-panel,
.contact-panel,
.core-panel,
.float-card {
  backdrop-filter: blur(12px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: rgba(6, 10, 17, 0.44);
  border-radius: 999px;
  position: sticky;
  top: 16px;
  z-index: 10;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 0.94rem;
  color: #041117;
  background: linear-gradient(135deg, var(--accent), #e5fff7);
  box-shadow: 0 0 22px rgba(113, 246, 201, 0.12);
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-copy strong {
  font-size: 0.88rem;
}

.nav-links {
  display: flex;
  gap: 14px;
}

.nav-links a {
  color: rgba(245, 247, 251, 0.68);
  text-decoration: none;
  font-size: 0.84rem;
}

.hero-stage {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  align-items: center;
  min-height: auto;
  padding: 18px 0 8px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
}

h1,
h2,
.core-title {
  font-family: "Syne", sans-serif;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  line-height: 1;
  max-width: 10ch;
}

h2 {
  font-size: clamp(1.1rem, 2.4vw, 1.85rem);
  line-height: 1.08;
  max-width: 16ch;
}

.intro-panel h1 {
  max-width: 14ch;
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  line-height: 1.08;
}

.hero-title {
  max-width: 14ch;
}

.hero-text {
  margin-top: 12px;
  max-width: 50ch;
  font-size: 0.84rem;
  line-height: 1.58;
}

.hero-actions,
.contact-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, opacity 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #031116;
  background: linear-gradient(135deg, var(--accent), #ddfff5);
  box-shadow: 0 8px 20px rgba(113, 246, 201, 0.14);
}

.button-secondary {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.hero-visual {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
}

.visual-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: rotateRing linear infinite;
}

.ring-a {
  width: 280px;
  height: 280px;
  animation-duration: 34s;
}

.ring-b {
  width: 200px;
  height: 200px;
  border-style: dashed;
  animation-duration: 26s;
  animation-direction: reverse;
}

.ring-c {
  width: 120px;
  height: 120px;
  border-color: rgba(113, 246, 201, 0.2);
  animation-duration: 18s;
}

.core-panel {
  position: relative;
  z-index: 2;
  width: min(320px, 100%);
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 21, 35, 0.54), rgba(8, 14, 24, 0.74));
  box-shadow: var(--shadow);
}

.core-badge,
.card-index,
.layer-card span,
.meta-label {
  display: inline-flex;
  color: var(--accent-2);
}

.core-title {
  margin-top: 10px;
  font-size: 1.2rem;
}

.core-panel p {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.signal-list,
.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.signal-list {
  margin-top: 12px;
}

.signal-list span,
.meta-tags span {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.72rem;
}

.float-card {
  position: absolute;
  z-index: 1;
  width: 110px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(6, 12, 20, 0.4);
  animation: floatY 9s ease-in-out infinite;
}

.float-card strong {
  display: block;
  font-size: 1.15rem;
  font-family: "Syne", sans-serif;
}

.float-card span {
  color: var(--muted);
  font-size: 0.7rem;
}

.float-card-a {
  top: 14%;
  right: 4%;
}

.float-card-b {
  left: 0;
  bottom: 18%;
  animation-delay: -2s;
}

.section {
  padding-top: 46px;
}

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

.manifesto-card,
.layer-card,
.projects-sidebar,
.network-panel,
.contact-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11, 18, 30, 0.42), rgba(7, 12, 20, 0.62));
  box-shadow: var(--shadow);
}

.manifesto-card,
.layer-card {
  min-height: 160px;
  padding: 16px;
  border-radius: 16px;
}

.manifesto-card.large {
  grid-row: span 2;
  min-height: 100%;
}

.manifesto-card h2 {
  margin-bottom: 16px;
}

.manifesto-card h3,
.layer-card h3,
#project-title {
  margin-top: 10px;
  margin-bottom: 8px;
  font-size: 1rem;
}

.section-heading {
  margin-bottom: 14px;
}

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

.projects-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 20px;
  align-items: start;
}

.projects-sidebar,
.network-panel,
.contact-panel {
  border-radius: 16px;
  padding: 16px;
}

.project-meta {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.project-category {
  margin-top: 8px;
  color: rgba(158, 175, 199, 0.74);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.meta-tags {
  margin: 12px 0 12px;
}

.project-status {
  margin-bottom: 12px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.project-cta.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

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

.network-node {
  position: relative;
  min-height: 124px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.network-node:hover,
.network-node:focus-visible,
.network-node.is-active {
  transform: translateX(4px);
  border-color: rgba(113, 246, 201, 0.26);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
  outline: 0;
}

.network-node.is-active {
  background: rgba(255, 255, 255, 0.03);
}

.network-node.is-live {
  border-color: rgba(255, 143, 67, 0.26);
}

.network-node.is-live .node-status {
  color: var(--accent-2);
}

.node-index {
  color: var(--accent);
}

.node-status {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.network-node h3 {
  margin-top: 10px;
  font-size: 0.9rem;
}

.network-node p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.contact-panel {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.theme-network .cursor-glow {
  background: radial-gradient(circle at var(--cursor-x, 50%) var(--cursor-y, 50%), rgba(113, 246, 201, 0.18), transparent 180px);
}

body.theme-layers .cursor-glow {
  background: radial-gradient(circle at var(--cursor-x, 50%) var(--cursor-y, 50%), rgba(255, 143, 67, 0.18), transparent 180px);
}

body.theme-story .cursor-glow {
  background: radial-gradient(circle at var(--cursor-x, 50%) var(--cursor-y, 50%), rgba(115, 167, 255, 0.18), transparent 180px);
}

body.theme-contact .cursor-glow {
  background: radial-gradient(circle at var(--cursor-x, 50%) var(--cursor-y, 50%), rgba(255, 255, 255, 0.16), transparent 180px);
}

@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes pulseRing {
  0% { transform: scale(0.8); opacity: 0; }
  30% { opacity: 0.5; }
  100% { transform: scale(1.15); opacity: 0; }
}

@media (max-width: 1080px) {
  .hero-stage,
  .projects-layout,
  .system-grid,
  .manifesto-grid,
  .intro-options {
    grid-template-columns: 1fr 1fr;
  }

  .manifesto-card.large {
    grid-row: auto;
    grid-column: span 2;
  }

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

  .contact-panel {
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 18px, 1220px);
  }

  .topbar,
  .hero-stage,
  .manifesto-grid,
  .system-grid,
  .projects-layout,
  .network-grid,
  .intro-options {
    grid-template-columns: 1fr;
  }

  .intro-panel {
    padding: 24px;
  }

  .topbar {
    border-radius: 28px;
    align-items: start;
  }

  .nav-links {
    display: none;
  }

  .hero-stage {
    min-height: auto;
    padding-top: 34px;
  }

  .hero-visual {
    min-height: 460px;
  }

  .ring-a { width: 360px; height: 360px; }
  .ring-b { width: 280px; height: 280px; }
  .ring-c { width: 180px; height: 180px; }

  .float-card-a,
  .float-card-b {
    display: none;
  }

  .manifesto-card.large {
    grid-column: auto;
  }

  h1,
  h2,
  .cinematic-title {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .cursor-glow,
  .orbital-canvas {
    display: none;
  }
}
