/* Self-hosted Inter (latin, variable weights via same file) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #07111f;
  --ink-2: #0b1930;
  --surface: #0d1d36;
  --surface-2: #102545;
  --line: rgba(190, 219, 255, 0.16);
  --line-strong: rgba(190, 219, 255, 0.32);
  --paper: #f2f6ff;
  --muted: #a8bad5;
  --faint: #7285a2;
  --blue: #51a6ff;
  --electric: #7b61ff;
  --aqua: #7deeff;
  --lime: #d9ff70;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --max: 1180px;
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--paper);
  background:
    radial-gradient(circle at 77% -10%, rgba(58, 120, 255, 0.23), transparent 34rem),
    radial-gradient(circle at 6% 37%, rgba(123, 97, 255, 0.10), transparent 30rem),
    var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(147, 190, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 190, 255, 0.026) 1px, transparent 1px);
  background-size: 64px 64px;
  content: "";
  pointer-events: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  cursor: pointer;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -4rem;
  left: 1rem;
  padding: 0.7rem 0.9rem;
  color: var(--ink);
  background: var(--aqua);
  border-radius: 0.5rem;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  display: flex;
  position: relative;
  z-index: 10;
  width: min(var(--max), calc(100% - 2.4rem));
  min-height: 84px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  min-width: max-content;
  gap: 0.65rem;
  align-items: center;
  color: var(--paper);
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  color: var(--ink);
  background:
    linear-gradient(135deg, var(--aqua), var(--blue) 55%, var(--electric));
  border-radius: 8px 8px 8px 2px;
  box-shadow: 0 0 28px rgba(81, 166, 255, 0.42);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.1em;
  line-height: 1;
  place-items: center;
}

.brand-copy {
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.065em;
}

.brand-copy .brand-accent {
  margin: 0;
  color: var(--blue);
  font: inherit;
  letter-spacing: inherit;
  text-transform: none;
}

.main-navigation {
  display: flex;
  gap: 1.65rem;
  align-items: center;
}

.main-navigation > a {
  position: relative;
  padding: 0.5rem 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: 0.005em;
  transition: color 180ms ease;
}

.main-navigation > a::after {
  position: absolute;
  right: 0;
  bottom: 0.03rem;
  left: 0;
  height: 1px;
  background: var(--aqua);
  content: "";
  opacity: 0;
  transform: scaleX(0.2);
  transform-origin: center;
  transition: transform 180ms ease, opacity 180ms ease;
}

.main-navigation > a:hover,
.main-navigation > a.is-active {
  color: var(--paper);
}

.main-navigation > a:hover::after,
.main-navigation > a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.main-navigation > a.nav-github {
  padding: 0.56rem 0.76rem;
  color: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.main-navigation > a.nav-github::after {
  display: none;
}

.main-navigation > a.nav-github:hover {
  border-color: var(--aqua);
  background: rgba(125, 238, 255, 0.08);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 0.7rem;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 4px auto;
  background: currentColor;
  transition: transform 180ms ease;
}

.section-frame {
  width: min(var(--max), calc(100% - 2.4rem));
  margin: 0 auto;
}

.eyebrow {
  display: flex;
  gap: 0.62rem;
  align-items: center;
  margin: 0 0 1.1rem;
  color: var(--aqua);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-block;
  width: 1.6rem;
  height: 1px;
  background: currentColor;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.068em;
  line-height: 0.97;
}

h1 {
  max-width: 9.5ch;
  margin-bottom: 1.45rem;
  font-size: clamp(3.65rem, 8.5vw, 7.75rem);
  font-weight: 700;
}

h1 em,
h2 em {
  color: var(--aqua);
  font-style: normal;
}

h2 {
  max-width: 12ch;
  margin-bottom: 1.25rem;
  font-size: clamp(2.55rem, 5.1vw, 4.65rem);
  font-weight: 760;
}

h3 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.55rem, 2.7vw, 2.35rem);
  font-weight: 740;
}

.hero {
  display: grid;
  min-height: 655px;
  padding: 6.5rem 0 5.5rem;
  gap: 3rem;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(410px, 0.85fr);
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 2rem 0;
}

.hero-description {
  max-width: 44rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.7vw, 1.2rem);
  line-height: 1.7;
}

.hero-actions,
.github-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-identity {
  display: inline-flex;
  margin-top: 2.1rem;
  gap: 0.75rem;
  align-items: center;
  color: var(--muted);
}

.identity-avatar {
  width: 52px;
  height: 52px;
  overflow: hidden;
  background: #0b1421;
  border: 1px solid rgba(125, 238, 255, 0.46);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(125, 238, 255, 0.06), 0 0 24px rgba(81, 166, 255, 0.2);
}

.identity-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-identity strong,
.hero-identity span {
  display: block;
}

.hero-identity strong {
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-identity span {
  margin-top: 0.15rem;
  color: var(--faint);
  font-size: 0.63rem;
  letter-spacing: 0.045em;
}

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 0.72rem 1rem;
  gap: 0.8rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  font-size: 0.84rem;
  font-weight: 760;
  letter-spacing: 0.005em;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

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

.button-primary {
  color: var(--ink);
  background: linear-gradient(120deg, var(--aqua), var(--blue));
  box-shadow: 0 11px 34px rgba(81, 166, 255, 0.24);
}

.button-primary:hover {
  background: linear-gradient(120deg, #b9fbff, #6ab7ff);
}

.button-quiet {
  color: var(--paper);
  background: rgba(242, 246, 255, 0.035);
  border-color: var(--line-strong);
}

.button-quiet:hover {
  border-color: var(--aqua);
  background: rgba(125, 238, 255, 0.08);
}

.hero-map {
  position: relative;
  min-height: 490px;
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(60, 123, 216, 0.12), rgba(16, 37, 69, 0.16) 45%, rgba(123, 97, 255, 0.17)),
    rgba(11, 25, 48, 0.76);
  border: 1px solid var(--line-strong);
  border-radius: 1.9rem;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-map::before {
  position: absolute;
  z-index: -1;
  inset: 1rem;
  border: 1px solid rgba(181, 220, 255, 0.08);
  border-radius: 1.25rem;
  content: "";
}

.hero-background-logo {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.48;
  filter: saturate(1.2) contrast(1.12);
}

.hero-brand-scrim {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(7, 17, 31, 0.24), rgba(7, 17, 31, 0.78)),
    radial-gradient(circle at 50% 44%, transparent 20%, rgba(7, 17, 31, 0.42) 76%);
  pointer-events: none;
}

.map-grid {
  position: absolute;
  z-index: 1;
  inset: 0;
  background-image:
    linear-gradient(rgba(125, 238, 255, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 238, 255, 0.065) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
}

.map-glow {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 25rem;
  height: 25rem;
  background: radial-gradient(circle, rgba(61, 161, 255, 0.29), rgba(123, 97, 255, 0.04) 61%, transparent 70%);
  transform: translate(-50%, -50%);
}

.map-core {
  display: flex;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10.4rem;
  height: 10.4rem;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 20%, rgba(159, 238, 255, 0.4), rgba(32, 81, 150, 0.62) 43%, rgba(8, 24, 49, 0.96) 76%);
  border: 1px solid rgba(178, 235, 255, 0.62);
  border-radius: 50%;
  box-shadow: 0 0 0 15px rgba(81, 166, 255, 0.05), 0 0 70px rgba(81, 166, 255, 0.38);
  flex-direction: column;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.map-core strong {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.map-core span {
  color: var(--muted);
  font-size: 0.53rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-core .core-index {
  position: absolute;
  top: 1.35rem;
  color: var(--aqua);
  font-size: 0.47rem;
}

.map-node {
  display: grid;
  position: absolute;
  width: min-content;
  min-width: 125px;
  padding: 0.68rem 0.82rem 0.64rem 1.45rem;
  color: var(--paper);
  background: rgba(6, 17, 32, 0.78);
  border: 1px solid rgba(174, 222, 255, 0.22);
  border-radius: 0.8rem;
  backdrop-filter: blur(12px);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
  z-index: 2;
}

.map-node:hover {
  background: rgba(24, 60, 105, 0.85);
  border-color: var(--aqua);
  transform: translateY(-3px);
}

.map-node strong {
  font-size: 0.59rem;
  letter-spacing: 0.08em;
}

.map-node small {
  margin-top: 0.13rem;
  color: var(--muted);
  font-size: 0.61rem;
  white-space: nowrap;
}

.node-dot {
  position: absolute;
  top: 0.84rem;
  left: 0.65rem;
  width: 0.3rem;
  height: 0.3rem;
  background: var(--aqua);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--aqua);
}

.node-nexo {
  top: 14%;
  left: 10%;
}

.node-voiceforge {
  right: 7%;
  bottom: 16%;
}

.node-zamerim {
  top: 20%;
  right: 7%;
}

.node-peo {
  left: 8%;
  bottom: 13%;
}

.map-line {
  position: absolute;
  z-index: -1;
  height: 1px;
  background: linear-gradient(90deg, rgba(125, 238, 255, 0.52), rgba(125, 238, 255, 0.04));
  transform-origin: left center;
}

.line-one {
  top: 31%;
  left: 31%;
  width: 31%;
  transform: rotate(32deg);
}

.line-two {
  top: 37%;
  left: 55%;
  width: 32%;
  transform: rotate(-22deg);
}

.line-three {
  top: 63%;
  left: 48%;
  width: 32%;
  transform: rotate(24deg);
}

.line-four {
  top: 60%;
  left: 23%;
  width: 29%;
  transform: rotate(-22deg);
}

.signal-strip {
  display: flex;
  width: 100%;
  min-height: 92px;
  padding: 1.1rem max(1.2rem, calc((100vw - var(--max)) / 2));
  gap: clamp(0.7rem, 2.5vw, 2.2rem);
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--aqua);
  background: linear-gradient(90deg, rgba(34, 89, 162, 0.57), rgba(93, 67, 167, 0.6));
  border-block: 1px solid rgba(158, 224, 255, 0.2);
}

.signal-strip p {
  margin: 0;
  font-size: clamp(0.78rem, 1.4vw, 0.94rem);
  font-weight: 750;
  letter-spacing: 0.065em;
  white-space: nowrap;
  text-transform: uppercase;
}

.signal-strip span {
  width: 0.27rem;
  height: 0.27rem;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(217, 255, 112, 0.8);
}

.ecosystem-preview {
  padding-top: clamp(5rem, 11vw, 8.5rem);
}

.section-heading {
  display: grid;
  margin-bottom: 2.7rem;
  gap: 0.55rem 4rem;
  grid-template-columns: 1.1fr 0.9fr;
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
}

.section-heading h2 {
  margin-bottom: 0;
}

.section-heading > p:not(.eyebrow) {
  max-width: 30rem;
  align-self: end;
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

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

.project-card {
  display: flex;
  min-height: 300px;
  padding: 1.45rem;
  justify-content: space-between;
  background: linear-gradient(145deg, rgba(20, 45, 83, 0.84), rgba(10, 25, 47, 0.78));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  flex-direction: column;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.project-card:hover {
  background: linear-gradient(145deg, rgba(28, 66, 116, 0.88), rgba(13, 34, 65, 0.86));
  border-color: rgba(125, 238, 255, 0.5);
  transform: translateY(-5px);
}

.project-card-featured {
  min-height: 372px;
  grid-column: span 2;
  background:
    radial-gradient(circle at 83% 45%, rgba(87, 128, 255, 0.27), transparent 30%),
    linear-gradient(135deg, rgba(20, 55, 107, 0.98), rgba(11, 28, 57, 0.88));
}

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-number {
  color: var(--aqua);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.project-status {
  padding: 0.3rem 0.55rem;
  color: var(--muted);
  background: rgba(216, 239, 255, 0.055);
  border: 1px solid rgba(216, 239, 255, 0.1);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-kicker {
  margin-bottom: 0.52rem;
  color: var(--aqua);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.project-card h3 {
  max-width: 12ch;
  font-size: clamp(1.7rem, 3.4vw, 2.85rem);
}

.project-card p:not(.project-kicker) {
  max-width: 34rem;
  margin-bottom: 1.2rem;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.project-card > a {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  align-self: flex-start;
  color: var(--paper);
  font-size: 0.83rem;
  font-weight: 760;
}

.project-card > a span {
  color: var(--aqua);
  font-size: 1.18rem;
  transition: transform 180ms ease;
}

.project-card > a:hover span {
  transform: translate(3px, -3px);
}

.philosophy {
  display: grid;
  padding-top: clamp(6rem, 13vw, 10.3rem);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  grid-template-columns: 0.83fr 1.17fr;
}

.philosophy-visual {
  display: grid;
  position: relative;
  min-height: 455px;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(29, 60, 107, 0.7), rgba(19, 15, 59, 0.62));
  border: 1px solid var(--line);
  border-radius: 50% 50% 16% 16%;
  box-shadow: var(--shadow);
  place-items: center;
}

.philosophy-visual::before {
  position: absolute;
  width: 63%;
  height: 63%;
  background: radial-gradient(circle, rgba(125, 238, 255, 0.48), rgba(66, 118, 235, 0.22) 41%, transparent 68%);
  border-radius: 50%;
  content: "";
  filter: blur(3px);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(182, 224, 255, 0.32);
  border-radius: 50%;
}

.orbit-one {
  width: 70%;
  height: 34%;
  transform: rotate(-38deg);
}

.orbit-two {
  width: 74%;
  height: 38%;
  border-color: rgba(145, 115, 255, 0.32);
  transform: rotate(37deg);
}

.orbit-three {
  width: 30%;
  height: 73%;
  border-color: rgba(125, 238, 255, 0.22);
  transform: rotate(26deg);
}

.philosophy-word {
  z-index: 1;
  color: var(--paper);
  font-size: clamp(2rem, 4.4vw, 4rem);
  font-weight: 850;
  letter-spacing: -0.08em;
  line-height: 0.84;
  text-align: center;
}

.philosophy-copy {
  max-width: 44rem;
}

.philosophy-copy > p:not(.eyebrow) {
  max-width: 39rem;
  color: var(--muted);
  line-height: 1.75;
}

.text-link {
  display: inline-flex;
  margin-top: 0.7rem;
  gap: 0.6rem;
  align-items: center;
  color: var(--aqua);
  font-size: 0.89rem;
  font-weight: 750;
}

.text-link span {
  font-size: 1.2rem;
  transition: transform 180ms ease;
}

.text-link:hover span {
  transform: translateX(4px);
}

.github-panel {
  display: grid;
  margin-top: clamp(6rem, 13vw, 10.3rem);
  gap: 1.8rem;
  grid-template-columns: 1fr 0.86fr;
}

.github-panel-copy,
.github-repository {
  min-height: 348px;
  padding: clamp(1.5rem, 3vw, 2.6rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.github-panel-copy {
  background:
    radial-gradient(circle at 85% 20%, rgba(125, 238, 255, 0.12), transparent 14rem),
    rgba(13, 29, 54, 0.72);
}

.github-panel-copy h2 {
  max-width: 10ch;
  font-size: clamp(2.25rem, 4.2vw, 3.85rem);
}

.github-panel-copy > p:not(.eyebrow) {
  max-width: 32rem;
  color: var(--muted);
  line-height: 1.68;
}

.github-panel-copy strong {
  color: var(--paper);
}

.github-actions {
  margin-top: 1.7rem;
}

.github-repository {
  display: flex;
  position: relative;
  overflow: hidden;
  justify-content: flex-end;
  background: linear-gradient(145deg, #e6f4ff, #9bd4ff);
  color: var(--ink);
  flex-direction: column;
  isolation: isolate;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.github-repository:hover {
  box-shadow: 0 20px 52px rgba(81, 166, 255, 0.22);
  transform: translateY(-5px);
}

.github-repository::before {
  position: absolute;
  z-index: -1;
  top: -5.2rem;
  right: -2.5rem;
  width: 17rem;
  height: 17rem;
  border: 22px solid rgba(5, 20, 40, 0.08);
  border-radius: 50%;
  content: "";
}

.repository-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: auto;
  color: var(--paper);
  background: var(--ink);
  border-radius: 0.75rem;
  font-size: 1.4rem;
  font-weight: 700;
  place-items: center;
}

.repository-meta {
  margin-bottom: 0.5rem;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.github-repository strong {
  max-width: none;
  font-size: clamp(1.1rem, 3vw, 2.65rem);
  letter-spacing: -0.065em;
  line-height: 1.01;
  white-space: nowrap;
}

.github-repository strong span {
  color: #1558a5;
}

.repository-arrow {
  position: absolute;
  right: 1.65rem;
  bottom: 1.2rem;
  font-size: 2.1rem;
  font-weight: 300;
  transition: transform 180ms ease;
}

.github-repository:hover .repository-arrow {
  transform: translate(4px, -4px);
}

.contact-cta {
  padding-block: clamp(7rem, 13vw, 10rem);
  text-align: center;
}

.contact-cta .eyebrow {
  justify-content: center;
}

.contact-cta h2 {
  max-width: 15ch;
  margin-right: auto;
  margin-left: auto;
}

.contact-cta > p:not(.eyebrow) {
  max-width: 42rem;
  margin: 0 auto 1.75rem;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer {
  display: grid;
  width: min(var(--max), calc(100% - 2.4rem));
  padding: 1.55rem 0 2.2rem;
  gap: 1rem;
  margin: 0 auto;
  color: var(--faint);
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  grid-template-columns: auto 1fr auto;
}

.site-footer .brand {
  align-self: center;
}

.site-footer p {
  margin: 0;
  align-self: center;
}

.site-footer p:nth-of-type(1) {
  text-align: center;
}

/* Inner pages */
.page-hero {
  display: grid;
  min-height: 430px;
  padding-block: clamp(5rem, 10vw, 8.5rem) clamp(4rem, 8vw, 6.5rem);
  gap: 2rem;
  align-items: end;
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(0, 1.1fr) minmax(13rem, 0.65fr);
}

