/* ZIPPRI V5.5 - dark theme rebuilt to mirror the approved Vedic light layout.
   Light theme is intentionally untouched. Dark changes only visual language. */

html[data-theme="dark"]{
  --ink:#ecfffb;
  --brown:#b9d8d2;
  --surface-alpha:rgba(7,15,26,.86);
  --border-gold:rgba(38,246,211,.42);
  --shadow-warm:0 18px 55px rgba(0,0,0,.54);
  --glow-gold:0 0 24px rgba(126,111,255,.28);
  --glow-teal:0 0 30px rgba(33,246,214,.38);
}
html[data-theme="dark"] body{
  color:#ecfffb;
  background:#040711;
  font-family:Georgia,'Times New Roman',serif;
}
html[data-theme="dark"] body::before{
  content:"";position:fixed;inset:0;z-index:-2;pointer-events:none;
  background:
    radial-gradient(circle at 26% 24%,rgba(20,215,190,.14),transparent 31%),
    radial-gradient(circle at 78% 22%,rgba(104,87,255,.13),transparent 28%),
    radial-gradient(circle at 60% 78%,rgba(0,129,255,.09),transparent 35%),
    linear-gradient(180deg,rgba(2,6,14,.04),rgba(2,5,12,.36));
}
html[data-theme="dark"] body::after{
  content:"";position:fixed;inset:0;z-index:6;pointer-events:none;opacity:.28;
  background-image:repeating-linear-gradient(180deg,rgba(122,255,235,.045) 0 1px,transparent 1px 4px);
  mix-blend-mode:screen;
}

