:root {
  --black: #030407;
  --black-soft: #080a0f;
  --panel: rgba(12, 14, 20, .68);
  --white: #f4f6fa;
  --silver: #aeb5c2;
  --silver-soft: #727986;
  --line: rgba(214, 220, 231, .16);
  --line-bright: rgba(214, 220, 231, .32);
  --gold: #d0aa50;
  --red: #d5273f;
  --blue: #2d6df6;
  --shell: 1240px;
  --font-social: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--black);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--white);
  background: var(--black);
  font-family: var(--font-social);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.section-shell {
  width: min(var(--shell), calc(100% - 64px));
  margin-inline: auto;
}

.main-nav {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 0 max(32px, calc((100vw - var(--shell)) / 2));
  border-bottom: 1px solid transparent;
  transition: min-height .3s ease, background-color .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}

.main-nav.is-scrolled {
  min-height: 62px;
  border-color: var(--line);
  background: rgba(3, 4, 7, .76);
  backdrop-filter: blur(18px) saturate(130%);
}

.nav-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 15px;
  font-weight: 760;
  text-decoration: none;
}

.nav-brand img {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .48));
  transform: scaleX(.9);
  transform-origin: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
  color: rgba(244, 246, 250, .68);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--white);
  outline: none;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-links .nav-exit {
  color: rgba(244, 246, 250, .42);
}

.theme-toggle {
  min-width: 76px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(214, 220, 231, .18);
  border-radius: 999px;
  padding: 6px 10px;
  color: #f4f6fa;
  background: rgba(255, 255, 255, .045);
  font-family: var(--font-social);
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: .02em;
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: rgba(214, 220, 231, .42);
  background: rgba(255, 255, 255, .09);
  outline: none;
  transform: translateY(-1px);
}

.theme-toggle-icon {
  width: 13px;
  height: 13px;
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
}

.theme-toggle-moon,
.theme-toggle-dark-label {
  display: none;
}

.landing-hero {
  position: relative;
  min-height: 92svh;
  isolation: isolate;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #030407;
}

.scene-canvas {
  position: absolute;
  z-index: -3;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  z-index: -2;
  inset: 0;
  opacity: .26;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .78), transparent 68%);
}

.light-sweeps {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.light-sweeps span {
  position: absolute;
  width: 46%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 220, 231, .72), transparent);
  box-shadow: 0 0 18px rgba(45, 109, 246, .38), 0 0 42px rgba(45, 109, 246, .16);
  opacity: 0;
  transform: rotate(-18deg) translateX(-140%);
  animation: sweep-light 7.2s ease-in-out infinite;
}

.light-sweeps span:first-child {
  top: 27%;
  left: 43%;
}

.light-sweeps span:last-child {
  right: 4%;
  bottom: 24%;
  background: linear-gradient(90deg, transparent, rgba(208, 170, 80, .62), transparent);
  box-shadow: 0 0 18px rgba(208, 170, 80, .34), 0 0 42px rgba(213, 39, 63, .12);
  animation-delay: 3.4s;
}

@keyframes sweep-light {
  0%, 22%, 100% { opacity: 0; transform: rotate(-18deg) translateX(-140%); }
  34% { opacity: .72; }
  58% { opacity: 0; transform: rotate(-18deg) translateX(190%); }
}

.landing-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 4, 7, .98) 0%, rgba(3, 4, 7, .78) 36%, rgba(3, 4, 7, .14) 70%),
    linear-gradient(0deg, rgba(3, 4, 7, .72), transparent 42%);
}

.hero-copy {
  width: min(var(--shell), calc(100% - 64px));
  margin-inline: auto;
  padding-top: 32px;
}

.system-label,
.section-kicker {
  margin: 0;
  color: var(--silver);
  font-size: 11px;
  font-weight: 740;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.system-label {
  display: flex;
  align-items: center;
  gap: 9px;
}

.system-label span {
  width: 6px;
  height: 6px;
  display: inline-block;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 18px rgba(213, 39, 63, .9);
}

.hero-copy h1 {
  margin: 14px 0 0;
  font-size: 112px;
  font-weight: 620;
  line-height: .9;
  letter-spacing: 0;
}

.hero-line {
  margin: 24px 0 36px;
  color: rgba(244, 246, 250, .68);
  font-size: 22px;
  font-weight: 430;
}

.primary-link,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: var(--white);
  font-weight: 720;
  text-decoration: none;
}

.primary-link {
  min-width: 172px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-bright);
  font-size: 13px;
}