.page-hero h1 {
  max-width: 11ch;
  margin-bottom: 0;
  font-size: clamp(3.3rem, 7vw, 6.3rem);
}

.page-hero-summary {
  max-width: 27rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.72;
}

.page-hero-index {
  padding-bottom: 0.85rem;
  color: var(--aqua);
  font-size: clamp(3.4rem, 8vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.09em;
  line-height: 0.7;
  text-align: right;
}

.page-hero-index span {
  display: block;
  margin-top: 1.1rem;
  color: var(--faint);
  font-size: 0.6rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-list {
  padding-block: clamp(4.5rem, 9vw, 7rem);
}

.project-list-head {
  display: flex;
  margin-bottom: 2rem;
  gap: 1.5rem;
  align-items: end;
  justify-content: space-between;
}

.project-list-head h2 {
  margin: 0;
  font-size: clamp(2.25rem, 4vw, 3.65rem);
}

.project-list-head p {
  max-width: 31rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.66;
}

.project-detail {
  display: grid;
  position: relative;
  min-height: 390px;
  padding: clamp(1.55rem, 4vw, 3.3rem);
  gap: 2rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 0.7fr 1.3fr;
}

.project-detail:first-of-type {
  border-top: 1px solid var(--line);
}

.project-detail::after {
  position: absolute;
  z-index: -1;
  top: 0;
  right: 3%;
  bottom: 0;
  width: 28%;
  background: radial-gradient(circle at center, rgba(125, 238, 255, 0.17), transparent 64%);
  content: "";
}

.project-detail:nth-of-type(odd)::after {
  right: auto;
  left: 3%;
  background: radial-gradient(circle at center, rgba(131, 98, 255, 0.18), transparent 64%);
}

.project-detail-meta {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  flex-direction: column;
}

.project-detail-index {
  color: var(--aqua);
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.project-detail-tag {
  padding: 0.34rem 0.56rem;
  color: var(--muted);
  background: rgba(175, 220, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-detail-content h2 {
  max-width: 13ch;
  font-size: clamp(2.35rem, 5vw, 4.55rem);
}

.project-detail-content > p {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.72;
}

.project-detail-areas {
  display: flex;
  flex-wrap: wrap;
  margin-top: 1.7rem;
  gap: 0.55rem;
}

.project-detail-areas span {
  padding: 0.42rem 0.65rem;
  color: var(--paper);
  background: rgba(125, 238, 255, 0.065);
  border: 1px solid rgba(125, 238, 255, 0.16);
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 690;
}

.future-note {
  display: flex;
  margin-top: 2.8rem;
  padding: 1.1rem 1.25rem;
  gap: 0.8rem;
  align-items: flex-start;
  color: var(--muted);
  background: rgba(125, 238, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.future-note strong {
  color: var(--aqua);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.future-note p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.58;
}

.principles-section {
  padding-block: clamp(4.5rem, 9vw, 7rem);
}

.principles-section > .eyebrow,
.principles-section > h2 {
  max-width: var(--max);
}

.principles-section > h2 {
  max-width: 14ch;
}

.principle-grid {
  display: grid;
  margin-top: 2.6rem;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.principle {
  min-height: 245px;
  padding: clamp(1.2rem, 3vw, 2rem);
  background: var(--ink-2);
}

.principle-number {
  display: block;
  margin-bottom: 3.5rem;
  color: var(--aqua);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.principle h3 {
  margin-bottom: 0.65rem;
  font-size: 1.65rem;
}

.principle p {
  max-width: 27rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.89rem;
  line-height: 1.63;
}

.engineering-cta {
  display: grid;
  padding-block: 1rem clamp(6rem, 11vw, 8.5rem);
  gap: 1.7rem;
  grid-template-columns: 1fr 1fr;
}

.engineering-cta-card {
  padding: clamp(1.45rem, 3.4vw, 2.6rem);
  background: linear-gradient(135deg, rgba(37, 79, 138, 0.56), rgba(13, 31, 59, 0.72));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.engineering-cta-card h2 {
  max-width: 11ch;
  margin-bottom: 0.8rem;
  font-size: clamp(2rem, 3.8vw, 3.25rem);
}

.engineering-cta-card p {
  max-width: 30rem;
  color: var(--muted);
  line-height: 1.66;
}

.github-card-link {
  display: flex;
  position: relative;
  padding: clamp(1.45rem, 3.4vw, 2.6rem);
  overflow: hidden;
  justify-content: space-between;
  background: var(--aqua);
  border-radius: var(--radius);
  color: var(--ink);
  flex-direction: column;
  transition: transform 200ms ease;
}

.github-card-link:hover {
  transform: translateY(-4px);
}

.github-card-link::after {
  position: absolute;
  right: -12%;
  bottom: -34%;
  width: 17rem;
  height: 17rem;
  border: 20px solid rgba(7, 17, 31, 0.08);
  border-radius: 50%;
  content: "";
}

.github-card-link span {
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.github-card-link strong {
  z-index: 1;
  max-width: 10ch;
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: -0.075em;
  line-height: 0.95;
}

.github-card-link b {
  z-index: 1;
  color: #134e91;
  font-size: 0.78rem;
  font-weight: 760;
}

.github-card-link i {
  position: absolute;
  z-index: 1;
  right: 1.4rem;
  bottom: 1rem;
  font-size: 2rem;
  font-style: normal;
}

.contact-layout {
  display: grid;
  padding-block: clamp(4.5rem, 9vw, 7rem);
  gap: 1rem;
  grid-template-columns: 1.3fr 0.7fr;
}

.channel-card {
  display: flex;
  min-height: 280px;
  padding: clamp(1.5rem, 4vw, 3rem);
  justify-content: space-between;
  background: rgba(13, 29, 54, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  flex-direction: column;
}

.channel-card.active {
  background:
    radial-gradient(circle at 82% 20%, rgba(125, 238, 255, 0.18), transparent 15rem),
    linear-gradient(135deg, rgba(27, 65, 117, 0.91), rgba(9, 27, 54, 0.9));
}

.channel-card-icon {
  display: grid;
  width: 46px;
  height: 46px;
  color: var(--ink);
  background: var(--aqua);
  border-radius: 0.8rem;
  font-size: 1.5rem;
  font-weight: 700;
  place-items: center;
}

.channel-card.pending .channel-card-icon {
  color: var(--aqua);
  background: rgba(125, 238, 255, 0.1);
  border: 1px solid rgba(125, 238, 255, 0.25);
}

.channel-card h2 {
  max-width: 11ch;
  margin-bottom: 0.72rem;
  font-size: clamp(2rem, 3.8vw, 3.25rem);
}

.channel-card p {
  max-width: 29rem;
  margin-bottom: 1.2rem;
  color: var(--muted);
  line-height: 1.63;
}

.channel-card .button {
  align-self: flex-start;
}

.channel-card-small {
  min-height: 0;
}

.channel-card-small h2 {
  font-size: 1.55rem;
}

.contact-note {
  padding: clamp(1.5rem, 4vw, 3rem);
  background: linear-gradient(145deg, rgba(50, 39, 115, 0.75), rgba(10, 25, 47, 0.74));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-note h2 {
  max-width: 11ch;
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.contact-note p {
  max-width: 28rem;
  color: var(--muted);
  line-height: 1.68;
}

.contact-note-list {
  display: grid;
  padding: 0;
  margin: 1.65rem 0 0;
  gap: 0.8rem;
  list-style: none;
}

.contact-note-list li {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  color: var(--paper);
  font-size: 0.86rem;
  font-weight: 680;
}

.contact-note-list li::before {
  width: 0.44rem;
  height: 0.44rem;
  background: var(--aqua);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(125, 238, 255, 0.76);
  content: "";
}

.contact-ready {
  padding-bottom: clamp(5.5rem, 11vw, 8rem);
}

.contact-ready-inner {
  display: grid;
  padding: clamp(1.4rem, 3.4vw, 2.4rem);
  gap: 1rem;
  background: rgba(125, 238, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  grid-template-columns: 0.5fr 1.5fr;
}

.contact-ready strong {
  color: var(--aqua);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-ready p {
  max-width: 44rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}


/* ========== Progress bar ========== */
.progress-bar {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--aqua), var(--electric));
  box-shadow: 0 0 12px rgba(125, 238, 255, 0.55);
  pointer-events: none;
  transition: width 40ms linear;
}

/* ========== Header scroll state ========== */
.site-header.is-scrolled {
  backdrop-filter: blur(16px);
  background: rgba(7, 17, 31, 0.78);
  border-bottom-color: rgba(190, 219, 255, 0.12);
}

/* ========== Scroll Journey ========== */
.journey {
  position: relative;
  height: 420vh;
}

.journey-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
}


.journey-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  /* GPU layer; helps iOS composite cheaper when scrolling */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.journey-ambient .ambient-layer {
  z-index: 0;
}

.journey-ambient .ambient-particles,
.journey-ambient .ambient-orb {
  z-index: 2;
}

/* Dim CSS orbs a bit when WebGL is active so 3D reads clearer */
.journey-canvas ~ .ambient-orb {
  opacity: 0.28;
}

.journey-canvas ~ .ambient-particles {
  opacity: 0.25;
}

.journey-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.ambient-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.ambient-base {
  opacity: 1;
  background:
    radial-gradient(circle at 20% 30%, rgba(81, 166, 255, 0.14), transparent 42%),
    radial-gradient(circle at 80% 70%, rgba(123, 97, 255, 0.12), transparent 46%),
    var(--ink);
}

.ambient-nexo {
  background:
    radial-gradient(circle at 30% 40%, rgba(81, 166, 255, 0.28), transparent 45%),
    radial-gradient(circle at 70% 60%, rgba(30, 90, 180, 0.18), transparent 50%),
    linear-gradient(160deg, #06101e 0%, #0a1f3a 100%);
}

.ambient-voiceforge {
  background:
    radial-gradient(circle at 70% 35%, rgba(123, 97, 255, 0.32), transparent 48%),
    radial-gradient(circle at 25% 75%, rgba(180, 90, 255, 0.16), transparent 50%),
    linear-gradient(160deg, #0a0618 0%, #1a0f30 100%);
}

.ambient-zamerim {
  background:
    radial-gradient(circle at 40% 30%, rgba(255, 170, 80, 0.18), transparent 45%),
    radial-gradient(circle at 75% 70%, rgba(217, 255, 112, 0.10), transparent 48%),
    linear-gradient(160deg, #100c08 0%, #1e160c 100%);
}

.ambient-peo {
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 220, 112, 0.22), transparent 45%),
    radial-gradient(circle at 76% 70%, rgba(86, 190, 165, 0.16), transparent 50%),
    linear-gradient(160deg, #101006 0%, #182318 100%);
}

.ambient-layer.is-active {
  opacity: 1;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.55;
  transition: background 0.8s ease, transform 0.8s ease;
}

.ambient-orb-a {
  width: 28rem;
  height: 28rem;
  top: -8%;
  right: -6%;
  background: rgba(81, 166, 255, 0.22);
}

.ambient-orb-b {
  width: 22rem;
  height: 22rem;
  bottom: -10%;
  left: -4%;
  background: rgba(123, 97, 255, 0.18);
}

.journey[data-active="voiceforge"] .ambient-orb-a {
  background: rgba(160, 100, 255, 0.28);
  transform: translate(-10%, 8%);
}

.journey[data-active="voiceforge"] .ambient-orb-b {
  background: rgba(200, 120, 255, 0.16);
}

.journey[data-active="zamerim"] .ambient-orb-a {
  background: rgba(255, 180, 80, 0.2);
  transform: translate(-6%, 12%);
}

.journey[data-active="zamerim"] .ambient-orb-b {
  background: rgba(217, 255, 112, 0.12);
}

.journey[data-active="peo"] .ambient-orb-a {
  background: rgba(255, 220, 112, 0.2);
  transform: translate(-8%, 10%);
}

.journey[data-active="peo"] .ambient-orb-b {
  background: rgba(86, 190, 165, 0.14);
}

.ambient-particles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1.5px 1.5px at 48% 68%, rgba(125,238,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 78% 18%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1.5px 1.5px at 32% 84%, rgba(123,97,255,0.35), transparent),
    radial-gradient(1.5px 1.5px at 88% 52%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1.5px 1.5px at 58% 38%, rgba(125,238,255,0.3), transparent);
  opacity: 0.55;
  animation: particle-drift 28s linear infinite;
}

@keyframes particle-drift {
  from { transform: translateY(0); }
  to { transform: translateY(-40px); }
}

.journey-progress {
  position: absolute;
  z-index: 4;
  top: 50%;
  right: max(1.2rem, calc((100vw - var(--max)) / 2));
  width: 3px;
  height: 140px;
  transform: translateY(-50%);
  background: rgba(190, 219, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.journey-progress-fill {
  display: block;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--aqua), var(--electric));
  border-radius: inherit;
  transition: height 80ms linear;
}

.journey-label {
  position: absolute;
  z-index: 4;
  top: max(5.5rem, 12vh);
  left: max(1.2rem, calc((100vw - var(--max)) / 2));
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
}

.journey-label-index {
  color: var(--aqua);
  font-size: 0.9rem;
  font-weight: 850;
}

.journey-label-name {
  color: var(--paper);
}

.journey-panels {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 2.4rem));
  height: 100%;
  margin: 0 auto;
}

.journey-panel {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s;
  pointer-events: none;
}

.journey-panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.panel-inner {
  max-width: 36rem;
  padding: 1rem 0;
}

.panel-meta {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 1.1rem;
}

.panel-index {
  color: var(--aqua);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.panel-tag {
  padding: 0.28rem 0.55rem;
  color: var(--muted);
  background: rgba(216, 239, 255, 0.06);
  border: 1px solid rgba(216, 239, 255, 0.12);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.panel-inner h2 {
  max-width: 12ch;
  margin-bottom: 1.1rem;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.panel-copy {
  max-width: 34rem;
  margin-bottom: 1.4rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.panel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.7rem;
}

.panel-chips span {
  padding: 0.4rem 0.65rem;
  color: var(--paper);
  background: rgba(125, 238, 255, 0.07);
  border: 1px solid rgba(125, 238, 255, 0.16);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 680;
}

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

.visual-card {
  width: min(100%, 320px);
  min-height: 280px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(8, 18, 34, 0.72);
  border: 1px solid rgba(174, 222, 255, 0.22);
  border-radius: 1.4rem;
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.visual-card-label {
  color: var(--aqua);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.visual-card strong {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.visual-nodes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}

.visual-nodes i {
  display: block;
  height: 42px;
  background: linear-gradient(135deg, rgba(81, 166, 255, 0.25), rgba(123, 97, 255, 0.15));
  border: 1px solid rgba(125, 238, 255, 0.2);
  border-radius: 0.7rem;
  animation: pulse-node 3.2s ease-in-out infinite;
}

.visual-nodes i:nth-child(2) { animation-delay: 0.4s; }
.visual-nodes i:nth-child(3) { animation-delay: 0.8s; }
.visual-nodes i:nth-child(4) { animation-delay: 1.2s; }

@keyframes pulse-node {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

.wave-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.28rem;
  height: 72px;
}

.wave-bars i {
  flex: 1;
  height: 30%;
  background: linear-gradient(180deg, #c4a0ff, #7b61ff);
  border-radius: 999px;
  animation: wave 1.1s ease-in-out infinite;
}

.wave-bars i:nth-child(odd) { animation-duration: 0.9s; }
.wave-bars i:nth-child(3n) { animation-duration: 1.3s; height: 55%; }
.wave-bars i:nth-child(4n) { height: 80%; }
.wave-bars i:nth-child(5n) { height: 40%; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1); }
}

.kit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.kit-grid i {
  display: block;
  height: 48px;
  background: linear-gradient(145deg, rgba(255, 190, 100, 0.22), rgba(217, 255, 112, 0.12));
  border: 1px solid rgba(255, 200, 120, 0.28);
  border-radius: 0.65rem;
}

.kit-grid i:nth-child(2) { border-radius: 1.2rem 0.4rem; }
.kit-grid i:nth-child(3) { border-radius: 0.4rem 1.2rem; }
.kit-grid i:nth-child(4) { border-radius: 0.9rem; }

/* Reduced motion: disable heavy ambient */
@media (max-width: 850px) {

  .journey {
    height: auto;
  }

  .journey-sticky {
    position: relative;
    height: auto;
    display: block;
    overflow: visible;
  }

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

.journey-ambient .ambient-layer {
  z-index: 0;
}

.journey-ambient .ambient-particles,
.journey-ambient .ambient-orb {
  z-index: 2;
}

/* Dim CSS orbs a bit when WebGL is active so 3D reads clearer */
.journey-canvas ~ .ambient-orb {
  opacity: 0.28;
}

.journey-canvas ~ .ambient-particles {
  opacity: 0.25;
}

.journey-ambient {
    display: none;
  }

  .journey-progress,
  .journey-label {
    display: none;
  }

  .journey-panels {
    width: min(var(--max), calc(100% - 1.5rem));
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 3rem 0;
  }

  .journey-panel {
    position: relative;
    inset: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding: 1.5rem;
    background: rgba(13, 29, 54, 0.65);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .journey-panel {
    display: flex;
    flex-direction: column;
  }

  .panel-inner {
    order: 1;
  }

  .panel-visual {
    min-height: 0;
    order: 2;
  }

  .visual-card {
    width: 100%;
    min-height: 180px;
  }

  .panel-inner h2 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

}

@media (prefers-reduced-motion: reduce) {
  .ambient-particles { animation: none; }
  .wave-bars i,
  .visual-nodes i { animation: none; }
  .journey-panel {
    transition: none;
  }
}


@media (max-width: 850px) {
  .site-header {
    min-height: 74px;
  }

  .menu-button {
    display: block;
  }

  .main-navigation {
    display: none;
    position: absolute;
    top: calc(100% + 0.7rem);
    right: 0;
    left: 0;
    padding: 0.8rem;
    gap: 0.1rem;
    background: rgba(7, 17, 31, 0.97);
    border: 1px solid var(--line-strong);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    flex-direction: column;
  }

  .main-navigation.is-open {
    display: flex;
  }

  .main-navigation > a {
    width: 100%;
    padding: 0.85rem;
    border-radius: 0.6rem;
  }

  .main-navigation > a:hover,
  .main-navigation > a.is-active {
    background: rgba(125, 238, 255, 0.075);
  }

  .main-navigation > a::after {
    display: none;
  }

  .main-navigation > a.nav-github {
    margin-top: 0.35rem;
    text-align: center;
  }

  .menu-open {
    overflow: hidden;
  }

  .hero {
    min-height: 0;
    padding-top: 4rem;
    padding-bottom: 4rem;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 0;
  }

  .hero-map {
    min-height: 450px;
  }

  .section-heading,
  .philosophy,
  .github-panel,
  .page-hero,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .page-hero-index {
    padding-bottom: 0;
    text-align: left;
  }

  .section-heading > p:not(.eyebrow) {
    max-width: 38rem;
  }

  .philosophy {
    gap: 3.4rem;
  }

  .philosophy-visual {
    min-height: 390px;
  }

  .github-panel-copy,
  .github-repository {
    min-height: 300px;
  }

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

  .project-detail-meta {
    flex-direction: row;
    align-items: center;
  }

  .engineering-cta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 590px) {
  .section-frame,
  .site-header,
  .site-footer {
    width: min(var(--max), calc(100% - 1.5rem));
  }

  .hero {
    gap: 2.4rem;
  }

  h1 {
    max-width: 8.5ch;
    font-size: clamp(3.3rem, 17vw, 4.55rem);
  }

  h2 {
    font-size: clamp(2.45rem, 11vw, 3.45rem);
  }

  .hero-map {
    min-height: 416px;
    border-radius: 1.35rem;
  }

  .map-core {
    width: 8rem;
    height: 8rem;
  }

  .map-core strong {
    font-size: 0.93rem;
  }

  .node-nexo {
    top: 10%;
    left: 5%;
  }

  .node-zamerim {
    top: 13%;
    right: 3%;
  }

  .node-voiceforge {
    right: 2%;
    bottom: 11%;
  }

  .node-peo {
    left: 3%;
    bottom: 9%;
  }

  .map-node {
    min-width: 95px;
    padding: 0.55rem 0.57rem 0.52rem 1.15rem;
  }

  .map-node strong {
    font-size: 0.46rem;
  }

  .map-node small {
    max-width: 9ch;
    font-size: 0.48rem;
    white-space: normal;
  }

  .node-dot {
    top: 0.67rem;
    left: 0.48rem;
  }

  .line-one {
    top: 29%;
    left: 27%;
    width: 35%;
  }

  .line-two {
    top: 35%;
    left: 52%;
    width: 36%;
  }

  .line-three {
    top: 63%;
    left: 48%;
    width: 35%;
  }

  .signal-strip {
    min-height: 74px;
    justify-content: flex-start;
    overflow-x: auto;
  }

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

  .project-card-featured {
    grid-column: span 1;
  }

  .project-card {
    min-height: 278px;
    border-radius: 1.2rem;
  }

  .project-card-featured {
    min-height: 320px;
  }

  .project-list-head {
    display: block;
  }

  .project-list-head h2 {
    margin-bottom: 1rem;
  }

  .project-detail {
    min-height: 0;
    padding: 1.35rem 0;
    gap: 1.3rem;
  }

  .project-detail-content h2 {
    font-size: clamp(2.35rem, 12vw, 3.4rem);
  }

  .project-detail::after {
    width: 60%;
  }

  .contact-ready-inner {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding-bottom: 1.7rem;
    grid-template-columns: 1fr;
  }

  .site-footer p:nth-of-type(1) {
    text-align: left;
  }
}

@media (max-width: 850px) {

  .journey {
    height: auto;
  }

  .journey-sticky {
    position: relative;
    height: auto;
    display: block;
    overflow: visible;
  }

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

.journey-ambient .ambient-layer {
  z-index: 0;
}

.journey-ambient .ambient-particles,
.journey-ambient .ambient-orb {
  z-index: 2;
}

/* Dim CSS orbs a bit when WebGL is active so 3D reads clearer */
.journey-canvas ~ .ambient-orb {
  opacity: 0.28;
}

.journey-canvas ~ .ambient-particles {
  opacity: 0.25;
}

.journey-ambient {
    display: none;
  }

  .journey-progress,
  .journey-label {
    display: none;
  }

  .journey-panels {
    width: min(var(--max), calc(100% - 1.5rem));
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 3rem 0;
  }

  .journey-panel {
    position: relative;
    inset: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding: 1.5rem;
    background: rgba(13, 29, 54, 0.65);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .journey-panel {
    display: flex;
    flex-direction: column;
  }

  .panel-inner {
    order: 1;
  }

  .panel-visual {
    min-height: 0;
    order: 2;
  }

  .visual-card {
    width: 100%;
    min-height: 180px;
  }

  .panel-inner h2 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

}

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

@media (max-width: 850px) {

  /* WebGL may still run on a low profile; CSS ambient remains as fallback */
  .journey-canvas {
    opacity: 0.9;
  }
}


/* Stronger panel visual identity tied to 3D themes */
.journey[data-active="nexo"] .panel-visual-nexo .visual-card {
  border-color: rgba(81, 166, 255, 0.45);
  box-shadow: 0 24px 60px rgba(81, 166, 255, 0.18);
}

.journey[data-active="voiceforge"] .panel-visual-voiceforge .visual-card {
  border-color: rgba(155, 107, 255, 0.5);
  box-shadow: 0 24px 60px rgba(123, 97, 255, 0.22);
}

.journey[data-active="zamerim"] .panel-visual-zamerim .visual-card {
  border-color: rgba(255, 178, 74, 0.45);
  box-shadow: 0 24px 60px rgba(255, 178, 74, 0.16);
}

.journey-panel .panel-visual {
  opacity: 0.92;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.journey-panel.is-active .panel-visual {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.journey-panel:not(.is-active) .panel-visual {
  transform: translateY(12px) scale(0.98);
}


/* ========== Boot / page enter ========== */
.boot-loader {
  position: fixed;
  z-index: 200;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--aqua), var(--electric), transparent);
  background-size: 200% 100%;
  animation: boot-slide 1.1s ease-out forwards;
  pointer-events: none;
  opacity: 0;
}

body.is-booting .boot-loader {
  opacity: 1;
}

@keyframes boot-slide {
  0% { background-position: 100% 0; opacity: 1; }
  70% { opacity: 1; }
  100% { background-position: -100% 0; opacity: 0; }
}

/* Boot no longer hides main — protects LCP */

/* ========== Project status badges ========== */
.project-detail-status {
  margin-top: 0.35rem;
  padding: 0.28rem 0.55rem;
  color: var(--aqua);
  background: rgba(125, 238, 255, 0.08);
  border: 1px solid rgba(125, 238, 255, 0.2);
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-detail-status.is-build {
  color: #ffc56e;
  background: rgba(255, 178, 74, 0.08);
  border-color: rgba(255, 178, 74, 0.22);
}

.project-detail-nexo::after {
  background: radial-gradient(circle at center, rgba(81, 166, 255, 0.2), transparent 64%);
}

.project-detail-voiceforge::after {
  background: radial-gradient(circle at center, rgba(155, 107, 255, 0.22), transparent 64%);
}

.project-detail-zamerim::after {
  background: radial-gradient(circle at center, rgba(255, 178, 74, 0.18), transparent 64%);
}

.project-detail-peo::after {
  background: radial-gradient(circle at center, rgba(255, 220, 112, 0.17), transparent 64%);
}

.visual-card-peo {
  border-color: rgba(255, 220, 112, 0.28);
  background: linear-gradient(145deg, rgba(38, 43, 18, 0.88), rgba(9, 20, 18, 0.8));
}

.peo-path {
  display: flex;
  margin-top: 1.4rem;
  gap: 0.55rem;
  align-items: center;
}

.peo-path i {
  display: block;
  width: 0.68rem;
  height: 0.9rem;
  background: linear-gradient(180deg, #fff4b5, #d7bd58);
  border-radius: 50% 50% 46% 46%;
  box-shadow: 0 0 15px rgba(255, 220, 112, 0.22);
}

.peo-path i:nth-child(even) { transform: translateY(0.65rem); }

.journey[data-active="peo"] .panel-visual-peo .visual-card {
  border-color: rgba(255, 220, 112, 0.52);
  box-shadow: 0 30px 90px rgba(53, 75, 31, 0.3);
}

/* ========== Living project system ========== */
.map-core {
  overflow: hidden;
  isolation: isolate;
}

.map-core::before,
.map-core::after {
  content: "";
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(125, 238, 255, 0.16);
  border-radius: 50%;
  animation: core-orbit 9s linear infinite;
  pointer-events: none;
}

.map-core::after {
  inset: 18%;
  border-color: rgba(123, 97, 255, 0.2);
  animation-direction: reverse;
  animation-duration: 6s;
}

.core-projects {
  position: relative;
  width: 9rem;
  height: 1rem;
  display: block;
  overflow: hidden;
  color: rgba(214, 237, 255, 0.72);
  font-size: 0.48rem;
  font-weight: 760;
  letter-spacing: 0.12em;
  line-height: 1rem;
  text-align: center;
}

.core-projects b {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(100%);
  animation: core-project 15s ease-in-out infinite;
}

.core-projects b:nth-child(2) { animation-delay: 3s; }
.core-projects b:nth-child(3) { animation-delay: 6s; }
.core-projects b:nth-child(4) { animation-delay: 9s; }
.core-projects b:nth-child(5) { animation-delay: 12s; }

.map-line {
  background-image: linear-gradient(90deg, transparent, rgba(125, 238, 255, 0.76), transparent);
  background-size: 220% 100%;
  animation: data-flow 3.2s linear infinite;
}

.map-node {
  animation: node-breathe 4.2s ease-in-out infinite;
}

.map-node:nth-of-type(even) { animation-delay: -2.1s; }

@keyframes core-project {
  0%, 17% { opacity: 0; transform: translateY(100%); }
  4%, 16% { opacity: 1; transform: translateY(0); }
  20%, 100% { opacity: 0; transform: translateY(-100%); }
}

@keyframes core-orbit { to { transform: rotate(360deg); } }
@keyframes data-flow { to { background-position: -220% 0; } }
@keyframes node-breathe { 0%, 100% { filter: brightness(0.92); } 50% { filter: brightness(1.22); } }

/* Nexo: files feeding a connected memory graph */
.nexo-network {
  position: relative;
  height: 126px;
  margin-top: 1.15rem;
}

.nexo-network::before {
  content: "";
  position: absolute;
  inset: 4px 12%;
  background: radial-gradient(circle at center, rgba(81, 166, 255, 0.2), transparent 58%);
  filter: blur(8px);
}

.nexo-node {
  position: absolute;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: rgba(225, 247, 255, 0.82);
  background: linear-gradient(145deg, rgba(21, 58, 100, 0.96), rgba(17, 24, 70, 0.92));
  border: 1px solid rgba(125, 238, 255, 0.35);
  border-radius: 11px;
  box-shadow: 0 0 22px rgba(81, 166, 255, 0.18);
  animation: nexo-float 3.8s ease-in-out infinite;
}

.nexo-node b { font-size: 0.48rem; letter-spacing: 0.08em; }
.nexo-node.node-core { left: calc(50% - 26px); top: 37px; width: 52px; height: 52px; border-radius: 50%; color: #7deeff; box-shadow: 0 0 30px rgba(81, 166, 255, 0.38); }
.nexo-node.node-memory { left: 3%; top: 2px; }
.nexo-node.node-file-a { right: 3%; top: 2px; animation-delay: -0.8s; }
.nexo-node.node-file-b { left: 5%; bottom: 2px; animation-delay: -1.7s; }
.nexo-node.node-context { right: 5%; bottom: 2px; animation-delay: -2.5s; }

.nexo-link {
  position: absolute;
  z-index: 1;
  left: 22%;
  top: 34%;
  width: 32%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #51a6ff, #7deeff);
  transform-origin: left center;
  opacity: 0.55;
}

.nexo-link.link-a { transform: rotate(20deg); }
.nexo-link.link-b { left: 48%; top: 49%; transform: rotate(-20deg); }
.nexo-link.link-c { top: 73%; transform: rotate(-20deg); }
.nexo-link.link-d { left: 48%; top: 57%; transform: rotate(20deg); }

.data-packet {
  position: absolute;
  z-index: 3;
  width: 6px;
  height: 6px;
  background: #baf7ff;
  border-radius: 50%;
  box-shadow: 0 0 12px #51a6ff;
  animation: packet-travel 3.4s ease-in-out infinite;
}

.packet-a { left: 17%; top: 21%; }
.packet-b { right: 17%; bottom: 18%; animation-delay: -1.7s; }

@keyframes nexo-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes packet-travel { 0% { opacity: 0; transform: translate(0,0); } 15% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(82px,42px); } }

/* VoiceForge: layered pitch, waveform and live metrics */
.visual-card-wave {
  background: radial-gradient(circle at 78% 18%, rgba(155, 107, 255, 0.19), transparent 42%), rgba(8, 18, 34, 0.78);
}

.voice-stage { position: relative; min-height: 120px; margin-top: 1rem; overflow: hidden; }
.voice-stage::before { content: ""; position: absolute; inset: 18px 0 30px; background: repeating-linear-gradient(0deg, rgba(196,160,255,.06) 0 1px, transparent 1px 18px); }
.voice-note { display: flex; align-items: baseline; justify-content: space-between; color: #c4a0ff; }
.voice-note span, .voice-metrics span { font-size: .43rem; font-weight: 760; letter-spacing: .1em; }
.voice-note b { font-size: 1rem; text-shadow: 0 0 18px rgba(196,160,255,.58); }
.voice-stage .wave-bars { position: relative; z-index: 2; height: 58px; gap: .2rem; align-items: center; }
.voice-stage .wave-bars i { transform-origin: center; background: linear-gradient(180deg,#80efff,#9b6bff 55%,#e793ff); box-shadow: 0 0 8px rgba(155,107,255,.25); }
.voice-stage .wave-bars i:nth-child(2n) { animation-delay: -.35s; }
.voice-stage .wave-bars i:nth-child(3n) { animation-delay: -.7s; }
.pitch-line { position: absolute; z-index: 3; left: 0; top: 50%; width: 38%; height: 1px; background: linear-gradient(90deg,transparent,#fff,#7deeff,transparent); box-shadow: 0 0 8px #7deeff; animation: pitch-scan 3.5s ease-in-out infinite; }
.voice-metrics { display: flex; justify-content: space-between; color: rgba(220,211,255,.62); }
.voice-particle { position: absolute; width: 3px; height: 3px; border-radius: 50%; background:#e7c8ff; box-shadow:0 0 8px #9b6bff; animation: voice-drift 3s ease-in-out infinite; }
.voice-particle.p1 { left:20%; top:48%; }.voice-particle.p2 { left:62%; top:33%; animation-delay:-1s }.voice-particle.p3 { right:8%; top:60%; animation-delay:-2s }
@keyframes pitch-scan { 0%,100% { transform:translateX(-40%); opacity:0; } 20%,80% { opacity:1; } 50% { transform:translateX(205%); } }
@keyframes voice-drift { 0%,100% { opacity:.15; transform:translateY(8px) scale(.7); } 50% { opacity:1; transform:translateY(-8px) scale(1.2); } }

/* ZamerimDecore: a tiny Pegue e Monte scene */
.visual-card-kit { background: radial-gradient(circle at 25% 78%, rgba(255,178,74,.16), transparent 42%), rgba(8,18,34,.78); }
.decor-stage { position:relative; height:130px; margin-top:1rem; overflow:hidden; border-bottom:1px solid rgba(255,200,120,.25); }
.decor-arch { position:absolute; left:22%; bottom:12px; width:56%; height:96px; border:5px solid rgba(255,190,100,.3); border-bottom:0; border-radius:60px 60px 0 0; }
.decor-table { position:absolute; left:31%; bottom:10px; width:42%; height:32px; background:linear-gradient(180deg,rgba(255,220,150,.38),rgba(176,105,48,.18)); border:1px solid rgba(255,211,140,.42); border-radius:20px 20px 5px 5px; }
.decor-piece { position:absolute; z-index:2; display:block; animation: decor-place 5s cubic-bezier(.45,.05,.3,1) infinite; }
.piece-balloon { left:24%; top:22px; width:22px; height:28px; background:linear-gradient(145deg,#ffd46e,#ff895d); border-radius:50%; box-shadow:20px 7px 0 -2px rgba(125,238,255,.8),10px -9px 0 -3px rgba(213,123,255,.75); }
.piece-vase { left:47%; bottom:39px; width:18px; height:24px; background:linear-gradient(180deg,#d9ff70,#6da65d); clip-path:polygon(16% 0,84% 0,100% 100%,0 100%); animation-delay:-1.7s; }
.piece-gift { right:25%; bottom:15px; width:23px; height:23px; background:#9b6bff; border:2px solid #c4a0ff; border-radius:3px; animation-delay:-3.3s; }
.decor-hand { position:absolute; z-index:4; right:-8px; top:28px; width:67px; height:28px; background:linear-gradient(135deg,#d7a579,#b97755); border-radius:18px 3px 3px 18px; transform-origin:right center; animation: hand-place 5s ease-in-out infinite; box-shadow:0 8px 20px rgba(0,0,0,.25); }
.decor-hand i { position:absolute; left:-8px; top:4px; width:28px; height:9px; background:#d7a579; border-radius:10px; transform:rotate(-20deg); }
.decor-spark { position:absolute; z-index:5; color:#fff0a6; font-size:.7rem; animation:sparkle 2.2s ease-in-out infinite; }.spark-a{left:52%;top:23px}.spark-b{right:20%;bottom:38px;animation-delay:-1.1s}
@keyframes hand-place { 0%,100% { transform:translateX(30px) rotate(-6deg); opacity:.2; } 35%,65% { transform:translateX(-27px) rotate(4deg); opacity:1; } }
@keyframes decor-place { 0%,25% { transform:translateY(-9px); opacity:.25; } 45%,100% { transform:translateY(0); opacity:1; } }
@keyframes sparkle { 0%,100% { opacity:.15; transform:scale(.6) rotate(0); } 50% { opacity:1; transform:scale(1.25) rotate(90deg); } }

/* PEO: discreet RPG easter egg */
.peo-easter { position:relative; height:128px; margin-top:1rem; overflow:hidden; }
.peo-easter::before { content:""; position:absolute; inset:5px 12%; background:radial-gradient(circle,rgba(255,220,112,.14),transparent 65%); }
.egg-shadow { position:absolute; left:calc(50% - 30px); top:13px; width:60px; height:78px; background:linear-gradient(145deg,rgba(255,244,181,.88),rgba(190,158,53,.48)); border-radius:50% 50% 46% 46%; filter:drop-shadow(0 0 18px rgba(255,220,112,.24)); animation:egg-awaken 5s ease-in-out infinite; }
.egg-shadow::before { content:""; position:absolute; inset:8px 10px auto; height:19px; border-top:2px solid rgba(45,54,27,.48); transform:rotate(-11deg); clip-path:polygon(0 45%,25% 0,48% 80%,72% 20%,100% 65%,100% 100%,0 100%); }
.egg-shadow i { position:absolute; left:17px; top:35px; width:7px; height:7px; background:#26351f; border-radius:50%; box-shadow:21px 0 #26351f; }
.rpg-rune { position:absolute; color:rgba(255,240,166,.64); font-size:1rem; text-shadow:0 0 12px rgba(255,220,112,.5); animation:rune-orbit 6s ease-in-out infinite; }.rune-a{left:15%;top:23px}.rune-b{right:14%;top:47px;animation-delay:-2s}.rune-c{left:23%;bottom:25px;animation-delay:-4s}
.quest-path { position:absolute; left:30%; right:30%; bottom:24px; display:flex; justify-content:space-between; }.quest-path i{width:5px;height:5px;border-radius:50%;background:#d7bd58;box-shadow:0 0 8px rgba(255,220,112,.6);animation:path-light 2.4s ease-in-out infinite}.quest-path i:nth-child(2){animation-delay:.3s}.quest-path i:nth-child(3){animation-delay:.6s}.quest-path i:nth-child(4){animation-delay:.9s}
.peo-easter small { position:absolute; bottom:0; width:100%; color:rgba(255,240,166,.52); font-size:.43rem; font-weight:750; letter-spacing:.18em; text-align:center; }
@keyframes egg-awaken { 0%,100% { transform:translateY(3px) rotate(-1deg); } 50% { transform:translateY(-4px) rotate(1deg); filter:drop-shadow(0 0 25px rgba(255,220,112,.4)); } }
@keyframes rune-orbit { 0%,100% { opacity:.25; transform:translateY(4px) rotate(-8deg); } 50% { opacity:.85; transform:translateY(-5px) rotate(8deg); } }
@keyframes path-light { 0%,100% { opacity:.2; transform:scale(.7); } 50% { opacity:1; transform:scale(1.25); } }

@media (max-width: 480px) {
  .nexo-network, .decor-stage, .peo-easter { height:116px; }
  .visual-card { padding:1.35rem; }
}

html.reduce-motion .map-core::before,
html.reduce-motion .map-core::after,
html.reduce-motion .core-projects b,
html.reduce-motion .map-line,
html.reduce-motion .map-node,
html.reduce-motion .nexo-node,
html.reduce-motion .data-packet,
html.reduce-motion .wave-bars i,
html.reduce-motion .pitch-line,
html.reduce-motion .voice-particle,
html.reduce-motion .decor-piece,
html.reduce-motion .decor-hand,
html.reduce-motion .decor-spark,
html.reduce-motion .egg-shadow,
html.reduce-motion .rpg-rune,
html.reduce-motion .quest-path i {
  animation: none !important;
}

html.reduce-motion .core-projects b { opacity: 0; transform: none; }
html.reduce-motion .core-projects b:first-child { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .map-core::before, .map-core::after, .core-projects b, .map-line, .map-node,
  .nexo-node, .data-packet, .wave-bars i, .pitch-line, .voice-particle,
  .decor-piece, .decor-hand, .decor-spark, .egg-shadow, .rpg-rune, .quest-path i { animation:none !important; }
  .core-projects b { opacity:0; transform:none; }
  .core-projects b:first-child { opacity:1; }
}

html.visual-paused .map-core *,
html.visual-paused .panel-visual * {
  animation-play-state: paused !important;
}

/* ========== Neural network visual language ========== */
.map-code-rain {
  position: absolute;
  z-index: 0;
  inset: 3% 4%;
  overflow: hidden;
  opacity: 0.2;
  pointer-events: none;
  mask-image: radial-gradient(circle at center, transparent 12%, #000 52%, transparent 96%);
}

.map-code-rain i {
  position: absolute;
  top: -45%;
  color: #7deeff;
  font: 650 0.46rem/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
  text-shadow: 0 0 9px rgba(81, 166, 255, 0.9);
  animation: code-fall 9s linear infinite;
}

.map-code-rain i:nth-child(1) { left: 8%; }
.map-code-rain i:nth-child(2) { left: 29%; animation-delay: -5.2s; animation-duration: 11s; color: #9b6bff; }
.map-code-rain i:nth-child(3) { right: 27%; animation-delay: -2.4s; animation-duration: 8s; }
.map-code-rain i:nth-child(4) { right: 7%; animation-delay: -7s; animation-duration: 12s; color: #c4a0ff; }

.map-cubes { position: absolute; z-index: 1; inset: 0; pointer-events: none; }
.map-cubes i {
  position: absolute;
  width: 17px;
  height: 17px;
  border: 1px solid rgba(125, 238, 255, 0.46);
  box-shadow: inset 4px -4px 9px rgba(81, 166, 255, 0.13), 0 0 14px rgba(81, 166, 255, 0.16);
  transform: rotate(30deg) skew(-4deg);
  animation: cube-network 7s ease-in-out infinite;
}
.map-cubes i::before,.map-cubes i::after { content:""; position:absolute; background:rgba(125,238,255,.34); transform-origin:left center; }
.map-cubes i::before { left:50%; top:50%; width:clamp(35px,8vw,88px); height:1px; }
.map-cubes i::after { left:50%; top:50%; width:4px; height:4px; border-radius:50%; box-shadow:0 0 8px #7deeff; }
.map-cubes i:nth-child(1){left:20%;top:35%}.map-cubes i:nth-child(2){left:34%;top:19%;animation-delay:-1.2s}.map-cubes i:nth-child(3){right:29%;top:25%;animation-delay:-2.4s}.map-cubes i:nth-child(4){right:18%;top:49%;animation-delay:-3.6s}.map-cubes i:nth-child(5){right:34%;bottom:18%;animation-delay:-4.8s}.map-cubes i:nth-child(6){left:25%;bottom:23%;animation-delay:-6s}
.map-cubes i:nth-child(2n){border-color:rgba(166,107,255,.45);box-shadow:0 0 14px rgba(166,107,255,.18)}

@keyframes code-fall { from { transform: translateY(-15%); opacity:0; } 12%{opacity:1} 88%{opacity:1} to { transform:translateY(185%); opacity:0; } }
@keyframes cube-network { 0%,100%{opacity:.3;transform:translateY(3px) rotate(30deg) skew(-4deg)} 50%{opacity:.9;transform:translateY(-6px) rotate(42deg) skew(-4deg)} }

.nexo-intelligence {
  position: relative;
  min-height: 145px;
  margin-top: 0.7rem;
  overflow: hidden;
  border: 1px solid rgba(81,166,255,.12);
  border-radius: 1rem;
  background: radial-gradient(circle at 50% 48%,rgba(81,166,255,.18),transparent 42%),linear-gradient(145deg,rgba(5,15,32,.9),rgba(18,12,54,.58));
}

.nexo-code { position:absolute; z-index:1; inset:0; opacity:.27; overflow:hidden; }
.nexo-code i { position:absolute; top:-100%; height:200%; color:#7deeff; font:600 .34rem/1.68 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.055em; white-space:nowrap; animation:brain-code 7s linear infinite; will-change:transform; }
.nexo-code i span { display:flex; height:50%; flex-direction:column; justify-content:center; }
.nexo-code i:nth-child(1){left:1%;animation-duration:7s}.nexo-code i:nth-child(2){left:14%;animation-delay:-4.1s;animation-duration:8.6s;color:#9b6bff}.nexo-code i:nth-child(3){left:27%;animation-delay:-2.7s;animation-duration:7.7s}.nexo-code i:nth-child(4){left:40%;animation-delay:-5.8s;animation-duration:9.2s;color:#9b6bff}.nexo-code i:nth-child(5){left:53%;animation-delay:-3.4s;animation-duration:8.1s}.nexo-code i:nth-child(6){left:66%;animation-delay:-6.6s;animation-duration:9.7s;color:#9b6bff}.nexo-code i:nth-child(7){left:79%;animation-delay:-1.9s;animation-duration:7.4s}.nexo-code i:nth-child(8){left:91%;animation-delay:-7.2s;animation-duration:9s;color:#9b6bff}
.nexo-decrypt { position:absolute; z-index:1; top:50%; right:0; left:0; color:rgba(196,160,255,.42); font:800 clamp(.56rem,1.5vw,.76rem)/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.16em; text-align:center; text-shadow:0 0 7px #9b6bff,0 0 20px rgba(81,166,255,.8); transform:translateY(-50%); }
.nexo-decrypt::after { display:block; min-height:1em; margin-top:.55rem; color:rgba(168,186,213,.5); font-size:.45em; letter-spacing:.24em; content:"VERIFYING ACCESS"; }
.nexo-decrypt.is-failed { color:rgba(255,111,145,.48); text-shadow:0 0 12px rgba(255,72,120,.65); }
.nexo-decrypt.is-failed::after { content:"ACCESS DENIED"; color:rgba(255,111,145,.62); }
.nexo-decrypt.is-granted { color:rgba(125,238,255,.88); text-shadow:0 0 7px #7deeff,0 0 28px #51a6ff; animation:decrypt-granted .72s ease-out both; }
.nexo-decrypt.is-granted::after { content:"ACCESS GRANTED · CORE ONLINE"; color:rgba(125,238,255,.78); }

.neural-brain { position:absolute; z-index:2; inset:5px 4% 12px; width:92%; height:calc(100% - 17px); overflow:visible; opacity:0; filter:drop-shadow(0 0 10px rgba(81,166,255,.2)); transform:scale(.86); transform-origin:center; transition:opacity .28s ease,transform .28s ease; }
.brain-outline { fill:rgba(13,29,54,.62); stroke:url(#brain-line); stroke-width:1.2; stroke-dasharray:6 4; animation:brain-dash 12s linear infinite; }
.brain-links path { fill:none; stroke:url(#brain-line); stroke-width:1; opacity:.72; filter:url(#brain-glow); }
.brain-nodes circle { fill:#7deeff; stroke:rgba(242,246,255,.8); stroke-width:.7; filter:url(#brain-glow); animation:neuron-fire 3.2s ease-in-out infinite; transform-box:fill-box; transform-origin:center; }
.brain-nodes circle:nth-child(3n){animation-delay:-1s;fill:#9b6bff}.brain-nodes circle:nth-child(2n){animation-delay:-2s}
.neural-brain text { fill:#f2f6ff; font:800 8px ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:1.5px; filter:url(#brain-glow); }
.nexo-sources { position:absolute; z-index:3; right:8px; bottom:5px; left:8px; display:flex; justify-content:space-between; color:rgba(168,186,213,.72); font-size:.36rem; font-weight:750; letter-spacing:.12em; opacity:0; transform:translateY(6px); transition:opacity .35s ease .55s,transform .35s ease .55s; }
.nexo-intelligence.is-unlocked .neural-brain { opacity:1; transform:scale(1); animation:brain-unlock .9s cubic-bezier(.2,.85,.25,1) both; }
.nexo-intelligence.is-unlocked .nexo-sources { opacity:1; transform:translateY(0); }
.nexo-intelligence.is-unlocked .nexo-decrypt { animation:decrypt-clear .7s ease .75s forwards; }

@keyframes brain-code { from { transform:translateY(0); } to { transform:translateY(50%); } }
@keyframes brain-dash { to { stroke-dashoffset:-100; } }
@keyframes neuron-fire { 0%,100%{opacity:.45;transform:scale(.75)} 45%,60%{opacity:1;transform:scale(1.35)} }
@keyframes decrypt-granted { 0%{opacity:.3;filter:brightness(2.2);transform:translateY(-50%) scale(.94)} 45%{opacity:1;transform:translateY(-50%) scale(1.08)} 100%{transform:translateY(-50%) scale(1)} }
@keyframes decrypt-clear { to{opacity:0;filter:blur(5px);transform:translateY(-50%) scale(1.12)} }
@keyframes brain-unlock { 0%{opacity:0;transform:scale(.72);filter:drop-shadow(0 0 0 transparent) brightness(2.5)} 55%{opacity:1;transform:scale(1.06);filter:drop-shadow(0 0 24px rgba(125,238,255,.85)) brightness(1.45)} 100%{opacity:1;transform:scale(1);filter:drop-shadow(0 0 10px rgba(81,166,255,.2)) brightness(1)} }

@media (max-width:850px){
  .map-code-rain{opacity:.15}.map-code-rain i{font-size:.4rem}.map-cubes i:nth-child(n+5){display:none}
  .nexo-intelligence{min-height:132px}
}

@media (max-width:420px){
  .map-code-rain i:nth-child(2),.map-code-rain i:nth-child(4){display:none}
  .map-cubes i:nth-child(n+4){display:none}
  .nexo-code{opacity:.24}.nexo-code i{font-size:.31rem}
}

html.reduce-motion .map-code-rain i,
html.reduce-motion .map-cubes i,
html.reduce-motion .nexo-code i,
html.reduce-motion .brain-outline,
html.reduce-motion .brain-nodes circle { animation:none!important; }

@media (prefers-reduced-motion:reduce){
  .map-code-rain i,.map-cubes i,.nexo-code i,.brain-outline,.brain-nodes circle{animation:none!important}
}

/* ========== NBL live neural ecosystem ========== */
.ecosystem-neural-canvas {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.18;
  transition:opacity .8s ease;
  pointer-events: none;
}

.hero-map:has(.ecosystem-neural-canvas) .hero-background-logo { opacity: 0.12; filter: saturate(.75) contrast(1.1); }
.hero-map:has(.ecosystem-neural-canvas) .hero-brand-scrim { background: radial-gradient(circle at center,rgba(7,17,31,.06),rgba(7,17,31,.62) 78%); }
.hero-map:has(.ecosystem-neural-canvas) .map-grid { opacity: .16; }
.hero-map:has(.ecosystem-neural-canvas) .map-code-rain { z-index: 2; opacity: .3; mask-image:linear-gradient(90deg,#000,transparent 38%,transparent 62%,#000); }
.hero-map:has(.ecosystem-neural-canvas) .map-cubes { z-index: 2; }

.neural-core {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: 98px;
  height: 98px;
  display: grid;
  align-content: center;
  justify-items: center;
  color: #f2f6ff;
  background: radial-gradient(circle,rgba(14,52,98,.92),rgba(7,17,31,.38) 64%,transparent 68%);
  border-radius: 50%;
  transform: translate(-50%,-50%);
  filter: drop-shadow(0 0 24px rgba(81,166,255,.48));
  pointer-events: none;
}
.neural-core::before,.neural-core::after { content:""; position:absolute; inset:-10px; border:1px solid rgba(125,238,255,.34); border-radius:44% 56% 52% 48%; animation:neural-membrane 7s linear infinite; }
.neural-core::after { inset:-21px; border-color:rgba(155,107,255,.23); animation-direction:reverse; animation-duration:11s; }
.neural-core .core-mark {
  display:grid;
  width:38px;
  height:38px;
  opacity:.18;
  color:#07111f;
  background:linear-gradient(135deg,var(--aqua),var(--blue) 55%,var(--electric));
  border-radius:10px 10px 10px 3px;
  box-shadow:0 0 28px rgba(81,166,255,.46);
  font-size:1.32rem;
  font-weight:700;
  letter-spacing:-.1em;
  line-height:1;
  place-items:center;
  transition:opacity .4s ease,transform .6s ease,filter .5s ease;
}
.core-brain { position:absolute; width:104px; height:80px; overflow:visible; opacity:0; transform:scale(.55); transition:opacity .5s ease .45s,transform .75s cubic-bezier(.2,.85,.25,1) .35s; }
.core-brain path { fill:none; stroke-linecap:round; stroke-linejoin:round; }
.core-brain .brain-shell { fill:rgba(7,33,72,.2); stroke:rgba(81,166,255,.48); stroke-width:1; stroke-dasharray:4 5; filter:drop-shadow(0 0 7px rgba(81,166,255,.7)); }
.core-brain .brain-mesh path { stroke:#51a6ff; stroke-width:1.05; filter:drop-shadow(0 0 4px #51a6ff); }
.core-brain .brain-mesh path:last-child { stroke:#7deeff; stroke-width:.75; opacity:.72; }
.core-brain circle { fill:#dffbff; stroke:#51a6ff; stroke-width:.7; filter:drop-shadow(0 0 4px #7deeff); animation:ecosystem-neuron 1.9s ease-in-out infinite alternate; transform-box:fill-box; transform-origin:center; }
.core-brain circle:nth-child(3n){fill:#7deeff;animation-delay:-.7s}.core-brain circle:nth-child(4n){fill:#a6c8ff;animation-delay:-1.3s}
.ecosystem-access { z-index:6; top:69%; pointer-events:none; }
.access-echo { position:absolute; z-index:3; inset:17% 14%; pointer-events:none; }
.access-echo>span { position:absolute; inset:0; display:grid; place-items:center; opacity:0; transform:scale(.72); transition:opacity .28s ease,transform .45s cubic-bezier(.2,.8,.2,1); }
.ecosystem-routes { position:absolute; z-index:4; inset:0; width:100%; height:100%; overflow:visible; opacity:0; pointer-events:none; transition:opacity .45s ease; }
.ecosystem-routes path { fill:none; stroke:#7deeff; stroke-width:.22; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:2 3.8; vector-effect:non-scaling-stroke; filter:drop-shadow(0 0 3px #51a6ff) drop-shadow(0 0 7px rgba(166,107,255,.65)); }
.ecosystem-routes path:nth-child(2n){stroke:#a6c8ff;animation-delay:-.7s}.ecosystem-routes path:nth-child(3){animation-delay:-1.35s}.ecosystem-routes path:nth-child(4){animation-delay:-2s}
.route-pulses circle { fill:#f2f6ff; stroke:#7deeff; stroke-width:.25; vector-effect:non-scaling-stroke; filter:drop-shadow(0 0 2px #fff) drop-shadow(0 0 5px #7deeff); }
.hero-map:not(.is-unlocked)[data-attempt="nexo-hub"] .echo-nexo,.hero-map:not(.is-unlocked)[data-attempt="voiceforge"] .echo-voice,.hero-map:not(.is-unlocked)[data-attempt="zamerimdecore"] .echo-zamerim,.hero-map:not(.is-unlocked)[data-attempt="peo-game"] .echo-peo { opacity:.5; transform:scale(1); }
.echo-nexo i { position:absolute; width:8px; height:8px; background:#7deeff; border-radius:50%; box-shadow:0 0 16px #51a6ff; }
.echo-nexo i::after { position:absolute; top:50%; left:50%; width:72px; height:1px; background:linear-gradient(90deg,#7deeff,transparent); content:""; transform-origin:left; }
.echo-nexo i:nth-child(1){left:22%;top:32%}.echo-nexo i:nth-child(1)::after{transform:rotate(22deg)}.echo-nexo i:nth-child(2){right:24%;top:27%}.echo-nexo i:nth-child(2)::after{transform:rotate(148deg)}.echo-nexo i:nth-child(3){left:31%;bottom:25%}.echo-nexo i:nth-child(3)::after{transform:rotate(-25deg)}.echo-nexo i:nth-child(4){right:28%;bottom:31%}.echo-nexo i:nth-child(4)::after{transform:rotate(205deg)}.echo-nexo i:nth-child(5){left:50%;top:50%;transform:scale(1.7)}
.echo-voice { grid-auto-flow:column; align-content:center; justify-content:center; gap:5px; }
.echo-voice i { width:3px; height:18px; background:linear-gradient(#a66bff,#7deeff); border-radius:99px; box-shadow:0 0 9px #51a6ff; animation:echo-wave .72s ease-in-out infinite alternate; }.echo-voice i:nth-child(2),.echo-voice i:nth-child(6){height:38px;animation-delay:-.3s}.echo-voice i:nth-child(3),.echo-voice i:nth-child(5){height:58px;animation-delay:-.55s}.echo-voice i:nth-child(4){height:78px;animation-delay:-.18s}
.echo-zamerim { display:block!important; }
.echo-zamerim b { position:absolute; z-index:0; top:17%; left:50%; width:78px; height:82px; border:1px solid rgba(196,160,255,.85); border-radius:40px 40px 8px 8px; background:radial-gradient(circle at 50% 34%,rgba(125,238,255,.2),transparent 44%),linear-gradient(145deg,rgba(166,107,255,.18),rgba(7,33,72,.42)); box-shadow:inset 0 0 22px rgba(81,166,255,.18),0 0 20px rgba(166,107,255,.3); transform:translateX(-50%); }
.echo-zamerim b::before { position:absolute; inset:9px; border:1px dashed rgba(125,238,255,.48); border-radius:32px 32px 5px 5px; content:""; }
.echo-zamerim b::after { position:absolute; top:20%; right:-25px; color:#7deeff; font-size:.72rem; letter-spacing:1.2rem; text-shadow:-72px 14px #a66bff,-53px -18px #7deeff,-17px 52px #a66bff,31px 36px #7deeff; content:"✦ ·"; }
.echo-zamerim i { position:absolute; z-index:1; bottom:19%; left:50%; width:30px; height:48px; border:1px solid rgba(125,238,255,.82); border-radius:50% 50% 9px 9px / 11px 11px 9px 9px; background:linear-gradient(90deg,rgba(14,52,98,.88),rgba(125,238,255,.2) 48%,rgba(166,107,255,.38)); box-shadow:inset 0 5px 10px rgba(125,238,255,.15),0 0 16px rgba(81,166,255,.42); animation:echo-cylinder-assemble 1.15s ease-in-out infinite alternate; }
.echo-zamerim i::before { position:absolute; top:-1px; left:-1px; width:30px; height:11px; border:1px solid rgba(196,160,255,.8); border-radius:50%; background:rgba(11,42,77,.96); box-shadow:inset 0 0 7px rgba(125,238,255,.4); content:""; }
.echo-zamerim i:nth-child(1){margin-left:-48px;height:38px}.echo-zamerim i:nth-child(2){margin-left:-15px;height:55px;animation-delay:-.4s}.echo-zamerim i:nth-child(3){margin-left:18px;height:44px;animation-delay:-.8s}
.echo-peo i { width:44px;height:60px;border:2px solid #ffe779;border-radius:52% 48% 48% 52% / 62% 62% 38% 38%;background:radial-gradient(circle at 40% 30%,#fff6b0,#d3a932);box-shadow:0 0 28px rgba(255,231,121,.5);animation:echo-egg 1.2s ease-in-out infinite }.echo-peo b{position:absolute;color:#07111f;font:900 1rem ui-monospace,monospace}
.hero-map:not(.is-unlocked) .network-project-feed a { opacity:0; animation:none; }
.hero-map:not(.is-unlocked) .network-status { opacity:0; }
.hero-map.is-unlocked .ecosystem-neural-canvas { opacity:.92; }
.hero-map.is-unlocked .ecosystem-routes { opacity:.78; }
.hero-map.is-unlocked .ecosystem-routes path { animation:ecosystem-route-inbound 1.15s linear infinite; }
.hero-map.is-unlocked .route-pulses { opacity:1; }
.hero-map.is-unlocked .neural-core { z-index:7; }
.hero-map.is-unlocked .core-mark { animation:ecosystem-logo-arrival 2.8s cubic-bezier(.2,.85,.22,1) both; }
.hero-map.is-unlocked .core-brain { animation:ecosystem-brain-arrival 1.1s cubic-bezier(.2,.85,.25,1) 2.45s both; }
.hero-map.is-unlocked .network-project-feed a { animation:ecosystem-project-reveal 1s cubic-bezier(.16,.8,.22,1) both; }
.hero-map.is-unlocked .network-project-feed a:nth-child(1){--project-from-x:150%;--project-from-y:145%;animation-delay:1.15s}.hero-map.is-unlocked .network-project-feed a:nth-child(2){--project-from-x:-145%;--project-from-y:-135%;animation-delay:1.3s}.hero-map.is-unlocked .network-project-feed a:nth-child(3){--project-from-x:-145%;--project-from-y:145%;animation-delay:1.45s}.hero-map.is-unlocked .network-project-feed a:nth-child(4){--project-from-x:150%;--project-from-y:-135%;animation-delay:1.6s}
.hero-map.is-unlocked .network-status { opacity:1; transition:opacity .5s ease 3.1s; }
.core-contact { position:absolute; z-index:3; width:5px; height:5px; background:#f2f6ff; border-radius:50%; opacity:0; box-shadow:0 0 5px #fff,0 0 13px #7deeff,0 0 24px #51a6ff; animation:core-contact 4s ease-out infinite; }
.core-contact::after { content:""; position:absolute; inset:-5px; border:1px solid rgba(125,238,255,.8); border-radius:50%; transform:scale(.2); animation:contact-ring 4s ease-out infinite; }
.contact-a{left:-9px;top:46%;animation-delay:0s}.contact-b{right:-10px;top:35%;animation-delay:1s}.contact-c{left:35%;top:-10px;animation-delay:2s}.contact-d{right:24%;bottom:-10px;animation-delay:3s}
.contact-a::after{animation-delay:0s}.contact-b::after{animation-delay:1s}.contact-c::after{animation-delay:2s}.contact-d::after{animation-delay:3s}

.network-project-feed { position:absolute; z-index:5; inset:0; pointer-events:none; }
.network-project-feed a {
  position:absolute;
  width:max-content;
  max-width:145px;
  padding:.58rem .75rem .55rem 1.45rem;
  color:#f2f6ff;
  background:linear-gradient(115deg,rgba(8,22,44,.88),rgba(20,19,65,.7));
  border:1px solid rgba(125,238,255,.3);
  border-radius:.75rem;
  box-shadow:0 0 28px rgba(81,166,255,.12);
  opacity:0;
  transform:scale(.86) translateY(8px);
  animation:project-signal 16s ease-in-out infinite;
  pointer-events:auto;
  backdrop-filter:blur(10px);
}
.network-project-feed a::after { content:""; position:absolute; top:50%; width:clamp(45px,10vw,105px); height:1px; background:linear-gradient(90deg,rgba(125,238,255,.75),transparent); transform-origin:left center; }
.network-project-feed a i { position:absolute; left:.68rem; top:.77rem; width:6px; height:6px; background:#7deeff; border-radius:50%; box-shadow:0 0 12px #7deeff; }
.network-project-feed strong,.network-project-feed small { display:block; }
.network-project-feed strong{font-size:.56rem;letter-spacing:.08em}
.network-project-feed small{max-width:18ch;margin-top:.22rem;color:#bed0e8;font-size:.59rem;font-weight:650;letter-spacing:.055em;line-height:1.3;overflow-wrap:anywhere;text-transform:uppercase}
.network-project-feed a:nth-child(1){left:8%;top:15%}.network-project-feed a:nth-child(1)::after{left:100%;transform:rotate(25deg)}
.network-project-feed a:nth-child(2){right:7%;bottom:16%;animation-delay:4s}.network-project-feed a:nth-child(2)::after{right:100%;background:linear-gradient(90deg,transparent,rgba(125,238,255,.75));transform:rotate(22deg)}
.network-project-feed a:nth-child(3){right:7%;top:18%;animation-delay:8s}.network-project-feed a:nth-child(3)::after{right:100%;background:linear-gradient(90deg,transparent,rgba(166,107,255,.75));transform:rotate(-22deg)}
.network-project-feed a:nth-child(4){left:7%;bottom:14%;animation-delay:12s}.network-project-feed a:nth-child(4)::after{left:100%;transform:rotate(-24deg)}
.network-project-feed a:nth-child(2n){border-color:rgba(166,107,255,.3)}

.network-status { position:absolute; right:0; bottom:4%; left:0; color:rgba(168,186,213,.6); font-size:.45rem; font-weight:750; letter-spacing:.18em; text-align:center; }
.network-status b { display:inline-block; width:5px; height:5px; margin-right:.35rem; background:#7deeff; border-radius:50%; box-shadow:0 0 9px #51a6ff; animation:status-pulse 1.8s ease-in-out infinite; }

@keyframes neural-membrane { to{transform:rotate(360deg)} }
@keyframes core-contact { 0%,68%,100%{opacity:0;transform:scale(.45)} 73%{opacity:1;transform:scale(1.5)} 84%{opacity:.22;transform:scale(.8)} }
@keyframes contact-ring { 0%,68%,100%{opacity:0;transform:scale(.2)} 73%{opacity:1} 88%{opacity:0;transform:scale(2.5)} }
@keyframes project-signal { 0%,20%,100%{opacity:0;transform:scale(.86) translateY(8px)} 3%,17%{opacity:1;transform:scale(1) translateY(0)} }
@keyframes status-pulse { 0%,100%{opacity:.35;transform:scale(.75)} 50%{opacity:1;transform:scale(1.3)} }
@keyframes ecosystem-logo-arrival { 0%{opacity:0;transform:scale(.45);filter:blur(8px) brightness(2.4)} 24%{opacity:1;transform:scale(2.6);filter:blur(0) brightness(1.35)} 64%{opacity:1;transform:scale(2.25);filter:blur(0) brightness(1)} 100%{opacity:0;transform:scale(3.15);filter:blur(9px) brightness(2)} }
@keyframes ecosystem-brain-arrival { 0%{opacity:0;transform:scale(.5);filter:blur(8px) brightness(2.2)} 60%{opacity:1;transform:scale(1.12);filter:blur(0) brightness(1.5)} 100%{opacity:1;transform:scale(1);filter:blur(0) brightness(1)} }
@keyframes ecosystem-neuron { from{opacity:.45;transform:scale(.7)} to{opacity:1;transform:scale(1.35)} }
@keyframes ecosystem-route-inbound { from{stroke-dashoffset:0} to{stroke-dashoffset:-11.6} }
@keyframes ecosystem-project-reveal { from{opacity:0;transform:translate(var(--project-from-x),var(--project-from-y)) scale(.28);filter:blur(8px)} 68%{opacity:1;transform:translate(0,0) scale(1.06);filter:blur(0)} to{opacity:1;transform:translate(0,0) scale(1);filter:blur(0)} }
@keyframes echo-wave { to{transform:scaleY(.3);opacity:.45} }
@keyframes echo-cylinder-assemble { from{opacity:.55;transform:translateY(9px) scale(.9)} to{opacity:1;transform:translateY(0) scale(1)} }
@keyframes echo-egg { 50%{transform:rotate(5deg) scale(1.06)} }

@media(max-width:520px){
  .neural-core{width:84px;height:84px}.neural-core .core-mark{width:34px;height:34px;font-size:1.18rem}
  .network-project-feed a{max-width:125px;padding:.48rem .6rem .46rem 1.25rem;background:linear-gradient(115deg,rgba(8,22,44,.96),rgba(20,19,65,.92));backdrop-filter:none}
  .network-project-feed a i{left:.56rem;top:.67rem}.network-project-feed strong{font-size:.5rem}.network-project-feed small{max-width:16ch;font-size:.52rem;letter-spacing:.045em}
  .network-project-feed a:nth-child(1){left:5%;top:12%}.network-project-feed a:nth-child(2){right:4%;bottom:15%}.network-project-feed a:nth-child(3){right:4%;top:17%}.network-project-feed a:nth-child(4){left:4%;bottom:12%}
  .ecosystem-routes path{filter:none}
  .route-pulses circle{filter:drop-shadow(0 0 3px #7deeff)}
  .neural-core{filter:drop-shadow(0 0 12px rgba(81,166,255,.42))}
  .core-brain .brain-shell,.core-brain .brain-mesh path,.core-brain circle{filter:none}
  .hero-map.is-unlocked .core-mark{animation-name:ecosystem-logo-arrival-mobile}
  .hero-map.is-unlocked .core-brain{animation-name:ecosystem-brain-arrival-mobile}
  .hero-map.is-unlocked .network-project-feed a{animation-name:ecosystem-project-reveal-mobile}
  .hero-map.is-unlocked .ecosystem-routes path,
  .hero-map.is-unlocked .core-brain circle,
  .hero-map.is-unlocked .neural-core::after,
  .hero-map.is-unlocked .core-contact,
  .hero-map.is-unlocked .core-contact::after{animation:none!important}
  .hero-map.is-unlocked .core-contact{opacity:.38}
  .hero-map.is-unlocked .map-code-rain i,
  .hero-map.is-unlocked .map-cubes i{animation-play-state:paused}
}

@keyframes ecosystem-logo-arrival-mobile { 0%{opacity:0;transform:scale(.45)} 24%{opacity:1;transform:scale(2.6)} 64%{opacity:1;transform:scale(2.25)} 100%{opacity:0;transform:scale(3.15)} }
@keyframes ecosystem-brain-arrival-mobile { 0%{opacity:0;transform:scale(.5)} 60%{opacity:1;transform:scale(1.08)} 100%{opacity:1;transform:scale(1)} }
@keyframes ecosystem-project-reveal-mobile { from{opacity:0;transform:translate(var(--project-from-x),var(--project-from-y)) scale(.28)} 68%{opacity:1;transform:translate(0,0) scale(1.04)} to{opacity:1;transform:translate(0,0) scale(1)} }

html.reduce-motion .neural-core::before,html.reduce-motion .neural-core::after,html.reduce-motion .network-project-feed a,html.reduce-motion .network-status b{animation:none!important}
html.reduce-motion .core-contact,html.reduce-motion .core-contact::after{animation:none!important;opacity:.45}
html.reduce-motion .network-project-feed a{opacity:1;transform:none}
@media(prefers-reduced-motion:reduce){.neural-core::before,.neural-core::after,.network-project-feed a,.network-status b,.core-contact,.core-contact::after{animation:none!important}.core-contact{opacity:.45}.network-project-feed a{opacity:1;transform:none}}

/* ========== Back to top ========== */
.back-top {
  position: fixed;
  z-index: 40;
  right: 1.1rem;
  bottom: 1.1rem;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: rgba(13, 29, 54, 0.82);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.2s ease;
  backdrop-filter: blur(10px);
}

/* ========== Installable mobile app shell ========== */
.settings-button {
  display: grid;
  width: 42px;
  height: 42px;
  margin-left: auto;
  color: var(--paper);
  background: rgba(125, 238, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
  cursor: pointer;
}

.settings-button span { font-size: 1rem; }
.app-tabbar { display: none; }
.settings-open { overflow: hidden; }

.settings-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.settings-modal.is-open { visibility: visible; opacity: 1; }
.settings-backdrop { position: absolute; inset: 0; background: rgba(1, 6, 14, 0.8); backdrop-filter: blur(12px); }

.settings-sheet {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(92vw, 560px);
  max-height: min(88vh, 780px);
  overflow: hidden;
  color: var(--paper);
  background: #0b1930;
  border: 1px solid rgba(125, 238, 255, 0.2);
  border-radius: 1.45rem;
  box-shadow: 0 36px 120px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -47%);
  transition: transform 180ms ease;
}

.settings-modal.is-open .settings-sheet { transform: translate(-50%, -50%); }
.settings-sheet-header { display: flex; padding: 1.25rem 1.35rem; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.settings-sheet-header span { color: var(--aqua); font-size: 0.62rem; font-weight: 760; letter-spacing: 0.13em; text-transform: uppercase; }
.settings-sheet-header h2 { margin: 0.25rem 0 0; font-size: 1.45rem; }
.settings-sheet-header button { width: 40px; height: 40px; color: var(--paper); background: var(--surface); border: 1px solid var(--line); border-radius: 50%; font-size: 1.45rem; cursor: pointer; }
.settings-content { max-height: calc(min(88vh, 780px) - 90px); padding: 0.35rem clamp(1rem, 4vw, 1.5rem) 2rem; overflow-y: auto; }
.settings-section-label { max-width: 480px; margin: 1.4rem auto 0.65rem; color: var(--aqua); font-size: 0.7rem; font-weight: 760; letter-spacing: 0.13em; text-transform: uppercase; }
.settings-group { width: 100%; max-width: 480px; margin: 0 auto; overflow: hidden; background: rgba(16, 37, 69, 0.82); border: 1px solid var(--line); border-radius: 1rem; }

.settings-row {
  display: grid;
  width: 100%;
  min-width: 0;
  padding: 1rem;
  gap: 0.85rem;
  align-items: center;
  color: var(--paper);
  grid-template-columns: 38px minmax(0, 1fr) auto;
  text-align: left;
}

.settings-row + .settings-row { border-top: 1px solid var(--line); }
.settings-icon { display: grid; width: 38px; height: 38px; color: var(--aqua); background: rgba(81, 166, 255, 0.14); border-radius: 50%; font-size: 0.72rem; font-weight: 800; place-items: center; }
.settings-copy { display: grid; min-width: 0; gap: 0.22rem; }
.settings-copy strong { font-size: 0.92rem; line-height: 1.25; }
.settings-copy small { max-width: 34ch; color: var(--muted); font-size: 0.76rem; line-height: 1.45; overflow-wrap: anywhere; }
.settings-chevron { color: var(--muted); font-size: 1.4rem; }
.settings-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.settings-switch { position: relative; width: 46px; height: 26px; background: #223653; border-radius: 999px; transition: background 160ms ease; }
.settings-switch::after { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--paper); border-radius: 50%; content: ""; transition: transform 160ms ease; }
.settings-row input:checked + .settings-switch { background: var(--blue); }
.settings-row input:checked + .settings-switch::after { transform: translateX(20px); }
.settings-tagline { margin: 2rem auto 0; color: var(--muted); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.13em; text-align: center; text-transform: uppercase; }
.larger-text { font-size: 112.5%; }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { scroll-behavior: auto !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }

.about-app-grid { display: grid; padding-block: clamp(3rem, 8vw, 7rem); gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.about-app-card { padding: clamp(1.25rem, 3vw, 2rem); background: rgba(11, 25, 48, 0.78); border: 1px solid var(--line); border-radius: var(--radius); }
.about-app-card strong { color: var(--aqua); font-size: 1.1rem; }
.about-app-card p { color: var(--muted); line-height: 1.65; }
.about-app-main { grid-column: 1 / -1; }
.about-app-main h2 { max-width: 13ch; font-size: clamp(2rem, 5vw, 4.5rem); }

@media (min-width: 851px) {
  .menu-button { display:block; }
  .main-navigation {
    display:none;
    position:absolute;
    top:calc(100% + .7rem);
    right:0;
    width:min(310px,calc(100vw - 2.4rem));
    padding:.7rem;
    gap:.12rem;
    background:rgba(7,17,31,.97);
    border:1px solid var(--line-strong);
    border-radius:1rem;
    box-shadow:var(--shadow);
    backdrop-filter:blur(18px);
    flex-direction:column;
  }
  .main-navigation.is-open { display:flex; }
  .main-navigation>a { width:100%; padding:.8rem .9rem; border-radius:.65rem; }
  .main-navigation>a:hover,.main-navigation>a.is-active { background:rgba(125,238,255,.075); }
  .main-navigation>a::after { display:none; }
  .main-navigation>a.nav-github { margin-top:.3rem; text-align:center; }
}

@media (max-width: 850px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .site-header { grid-template-columns: 1fr auto auto; }
  .menu-button { display:none; }
  .main-navigation,.main-navigation.is-open { display:none; }
  .settings-button { margin-right: 0.15rem; }
  .app-tabbar {
    display: grid;
    position: fixed;
    z-index: 70;
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(72px + env(safe-area-inset-bottom));
    padding: 0.4rem 0.65rem env(safe-area-inset-bottom);
    background:linear-gradient(180deg,rgba(10,25,47,.94),rgba(5,14,28,.98));
    border-top: 1px solid rgba(125, 238, 255, 0.18);
    box-shadow:0 -12px 34px rgba(0,0,0,.22),inset 0 1px rgba(255,255,255,.025);
    backdrop-filter: blur(22px) saturate(1.2);
    grid-template-columns: repeat(4, 1fr);
  }
  .app-tabbar a { position:relative; display:grid; color:#8296b4; place-items:center; align-content:center; gap:.18rem; border-radius:.9rem; transition:color .2s ease,background .2s ease,transform .2s ease; }
  .app-tabbar .tab-icon { display:grid; width:28px; height:28px; place-items:center; border:1px solid transparent; border-radius:10px; transition:border-color .2s ease,background .2s ease,box-shadow .2s ease; }
  .app-tabbar .tab-icon svg { width:19px; height:19px; overflow:visible; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
  .app-tabbar .engineering-glyph { font-size:1.08rem; line-height:1; }
  .app-tabbar a small { font-size:.58rem; font-weight:700; letter-spacing:.015em; }
  .app-tabbar a.is-active { color:var(--aqua); background:linear-gradient(180deg,rgba(125,238,255,.09),rgba(81,166,255,.035)); }
  .app-tabbar a.is-active::before { position:absolute; top:0; width:20px; height:2px; background:linear-gradient(90deg,transparent,var(--aqua),transparent); border-radius:99px; box-shadow:0 0 10px var(--blue); content:""; }
  .app-tabbar a.is-active .tab-icon { background:rgba(125,238,255,.07); border-color:rgba(125,238,255,.2); box-shadow:0 0 18px rgba(81,166,255,.12); }
  .settings-sheet { top: auto; bottom: 0; width: 100%; max-height: 92vh; border-radius: 1.5rem 1.5rem 0 0; transform: translate(-50%, 100%); }
  .settings-modal.is-open .settings-sheet { transform: translate(-50%, 0); }
  .settings-content { max-height: calc(92vh - 88px); padding-inline: 1rem; padding-bottom: calc(2rem + env(safe-area-inset-bottom)); }
  .settings-section-label, .settings-group { max-width: 520px; }
  .settings-row { padding: 0.95rem; gap: 0.72rem; grid-template-columns: 36px minmax(0, 1fr) auto; }
  .settings-icon { width: 36px; height: 36px; }
  .settings-copy small { max-width: none; }
  .about-app-grid { grid-template-columns: 1fr; }
  .about-app-main { grid-column: auto; }
}

@media (max-width: 380px) {
  .settings-row { padding: 0.82rem; gap: 0.58rem; grid-template-columns: 32px minmax(0, 1fr) auto; }
  .settings-icon { width: 32px; height: 32px; }
  .settings-copy strong { font-size: 0.84rem; }
  .settings-copy small { font-size: 0.7rem; }
  .settings-switch { width: 42px; height: 24px; }
  .settings-switch::after { width: 18px; height: 18px; }
  .settings-row input:checked + .settings-switch::after { transform: translateX(18px); }
}

.back-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-top:hover {
  border-color: var(--aqua);
  color: var(--aqua);
}

/* ========== Active section nav hint ========== */
.site-header.is-scrolled {
  position: sticky;
  top: 0;
  width: 100%;
  max-width: none;
  padding-inline: max(1.2rem, calc((100vw - var(--max)) / 2));
  background: rgba(7, 17, 31, 0.82);
  backdrop-filter: blur(16px);
  border-bottom-color: rgba(190, 219, 255, 0.12);
}

@media (max-width: 850px) {
  .back-top {
    right: 0.85rem;
    bottom: 0.85rem;
    width: 40px;
    height: 40px;
  }
}


/* Responsive image wrappers */
picture.hero-background-logo {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

picture.hero-background-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.48;
  filter: saturate(1.2) contrast(1.12);
}

.identity-avatar picture {
  display: block;
  width: 100%;
  height: 100%;
}

.identity-avatar picture img,
.identity-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}


/* ========== Engineering principles (elevated) ========== */
.principles-section {
  padding-block: clamp(4.5rem, 10vw, 7.5rem);
}

.principle-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.principle-card {
  display: flex;
  min-height: 280px;
  padding: 1.45rem 1.5rem;
  flex-direction: column;
  gap: 0.55rem;
  background: linear-gradient(145deg, rgba(20, 45, 83, 0.84), rgba(10, 25, 47, 0.78));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.principle-card:hover {
  border-color: rgba(125, 238, 255, 0.45);
  background: linear-gradient(145deg, rgba(28, 66, 116, 0.88), rgba(13, 34, 65, 0.86));
  transform: translateY(-4px);
}

.principle-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.principle-number {
  color: var(--aqua);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.principle-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--ink);
  background: linear-gradient(135deg, var(--aqua), var(--blue));
  border-radius: 10px;
  font-size: 0.95rem;
  box-shadow: 0 0 24px rgba(81, 166, 255, 0.25);
}

.principle-card h3 {
  margin: 0;
  font-size: clamp(1.55rem, 2.5vw, 2rem);
}

.principle-lead {
  margin: 0;
  color: var(--paper);
  font-size: 0.95rem;
  font-weight: 650;
}

.principle-card > p:not(.principle-lead) {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.principle-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 1rem;
}

.principle-tags span {
  padding: 0.32rem 0.55rem;
  color: var(--muted);
  background: rgba(125, 238, 255, 0.06);
  border: 1px solid rgba(125, 238, 255, 0.12);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 680;
  letter-spacing: 0.04em;
}

/* Stack panel */
.stack-section {
  padding-bottom: clamp(4rem, 9vw, 6.5rem);
}

.stack-panel {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  background:
    radial-gradient(circle at 85% 20%, rgba(125, 238, 255, 0.12), transparent 14rem),
    rgba(13, 29, 54, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  grid-template-columns: 1.1fr 0.9fr;
}

.stack-copy h2 {
  max-width: 12ch;
}

.stack-copy > p:not(.eyebrow) {
  max-width: 36rem;
  color: var(--muted);
  line-height: 1.7;
}

.stack-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  background: rgba(7, 17, 31, 0.45);
  border: 1px solid rgba(190, 219, 255, 0.1);
  border-radius: 0.75rem;
}

.stack-list strong {
  color: var(--paper);
  font-size: 0.88rem;
  font-weight: 750;
}

.stack-list span {
  color: var(--faint);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

/* Engineering CTA polish */
.engineering-cta {
  display: grid;
  gap: 1rem;
  padding-bottom: clamp(5rem, 11vw, 8rem);
  grid-template-columns: 1.15fr 0.85fr;
}

.engineering-cta-card {
  padding: clamp(1.5rem, 3vw, 2.4rem);
  background: rgba(13, 29, 54, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.engineering-cta-card h2 {
  max-width: 12ch;
}

.engineering-cta-card > p:not(.eyebrow) {
  max-width: 32rem;
  color: var(--muted);
  line-height: 1.68;
}

.github-card-link {
  display: flex;
  position: relative;
  min-height: 240px;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  overflow: hidden;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--ink);
  background: linear-gradient(145deg, #e6f4ff, #9bd4ff);
  border-radius: var(--radius);
  transition: transform 220ms ease, box-shadow 220ms ease;
  isolation: isolate;
}

.github-card-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 52px rgba(81, 166, 255, 0.22);
}

.github-card-link::before {
  position: absolute;
  z-index: -1;
  top: -4rem;
  right: -2rem;
  width: 14rem;
  height: 14rem;
  border: 18px solid rgba(5, 20, 40, 0.08);
  border-radius: 50%;
  content: "";
}

.github-card-link > span {
  margin-bottom: 0.45rem;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.github-card-link strong {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.github-card-link b {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.75;
}

.github-card-link i {
  position: absolute;
  top: 1.3rem;
  right: 1.3rem;
  font-style: normal;
  font-size: 1.5rem;
  font-weight: 300;
}

/* ========== Contact elevated ========== */
.channel-card-featured {
  position: relative;
  overflow: hidden;
  grid-column: 1 / -1;
}

.channel-card-glow {
  position: absolute;
  z-index: 0;
  top: -30%;
  right: -10%;
  width: 55%;
  height: 140%;
  background: radial-gradient(circle, rgba(81, 166, 255, 0.2), transparent 65%);
  pointer-events: none;
}

.channel-card-featured > *:not(.channel-card-glow) {
  position: relative;
  z-index: 1;
}

.channel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.channel-card.pending {
  opacity: 0.92;
}

.channel-card.pending .channel-card-icon {
  color: var(--faint);
  background: rgba(216, 239, 255, 0.05);
}

@media (max-width: 850px) {
  .principle-grid,
  .stack-panel,
  .engineering-cta {
    grid-template-columns: 1fr;
  }

  .principle-card {
    min-height: 0;
  }
}


/* ========== Mobile performance helpers ========== */
@media (max-width: 850px) {
  .journey {
    height: auto !important;
  }

  .journey-sticky {
    position: relative !important;
    height: auto !important;
  }

  /* Skip offscreen layout/paint work where supported */
  .philosophy,
  .github-panel,
  .contact-cta,
  .principles-section,
  .stack-section,
  .engineering-cta,
  .contact-layout,
  .project-list {
    content-visibility: auto;
    contain-intrinsic-size: 1px 720px;
  }

  /* Cheaper shadows/filters on small screens */
  .hero-map,
  .project-card,
  .principle-card,
  .github-repository,
  .github-card-link {
    box-shadow: none;
  }

  .hero-background-logo img,
  picture.hero-background-logo img {
    filter: none;
    opacity: 0.4;
  }

  .ambient-particles {
    animation: none !important;
    opacity: 0.2;
  }
}

@media (max-width: 850px) and (prefers-reduced-motion: reduce) {
  .journey-panel {
    transition: none !important;
  }
}



/* Safe areas (notched phones) */
@supports (padding: env(safe-area-inset-bottom)) {
  .back-top {
    bottom: calc(1.1rem + env(safe-area-inset-bottom));
  }
  .site-footer {
    padding-bottom: calc(2.2rem + env(safe-area-inset-bottom));
  }
}

/* Ensure main content not hidden under sticky header anchors */
[id] {
  scroll-margin-top: 5.5rem;
}


/* Lazy image reveal */
img[loading="lazy"] {
  content-visibility: auto;
}

img.is-loaded {
  animation: img-in 0.45s ease both;
}

@keyframes img-in {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  img.is-loaded { animation: none; }
}


/* ========== Core Web Vitals ========== */
/* Reserve space for hero media (CLS) */
.hero-map {
  aspect-ratio: 1 / 1;
  min-height: min(52vw, 28rem);
}

@media (max-width: 850px) {
  .hero-map {
    min-height: min(88vw, 22rem);
  }
}

.identity-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  overflow: hidden;
}

.identity-avatar img {
  width: 52px;
  height: 52px;
}

/* Avoid layout jump from progress/boot bars */
.progress-bar,
.boot-loader {
  contain: layout style;
}

/* Sticky header: keep original min-height to avoid CLS */
.site-header {
  min-height: 84px;
}

/* Prefer compositor-friendly motion */
.journey-panel,
.project-card,
.principle-card,
.back-top {
  will-change: auto;
}

/* Reduce main-thread style cost on mobile */
@media (max-width: 850px) {
  .site-header.is-scrolled {
    backdrop-filter: none;
    background: rgba(7, 17, 31, 0.94);
  }
}
