.header-container {
  justify-content: center;
  margin-top: 10px;
  position: fixed;
  top: 20px;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  z-index: 999;
  pointer-events: auto;
}

.nav-wrapper {
  border-radius: 999px;
  transition: background 0.3s ease, backdrop-filter 0.3s ease,
    box-shadow 0.3s ease, padding 0.3s ease;
  padding: 0;
  pointer-events: auto;
}

.nav-wrapper.scrolled {
  background: var(--nav-bg-scrolled);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 35px var(--nav-shadow-scrolled);
  padding: 8px 12px;
}

.nav {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.nav a {
  position: relative;
  font-size: 16px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-color);
  transition: color 0.4s ease;
}

.nav-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 100%;
  background: var(--indicator-bg);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  transition: all 0.55s cubic-bezier(0.25, 1, 0.5, 1);
}

#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.4s ease, transform 0.6s ease;
  position: absolute;
  right: 5%;
}

#theme-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.dark-mode #theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sun-icon,
.moon-icon {
  transition: transform 0.4s ease, opacity 0.4s ease;
}

#opportunities-button {
  text-decoration: none;
  position: absolute;
  left: 5%;
  background: #d6e9fa;
  padding: 10px 22px;
  border-radius: 777px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-color);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

#opportunities-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.12);
  background: rgba(156, 244, 162, 0.885);
}

body.dark-mode #opportunities-button {
  background: rgba(255, 255, 255, 0.1);
}

body.dark-mode #opportunities-button:hover {
  background: rgba(135, 250, 143, 0.885);
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 20px;
    justify-content: space-between;
  }

  .nav-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .nav a {
    padding: 8px 16px;
    font-size: 14px;
  }

  #opportunities-button {
    position: static;
    padding: 8px 16px;
    font-size: 13px;
  }

  #theme-toggle {
    position: static;
    right: auto;
  }
}

@media (max-width: 480px) {
  .header-container {
    top: 15px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }

  .nav-wrapper {
    position: relative;
    left: auto;
    transform: none;
    width: 100%;
    max-width: 320px;
    order: 3;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .nav a {
    padding: 8px 10px;
    flex: 1;
    text-align: center;
    font-size: 13px;
  }

  #opportunities-button {
    order: 1;
    font-size: 12px;
    padding: 8px 14px;
  }

  #theme-toggle {
    order: 2;
    padding: 6px;
  }
}