.primary-link span,
.text-link span {
  color: var(--gold);
  transition: transform .2s ease;
}

.primary-link:hover span,
.primary-link:focus-visible span {
  transform: translateY(4px);
}

.hero-index {
  position: absolute;
  right: max(32px, calc((100vw - var(--shell)) / 2));
  bottom: 30px;
  display: flex;
  gap: 30px;
  color: rgba(244, 246, 250, .38);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: .1em;
}

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  width: 28px;
  height: 42px;
  border: 1px solid rgba(244, 246, 250, .22);
  border-radius: 18px;
  transform: translateX(-50%);
}

.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: var(--silver);
  transform: translateX(-50%);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { transform: translate(-50%, 0); opacity: .32; }
  50% { transform: translate(-50%, 13px); opacity: 1; }
}

.journal,
.ecosystem {
  padding-top: 112px;
  padding-bottom: 128px;
}

.journal {
  min-height: 100svh;
}

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

.section-kicker {
  margin-bottom: 11px;
  color: var(--gold);
}

.section-head h2 {
  margin: 0;
  font-size: 48px;
  font-weight: 560;
  line-height: 1;
  letter-spacing: 0;
}

.text-link {
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
  color: var(--silver);
  font-size: 12px;
}

.text-link:hover span,
.text-link:focus-visible span {
  transform: translate(3px, -3px);
}

.latest-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  grid-template-rows: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.latest-card {
  position: relative;
  min-width: 0;
  min-height: 220px;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--black-soft);
  transform-style: preserve-3d;
  transition: border-color .25s ease, transform .18s ease;
}

.latest-card-featured {
  grid-row: 1 / 3;
  min-height: 454px;
}

.latest-card > a {
  position: absolute;
  z-index: 4;
  inset: 0;
}

.latest-media {
  position: absolute;
  inset: 0;
  background: #11141b;
}

.latest-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(.46) contrast(1.12) brightness(.68);
  transform: scale(1.015);
  transition: filter .4s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
}

.latest-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(0deg, rgba(3, 4, 7, .96) 0%, rgba(3, 4, 7, .12) 72%);
  pointer-events: none;
}

.latest-copy {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 24px;
  transform: translateZ(18px);
}

.latest-copy span {
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.latest-copy h3 {
  max-width: 760px;
  margin: 8px 0 0;
  font-size: 24px;
  font-weight: 580;
  line-height: 1.15;
  letter-spacing: 0;
}

.latest-card-featured .latest-copy {
  padding: 32px;
}

.latest-card-featured .latest-copy h3 {
  font-size: 36px;
}

.latest-card:hover,
.latest-card:focus-within {
  border-color: var(--line-bright);
}

.latest-card:hover .latest-media img,
.latest-card:focus-within .latest-media img {
  filter: saturate(.82) contrast(1.04) brightness(.78);
  transform: scale(1.06);
}

.skeleton-card .latest-media {
  background: linear-gradient(100deg, #0a0c11 20%, #141722 48%, #0a0c11 78%);
  background-size: 220% 100%;
  animation: skeleton 1.6s linear infinite;
}

@keyframes skeleton {
  to { background-position-x: -220%; }
}

.ecosystem {
  border-top: 1px solid var(--line);
}

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

.project-card {
  --project-tone: var(--blue);
  position: relative;
  min-width: 0;
  min-height: 238px;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
  color: var(--white);
  background: rgba(8, 10, 15, .78);
  box-shadow: inset 0 1px rgba(255, 255, 255, .04);
  text-align: left;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: border-color .25s ease, box-shadow .25s ease, transform .22s ease;
}

.project-card::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: -70%;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
  transform: skewX(-18deg);
  transition: left .7s cubic-bezier(.2, .7, .2, 1);
  pointer-events: none;
}

.project-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(3, 4, 7, .98), rgba(3, 4, 7, .08) 76%),
    linear-gradient(120deg, color-mix(in srgb, var(--project-tone) 15%, transparent), transparent 58%);
  pointer-events: none;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: color-mix(in srgb, var(--project-tone) 52%, var(--line-bright));
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 22px 60px color-mix(in srgb, var(--project-tone) 13%, transparent);
  outline: none;
}

.project-card:hover::before,
.project-card:focus-visible::before {
  left: 132%;
}

.project-card:hover .project-art,
.project-card:focus-visible .project-art {
  opacity: .58;
  transform: scale(1.06);
}

