/* Floating dock navigation */

.dock-shell {
  position: sticky;
  top: 4vh;
  left: 50%;
  transform: translateX(-50%);
  width: fit-content;
  z-index: 999;
  transition: all 0.5s ease, opacity 0.3s ease;
}

.dock-shell.dock-hidden {
  transform: translate(-50%, -20rem);
  pointer-events: none;
}

.dock-shell.dock-hidden:not(.dock-stuck) {
  transform: translate(-50%, 0);
  opacity: 0;
  z-index: -1;
}

.dock-shell.dock-stuck .floating-dock {
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.75),
    0 0 26px rgba(0, 0, 0, 0.6);
}

.floating-dock {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: rgba(20, 21, 25, 0.8);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.2s ease;
}

.floating-dock::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(210, 56, 120, 0.9), rgba(161, 119, 255, 0.9), rgba(102, 204, 254, 0.9));
  z-index: -1;
  opacity: 0.9;
  box-shadow: 0 0 14px rgba(102, 204, 254, 0.25);
}

.floating-dock::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(20, 21, 25, 0.9);
  z-index: -1;
}

.dock-indicator {
  position: absolute;
  top: 0.2rem;
  height: calc(100% - 0.4rem);
  border-radius: 999px;
  background: rgba(210, 56, 120, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(210, 56, 120, 0.45),
    0 0 10px rgba(210, 56, 120, 0.25);
  transition: transform 0.18s ease, width 0.18s ease, opacity 0.14s ease;
  opacity: 0;
  pointer-events: none;
}

.dock-link {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  transition: background-color 0.16s ease, color 0.16s ease;
  position: relative;
  z-index: 1;
}

.dock-link:hover {
  background: rgba(210, 56, 120, 0.14);
  color: var(--accent-pink);
  text-decoration: none;
}

.dock-link.is-active,
.dock-top.is-active,
.dock-link.is-active:hover,
.dock-top.is-active:hover {
  color: var(--accent-pink);
  background: transparent;
}

@media (max-width: 820px) {
  .dock-shell {
    position: fixed;
    bottom: 1rem;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
  }

  .dock-shell.dock-hidden {
    transform: translate(-50%, 20rem);
  }

  /* Disable hover styling on mobile */
  .dock-link:hover,
  .dock-top:hover {
    background: transparent;
    color: inherit;
    transform: none;
    text-decoration: none;
  }
}

@media (min-width: 821px) {
  .floating-dock {
    padding: 0.8rem 1.25rem;
    gap: 0.4rem;
  }

  .dock-shell.dock-stuck .floating-dock {
    box-shadow:
      0 24px 70px rgba(0, 0, 0, 0.85),
      0 0 40px rgba(0, 0, 0, 0.7);
  }
}

.dock-anchor {
  display: block;
  height: 1px;
}

#career.dock-anchor {
  scroll-margin-top: 6rem;
}