/* nav.css — Navegación fija, menú de escritorio y drawer móvil
   Autor: Borja Iturregui — borjaiturregui.github.io */

nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(0,0,0,0.93);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 960px; margin: 0 auto; padding: 0 24px;
  height: 56px; display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono); font-size: 15px; letter-spacing: 0.5px;
  color: var(--white); text-decoration: none; white-space: nowrap;
  flex-shrink: 0; display: flex; align-items: center;
}
.nav-logo .prompt { color: var(--red-hi); }
.nav-logo .name   { color: var(--white); }
.nav-logo .cursor {
  display: inline-block; width: 7px; height: 14px;
  background: var(--red-hi); vertical-align: middle; margin-left: 1px;
  animation: blink 1s step-end infinite;
}

.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase; transition: color 0.2s; white-space: nowrap;
}
.nav-links a:hover { color: var(--red-hi); }

.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: crosshair; padding: 4px; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--white); transition: transform 0.3s, opacity 0.3s; }
.nav-burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.active span:nth-child(2) { opacity: 0; }
.nav-burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-drawer {
  display: none; flex-direction: column;
  background: rgba(0,0,0,0.97); border-top: 1px solid var(--border);
  max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.2s;
}
.nav-drawer.open { max-height: 380px; padding: 8px 0; }
.nav-drawer a {
  color: var(--muted); text-decoration: none; font-size: 12px;
  letter-spacing: 2px; text-transform: uppercase; padding: 14px 24px;
  border-bottom: 1px solid var(--border); transition: color 0.2s, background 0.2s;
}
.nav-drawer a:last-child { border-bottom: none; }
.nav-drawer a:hover { color: var(--red-hi); background: rgba(178,41,72,0.05); }

@media (max-width: 720px) {
  .nav-links  { display: none; }
  .nav-burger { display: flex; }
  .nav-drawer { display: flex; }
}