/* space-science / hacking environment while preserving the exact light-theme composition */
html[data-theme="dark"] .scene{
  background:#050812 url('../svg/dark-hacking-grid.svg') center/cover no-repeat;
  filter:none;
}
html[data-theme="dark"] .scene::before{
  content:"";position:absolute;inset:0;
  background:
    radial-gradient(circle at 50% 74%,rgba(23,255,217,.08),transparent 16%),
    linear-gradient(180deg,transparent 0 63%,rgba(6,15,24,.65) 74%,rgba(3,6,12,.96) 100%);
}
html[data-theme="dark"] .sky{
  background:
    radial-gradient(circle at 22% 18%,rgba(45,255,223,.18),transparent 20%),
    radial-gradient(circle at 72% 20%,rgba(110,83,255,.18),transparent 24%),
    radial-gradient(circle at 56% 48%,rgba(13,99,135,.12),transparent 32%),
    linear-gradient(180deg,#040812 0%,#07101c 58%,#03060c 100%);
  filter:none;
}
html[data-theme="dark"] .sky::after{
  opacity:.86;
  background-image:
    radial-gradient(circle,rgba(193,255,247,.92) 0 1px,transparent 1.5px),
    radial-gradient(circle,rgba(116,116,255,.82) 0 1px,transparent 1.7px),
    radial-gradient(circle,rgba(66,245,219,.7) 0 .8px,transparent 1.5px);
  background-size:97px 89px,151px 139px,63px 71px;
  animation:darkStarDrift 32s linear infinite;
}
html[data-theme="dark"] .sun{
  width:34vw;height:34vw;left:25%;top:54%;
  background:radial-gradient(circle,rgba(212,255,250,.95) 0 1.5%,rgba(34,244,213,.5) 5%,rgba(13,123,153,.24) 18%,rgba(84,71,244,.12) 34%,transparent 66%);
  filter:blur(.2px);
  opacity:.7;
}
html[data-theme="dark"] .mountains{
  clip-path:polygon(0 56%,10% 38%,19% 54%,31% 29%,42% 53%,52% 39%,61% 50%,70% 31%,83% 54%,92% 38%,100% 51%,100% 100%,0 100%);
  background:linear-gradient(180deg,rgba(22,55,73,.16),rgba(2,8,15,.94));
  opacity:.9;
}
html[data-theme="dark"] .city{
  opacity:.54;
  background:linear-gradient(90deg,transparent 0 16%,rgba(31,255,216,.17) 16% 19%,transparent 19% 41%,rgba(105,96,255,.18) 41% 45%,transparent 45% 54%,rgba(19,237,205,.22) 54% 57%,transparent 57% 69%,rgba(42,160,255,.2) 69% 72%,transparent 72%);
  filter:drop-shadow(0 0 8px rgba(34,246,214,.23));
}
html[data-theme="dark"] .river{
  background:
    radial-gradient(ellipse at 34% 14%,rgba(112,255,237,.34),rgba(29,178,190,.12) 16%,transparent 30%),
    repeating-linear-gradient(180deg,rgba(47,236,213,.10) 0 1px,rgba(27,78,99,.035) 2px 5px),
    linear-gradient(180deg,rgba(16,62,76,.19),rgba(1,8,14,.82));
}
html[data-theme="dark"] .foliage{filter:brightness(.2) saturate(.8) hue-rotate(110deg);opacity:.34}

/* atmospheric Vedic shapes translate into cyber sigils rather than disappearing */
html[data-theme="dark"] .vedic-atmosphere{mix-blend-mode:screen}
html[data-theme="dark"] .aura-a{background:radial-gradient(circle,rgba(39,255,220,.22),rgba(2,122,133,.08) 35%,transparent 68%)}
html[data-theme="dark"] .aura-b{background:radial-gradient(circle,rgba(120,100,255,.20),rgba(72,55,170,.08) 34%,transparent 68%)}
html[data-theme="dark"] .aura-c{background:radial-gradient(ellipse,rgba(34,225,255,.11),transparent 66%)}
html[data-theme="dark"] .vedic-sigil{color:rgba(67,255,226,.16);text-shadow:0 0 18px rgba(37,245,213,.32)}
html[data-theme="dark"] .cursor-halo{background:radial-gradient(circle,rgba(42,255,223,.18),rgba(91,90,255,.06) 40%,transparent 68%)}

/* header: same approved silhouette, cyber glass material */
html[data-theme="dark"] .top-shell{
  border-color:rgba(38,242,210,.48);
  background:linear-gradient(180deg,rgba(8,18,30,.94),rgba(5,12,22,.9));
  color:#e9fffb;
  box-shadow:0 0 0 3px rgba(40,255,220,.055),0 12px 34px rgba(0,0,0,.5),inset 0 0 28px rgba(32,244,214,.035),0 0 34px rgba(47,131,255,.08);
  backdrop-filter:blur(15px) saturate(1.25);
}
html[data-theme="dark"] .top-shell::before{border-color:rgba(101,106,255,.26)}
html[data-theme="dark"] .top-shell::after{
  background:linear-gradient(90deg,transparent,rgba(25,255,218,.12),rgba(25,255,218,.82),rgba(114,91,255,.55),rgba(45,195,255,.25),transparent);
  box-shadow:0 0 10px rgba(33,246,214,.36);
}
html[data-theme="dark"] .top-shell.scrolled{
  background:linear-gradient(180deg,rgba(7,16,28,.98),rgba(4,10,18,.96));
  box-shadow:0 0 0 3px rgba(34,255,218,.06),0 18px 45px rgba(0,0,0,.56),inset 0 0 28px rgba(44,244,220,.04);
}
html[data-theme="dark"] .brand,html[data-theme="dark"] .nav-links a,html[data-theme="dark"] .mode-tab,html[data-theme="dark"] .mini-btn{color:#e8fffb}
html[data-theme="dark"] .brand-mark{filter:brightness(1.55) saturate(.55) hue-rotate(118deg) drop-shadow(0 0 10px rgba(43,255,220,.45))}
html[data-theme="dark"] .brand-copy strong{background:none!important;color:#effffc!important;text-shadow:0 0 14px rgba(41,250,216,.16)}
html[data-theme="dark"] .brand-copy small{color:#7ff6e5}
html[data-theme="dark"] .mode-switch{background:rgba(8,22,32,.78);border-color:rgba(39,244,214,.24);box-shadow:inset 0 0 17px rgba(32,244,214,.045)}
html[data-theme="dark"] .mode-switch::before{background:conic-gradient(from 0deg,transparent 0 25%,rgba(31,248,215,.16) 34%,transparent 43% 70%,rgba(109,92,255,.15) 78%,transparent 88%)}
html[data-theme="dark"] .mode-tab span{color:#59cabd}
html[data-theme="dark"] .mode-tab.active{color:#f1fffd;border-color:#24dfc5;background:linear-gradient(180deg,rgba(14,85,89,.78),rgba(8,43,55,.88));box-shadow:0 8px 22px rgba(0,0,0,.25),inset 0 0 16px rgba(42,251,218,.08),0 0 15px rgba(38,224,201,.09)}
html[data-theme="dark"] .mode-tab.active::after{background:linear-gradient(90deg,transparent,#29ffe0,transparent);box-shadow:0 0 9px rgba(35,255,221,.82)}
html[data-theme="dark"] .nav-links a{color:#a8c9c4}
html[data-theme="dark"] .nav-links a:hover,html[data-theme="dark"] .nav-links a.active{color:#60f6df}
html[data-theme="dark"] .nav-links a::before{color:#66ffe8;text-shadow:0 0 9px #24e8cc}
html[data-theme="dark"] .nav-links a::after{background:#2ef1d4;box-shadow:0 0 10px rgba(36,244,213,.7)}
html[data-theme="dark"] .mini-btn{border-color:rgba(48,232,207,.25);background:rgba(9,23,35,.84);box-shadow:0 5px 15px rgba(0,0,0,.22),inset 0 0 12px rgba(35,241,211,.03)}
html[data-theme="dark"] .mini-btn:hover{box-shadow:0 7px 18px rgba(0,0,0,.34),0 0 18px rgba(41,246,215,.16)}
html[data-theme="dark"] .lamp{background:#2ef6d8;box-shadow:0 0 10px #2ef6d8}
html[data-theme="dark"] .connect-btn,html[data-theme="dark"] .universe-btn{
  border-color:#2cf0d2;
  background:radial-gradient(circle at 24% 10%,rgba(57,232,209,.12),transparent 30%),linear-gradient(180deg,#083b43,#05242d);
  color:#ecfffb;
  box-shadow:0 0 0 4px rgba(40,255,219,.10),0 0 0 6px rgba(88,77,235,.21),inset 0 0 0 1px #2cf0d2,inset 0 0 22px rgba(24,255,221,.055),0 12px 28px rgba(0,0,0,.36),0 0 24px rgba(36,245,214,.17);
}
html[data-theme="dark"] .connect-btn b,html[data-theme="dark"] .universe-btn b{color:#7ff9e6}

/* hero: same classical layout, dark scientific material */
html[data-theme="dark"] .hero-copy::before{
  content:"// SOVEREIGN SYSTEM :: ONLINE";position:absolute;left:22px;top:37px;font:700 9px ui-monospace,monospace;letter-spacing:2px;color:rgba(91,255,230,.45);pointer-events:none;
}
html[data-theme="dark"] .hero-copy::after{border-color:rgba(54,244,217,.09);box-shadow:0 0 0 28px rgba(54,244,217,.02),0 0 0 74px rgba(102,86,255,.015)}
html[data-theme="dark"] .hero-mandala{filter:brightness(1.5) sepia(0) saturate(1.6) hue-rotate(122deg);opacity:.2}
html[data-theme="dark"] .eyebrow{color:#70d7ca}
html[data-theme="dark"] .eyebrow>span{background:#2ff2d6;box-shadow:0 0 12px #2ff2d6}
html[data-theme="dark"] .eyebrow::after{background:linear-gradient(90deg,rgba(48,245,216,.66),transparent)}
html[data-theme="dark"] .hero-title{color:#f4fffd;filter:drop-shadow(0 8px 22px rgba(0,0,0,.34))}
html[data-theme="dark"] .hero-title .line-a{color:#d8f4ef}
html[data-theme="dark"] .hero-title em{color:#f8fffe;text-shadow:0 0 28px rgba(59,242,216,.08)}
html[data-theme="dark"] .hero-title b{color:#2ef6d8;text-shadow:0 0 18px rgba(37,246,216,.62)}
html[data-theme="dark"] .hero-title strong{background:none!important;color:#65eadb!important;text-shadow:0 0 18px rgba(40,246,216,.2)}
html[data-theme="dark"] .sanskrit{color:#66f1dd;filter:drop-shadow(0 0 8px rgba(35,238,207,.26))}
html[data-theme="dark"] .sanskrit i{filter:brightness(1.5) saturate(.3) hue-rotate(100deg) drop-shadow(0 0 6px rgba(45,250,217,.4))}
html[data-theme="dark"] .hero-body{color:#b6d0cb;text-shadow:0 1px 16px rgba(0,0,0,.25)}
html[data-theme="dark"] .ai-link{color:#b8d9d3}
html[data-theme="dark"] .ai-link:hover{color:#67f6df;text-shadow:0 0 13px rgba(50,242,213,.22)}
html[data-theme="dark"] .ai-link::before{color:#63ffe6}
html[data-theme="dark"] .universe-btn img{filter:brightness(1.55) saturate(.45) hue-rotate(118deg) drop-shadow(0 0 7px rgba(44,251,218,.35))}

/* open orbit remains open, exactly like light; only its visual language changes */
html[data-theme="dark"] .orbit-stage.system-panel{background:transparent!important;color:#ecfffb!important}
html[data-theme="dark"] .orbit-stage .map-wrap::before{
  background:
    radial-gradient(ellipse at 50% 50%,rgba(11,31,48,.86) 0%,rgba(7,21,35,.72) 34%,rgba(8,17,31,.38) 60%,rgba(5,10,18,.08) 78%,transparent 90%),
    radial-gradient(ellipse at 52% 48%,rgba(31,246,216,.10),transparent 58%)!important;
  filter:blur(7px)!important;
}
html[data-theme="dark"] .orbit-stage .map-wrap::after{
  background:
    radial-gradient(ellipse at 50% 50%,transparent 48%,rgba(42,255,220,.13) 49%,transparent 50.2%),
    radial-gradient(ellipse at 50% 50%,transparent 62%,rgba(111,91,255,.12) 63%,transparent 64.2%)!important;
  mix-blend-mode:screen!important;
}
html[data-theme="dark"] .orbit-stage .map-wrap svg{filter:drop-shadow(0 10px 22px rgba(0,0,0,.45)) drop-shadow(0 0 12px rgba(37,244,214,.15))!important}
html[data-theme="dark"] .orbit-stage .yantra-ring,
html[data-theme="dark"] .orbit-stage .yantra-spokes line,
html[data-theme="dark"] .orbit-stage .yantra-square rect,
html[data-theme="dark"] .orbit-stage .yantra-star,
html[data-theme="dark"] .orbit-stage .yantra-triangles,
html[data-theme="dark"] .orbit-stage .yantra-petals path{stroke:#42e9d2!important}
html[data-theme="dark"] .orbit-stage .ring-outer{stroke-opacity:.52!important}
html[data-theme="dark"] .orbit-stage .ring-mid{stroke-opacity:.34!important}
html[data-theme="dark"] .orbit-stage .ring-dash{stroke:#8174ff!important;stroke-opacity:.46!important}
html[data-theme="dark"] .orbit-stage .ring-inner{stroke-opacity:.38!important}
html[data-theme="dark"] .orbit-stage .yantra-spokes line{stroke-opacity:.19!important}
html[data-theme="dark"] .orbit-stage .yantra-square rect{stroke-opacity:.24!important}
html[data-theme="dark"] .orbit-stage .yantra-petals path{stroke:#6376ff!important;stroke-opacity:.21!important;fill:rgba(31,235,210,.018)!important}
html[data-theme="dark"] .orbit-stage .yantra-star{stroke:#33f0d2!important;stroke-opacity:.58!important}
html[data-theme="dark"] .orbit-stage .yantra-triangles{stroke:#8578ff!important;stroke-opacity:.35!important}
html[data-theme="dark"] .orbit-stage .yantra-beads circle{fill:#49ffe1!important;fill-opacity:.9!important}
html[data-theme="dark"] .orbit-stage .orbit-gold{stroke:#8179ff!important;stroke-opacity:.7!important}
html[data-theme="dark"] .orbit-stage .orbit-cyan{stroke:#27f2d3!important;stroke-opacity:1!important;stroke-width:2.6!important}
html[data-theme="dark"] .orbit-stage .orbit-teal-dash{stroke:#24bfdc!important;stroke-opacity:.62!important}
html[data-theme="dark"] .orbit-stage .orbit-dash{stroke:#7769f3!important;stroke-opacity:.5!important}
html[data-theme="dark"] .orbit-stage .energy-path{stroke:#33f7d8!important;stroke-opacity:.86!important}
html[data-theme="dark"] .orbit-stage .energy-path.second{stroke:#7b70ff!important;stroke-opacity:.64!important}
html[data-theme="dark"] .orbit-stage .energy-path.third{stroke:#32ccea!important;stroke-opacity:.5!important}
html[data-theme="dark"] .orbit-stage .teal-rotor circle:first-child{stroke:#31f6d8!important;stroke-opacity:.94!important}
html[data-theme="dark"] .orbit-stage .teal-rotor circle:last-child{stroke:#2acdd7!important;stroke-opacity:.16!important}
html[data-theme="dark"] .orbit-stage .gold-rotor circle{stroke:#766aff!important;stroke-opacity:.52!important}
html[data-theme="dark"] .orbit-stage .orbit-labels rect{fill:rgba(7,19,31,.95)!important;stroke:#2ae5ca!important;stroke-opacity:.55!important;filter:drop-shadow(0 5px 12px rgba(0,0,0,.4)) drop-shadow(0 0 8px rgba(42,235,207,.1))}
html[data-theme="dark"] .orbit-stage .orbit-labels text{fill:#c8fff6!important}
html[data-theme="dark"] #orbitingNodes .planet-halo{fill:rgba(110,98,255,.14)!important}
html[data-theme="dark"] #orbitingNodes .planet.teal .planet-halo{fill:rgba(31,242,211,.16)!important}
html[data-theme="dark"] #orbitingNodes .planet-ring{stroke:rgba(123,109,255,.7)!important}
html[data-theme="dark"] #orbitingNodes .planet.teal .planet-ring{stroke:rgba(35,246,214,.78)!important}
html[data-theme="dark"] #orbitingNodes .planet-trail{stroke:rgba(123,109,255,.4)!important}
html[data-theme="dark"] #orbitingNodes .planet.teal .planet-trail{stroke:rgba(34,246,214,.44)!important}
html[data-theme="dark"] .orbit-stage .core{filter:drop-shadow(0 0 11px rgba(42,245,216,.65)) drop-shadow(0 0 14px rgba(119,104,255,.42))}
html[data-theme="dark"] .orbit-stage .core-halo{fill:rgba(42,243,215,.13)!important}

/* lower rail and sections preserve form but become terminal/science surfaces */
html[data-theme="dark"] .info-rail{
  border-color:rgba(47,232,207,.42);
  background:linear-gradient(180deg,rgba(8,22,33,.96),rgba(5,14,24,.96));
  box-shadow:0 -8px 30px rgba(0,0,0,.28),inset 0 0 25px rgba(40,242,213,.025),0 0 20px rgba(95,83,255,.06);
}
html[data-theme="dark"] .info-rail::after{border-color:#2ae6cb;background:#071522;box-shadow:0 0 9px rgba(39,236,210,.3)}
html[data-theme="dark"] .info-rail article{border-color:rgba(75,228,210,.13)}
html[data-theme="dark"] .info-rail b{color:#dffbf6}
html[data-theme="dark"] .info-rail span{color:#91b7b0}
html[data-theme="dark"] .info-rail img{filter:brightness(1.75) saturate(.25) hue-rotate(112deg) drop-shadow(0 0 6px rgba(42,242,214,.25))}
html[data-theme="dark"] .continuation{
  background:
    linear-gradient(180deg,rgba(4,10,18,.97),rgba(5,11,22,.985)),
    url('../svg/dark-hacking-grid.svg') center/cover;
  border-top-color:rgba(49,235,210,.14);
}
html[data-theme="dark"] .continuation::before{
  background-image:
    radial-gradient(circle at 18% 32%,rgba(39,255,221,.06),transparent 22%),
    linear-gradient(90deg,transparent 49.9%,rgba(36,234,209,.08) 50%,transparent 50.1%),
    linear-gradient(0deg,transparent 49.9%,rgba(108,91,255,.065) 50%,transparent 50.1%);
  background-size:auto,82px 82px,82px 82px;
}
html[data-theme="dark"] .continuation::after{color:rgba(47,247,216,.03)}
html[data-theme="dark"] .section-card{
  border-color:rgba(48,231,207,.24);
  background:linear-gradient(180deg,rgba(8,21,33,.84),rgba(5,13,23,.82));
  box-shadow:0 22px 64px rgba(0,0,0,.42),inset 0 0 32px rgba(42,241,214,.025),0 0 24px rgba(89,74,255,.05);
}
html[data-theme="dark"] .section-card::before{border-color:rgba(41,234,209,.13)}
html[data-theme="dark"] .section-card small{color:#61e4d3}
html[data-theme="dark"] .section-card h2{background:none!important;color:#ebfffb!important;text-shadow:0 0 22px rgba(46,239,211,.07)}
html[data-theme="dark"] .section-card p{color:#9fbbb7}

/* overlays and command UI */
html[data-theme="dark"] .modal-backdrop,html[data-theme="dark"] .command-backdrop{background:rgba(1,5,10,.68);backdrop-filter:blur(12px)}
html[data-theme="dark"] .modal,html[data-theme="dark"] .command-box{
  border-color:rgba(44,236,211,.42);
  background:linear-gradient(180deg,#081726,#050d18);
  box-shadow:0 28px 90px rgba(0,0,0,.62),0 0 0 4px rgba(37,244,214,.05),0 0 34px rgba(102,87,255,.08);
  color:#ecfffb;
}
html[data-theme="dark"] .modal small{color:#63e8d6}
html[data-theme="dark"] .modal-close{color:#7ef8e6}
html[data-theme="dark"] .connect-grid button{border-color:rgba(47,231,207,.2);background:rgba(8,27,38,.82);color:#dffff9}
html[data-theme="dark"] .connect-grid button:hover{background:#0b3140;box-shadow:0 0 22px rgba(42,244,214,.12)}
html[data-theme="dark"] .command-search{border-color:rgba(44,232,208,.18)}
html[data-theme="dark"] .command-search input{color:#edfffb}
html[data-theme="dark"] .command-search input::placeholder{color:#63817d}
html[data-theme="dark"] .command-search kbd{border-color:rgba(63,234,211,.2);color:#9ceee3}
html[data-theme="dark"] .command-item{color:#cbeae5}
html[data-theme="dark"] .command-item:hover,html[data-theme="dark"] .command-item.active{background:rgba(35,240,211,.065);box-shadow:inset 0 0 0 1px rgba(46,233,210,.12)}

/* transition becomes cyber/hacking while keeping existing choreography */
html[data-theme="dark"] .transition-curtain{background:linear-gradient(135deg,rgba(4,10,19,.99),rgba(7,24,35,.99))!important}
html[data-theme="dark"] .transition-curtain::before{content:"";position:absolute;inset:0;background:url('../svg/dark-hacking-grid.svg') center/cover;opacity:.48;mix-blend-mode:screen}
html[data-theme="dark"] .transition-flare{background:linear-gradient(180deg,transparent,rgba(41,255,220,.92),transparent)!important;box-shadow:0 0 45px rgba(40,244,214,.8)!important}
html[data-theme="dark"] .transition-yantra{border-color:rgba(44,244,215,.55)!important;filter:drop-shadow(0 0 25px rgba(45,244,215,.24))}
html[data-theme="dark"] .transition-yantra::before,html[data-theme="dark"] .transition-yantra::after{border-color:rgba(109,94,255,.45)!important}
html[data-theme="dark"] .transition-copy{color:#cffff8!important}
html[data-theme="dark"] .transition-copy small{color:#52dfcf!important}
html[data-theme="dark"] .scroll-progress span{background:linear-gradient(90deg,#28f0d0,#47b9ff,#806cff)!important;box-shadow:0 0 10px rgba(43,244,214,.5)!important}

/* theme flash is directional: warm when entering light, cyber when entering dark */
html[data-theme="dark"] body.theme-changing::before{
  background:radial-gradient(circle at var(--pointer-x,72%) var(--pointer-y,8%),rgba(75,255,228,.42),rgba(30,95,129,.18) 20%,rgba(105,87,255,.13) 38%,transparent 62%);
}

@keyframes darkStarDrift{to{background-position:97px 89px,151px 139px,63px 71px}}

@media(max-width:900px){
  html[data-theme="dark"] .hero-copy::before{top:30px;left:16px}
}
@media(prefers-reduced-motion:reduce){
  html[data-theme="dark"] .sky::after{animation:none}
}
