/* ══════════════════════════════════════════
   HAMBURGER BUTTON
   ══════════════════════════════════════════ */

.nav-hamburger {
  display: none;
  /* solo visible en mobile */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
  /* empuja al extremo derecho */
  z-index: 110;
  -webkit-tap-highlight-color: transparent;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text, #e8edf5);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* Estado "X" cuando el menú está abierto */
.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ══════════════════════════════════════════
   BREAKPOINT 900px — TABLET / MOBILE
   ══════════════════════════════════════════ */

@media (max-width: 900px) {

  /* ── NAV: contenedor flex que se expande ── */
  nav {
    padding: 0.9rem 1.2rem !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
  }

  /* Logo empujado a la izquierda, toma solo su espacio */
  .nav-logo {
    flex: 1;
  }

  /* Ocultar el botón "Contactar" del nav en mobile
     (aparece en el menú desplegable) */
  .nav-cta {
    display: none;
  }

  /* Mostrar hamburger */
  .nav-hamburger {
    display: flex;
  }

  /* ── Nav links: oculto por defecto en mobile ── */
  .nav-links {
    display: none !important;
    /* override de todos los temas */
    width: 100%;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0.5rem 0 0.8rem !important;
    margin-top: 0.6rem;
    border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    list-style: none;
  }

  /* Menú abierto */
  nav.nav-open .nav-links {
    display: flex !important;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block !important;
    padding: 0.85rem 0.2rem !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.03em;
  }

  /* ── HERO ── */
  .hero {
    padding: 6rem 1.2rem 3rem !important;
    min-height: auto;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-name {
    font-size: clamp(2rem, 9vw, 4rem) !important;
    line-height: 1 !important;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* Company tag: permitir que rompa línea en tags largos */
  .company-tag {
    white-space: normal !important;
    word-break: break-word;
    max-width: 100%;
  }

  /* card-header: apilar verticalmente para que el tag no desborde */
  .card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.4rem !important;
  }

  .hero-summary {
    font-size: 0.95rem !important;
    max-width: 100%;
  }

  .hero-roles {
    gap: 0.5rem !important;
  }

  .hero-stats {
    gap: 1.5rem !important;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    margin-top: 2rem;
  }

  /* ── CONTAINER ── */
  .container {
    padding: 0 1.2rem !important;
  }

  /* ── GRIDS ── */
  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .cert-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.9rem !important;
  }

  .edu-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* ── TIMELINE ── */
  .timeline-item {
    grid-template-columns: 1fr !important;
    gap: 0.4rem !important;
    padding-left: 1.5rem !important;
  }

  .timeline-date {
    font-size: 0.7rem !important;
    padding-top: 0 !important;
  }

  /* ── FOOTER ── */
  .footer-inner {
    flex-direction: column !important;
    gap: 0.4rem !important;
    text-align: center;
  }

  /* ── SECTION HEADER ── */
  .section-header h2 {
    font-size: 1.7rem !important;
  }

  /* ── SECTIONS PADDING ── */
  .section {
    padding: 4rem 0 !important;
  }
}

/* ══════════════════════════════════════════
   BREAKPOINT 600px — MOBILE PEQUEÑO
   ══════════════════════════════════════════ */

@media (max-width: 600px) {

  /* ── HERO ── */
  .hero {
    padding: 5.5rem 1rem 2.5rem !important;
  }

  .hero-name {
    font-size: clamp(1.8rem, 10vw, 2.6rem) !important;
  }

  .hero-stats {
    flex-direction: column !important;
    gap: 1rem !important;
  }

  .stat-num {
    font-size: 2rem !important;
  }

  .hero-actions {
    flex-direction: column !important;
    gap: 0.7rem !important;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* ── GRIDS ── */
  .cert-grid {
    grid-template-columns: 1fr !important;
  }

  .edu-grid {
    grid-template-columns: 1fr !important;
  }

  /* ── CERT CARDS ── */
  .cert-card {
    padding: 1.2rem !important;
  }

  /* ── CONTACT ── */
  .contact-item {
    padding: 0.9rem 1rem !important;
    gap: 0.8rem !important;
  }

  /* ── THEME / LANG SWITCHERS ── */
  #theme-switcher {
    bottom: 0.6rem !important;
    right: 0.6rem !important;
    padding: 0.4rem 0.6rem !important;
    gap: 0.5rem !important;
  }

  #lang-switcher {
    bottom: 0.6rem !important;
    left: 0.6rem !important;
    padding: 0.4rem 0.6rem !important;
  }

  #lang-switcher .sw-meta,
  .sw-col .sw-meta {
    font-size: 0.30rem !important;
  }

  #theme-label,
  #theme-toggle,
  #lang-toggle {
    font-size: 0.32rem !important;
    padding: 0.35rem 0.6rem !important;
  }

  /* ── SECTIONS ── */
  .section {
    padding: 3rem 0 !important;
  }

  .section-header {
    margin-bottom: 2rem !important;
  }

  /* ── TIMELINE ── */
  .timeline-card {
    padding: 1.1rem 1.2rem !important;
  }
}

@media (max-width: 900px) {
  .contact-intro p {
    font-size: 1rem !important;
  }

  .contact-value {
    font-size: 0.9rem !important;
    word-break: break-all;
    overflow-wrap: anywhere;
  }

  .renta-info {
    font-size: 0.52rem !important;
    white-space: normal !important;
    word-break: break-word;
    max-width: 100%;
    display: block !important;
    line-height: 1.6;
  }

  .contact-item {
    gap: 0.8rem !important;
    padding: 1rem !important;
    overflow: hidden;
  }

  .contact-icon {
    flex-shrink: 0;
  }
}

/* ══════════════════════════════════════════
   OVERRIDE: unifica switchers en todos los temas
   ══════════════════════════════════════════ */
#theme-switcher {
  background: rgba(0, 0, 0, 0.9) !important;
  border: 3px solid #f8c800 !important;
  box-shadow: 4px 4px 0 #000 !important;
  align-items: flex-start !important;
}

#lang-switcher {
  background: rgba(0, 0, 0, 0.9) !important;
  border: 3px solid #f8c800 !important;
  box-shadow: 4px 4px 0 #000 !important;
}

#theme-label {
  color: #f8c800 !important;
  background: transparent !important;
  border: 2px solid #f8c800 !important;
  box-shadow: none !important;
  font-family: 'Press Start 2P', monospace !important;
  cursor: default !important;
  pointer-events: none !important;
}

#theme-toggle {
  background: #f8c800 !important;
  color: #180828 !important;
  border: 2px solid #000 !important;
  box-shadow: 2px 2px 0 #000 !important;
  font-family: 'Press Start 2P', monospace !important;
}

#lang-toggle {
  background: #f8c800 !important;
  color: #180828 !important;
  border: 2px solid #000 !important;
  box-shadow: 2px 2px 0 #000 !important;
  font-family: 'Press Start 2P', monospace !important;
}

.sw-meta {
  color: #f8c800 !important;
  font-family: 'Press Start 2P', monospace !important;
  opacity: 0.85 !important;
}