/* ==========================================================================
   TechBrowser — Liquid glass navbar
   Vanilla uyarlama: Nimbus UI "Waterline" / guglielmogiannattasio.it
   Site başlığındaki ana menü; WebGL su damlası, CSS fallback ve site teması.
   ========================================================================== */

.nimbus-nav {
  --n-tint: rgba(255, 255, 255, .14);
  --n-fg: #0A0B0D;
  --n-fg-soft: rgba(10, 11, 13, .6);
  --n-rim: rgba(255, 255, 255, .7);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-radius: 999px;
  isolation: isolate;
  font-family: var(--sans, ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI", system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.nimbus-nav[data-tone="dark"] {
  --n-tint: rgba(10, 11, 13, .18);
  --n-fg: #F5F6F8;
  --n-fg-soft: rgba(245, 246, 248, .66);
  --n-rim: rgba(255, 255, 255, .34);
}

.nimbus-glass {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -2;
  overflow: hidden;
  background: var(--n-tint);
  -webkit-backdrop-filter: blur(10px) brightness(1.08);
  backdrop-filter: blur(10px) brightness(1.08);
  box-shadow:
    inset 0 1px 1px var(--n-rim),
    inset 0 0 0 1px rgba(255, 255, 255, .2),
    0 12px 32px -14px rgba(0, 0, 0, .55),
    0 2px 6px rgba(0, 0, 0, .18);
}

.nimbus-nav[data-refract="on"] .nimbus-glass {
  -webkit-backdrop-filter: url(#nimbus-refract) blur(2px) brightness(1.08);
  backdrop-filter: url(#nimbus-refract) blur(2px) brightness(1.08);
}

.nimbus-water {
  position: absolute;
  left: -14px;
  top: -14px;
  z-index: -1;
  pointer-events: none;
}

.nimbus-nav[data-gl="off"] .nimbus-water {
  display: none;
}

.nimbus-drop {
  display: none;
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  border-radius: 999px;
  z-index: -1;
  pointer-events: none;
  will-change: transform, width;
  background:
    radial-gradient(120% 140% at 30% 0%, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0) 55%),
    rgba(255, 255, 255, .38);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .95),
    inset 0 -2px 6px rgba(255, 255, 255, .12),
    inset 0 0 0 1px rgba(255, 255, 255, .55),
    0 6px 16px -6px rgba(0, 0, 0, .45);
}

.nimbus-nav[data-gl="off"] .nimbus-drop {
  display: block;
}

.nimbus-item {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--n-fg-soft);
  font-family: inherit;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  letter-spacing: -.01em;
  text-decoration: none;
  cursor: pointer;
  transition: color .25s;
}

.nimbus-item:hover,
.nimbus-item[aria-current="page"] {
  color: var(--n-fg);
}

.nimbus-item:focus-visible {
  outline: 2px solid #E7ECF3;
  outline-offset: 2px;
}

.nv-ico {
  position: relative;
  display: inline-flex;
  flex: none;
}

.nv-ico svg {
  transition: transform .45s cubic-bezier(.3, 1.6, .5, 1);
}

.nimbus-item[aria-current="page"] .nv-ico svg {
  transform: translateY(-1px) scale(1.08);
}

.nv-door {
  fill: transparent;
}

.nv-ico[data-fx="pop"] svg {
  animation: nvPop .5s cubic-bezier(.3, 1.6, .5, 1) both;
}
@keyframes nvPop {
  0% { transform: scale(.72); }
  60% { transform: scale(1.2); }
  100% { transform: translateY(-1px) scale(1.08); }
}

.nv-ico[data-fx="plane"] svg {
  animation: nvPlane 1.15s cubic-bezier(.55, 0, .3, 1) both;
}
@keyframes nvPlane {
  0% { transform: none; }
  12% { transform: translate(-3px, 2px) rotate(7deg); }
  42% { transform: translate(64px, -26px) rotate(-24deg) scale(.9); opacity: 0; }
  43% { transform: translate(-60px, 16px) rotate(-12deg) scale(.9); opacity: 0; }
  58% { opacity: 1; }
  80% { transform: translate(3px, -1px) rotate(2deg); }
  100% { transform: translateY(-1px) scale(1.08); }
}
.nv-ico[data-fx="plane"]::after {
  content: "";
  position: absolute;
  left: 55%;
  top: 48%;
  height: 2px;
  width: 46px;
  border-radius: 2px;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .95));
  animation: nvTrail 1.15s ease-out both;
  pointer-events: none;
}
@keyframes nvTrail {
  0%, 8% { opacity: 0; transform: rotate(-22deg) scaleX(0); }
  30% { opacity: .9; transform: rotate(-22deg) scaleX(1); }
  55%, 100% { opacity: 0; transform: rotate(-22deg) translateX(30px) scaleX(.2); }
}

