/* ═══════════════════════════════════════════════════════
   SKELINE — Harmonized navbar (overrides per-page inline styles)
   Linked AFTER </style> in every page so cascade wins.
   ═══════════════════════════════════════════════════════ */

#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 72px;
  background: transparent;
  border-bottom: 1px solid transparent;
  padding: 0;
  transition: background .35s ease, border-color .35s ease,
              box-shadow .35s ease, backdrop-filter .35s ease;
}
#navbar.scrolled {
  background: rgba(10,10,15,.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom-color: rgba(255,255,255,.07);
  box-shadow: 0 4px 40px rgba(0,0,0,.22);
}
body.light #navbar.scrolled {
  background: rgba(245,246,250,.94);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 48px;
  justify-content: unset;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0 auto;
}
.nav-links > li > a {
  color: var(--text-muted, #8888AA);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 100px;
  transition: color .2s, background .2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links > li > a:hover {
  color: var(--text, #F5F5F5);
  background: rgba(255,255,255,.06);
}
.nav-links > li > a.active {
  color: var(--accent, #00D4FF);
}
body.light .nav-links > li > a:hover {
  background: rgba(0,0,0,.05);
}

/* Logo */
#logoImg, .logo-img {
  height: 32px;
  display: block;
  width: auto;
}

@media (max-width: 900px) {
  .nav-inner { padding: 0 20px; gap: 0; }
}

/* ── HAMBURGER BUTTON ────────────────────────────────────── */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text, #F5F5F5);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease, width .3s ease;
  transform-origin: center;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; width: 12px; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
body.light .menu-toggle span { background: #0C0C18; }

/* ── OVERLAY ─────────────────────────────────────────────── */
.mob-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.52);
  z-index: 198;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.mob-overlay.open { display: block; }

/* ── MOBILE NAV DRAWER ───────────────────────────────────── */
.mobile-nav {
  display: flex !important;
  flex-direction: column;
  position: fixed !important;
  top: 0; left: auto !important; right: 0; bottom: 0;
  width: min(300px, 82vw);
  background: rgba(10,10,15,.97);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border-left: 1px solid rgba(255,255,255,.07);
  z-index: 199;
  transform: translateX(110%);
  transition: transform .32s cubic-bezier(.32,0,.67,0);
  overflow: hidden;
}
.mobile-nav.open {
  transform: translateX(0) !important;
  transition: transform .4s cubic-bezier(.22,1,.36,1) !important;
}
.mob-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.mob-close {
  background: none;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted, #8888AA);
  font-size: 16px;
  line-height: 1;
  transition: border-color .2s, color .2s;
}
.mob-close:hover { border-color: var(--accent, #00D4FF); color: var(--accent, #00D4FF); }
.mob-nav-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px 16px;
  -webkit-overflow-scrolling: touch;
}
.mob-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted, #8888AA);
  padding: 18px 0 6px;
  display: block;
}
.mobile-nav a {
  color: var(--text-dim, #C0C0D8);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color .2s;
}
.mobile-nav a:hover { color: var(--accent, #00D4FF); }
.mob-arrow {
  font-size: 12px;
  color: var(--text-muted, #8888AA);
  transition: transform .2s, color .2s;
  flex-shrink: 0;
}
.mobile-nav a:hover .mob-arrow { color: var(--accent, #00D4FF); transform: translateX(3px); }
.mob-nav-foot {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.mob-lang { display: flex; gap: 6px; margin-bottom: 12px; }
.mob-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent, #00D4FF);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  padding: 13px;
  border-radius: 100px;
  text-decoration: none;
  transition: filter .2s, transform .2s;
  border: none;
}
.mob-cta:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* Light mode */
body.light .mobile-nav { background: rgba(248,248,252,.97); border-left-color: rgba(0,0,0,.07); }
body.light .mobile-nav a { color: rgba(0,0,0,.6); border-bottom-color: rgba(0,0,0,.06); }
body.light .mob-close { border-color: rgba(0,0,0,.1); color: rgba(0,0,0,.45); }
body.light .mob-group-label { color: rgba(0,0,0,.4); }
body.light .mob-cta { background: #111; color: #fff; }

@media (max-width: 768px) {
  .menu-toggle { display: flex !important; }
  .nav-links { display: none !important; }
  .nav-actions .btn-sm { display: none !important; }
  .lang-switcher { display: none !important; }
  .nav-actions { display: flex !important; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
  .theme-toggle { display: flex !important; }
  .nav-inner { justify-content: space-between !important; gap: 0 !important; padding: 0 20px !important; }
}

/* ── Animated theme toggle ── */
.theme-toggle svg {
  overflow: visible;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.theme-toggle svg.moon-mode {
  transform: rotate(270deg);
}
.theme-toggle .tt-rays {
  transform-origin: 12px 12px;
  transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.theme-toggle .tt-rays.hidden {
  opacity: 0;
  transform: scale(0) rotate(-30deg);
}
.theme-toggle svg circle,
.theme-toggle svg line {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.theme-toggle:hover { transform: scale(1.1); }
.theme-toggle:active { transform: scale(0.88) !important; }
