/* Shared across every static page (index/bio/work/art/contact) — the
   session-aware sign-in/profile widget next to the hamburger, and the
   Apps sub-panel inside the hamburger nav. Kept in one file instead of
   duplicated inline per page since this behavior has to stay identical
   everywhere. Loaded after each page's own <style> block, so these rules
   win on equal specificity without needing !important. */

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ---------- sign-in CTA / profile avatar ---------- */
.header-auth-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--gradient-brand);
  padding: 9px 18px;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.header-auth-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -8px rgba(250, 85, 122, 0.5);
}
/* .header-auth-cta sets its own display, which otherwise beats the
   browser's default [hidden]{display:none} on equal specificity — same
   fix as .footer-nav[hidden] below */
.header-auth-cta[hidden] {
  display: none;
}

.header-profile {
  position: relative;
}
.header-profile-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s ease;
}
.header-profile-btn:hover {
  border-color: var(--ink-dim);
}
.header-profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.header-profile-fallback {
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}

.header-profile-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 950;
  min-width: 200px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  box-shadow: 0 20px 44px -18px rgba(0, 0, 0, 0.6);
}
.header-profile-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.header-profile-menu a,
.header-profile-menu button {
  display: block;
  width: 100%;
  text-align: left;
  font-family: "Space Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}
.header-profile-menu a:hover,
.header-profile-menu button:hover {
  background: var(--panel-2);
  color: var(--ink);
}
.header-profile-signout {
  color: var(--red) !important;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 12px !important;
  border-radius: 0 0 8px 8px !important;
}

@media (max-width: 640px) {
  .header-auth-cta {
    padding: 8px 14px;
    font-size: 0.68rem;
  }
}

/* ---------- nav overlay: Apps sub-panel ---------- */
/* the trigger/back buttons live inside .nav-list alongside the existing
   <a> items, so they need the same type treatment and reveal states —
   defined here rather than editing each page's own .nav-list a rule */
.nav-list button.nav-apps-trigger,
.nav-list button.nav-apps-back {
  display: flex;
  align-items: baseline;
  gap: 18px;
  font-family: "Anton", sans-serif;
  text-transform: uppercase;
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  line-height: 1.08;
  color: var(--ink);
  padding: 6px 0;
  opacity: 0;
  transform: translateY(24px);
  transition: transform 0.5s ease, color 0.25s ease;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-weight: inherit;
}
.nav-overlay.open .nav-list button.nav-apps-trigger,
.nav-overlay.open .nav-list button.nav-apps-back {
  opacity: 1;
  transform: translateY(0);
}
.nav-list button.nav-apps-trigger:hover,
.nav-list button.nav-apps-trigger:focus-visible,
.nav-list button.nav-apps-back:hover,
.nav-list button.nav-apps-back:focus-visible {
  background: var(--gradient-brand);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
/* the .num rule in each page's own <style> only targets ".nav-list a .num" —
   these buttons need the same small mono-gradient number treatment */
.nav-list button .num {
  font-family: "Space Mono", monospace;
  font-size: 0.9rem;
  background: var(--gradient-brand);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.05em;
}
