
/* THEME TOGGLE */
.theme-toggle {
  margin-left: 18px;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  outline: none;
}

.theme-toggle-track {
  position: relative;
  width: 66px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f172a, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.theme-toggle-thumb {
  position: absolute;
  top: 50%;
  left: 3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
  transform: translateY(-50%);
  transition: left 0.28s ease, background 0.25s ease, transform 0.2s ease;
}

.theme-toggle:hover .theme-toggle-thumb {
  transform: translateY(-50%) scale(1.03);
}

.toggle-icon {
    width: 16px;
    height: 16px;
    display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  font-size: 13px;
  line-height: 1;
  z-index: 1;
  pointer-events: none;

}

.toggle-moon {
  color: #cbd5e1;
}

.toggle-sun {
  color: #fbbf24;
  transform: translateX(2px);
}

/* LIGHT MODE TOGGLE LOOK */
html.light-mode .theme-toggle-track {
  background: linear-gradient(90deg, #dbeafe, #bfdbfe);
  border-color: rgba(37, 99, 235, 0.16);
  box-shadow: inset 0 1px 3px rgba(37, 99, 235, 0.10);
}

html.light-mode .theme-toggle-thumb {
  left: 35px;
  background: #ffffff;
}

html.light-mode .toggle-moon {
  color: #64748b;
}

html.light-mode .toggle-sun {
  color: #f59e0b;
}

/* FOCUS */
.theme-toggle:focus-visible .theme-toggle-track {
  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.20),
    inset 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* MOBILE NAV SUPPORT */
@media (max-width: 900px) {
  .theme-toggle {
    margin-left: 12px;
  }
}

@media (max-width: 340px) {
  .theme-toggle {
    margin-left: 0;
    margin-top: 6px;
  }
}



/* HAMBURGER */
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-soft);
  background: var(--card-bg);
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0;
  box-shadow: var(--card-shadow);
}

.menu-toggle span {
  width: 18px;
  height: 2.2px;
  border-radius: 999px;
  background: var(--text-dark);
  display: block;
}

/* MOBILE MENU OVERLAY */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(6px);
  z-index: 1090;
}

/* MOBILE MENU PANEL */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: min(82vw, 300px);
  height: 100vh;
  background: var(--card-bg);
  border-left: 1px solid var(--line-soft);
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.24);
  padding: 22px 18px 20px;
  z-index: 1100;
  transition: right 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-close {
  align-self: flex-end;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-soft);
  background: transparent;
  color: var(--text-dark);
  border-radius: 10px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  margin-top: 18px;
  gap: 6px;
}

.mobile-menu-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 12px;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-menu-links a:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}
.mobile-menu .mobile-theme-toggle {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin-left: 0;
  margin-top: 0;
}

.mobile-menu-bottom {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: flex-start;
}

/* DESKTOP / MOBILE SWITCH */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .theme-toggle {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .navbar {
    justify-content: space-between;
  }
}

@media (min-width: 901px) {
  .mobile-menu,
  .mobile-menu-overlay {
    display: none;
  }
}





.no-theme-transition * {
  transition: none !important;
}
