/* =========  Header / Shell  ========= */
header{
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1.2rem 2rem;
  background: rgba(10,10,12,0.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* The injected wrapper becomes the flex row */
#nav-placeholder{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
}

/* =========  Brand  ========= */
header h1{
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  flex-shrink: 0; /* never squish the brand */
}
header h1 a{
  color: #fff;
  text-decoration: none;
}

/* =========  Desktop Nav  ========= */
.nav-desktop{
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: 2rem; /* breathing room from the brand */
}
.nav-desktop a{
  color: #aaa;
  text-decoration: none;
  font-size: 1.5rem;
  transition: color .25s ease;
}
.nav-desktop a:hover,
.nav-desktop a.active{
  color: #fff;
}

/* =========  Mobile Toggle  ========= */
.nav-toggle{
  display: none;            /* hidden on desktop */
  background: none;
  border: none;
  font-size: 1.9rem;
  line-height: 1;
  color: #fff;
  cursor: pointer;
}

/* =========  Mobile Menu Panel  ========= */
.nav-mobile{
  position: absolute;
  left: 0; right: 0;
  top: 60px;                 /* ≈ header height; adjust if you change padding */
  display: flex;
  flex-direction: column;
  background: #111;
  overflow: hidden;
  max-height: 0;
  transition: max-height .35s ease;
  z-index: 99;
}
.nav-mobile.show{
  max-height: 320px;         /* enough to reveal all links */
}
.nav-mobile a{
  padding: 1rem;
  color: #ccc;
  text-decoration: none;
  transition: color .2s ease;
}
.nav-mobile a:hover,
.nav-mobile a.active{
  color: #fff;
}

/* =========  Responsive Switch  ========= */
@media (max-width: 900px){
  .nav-desktop{ display: none; }   /* hide horizontal links */
  .nav-toggle{ display: block; margin-left: auto; }  /* show burger at right */
}

/* =========  Accessibility niceties  ========= */
.nav-desktop a:focus-visible,
.nav-mobile a:focus-visible,
.nav-toggle:focus-visible{
  outline: 2px solid #fff;
  outline-offset: 2px;
}