.project-art {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: .38;
  filter: saturate(.42) contrast(1.08);
  transition: opacity .35s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}

.project-blog { --project-tone: var(--gold); }
.project-sanatorio { --project-tone: var(--silver); }
.project-patrimonio { --project-tone: var(--red); }
.project-portafolio { --project-tone: var(--blue); }
.project-x { --project-tone: var(--silver); }
.project-youtube { --project-tone: var(--gold); }
.project-blog .project-art { background-image: url("project-blog.svg?v=20260704-hud"); }
.project-sanatorio .project-art { background-image: url("project-sanatorio.svg?v=20260704-hud"); }
.project-patrimonio .project-art { background-image: url("project-patrimonio.svg?v=20260704-hud"); }
.project-portafolio .project-art { background-image: url("project-portafolio.svg?v=20260704-hud"); }
.project-x .project-art { background-image: url("project-x.svg?v=20260704-hud"); }
.project-youtube .project-art { background-image: url("project-youtube.svg?v=20260704-hud"); }

.project-top,
.project-bottom {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transform: translateZ(18px);
}

.node-number {
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.node-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(244, 246, 250, .48);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.node-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--project-tone);
  box-shadow: 0 0 12px var(--project-tone);
}

.project-bottom > span {
  display: grid;
  gap: 2px;
}

.project-bottom strong {
  font-size: 22px;
  font-weight: 610;
}

.project-bottom small {
  color: var(--silver-soft);
  font-size: 12px;
}

.project-bottom i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--silver);
  font-style: normal;
  font-size: 19px;
}

/* Project detail screen */
.project-dialog {
  position: fixed;
  inset: 50% auto auto 50%;
  width: min(780px, calc(100vw - 32px));
  width: min(780px, calc(100dvw - 32px));
  max-width: calc(100vw - 32px);
  max-width: calc(100dvw - 32px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: 0;
  border: 0;
  padding: 0;
  color: var(--white);
  background: transparent;
  overflow: visible;
  transform: translate(-50%, -50%);
}

.project-dialog::backdrop {
  background: rgba(1, 2, 5, .78);
  backdrop-filter: blur(12px) saturate(115%);
}

.project-screen {
  position: relative;
  width: 100%;
  max-height: inherit;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  overflow: auto;
  border: 1px solid rgba(214, 220, 231, .34);
  border-radius: 6px;
  background: rgba(7, 9, 14, .86);
  box-shadow: 0 44px 140px rgba(0, 0, 0, .72), inset 0 1px rgba(255, 255, 255, .07);
  backdrop-filter: blur(24px) saturate(125%);
  animation: screen-enter .36s cubic-bezier(.18, .78, .25, 1);
}

@keyframes screen-enter {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.screen-grid,
.screen-scan {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
}

.screen-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(90deg, #000, transparent 84%);
}

.screen-scan {
  height: 84px;
  background: linear-gradient(0deg, transparent, rgba(45, 109, 246, .08), transparent);
  animation: screen-scan 3.8s linear infinite;
}

@keyframes screen-scan {
  from { transform: translateY(-90px); }
  to { transform: translateY(620px); }
}

.screen-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 26px 18px;
  border-bottom: 1px solid var(--line);
}

.screen-code {
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.screen-head h2 {
  margin: 6px 0 0;
  font-size: 36px;
  font-weight: 620;
  line-height: 1;
}

.screen-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  padding: 0;
  color: var(--silver);
  background: rgba(255, 255, 255, .035);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.screen-close:hover,
.screen-close:focus-visible {
  border-color: var(--line-bright);
  color: var(--white);
  outline: none;
}

.screen-visual {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.screen-visual::before,
.screen-visual::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.screen-visual::before {
  inset: 0;
  background:
    linear-gradient(0deg, rgba(3, 4, 7, .9), transparent 76%),
    linear-gradient(120deg, rgba(45, 109, 246, .12), transparent 58%);
}

.screen-visual::after {
  top: 20px;
  right: 20px;
  width: 34px;
  height: 34px;
  border-top: 1px solid var(--gold);
  border-right: 1px solid var(--gold);
}

.screen-visual > span {
  position: absolute;
  z-index: 2;
  right: 22px;
  bottom: 22px;
  left: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--blue));
  box-shadow: 0 0 15px rgba(45, 109, 246, .35);
  animation: signal-pulse 2.2s ease-in-out infinite;
}

@keyframes signal-pulse {
  0%, 100% { opacity: .34; transform: scaleX(.76); }
  50% { opacity: 1; transform: scaleX(1); }
}

.project-dialog[data-active-project="blog"] .screen-visual { background-image: url("project-blog.svg?v=20260704-hud"); }
.project-dialog[data-active-project="sanatorio"] .screen-visual { background-image: url("project-sanatorio.svg?v=20260704-hud"); }
.project-dialog[data-active-project="patrimonio"] .screen-visual { background-image: url("project-patrimonio.svg?v=20260704-hud"); }
.project-dialog[data-active-project="portafolio"] .screen-visual { background-image: url("project-portafolio.svg?v=20260704-hud"); }
.project-dialog[data-active-project="x"] .screen-visual { background-image: url("project-x.svg?v=20260704-hud"); }
.project-dialog[data-active-project="youtube"] .screen-visual { background-image: url("project-youtube.svg?v=20260704-hud"); }

.screen-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  padding: 28px;
}

