/* site-header.css — THE shared site header.
 *
 * Extracted verbatim from index.html's inline <style> (the HEADER section, plus its
 * <=820px media block). index.html is NOT yet switched over to this file and still carries
 * its own copy: this sandbox cannot load the rendered page (egress to hscscience.com.au and
 * *.pages.dev is blocked), so migrating the highest-traffic SEO page's header CSS with no
 * way to see the result is a risk taken for no reason. study.html adopts it first, the owner
 * looks at it on a preview, and index.html moves over once the file is known-good.
 *
 * `npm run audit:site-header` fails if this file and index.html's inline copy drift, so the
 * duplication is bounded by a check rather than by anyone remembering it exists.
 *
 * The --hp-* custom properties the header needs are declared here so the file stands alone.
 * index.html declares the same values in its own :root; identical values, so whichever wins
 * the cascade renders the same.
 */
:root {
  --hp-accent: #0f172a;
  --hp-accent-hover: #1e293b;
  --hp-bio: #059669;
  --hp-canvas: #f5f5f4;
  --hp-chem: #2563eb;
  --hp-hairline: #e7e5e4;
  --hp-hairline-2: #d6d3d1;
  --hp-ink: #0f172a;
  --hp-ink-2: #334155;
  --hp-ink-3: #64748b;
  --hp-ink-4: #94a3b8;
  --hp-math: #7c3aed;
  --hp-surface: #ffffff;
}

/* ========== HEADER ========== */
.hp-nav {
  background: rgba(245,245,244,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hp-hairline);
  position: sticky; top: 0; z-index: 100;
}
.hp-nav-inner {
  max-width: 1280px; margin: 0 auto;
  height: 56px; padding: 0 24px;
  display: flex; align-items: center; gap: 28px;
}
.hp-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 700; font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--hp-ink); text-decoration: none;
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.hp-logo-mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, var(--hp-bio) 0%, var(--hp-chem) 50%, var(--hp-math) 100%);
  display: grid; place-items: center;
  color: #fff; font-size: 11px; font-weight: 800;
  font-family: 'Outfit', sans-serif; letter-spacing: -0.5px;
}
.hp-nav-links {
  display: flex; align-items: center; gap: 2px;
  flex: 1;
}
.hp-nav-links a {
  font-size: 13.5px; font-weight: 500;
  color: var(--hp-ink-3); text-decoration: none;
  padding: 7px 11px; border-radius: 7px;
  transition: all .12s;
}
.hp-nav-links a:hover { color: var(--hp-ink); background: var(--hp-canvas); }
.hp-nav-dd { position: relative; }
.hp-nav-dd-trigger {
  font-size: 13.5px; font-weight: 500; font-family: inherit;
  color: var(--hp-ink-3); background: none; border: none; cursor: pointer;
  padding: 7px 11px; border-radius: 7px; display: inline-flex; align-items: center; gap: 3px;
  transition: all .12s;
}
.hp-nav-dd:hover .hp-nav-dd-trigger,
.hp-nav-dd:focus-within .hp-nav-dd-trigger { color: var(--hp-ink); background: var(--hp-canvas); }
.hp-nav-dd-menu {
  position: absolute; top: 100%; left: 0; margin-top: 8px; min-width: 188px;
  background: var(--hp-surface); border: 1px solid var(--hp-hairline); border-radius: 11px;
  box-shadow: 0 14px 34px rgba(15,23,42,0.12); padding: 7px; display: none; z-index: 60;
}
.hp-nav-dd.open .hp-nav-dd-menu { display: block; }
.hp-nav-dd-menu a {
  display: block; font-size: 13.5px; font-weight: 500; color: var(--hp-ink-2);
  text-decoration: none; padding: 9px 12px; border-radius: 7px; white-space: nowrap;
}
.hp-nav-dd-menu a:hover { background: var(--hp-canvas); color: var(--hp-ink); }
.hp-mobile-group { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--hp-ink-4); padding: 12px 0 2px; }
.hp-nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.hp-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600;
  text-decoration: none;
  padding: 8px 15px; border-radius: 8px;
  transition: all .12s; border: 1px solid transparent;
  cursor: pointer; font-family: inherit;
}
.hp-btn-ghost { color: var(--hp-ink-2); border-color: var(--hp-hairline-2); background: var(--hp-surface); }
.hp-btn-ghost:hover { border-color: var(--hp-ink-4); }
.hp-btn-solid { color: #fff; background: var(--hp-accent); }
.hp-btn-solid:hover { background: var(--hp-accent-hover); }

/* User menu */
.hp-user-menu { display: none; position: relative; }
.hp-user-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600;
  color: var(--hp-ink); background: var(--hp-surface);
  border: 1px solid var(--hp-hairline-2);
  border-radius: 8px; padding: 7px 14px;
  cursor: pointer; text-decoration: none;
}
.hp-user-btn:hover { border-color: var(--hp-ink-4); }
.hp-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  background-size: cover; background-position: center;
  color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .3px;
}
button.hp-user-btn { font-family: inherit; cursor: pointer; }
.hp-user-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--hp-surface);
  border: 1px solid var(--hp-hairline);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15,23,42,.1);
  min-width: 160px; padding: 6px;
  display: none; z-index: 200;
}
.hp-user-menu.open .hp-user-dropdown { display: block; }
.hp-user-dropdown a, .hp-user-dropdown button {
  display: block; width: 100%; text-align: left;
  padding: 8px 12px; font-size: 13.5px; font-weight: 500;
  color: var(--hp-ink-2); text-decoration: none;
  border-radius: 8px; border: none; background: none;
  cursor: pointer; font-family: inherit;
}
.hp-user-dropdown a:hover, .hp-user-dropdown button:hover {
  background: var(--hp-canvas); color: var(--hp-ink);
}

/* Hamburger */
.hp-hamburger {
  display: none; align-items: center; justify-content: center;
  margin-left: auto; background: none; border: none;
  cursor: pointer; padding: 6px; color: var(--hp-ink);
  border-radius: 6px;
}
.hp-hamburger:hover { background: var(--hp-canvas); }
.hp-mobile-menu {
  display: none; position: absolute;
  top: 56px; left: 0; right: 0;
  background: #fff; border-bottom: 1px solid var(--hp-hairline);
  box-shadow: 0 8px 24px rgba(0,0,0,0.07);
  padding: 8px 20px 20px;
  flex-direction: column; z-index: 99;
}
.hp-mobile-menu.open { display: flex; }
.hp-mobile-menu a {
  font-size: 15px; font-weight: 500;
  color: var(--hp-ink-2); text-decoration: none;
  padding: 11px 4px; border-bottom: 1px solid var(--hp-canvas);
}
.hp-mobile-menu a:last-child { border-bottom: none; }
.hp-mobile-actions {
  display: flex; gap: 8px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--hp-hairline);
}
.hp-mobile-actions a { border-bottom: none; padding: 8px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 600; }


/* Mobile: extracted from index.html's @media (max-width: 820px) block. */
@media (max-width: 820px) {
  .hp-nav-links { display: none; }
  .hp-nav-right { display: none; }
  .hp-hamburger { display: flex; }
}
