/* Mobile burger menu shared by the homepage, blog and skill page.
   nav-menu.js adds .has-menu and the toggle button, so without JS each page
   keeps its own narrow-screen header. */
.nav-toggle { display: none; }

@media (max-width: 960px) {
  nav.has-menu .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
  }
  nav.has-menu .nav-toggle:focus-visible { outline: 2px solid #13B2F7; outline-offset: 2px; }
  nav.has-menu .nav-toggle .icon-close,
  nav.has-menu.menu-open .nav-toggle .icon-open { display: none; }
  nav.has-menu.menu-open .nav-toggle .icon-close { display: block; }

  /* Open menu: a solid bar so the panel reads as part of the header */
  nav.has-menu.menu-open { background: #04172E; border-bottom-color: transparent; }

  nav.has-menu .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 0 24px;
    padding-left: inherit;
    padding-right: inherit;
    max-height: calc(100vh - 80px);
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
    background: #04172E;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 18px 32px rgba(0,0,0,0.35);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
  }
  nav.has-menu.menu-open .nav-links { visibility: visible; opacity: 1; transform: none; }
  /* Animate only after the first paint, so the panel doesn't flash on page load */
  nav.has-menu.menu-animate .nav-links { transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s; }
  nav.has-menu.menu-animate.menu-open .nav-links { transition: opacity 0.2s ease, transform 0.2s ease; }

  nav.has-menu .nav-links a:not(.nav-cta) {
    display: block;
    padding: 15px 0;
    font-size: 16px;
    color: rgba(255,255,255,0.82);
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  nav.has-menu .nav-links a:not(.nav-cta)::after { display: none; }
  nav.has-menu .nav-links a.active { color: #fff; }

  nav.has-menu .nav-links .nav-cta {
    justify-content: center;
    width: 100%;
    margin-top: 20px;
    padding: 14px 22px;
    font-size: 14px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  nav.has-menu .nav-links { transition: none !important; }
}