.screen-copy > p {
  margin: 0;
  color: rgba(244, 246, 250, .72);
  font-size: 16px;
  line-height: 1.62;
}

.screen-copy dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.screen-copy dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.screen-copy dt,
.screen-copy dd {
  margin: 0;
  font-size: 10px;
  text-transform: uppercase;
}

.screen-copy dt {
  color: var(--silver-soft);
  letter-spacing: .08em;
}

.screen-copy dd {
  color: var(--silver);
  font-weight: 720;
}

.screen-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 26px;
  border-top: 1px solid var(--line);
}

.screen-signal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--silver-soft);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.screen-signal i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #63d897;
  box-shadow: 0 0 14px rgba(99, 216, 151, .8);
}

.visit-button {
  min-width: 142px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 4px;
  padding: 10px 14px;
  color: #05070b;
  background: var(--white);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: background-color .2s ease, transform .2s ease;
}

.visit-button:hover,
.visit-button:focus-visible {
  background: #dce4f2;
  transform: translateY(-1px);
  outline: none;
}

body.dialog-open {
  overflow: hidden;
}

.landing-footer {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--silver-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.landing-footer .nav-brand span {
  display: none;
}

.landing-footer .nav-brand img {
  width: 38px;
  height: 38px;
  opacity: .72;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s ease, transform .65s cubic-bezier(.2, .75, .2, 1);
}

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

/* Access gate */
.access-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--black);
}

.access-stage {
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: grid;
  place-items: center;
  isolation: isolate;
  padding: 28px;
}

.access-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 4, 7, .9), rgba(3, 4, 7, .28) 50%, rgba(3, 4, 7, .84)),
    linear-gradient(0deg, rgba(3, 4, 7, .92), transparent 58%);
  pointer-events: none;
}

.access-card {
  position: relative;
  z-index: 2;
  width: min(410px, 100%);
  display: grid;
  gap: 17px;
  padding: 28px;
  border: 1px solid var(--line-bright);
  border-radius: 6px;
  background: rgba(8, 10, 15, .68);
  box-shadow: 0 32px 100px rgba(0, 0, 0, .56), inset 0 1px rgba(255, 255, 255, .06);
  backdrop-filter: blur(22px) saturate(120%);
}

.access-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 28px;
  width: 72px;
  height: 1px;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(208, 170, 80, .6);
}

.access-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 3px;
}

.access-brand img {
  width: 68px;
  height: 68px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .5));
}

.access-brand h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 620;
  letter-spacing: 0;
}

