.navbar {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background-color: rgba(255, 255, 255, 0.9);
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    padding-block 0.25s ease,
    transform 0.25s ease;
  padding-block: 0.7rem;
}

:root[data-theme="dark"] .navbar {
  background-color: rgba(15, 23, 42, 0.9);
}

.navbar-scrolled {
  padding-block: 0.45rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.4);
  transform: translateY(-2px);
}

.navbar-brand {
  font-size: 1rem;
}

.navbar-brand span {
  font-weight: 600;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(145deg, #34c759, var(--accent));
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(52, 199, 89, 0.35);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.navbar-brand:hover .brand-icon {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 16px 35px rgba(52, 199, 89, 0.5);
}

:root[data-theme="dark"] .brand-icon {
  box-shadow: 0 10px 25px rgba(0, 184, 90, 0.55);
}

.nav-link {
  position: relative;
  font-size: 0.95rem;
  color: var(--text-main);
  padding-inline: 0.75rem;
  transition: color 0.2s ease;
  text-decoration: none !important;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--wave-2));
  transform-origin: center;
  transform: scaleX(0) translateY(2px);
  opacity: 0;
  transition:
    transform 0.2s ease-out,
    opacity 0.2s ease-out;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--accent);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.active::after {
  transform: scaleX(1) translateY(2px);
  opacity: 1;
}

.nav-link.active {
  color: var(--accent);
}

.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

:root[data-theme="dark"] .nav-link {
  color: var(--text-main) !important;
}

:root[data-theme="dark"] .nav-link.active {
  color: var(--accent) !important;
}

:root[data-theme="dark"] .nav-link:hover {
  color: var(--accent) !important;
}

.navbar-brand,
.nav-link {
  text-decoration: none !important;
}

.navbar-brand:hover,
.nav-link:hover,
.nav-link:focus,
.nav-link.active {
  text-decoration: none !important;
  outline: none !important;
}

#themeToggle,
#themeToggleMobile {
  border-radius: 999px;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

#themeToggle:hover,
#themeToggleMobile:hover {
  background-color: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-1px);
}

#themeToggle:focus-visible,
#themeToggleMobile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler-icon {
  display: inline-block;
  width: 1.6rem;
  height: 1.6rem;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% auto;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(0,0,0,0.85)' stroke-width='2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

:root[data-theme='dark'] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255,255,255,0.9)' stroke-width='2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

body.menu-open {
  overflow: hidden !important;
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(25px);
  }

  :root[data-theme="dark"] .navbar-collapse {
    background-color: rgba(0, 0, 0, 0.9) !important;
  }
  .navbar-toggler {
  border: 1px solid rgba(0, 0, 0, 0.85) !important;
}


:root[data-theme="dark"] .navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
}
}