:root {
  --linear-ease: linear(
    0,
    0.068,
    0.19 2.7%,
    0.804 8.1%,
    1.037,
    1.199 13.2%,
    1.245,
    1.27 15.8%,
    1.274,
    1.272 17.4%,
    1.249 19.1%,
    0.996 28%,
    0.949,
    0.928 33.3%,
    0.926,
    0.933 36.8%,
    1.001 45.6%,
    1.013,
    1.019 50.8%,
    1.018 54.4%,
    1 63.1%,
    0.995 68%,
    1.001 85%,
    1
  );
  --color-1: #667eea;
  --color-2: #764ba2;
  --color-3: #5fb0ff; /* replaced pink with blue */
  --color-4: #80d0c7;
}

/* Gooey Navigation Container */
.gooey-nav-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  z-index: 150;
}

.gooey-nav-container nav {
  display: flex;
  position: relative;
  transform: translate3d(0, 0, 0.01px);
}

.gooey-nav-container nav ul {
  display: flex;
  gap: 1.5em;
  list-style: none;
  padding: 0 1em;
  margin: 0;
  position: relative;
  z-index: 160;
  color: white;
  text-shadow: 0 1px 1px hsl(205deg 30% 10% / 0.2);
}

.gooey-nav-container nav ul li {
  border-radius: 100vw;
  position: relative;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 0 0.5px 1.5px transparent;
  color: white;
}

.gooey-nav-container nav ul li a {
  display: inline-block;
  padding: 0.6em 1.3em;
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  font-size: 1rem;
}

.gooey-nav-container nav ul li:focus-within:has(:focus-visible) {
  box-shadow: 0 0 0.5px 1.5px white;
}

.gooey-nav-container nav ul li::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100vw;
  background: white;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
  z-index: -1;
}

.gooey-nav-container nav ul li.active {
  color: black;
  text-shadow: none;
}

.gooey-nav-container nav ul li.active::after {
  opacity: 1;
  transform: scale(1);
}

/* Effect Elements */
.gooey-nav-container .effect {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  opacity: 1;
  pointer-events: none;
  display: grid;
  place-items: center;
  z-index: 140;
  transition: all 0.3s ease;
}

.gooey-nav-container .effect.text {
  color: white;
  transition: color 0.3s ease;
  font-weight: 500;
  text-shadow: 0 1px 1px hsl(205deg 30% 10% / 0.2);
  opacity: 0;
}

.gooey-nav-container .effect.text.active {
  color: black;
  text-shadow: none;
  opacity: 1;
}

.gooey-nav-container .effect.filter {
  filter: blur(5px) contrast(110%);
  mix-blend-mode: lighten;
}

.gooey-nav-container .effect.filter::before {
  content: '';
  position: absolute;
  inset: -8px;
  z-index: -2;
  /* Tight radial halo matching the pill size to avoid visible blotches */
  background: radial-gradient(
    circle at 50% 50%,
    rgba(15,15,30,0.95) 0%,
    rgba(15,15,30,0.75) 8%,
    rgba(15,15,30,0.3) 22%,
    rgba(15,15,30,0.0) 40%
  );
  border-radius: 100vw;
}

.gooey-nav-container .effect.filter::after {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  transform: scale(0);
  opacity: 0;
  z-index: -1;
  border-radius: 100vw;
}

.gooey-nav-container .effect.active::after {
  animation: pill 0.3s ease both;
}

@keyframes pill {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Particles Animation */
.particle,
.point {
  display: block;
  opacity: 0;
  width: 20px;
  height: 20px;
  border-radius: 100%;
  transform-origin: center;
}

.particle {
  --time: 1200ms;
  position: absolute;
  top: calc(50% - 10px);
  left: calc(50% - 10px);
  animation: particle var(--time) ease 1 -350ms;
}

.point {
  background: var(--color);
  opacity: 1;
  animation: point var(--time) ease 1 -350ms;
}

@keyframes particle {
  0% {
    transform: rotate(0deg) translate(var(--start-x), var(--start-y));
    opacity: 1;
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }

  70% {
    transform: rotate(calc(var(--rotate) * 0.5)) translate(calc(var(--end-x) * 1.2), calc(var(--end-y) * 1.2));
    opacity: 1;
    animation-timing-function: ease;
  }

  85% {
    transform: rotate(calc(var(--rotate) * 0.66)) translate(var(--end-x), var(--end-y));
    opacity: 1;
  }

  100% {
    transform: rotate(calc(var(--rotate) * 1.2)) translate(calc(var(--end-x) * 0.5), calc(var(--end-y) * 0.5));
    opacity: 1;
  }
}

@keyframes point {
  0% {
    transform: scale(0);
    opacity: 0;
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }

  25% {
    transform: scale(calc(var(--scale) * 0.25));
  }

  38% {
    opacity: 1;
  }

  65% {
    transform: scale(var(--scale));
    opacity: 1;
    animation-timing-function: ease;
  }

  85% {
    transform: scale(var(--scale));
    opacity: 1;
  }

  100% {
    transform: scale(0);
    opacity: 0;
  }
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  .gooey-nav-container nav ul {
    gap: 1em;
    padding: 0 0.5em;
  }
  
  .gooey-nav-container nav ul li a {
    padding: 0.5em 1em;
    font-size: 0.75rem;
  }
}
