/* ==========================================================================
   APPLE-INSPIRED LIQUID GLASS NAVBAR (SPECULAR REFLECTION & REFRACTIVE DISTORTION)
   ========================================================================== */

/* The Liquid Glass Nav Capsule Container */
.glass-nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);

  width: max-content;
  max-width: min(960px, calc(100% - 24px));
  height: 52px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 5px 8px 5px 12px;

  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-top-color: rgba(255, 255, 255, 0.4) !important;

  /* Optical Liquid Glass Gradient & Refraction */
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.04) 40%,
    rgba(255, 255, 255, 0.02) 60%,
    rgba(255, 255, 255, 0.08) 100%
  );

  /* OPTICAL REFRACTION, CHROMATIC BLUR & LIQUID SATURATION */
  backdrop-filter:
    blur(28px)
    saturate(210%)
    brightness(1.08)
    contrast(102%);

  -webkit-backdrop-filter:
    blur(28px)
    saturate(210%)
    brightness(1.08)
    contrast(102%);

  /* Apple Liquid Glass Soft Depth & Dual Specular Inset Reflections */
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.42),
    0 6px 18px rgba(0, 0, 0, 0.22),
    inset 0 1.5px 2px 0 rgba(255, 255, 255, 0.65),
    inset 0 -1.5px 2px 0 rgba(0, 0, 0, 0.35);

  overflow: hidden;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, box-shadow 0.4s ease;
}

[data-theme="dark"] .glass-nav {
  background: linear-gradient(
    135deg,
    rgba(20, 28, 48, 0.55) 0%,
    rgba(10, 15, 28, 0.65) 50%,
    rgba(15, 23, 42, 0.55) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-top-color: rgba(255, 255, 255, 0.38) !important;
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.55),
    0 6px 20px rgba(0, 0, 0, 0.35),
    inset 0 1.5px 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1.5px 2px 0 rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .glass-nav {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.86) 0%,
    rgba(255, 255, 255, 0.68) 45%,
    rgba(240, 245, 255, 0.8) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.95) !important;
  border-top-color: #ffffff !important;
  box-shadow:
    0 18px 42px rgba(60, 80, 120, 0.12),
    0 4px 14px rgba(60, 80, 120, 0.06),
    inset 0 1.5px 2px #ffffff,
    inset 0 -1.5px 2px rgba(100, 120, 160, 0.14);
}

/* Optical Meniscus Highlight (Top Curved Liquid Specular Line) */
.glass-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48%;
  border-radius: 9999px 9999px 100px 100px / 9999px 9999px 20px 20px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.08) 60%,
    transparent 100%
  );
  pointer-events: none;
}

[data-theme="light"] .glass-nav::before {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(255, 255, 255, 0.25) 60%,
    transparent 100%
  );
}

/* Liquid Sheen Refractive Caustic Distortion */
.glass-nav::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.03) 25%,
    transparent 45%,
    transparent 70%,
    rgba(255, 255, 255, 0.12) 100%
  );
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* ==========================================================================
   ACTIVE SEE-THROUGH GLASS SLIDER WITH MOVING REFLECTION
   ========================================================================== */
.active-glass {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 6px;
  width: 0;

  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-top-color: rgba(255, 255, 255, 0.6);

  /* SEE-THROUGH LIQUID GLASS */
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.25),
      rgba(255, 255, 255, 0.08)
    );

  backdrop-filter:
    blur(14px)
    saturate(200%)
    brightness(1.12);

  -webkit-backdrop-filter:
    blur(14px)
    saturate(200%)
    brightness(1.12);

  box-shadow:
    0 4px 14px rgba(15, 23, 42, 0.08),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.8),
    inset 0 -1px 1px rgba(255, 255, 255, 0.1);

  pointer-events: none;

  transition:
    left 0.45s cubic-bezier(.22, 1, .36, 1),
    width 0.45s cubic-bezier(.22, 1, .36, 1),
    opacity 0.2s ease;

  z-index: 1;
  opacity: 0;
}

