.gooey-nav {
  --gn-pad: 6px;
  --gn-gap: 4px;
  --gn-font: 14px;
  --gn-x: 16px;
  --gn-y: 9px;
  position: relative;
  display: inline-flex;
  max-width: 100%;
  font-family: inherit;
  font-size: var(--gn-font);
  line-height: 1.2;
}

.gooey-nav--sm {
  --gn-pad: 5px;
  --gn-gap: 2px;
  --gn-font: 13px;
  --gn-x: 13px;
  --gn-y: 7px;
}

.gooey-nav--lg {
  --gn-pad: 7px;
  --gn-gap: 6px;
  --gn-font: 16px;
  --gn-x: 20px;
  --gn-y: 11px;
}

.gooey-nav--framed {
  padding: var(--gn-pad);
  border-radius: 999px;
  background: var(--gn-frame);
  box-shadow: var(--gn-frame-shadow);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
}

.gooey-nav__stage {
  position: relative;
  max-width: 100%;
}

.gooey-nav__canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.gooey-nav__fallback {
  position: absolute;
  top: 0;
  left: 0;
  display: none;
  border-radius: 999px;
  background: var(--gn-pill);
  pointer-events: none;
}

.gooey-nav__list {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  gap: var(--gn-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.gooey-nav__list--active {
  position: absolute;
  inset: 0;
  color: var(--gn-active-ink);
  visibility: hidden;
  clip-path: inset(100%);
  pointer-events: none;
}

.gooey-nav__item {
  display: flex;
}

.gooey-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: var(--gn-y) var(--gn-x);
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--gn-muted);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.gooey-nav__list--active .gooey-nav__link {
  color: inherit;
}

.gooey-nav__item[data-active] .gooey-nav__link {
  color: var(--gn-ink);
}

.gooey-nav__link:focus-visible {
  outline: 2px solid var(--gn-ink);
  outline-offset: 2px;
}

.gooey-nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.gooey-nav__icon svg,
.gooey-nav__icon i {
  width: 1.15em;
  height: 1.15em;
  font-size: 1.15em;
  line-height: 1;
}

.gooey-nav__rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px var(--gn-frame-edge),
    inset 0 1px 0 var(--gn-frame-highlight);
  pointer-events: none;
}

@media (hover: hover) {
  .gooey-nav__link:hover {
    color: var(--gn-ink);
  }
}

/* Floating Bottom Dock Container */
.gooey-nav-wrapper {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
  max-width: calc(100vw - 32px);
  display: flex;
  justify-content: center;
  animation: gnFadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes gnFadeInUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Hide mobile "Other" button on desktop */
.gooey-nav__item--more {
  display: none;
}

@media (max-width: 768px) {
  .gooey-nav-wrapper {
    bottom: 14px;
    max-width: calc(100vw - 16px);
  }
  .gooey-nav {
    --gn-pad: 5px;
    --gn-gap: 4px;
    --gn-x: 12px;
    --gn-y: 8px;
    --gn-font: 13px;
  }
  .gooey-nav__link {
    gap: 6px;
  }
}

@media (max-width: 640px) {
  .gooey-nav-wrapper {
    bottom: 16px;
    max-width: calc(100vw - 20px);
  }

  /* Collapsed mobile mode: show only Home, Projects, and Other at comfortable size */
  .gooey-nav {
    --gn-pad: 6px;
    --gn-gap: 4px;
    --gn-x: 15px;
    --gn-y: 9px;
    --gn-font: 13.5px;
    transition: border-radius 0.25s ease, padding 0.25s ease;
  }

  .gooey-nav:not(.gooey-nav--expanded) .gooey-nav__item--extra {
    display: none !important;
  }

  .gooey-nav:not(.gooey-nav--expanded) .gooey-nav__item--more {
    display: flex !important;
  }

  /* Expanded mobile mode: show all 6 items in a clean 3x2 grid */
  .gooey-nav.gooey-nav--expanded {
    --gn-pad: 8px;
    --gn-gap: 6px;
    --gn-x: 12px;
    --gn-y: 8px;
    --gn-font: 13px;
    border-radius: 26px;
  }

  .gooey-nav.gooey-nav--expanded .gooey-nav__item--extra {
    display: flex !important;
  }

  .gooey-nav.gooey-nav--expanded .gooey-nav__item--more {
    display: none !important;
  }

  .gooey-nav.gooey-nav--expanded .gooey-nav__list {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: var(--gn-gap);
    justify-items: center;
    align-items: center;
  }
}

@media (max-width: 380px) {
  .gooey-nav {
    --gn-x: 12px;
    --gn-y: 8px;
    --gn-font: 12.5px;
  }
  .gooey-nav.gooey-nav--expanded {
    --gn-x: 9px;
    --gn-y: 7px;
    --gn-font: 12px;
  }
}