.nv-ico[data-fx="drop"] svg {
  animation: nvDrop .95s cubic-bezier(.4, 0, .3, 1) both;
  transform-origin: 50% 100%;
}
@keyframes nvDrop {
  0% { transform: translateY(-1px); }
  26% { transform: translateY(-13px) scale(.88, 1.12); }
  46% { transform: translateY(3px) scale(1.3, .68); }
  62% { transform: translateY(-3px) scale(.92, 1.08); }
  80% { transform: translateY(0) scale(1.04, .97); }
  100% { transform: translateY(-1px) scale(1.08); }
}
.nv-ico[data-fx="drop"]::before,
.nv-ico[data-fx="drop"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  pointer-events: none;
}
.nv-ico[data-fx="drop"]::before { animation: nvSplashL .95s ease-out both; }
.nv-ico[data-fx="drop"]::after { animation: nvSplashR .95s ease-out both; }
@keyframes nvSplashL {
  0%, 44% { opacity: 0; transform: none; }
  50% { opacity: .9; transform: translate(-5px, -6px); }
  75%, 100% { opacity: 0; transform: translate(-11px, 1px) scale(.4); }
}
@keyframes nvSplashR {
  0%, 44% { opacity: 0; transform: none; }
  50% { opacity: .9; transform: translate(5px, -7px); }
  75%, 100% { opacity: 0; transform: translate(12px, 1px) scale(.4); }
}

.nv-ico[data-fx="spin"] svg {
  animation: nvSpin 1s cubic-bezier(.2, .75, .25, 1) both;
}
@keyframes nvSpin {
  0% { transform: perspective(80px) rotateY(0); }
  100% { transform: perspective(80px) rotateY(360deg) translateY(-1px) scale(1.08); }
}

.nv-ico[data-fx="glow"] svg {
  animation: nvHop .8s cubic-bezier(.3, 1.4, .5, 1) both;
  transform-origin: 50% 100%;
}
@keyframes nvHop {
  0% { transform: none; }
  30% { transform: translateY(-5px) scale(1.04, .96); }
  55% { transform: translateY(0) scale(1.12, .88); }
  75% { transform: translateY(-2px) scale(.98, 1.04); }
  100% { transform: translateY(-1px) scale(1.08); }
}
.nv-ico[data-fx="glow"] .nv-door {
  animation: nvDoor 1.3s ease both;
}
@keyframes nvDoor {
  0% { fill: transparent; }
  30% { fill: rgba(255, 255, 255, .92); }
  100% { fill: rgba(231, 236, 243, .6); }
}

.nv-ico[data-fx="wave"] svg {
  animation: nvWave .9s ease-in-out both;
  transform-origin: 50% 92%;
}
@keyframes nvWave {
  0% { transform: none; }
  20% { transform: rotate(-15deg); }
  40% { transform: rotate(12deg); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(4deg); }
  100% { transform: translateY(-1px) scale(1.08); }
}

/* ---------- Site header yerleşimi ---------- */

.site-header .nimbus-nav {
  flex: 0 1 auto;
  margin-inline: auto;
}

.site-header .nimbus-nav .nimbus-item {
  font-family: var(--sans);
}

.site-header .nimbus-nav .nimbus-label {
  white-space: nowrap;
}

@media (max-width: 980px) {
  .site-header .nimbus-nav .nimbus-item {
    padding: 0 13px;
  }

  .site-header .nimbus-nav .nimbus-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .site-header .brand__name {
    display: none;
  }
}

@media (max-width: 400px) {
  .site-header .nimbus-nav .nimbus-item {
    padding: 0 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nv-ico svg,
  .nv-ico::before,
  .nv-ico::after,
  .nv-door {
    animation: none !important;
    transition: none;
  }
}