[data-theme="dark"] .active-glass {
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.18),
      rgba(255, 255, 255, 0.05)
    );
  border-color: rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.45);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.35),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.5);
}

/* Moving Reflection on Active Glass */
.active-glass::before {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  filter: blur(6px);
  animation: glassShine 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glassShine {
  0% {
    left: -60%;
  }
  50% {
    left: 120%;
  }
  100% {
    left: 120%;
  }
}

/* ==========================================================================
   INDIVIDUAL BUT CONNECTED CAPSULE NAV LINKS
   ========================================================================== */
.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 5px;
  position: relative;
  z-index: 2;
  height: 100%;
}

.nav-link {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  height: 36px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--text-secondary);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 2px 6px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-sizing: border-box;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 3;
  white-space: nowrap;
}

[data-theme="light"] .nav-link {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.9);
  color: #475569;
  box-shadow: inset 0 1px 1px #ffffff, 0 2px 6px rgba(70, 90, 130, 0.08);
}

.nav-link .nav-icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.2;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
  color: #ffffff;
  transform: translateY(-1px);
}

[data-theme="light"] .nav-link:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: #ffffff;
  color: #0f172a;
  box-shadow: inset 0 1px 1px #ffffff, 0 4px 12px rgba(70, 90, 130, 0.14);
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.28) 0%, rgba(59, 130, 246, 0.18) 100%);
  border-color: rgba(165, 180, 252, 0.45);
  color: #ffffff;
  font-weight: 700;
  box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.4), 0 4px 14px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .nav-link.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14) 0%, rgba(59, 130, 246, 0.08) 100%);
  border-color: rgba(99, 102, 241, 0.35);
  color: #312e81;
  box-shadow: inset 0 1px 1px #ffffff, 0 3px 10px rgba(70, 90, 130, 0.12);
}

/* Right Quick Actions (Theme Switcher Alignment) */
.nav-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding-left: 6px;
  margin-left: 4px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  position: relative;
  z-index: 3;
  height: 24px;
}

[data-theme="light"] .nav-actions {
  border-left-color: rgba(0, 0, 0, 0.1);
}

.icon-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  margin: 0;
  line-height: 1;
  box-sizing: border-box;
}

[data-theme="light"] .icon-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
  transform: scale(1.08);
}

.icon-btn span,
.icon-btn svg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
}

.nav-resume-btn {
  display: none !important;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

.nav-brand-mobile {
  display: none;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-monogram {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.brand-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

/* Responsive Navigation Adjustments */
@media (max-width: 960px) {
  .glass-nav {
    height: 48px;
    padding: 4px 6px 4px 10px;
  }
  .nav-link {
    padding: 5px 9px;
    font-size: 0.74rem;
    gap: 4px;
  }
  .nav-link .nav-icon {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 820px) {
  .nav-brand-mobile {
    display: inline-flex;
  }
  .nav-links {
    display: none;
  }
  .active-glass {
    display: none;
  }
  .menu-toggle {
    display: flex;
  }
  .glass-nav {
    height: 50px;
    padding: 6px 14px;
    width: calc(100% - 24px);
    max-width: 560px;
    justify-content: space-between;
  }
}

/* Dynamic Liquid Glass Theme Switcher Pill */
.theme-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.22), 0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

[data-theme="light"] .theme-toggle-pill {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 1px 1px #ffffff, 0 2px 8px rgba(70, 90, 130, 0.1);
  color: #0f172a;
}

.theme-toggle-pill:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 4px 12px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .theme-toggle-pill:hover {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 1px 1px #ffffff, 0 4px 12px rgba(70, 90, 130, 0.12);
}

.theme-toggle-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

@media (max-width: 520px) {
  .theme-toggle-label {
    display: none;
  }
  .theme-toggle-pill {
    padding: 0 9px;
    width: 34px;
    justify-content: center;
  }
}

