/* Fixed NAV that respects iOS safe area and stays tappable */
nav{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 80px;
  padding: env(safe-area-inset-top) 30px 0 30px; /* top padding for notch */
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(10px);
  z-index: 1100; /* above main and curtain */
  overflow: visible;
}
nav a{ color: white; text-decoration: none; }
nav img{ height: 150px; position: relative; top: 50px; }
nav .menu{ height: 100%; display: flex; align-items: center; font-size: 20px; }

/* Outer/inner menu chip UI (as you had) */
:root{
  --menu-outer-bg: rgba(0, 0, 0, 0.45);
  --menu-outer-border: rgba(255, 255, 255, 0.35);
  --menu-inner-bg: rgba(0, 240, 255, 0.16);
  --menu-inner-border: rgba(0, 240, 255, 0.65);
  --menu-text: #ffffff;
}
.menu > span{
  display: inline-block;
  background-color: var(--menu-outer-bg);
  border: 1px solid var(--menu-outer-border);
  border-radius: 12px;
  padding: 6px;
  backdrop-filter: blur(8px);
  cursor: pointer;
}
#menu-icon-toggle{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background-color: var(--menu-inner-bg);
  border: 1px solid var(--menu-inner-border);
  color: var(--menu-text);
}
.menu .fa-solid{ margin-left: 10px; }
#menu-icon-toggle:hover{ background-color: rgba(0, 240, 255, 0.22); border-color: rgba(0, 240, 255, 0.8); }

/* Curtain Menu: doesn't block when closed */
.curtain-menu {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.95);
  z-index: 1050;                 /* below nav (1100) */
  opacity: 0;
  pointer-events: none;          /* KEY: cannot intercept taps when closed */
  transition: opacity .35s ease;
}
.curtain-menu.open {
  opacity: 1;
  pointer-events: auto;          /* active only when open */
}
.curtain-menu ul { list-style: none; text-align: center; }
.curtain-menu li { margin: 30px 0; }
.curtain-menu li a {
  font-size: 2.2rem;
  color: #00f0ff;
  text-decoration: none;
  transition: 0.3s ease;
}
.curtain-menu li a:hover { color: #ffffff; }

.close-btn {
  position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 30px;
  font-size: 2rem; background: none; border: none; color: #00f0ff; cursor: pointer;
}

/* Optional scrolled style */
nav.scrolled {
  background: rgba(0,0,0,0.5);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}