.access-brand p {
  margin: 3px 0 0;
  color: var(--silver-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.access-card label {
  color: var(--silver);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.access-card input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line-bright);
  border-radius: 4px;
  padding: 12px 14px;
  color: var(--white);
  background: rgba(1, 2, 5, .72);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.access-card input:focus {
  border-color: rgba(45, 109, 246, .9);
  box-shadow: 0 0 0 3px rgba(45, 109, 246, .14), 0 0 34px rgba(45, 109, 246, .12);
}

.access-card button {
  min-height: 50px;
  border: 1px solid rgba(244, 246, 250, .7);
  border-radius: 4px;
  color: #05070b;
  background: var(--white);
  font-weight: 800;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}

.access-card button:hover,
.access-card button:focus-visible {
  background: #dbe3f3;
  transform: translateY(-1px);
  outline: none;
}

.access-error {
  min-height: 18px;
  margin: 0;
  color: #ff8795;
  font-size: 12px;
}

.access-meta {
  position: absolute;
  z-index: 2;
  right: 28px;
  bottom: 24px;
  color: rgba(244, 246, 250, .3);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .section-shell,
  .hero-copy {
    width: min(100% - 32px, var(--shell));
  }

  .main-nav {
    min-height: 66px;
    padding-inline: 16px;
  }

  .nav-links {
    gap: 18px;
  }

  .nav-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .nav-links a:nth-child(2),
  .nav-links .nav-exit {
    display: none;
  }

  .landing-hero {
    min-height: 90svh;
  }

  .landing-hero::after {
    background:
      linear-gradient(0deg, rgba(3, 4, 7, .96) 0%, rgba(3, 4, 7, .42) 64%, rgba(3, 4, 7, .16)),
      linear-gradient(90deg, rgba(3, 4, 7, .8), rgba(3, 4, 7, .14));
  }

  .hero-grid {
    background-size: 54px 54px;
    mask-image: linear-gradient(0deg, #000, transparent 82%);
  }

  .hero-copy {
    align-self: end;
    padding: 0 0 116px;
  }

  .hero-copy h1 {
    font-size: 64px;
  }

  .hero-line {
    margin: 17px 0 26px;
    font-size: 18px;
  }

  .hero-index {
    right: 16px;
    bottom: 18px;
  }

  .hero-index span:first-child,
  .scroll-cue {
    display: none;
  }

  .journal,
  .ecosystem {
    padding-top: 76px;
    padding-bottom: 88px;
  }

  .section-head {
    align-items: start;
    margin-bottom: 28px;
  }

  .section-head h2 {
    font-size: 36px;
  }

  .latest-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .latest-card,
  .latest-card-featured {
    grid-row: auto;
    min-height: 268px;
  }

  .latest-card-featured {
    min-height: 390px;
  }

  .latest-card-featured .latest-copy,
  .latest-copy {
    padding: 22px;
  }

  .latest-card-featured .latest-copy h3,
  .latest-copy h3 {
    font-size: 24px;
  }

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

  .project-card {
    min-height: 196px;
    padding: 16px;
  }

  .project-bottom strong {
    font-size: 18px;
  }

  .project-screen {
    grid-template-columns: 1fr;
  }

  .project-dialog {
    width: calc(100vw - 24px);
    width: calc(100dvw - 24px);
    max-width: calc(100vw - 24px);
    max-width: calc(100dvw - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .screen-head {
    padding: 20px;
  }

  .screen-head h2 {
    font-size: 30px;
  }

  .screen-visual {
    min-height: 210px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .screen-copy {
    gap: 20px;
    padding: 22px 20px;
  }

  .screen-copy > p {
    font-size: 15px;
  }

  .screen-actions {
    padding: 16px 20px;
  }

  .access-stage {
    align-items: end;
    padding: 16px 16px 36px;
  }

  .access-card {
    padding: 22px;
  }

  .access-meta {
    display: none;
  }
}

@media (max-width: 460px) {
  .main-nav .nav-brand span {
    display: none;
  }

  .project-card {
    min-height: 172px;
    padding: 13px;
  }

  .project-bottom strong {
    font-size: 16px;
  }

  .project-bottom small {
    font-size: 11px;
  }

  .project-bottom i {
    width: 30px;
    height: 30px;
  }

  .screen-signal {
    display: none;
  }

  .visit-button {
    width: 100%;
  }
}

/* Light appearance */
:root[data-theme="light"] {
  --black: #f5f5f7;
  --black-soft: #ffffff;
  --panel: rgba(255, 255, 255, .82);
  --white: #1d1d1f;
  --silver: #515154;
  --silver-soft: #6e6e73;
  --line: rgba(29, 29, 31, .13);
  --line-bright: rgba(29, 29, 31, .26);
  --gold: #8a5f00;
  --red: #d51f45;
  --blue: #0868ee;
}

:root[data-theme="light"] .theme-toggle {
  border-color: rgba(29, 29, 31, .16);
  color: #1d1d1f;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 1px 8px rgba(0, 0, 0, .04);
}

:root[data-theme="light"] .theme-toggle:hover,
:root[data-theme="light"] .theme-toggle:focus-visible {
  border-color: rgba(29, 29, 31, .3);
  background: #fff;
}

:root[data-theme="light"] .theme-toggle-sun,
:root[data-theme="light"] .theme-toggle-light-label {
  display: none;
}

:root[data-theme="light"] .theme-toggle-moon,
:root[data-theme="light"] .theme-toggle-dark-label {
  display: inline-grid;
}

:root[data-theme="light"] .main-nav.is-scrolled {
  background: rgba(250, 250, 252, .82);
  box-shadow: 0 1px 16px rgba(20, 24, 32, .04);
}

:root[data-theme="light"] .nav-links a {
  color: rgba(29, 29, 31, .66);
}

:root[data-theme="light"] .nav-links a:hover,
:root[data-theme="light"] .nav-links a:focus-visible {
  color: var(--white);
}

:root[data-theme="light"] .landing-hero {
  background: #eef1f6;
}

:root[data-theme="light"] .scene-canvas {
  filter: saturate(1.35) contrast(1.1) brightness(1.02);
}

:root[data-theme="light"] .hero-grid {
  opacity: .2;
  background-image:
    linear-gradient(rgba(29, 29, 31, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 29, 31, .045) 1px, transparent 1px);
}

:root[data-theme="light"] .light-sweeps span {
  background: linear-gradient(90deg, transparent, rgba(29, 29, 31, .34), transparent);
  box-shadow: 0 0 18px rgba(45, 109, 246, .2), 0 0 42px rgba(45, 109, 246, .09);
}

:root[data-theme="light"] .landing-hero::after {
  background:
    linear-gradient(90deg, rgba(245, 247, 250, .99) 0%, rgba(245, 247, 250, .82) 35%, rgba(245, 247, 250, .04) 68%),
    linear-gradient(0deg, rgba(245, 247, 250, .48), transparent 40%);
}

:root[data-theme="light"] .hero-line {
  color: rgba(29, 29, 31, .66);
}

:root[data-theme="light"] .hero-index {
  color: rgba(29, 29, 31, .46);
}

:root[data-theme="light"] .scroll-cue {
  border-color: rgba(29, 29, 31, .24);
}

:root[data-theme="light"] .latest-card {
  border-color: rgba(29, 29, 31, .16);
  background: #11141b;
}

:root[data-theme="light"] .latest-copy {
  color: #f4f6fa;
}

:root[data-theme="light"] .latest-copy span {
  color: #e0bb5d;
}

:root[data-theme="light"] .project-card {
  border-color: rgba(29, 29, 31, .18);
  color: #f4f6fa;
  background: rgba(8, 10, 15, .94);
  box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 16px 44px rgba(20, 24, 32, .08);
}

:root[data-theme="light"] .project-card .node-number {
  color: #e0bb5d;
}

:root[data-theme="light"] .project-card .node-status {
  color: rgba(244, 246, 250, .58);
}

:root[data-theme="light"] .project-card .project-bottom small {
  color: #aeb5c2;
}

:root[data-theme="light"] .project-card .project-bottom i {
  border-color: rgba(214, 220, 231, .24);
  color: #aeb5c2;
}

:root[data-theme="light"] .project-dialog,
:root[data-theme="light"] .project-screen {
  color: #f4f6fa;
}

:root[data-theme="light"] .project-screen {
  border-color: rgba(29, 29, 31, .24);
  box-shadow: 0 44px 140px rgba(23, 27, 35, .34), inset 0 1px rgba(255, 255, 255, .07);
}

:root[data-theme="light"] .screen-copy > p {
  color: rgba(244, 246, 250, .74);
}

:root[data-theme="light"] .screen-copy dt,
:root[data-theme="light"] .screen-signal {
  color: #727986;
}

:root[data-theme="light"] .screen-copy dd,
:root[data-theme="light"] .screen-close {
  color: #aeb5c2;
}

:root[data-theme="light"] .screen-close:hover,
:root[data-theme="light"] .screen-close:focus-visible {
  color: #f4f6fa;
}

:root[data-theme="light"] .visit-button {
  border-color: rgba(255, 255, 255, .7);
  color: #05070b;
  background: #f4f6fa;
}

:root[data-theme="light"] .access-card,
:root[data-theme="light"] .access-brand h1 {
  color: #f4f6fa;
}

:root[data-theme="light"] .access-card input {
  color: #f4f6fa;
}

@media (max-width: 760px) {
  .theme-toggle {
    min-width: 36px;
    width: 36px;
    min-height: 36px;
    padding: 0;
  }

  .theme-toggle-label {
    display: none !important;
  }

  :root[data-theme="light"] .landing-hero::after {
    background:
      linear-gradient(0deg, rgba(245, 247, 250, .98) 0%, rgba(245, 247, 250, .58) 64%, rgba(245, 247, 250, .18)),
      linear-gradient(90deg, rgba(245, 247, 250, .88), rgba(245, 247, 250, .08));
  }
}

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