/* Moon and sun switch. Checked keeps the original dark theme. */
.theme-switch {
  font-size: 12px;
  position: relative;
  display: inline-block;
  flex: none;
  width: 4em;
  height: 2.2em;
  border-radius: 30px;
  box-shadow: 0 0 10px rgba(0, 0, 0, .1);
}
.theme-switch input {
  position: absolute;
  inset: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.theme-slider {
  position: absolute;
  inset: 0;
  background: #00a6ff;
  border-radius: 30px;
  overflow: hidden;
  pointer-events: none;
  transition: background-color .4s;
}
.theme-slider::before {
  position: absolute;
  content: "";
  width: 1.2em;
  height: 1.2em;
  left: .5em;
  bottom: .5em;
  border-radius: 50%;
  background: #ffcf48;
  box-shadow: 0 0 0 .12em rgba(255, 255, 255, .5);
  transition: transform .4s cubic-bezier(.81, -.04, .38, 1.5), background-color .4s, box-shadow .4s;
}
.theme-switch input:checked + .theme-slider { background: #2a2a2a; }
.theme-switch input:checked + .theme-slider::before {
  transform: translateX(1.8em);
  background: transparent;
  box-shadow: inset 8px -4px 0 0 #fff;
}
.theme-switch input:focus-visible + .theme-slider { outline: 3px solid #129e43; outline-offset: 3px; }
.theme-switch .star {
  position: absolute;
  width: .294em;
  height: .294em;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .4s;
}
.theme-switch .star_1 { left: 2.5em; top: .5em; }
.theme-switch .star_2 { left: 2.2em; top: 1.2em; }
.theme-switch .star_3 { left: 3em; top: .9em; }
.theme-switch input:checked + .theme-slider .star { opacity: 1; }
.theme-switch .cloud {
  width: 3.5em;
  position: absolute;
  bottom: -1.4em;
  left: -1.1em;
  transition: opacity .4s;
}
.theme-switch input:checked + .theme-slider .cloud { opacity: 0; }

/* Light palette leaves the existing dark styles untouched. */
html[data-theme="light"] { color-scheme: light; }
html[data-theme="light"] body { background: #f7faf7; color: #192b20; }
html[data-theme="light"] ::-webkit-scrollbar-track { background: #f7faf7; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #bdcfc0; }
html[data-theme="light"] .cyber-grid {
  background-image: linear-gradient(to right, rgba(23, 74, 42, .055) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(23, 74, 42, .055) 1px, transparent 1px);
}
html[data-theme="light"] .glow-radial-top {
  background: radial-gradient(circle 700px at 50% -10%, rgba(57, 229, 61, .14), transparent 75%);
}
html[data-theme="light"] .glass-panel {
  background: rgba(255, 255, 255, .92);
  border-color: #dce9df;
}
html[data-theme="light"] .glass-card-interactive {
  background: #fff;
  border-color: #dce9df;
  box-shadow: 0 8px 24px rgba(22, 65, 35, .035);
}
html[data-theme="light"] [class~="bg-black"],
html[data-theme="light"] [class~="bg-black/90"],
html[data-theme="light"] [class~="bg-black/95"] { background-color: #fff; }
html[data-theme="light"] [class~="bg-zinc-950"] { background-color: #f3f8f4; }
html[data-theme="light"] [class~="bg-zinc-900"] { background-color: #eaf3eb; }
html[data-theme="light"] [class~="bg-zinc-800"] { background-color: #d4e6d8; }
html[data-theme="light"] [class~="bg-white/10"] { background-color: #e9f4ec; }
html[data-theme="light"] [class~="bg-gradient-to-b"] {
  background-image: linear-gradient(to bottom, #f7faf7, #eaf4ec, #f7faf7);
}
html[data-theme="light"] [class~="bg-gradient-to-r"] {
  background-image: linear-gradient(to right, #142e1f, #087e32);
}
html[data-theme="light"] [class~="border-white/5"],
html[data-theme="light"] [class~="border-white/10"],
html[data-theme="light"] [class~="border-white/15"],
html[data-theme="light"] [class~="border-white/20"] { border-color: #d7e5da; }
html[data-theme="light"] [class~="text-white"],
html[data-theme="light"] [class~="text-zinc-200"] { color: #192b20; }
html[data-theme="light"] [class~="text-zinc-300"],
html[data-theme="light"] [class~="text-brand-muted"] { color: #435b4b; }
html[data-theme="light"] [class~="text-zinc-400"],
html[data-theme="light"] [class~="text-brand-dim"] { color: #4e6855; }
html[data-theme="light"] [class~="text-zinc-500"],
html[data-theme="light"] [class~="text-zinc-600"] { color: #536b5a; }
html[data-theme="light"] [class~="text-[#39E53D]"] { color: #087b30; }
html[data-theme="light"] [class~="text-red-400"] { color: #b42332; }
html[data-theme="light"] [class~="hover:text-white"]:hover { color: #075d28; }
html[data-theme="light"] .partner-card {
  box-shadow: 0 8px 26px rgba(15, 63, 30, .08);
}
html[data-theme="light"] .partner-card [class~="group-hover:bg-[#39E53D]"]:hover,
html[data-theme="light"] .partner-card:hover [class~="group-hover:bg-[#39E53D]"] { color: #092b15; }
html[data-theme="light"] .brand-mark { background: #000; border-color: #33513a; }
html[data-theme="light"] input:not([type="checkbox"]),
html[data-theme="light"] select { color: #192b20; }
html[data-theme="light"] input::placeholder { color: #597463; opacity: 1; }
html[data-theme="light"] #toastNotification > div { box-shadow: 0 10px 32px rgba(15, 63, 30, .15); }
@media (max-width: 400px) {
  header .header-brand-title { font-size: .875rem; letter-spacing: 0; }
  header .header-brand-tagline { display: none; }
  header .brand-mark { width: 2rem; height: 2rem; }
  header .theme-switch { font-size: 10px; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  header nav { display: none; }
  header #mobileBtn { display: block; }
  header #mobileMenu:not(.hidden) { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  .theme-switch *, .theme-slider::before { transition-duration: .01ms !important; }
}
