/* ══════════════════════════════════════════════════════════════
   menubar.css — the site header: green dot stickers on a clean white bar
   (the same green as the cursor). Left: the logo sticker → home.
   Right: ART · ABOUT · RESUME stickers. Each is flat matte paper at a slight
   tilt with a thin shadow, like a round sticky note; on hover it straightens
   and lifts as if you're about to peel it; the current page is pressed flat.

   Loaded LAST on every page, so it's the one place the header is styled.
   Selectors start with ":root body" so they outrank older per-page rules.
   ══════════════════════════════════════════════════════════════ */

:root {
  --hdr-h: 84px;                 /* header height — the home hero + intro read this too */
  --dot: 58px;                   /* sticker size */
  --dot-green: #2f843b;          /* deep enough for white labels to pass WCAG AA (4.7:1) */
  --dot-ink: #fff;
  --gutter: clamp(16px, 4vw, 60px);   /* page side margin — the header's edges; page content lines up with it */
  --page-max: 1800px;                 /* widest the content gets; past this the margins grow instead (big monitors) */
  --edge: max(var(--gutter), calc((100vw - var(--page-max)) / 2));   /* the side margin actually used */
}

/* ── The bar: plain white, no frame ── */
:root body header {
  position: fixed; inset: 0 0 auto 0; height: var(--hdr-h);
  display: flex; align-items: center;
  padding: 0 var(--edge);
  background: rgba(255, 255, 255, .92) !important;
  border: 0; box-shadow: none;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
:root body header .headerInner {
  max-width: none; width: 100%; height: 100%; min-height: 0; margin: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

/* ── A sticker ── */
:root body header :is(.headerLogoLink, .sectionTab) {
  --tilt: 0deg;
  position: relative; flex-shrink: 0;
  width: var(--dot); height: var(--dot); margin: 0; padding: 0;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--dot-green) !important;          /* flat paper — no shading */
  color: var(--dot-ink) !important; text-decoration: none;
  box-shadow: 0 1px 1.5px rgba(20, 40, 25, .22);      /* thin, close shadow: it's stuck flat on the page */
  transform: rotate(var(--tilt));
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}
/* faint paper grain */
:root body header :is(.headerLogoLink, .sectionTab)::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
/* hover: straighten + lift, like you're about to peel it */
:root body header :is(.headerLogoLink, .sectionTab):hover,
:root body header :is(.headerLogoLink, .sectionTab):focus-visible {
  transform: rotate(0deg) translateY(-2px) scale(1.04);
  box-shadow: 0 2px 3px rgba(20, 40, 25, .18), 0 6px 10px rgba(20, 40, 25, .12);   /* lifted off the page */
  outline: none;
}
:root body header :is(.headerLogoLink, .sectionTab):focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--dot-green); }
:root body header :is(.headerLogoLink, .sectionTab):active { transform: rotate(0deg) scale(.96); }
/* current page: a darker sticker, stuck down straight */
:root body header .sectionTab[aria-current="page"] {
  background: #246b2f !important;
  transform: rotate(0deg);
}

/* each sticker stuck on at its own slight angle */
:root body header .headerLogoLink { --tilt: -6deg; }
:root body header .sectionTab:nth-child(1) { --tilt: 4deg; }
:root body header .sectionTab:nth-child(2) { --tilt: -3deg; }
:root body header .sectionTab:nth-child(3) { --tilt: 5deg; }

/* logo sticker: the monogram in white; the name stays for screen readers */
:root body header .headerLogo { height: 58%; width: auto; filter: brightness(0) invert(1); opacity: 1; }
:root body header .headerWordmark {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* nav stickers + labels */
:root body header .sectionTabs {
  display: flex; align-items: center; gap: clamp(12px, 2vw, 26px);
  margin: 0; padding: 0; background: none; border: 0; box-shadow: none; border-radius: 0; height: auto;
}
:root body header .sectionTab {
  font: 600 11px/1 var(--font-pixel) !important; text-transform: uppercase; letter-spacing: .04em;
}

/* no hamburger, clock or contacts card — the three stickers fit on every screen */
:root body header :is(.menuBtn, .contactsCard, .headerTray) { display: none !important; }

@media (max-width: 720px) {
  :root { --hdr-h: 68px; --dot: 48px; }
  :root body header .sectionTabs { gap: 10px; }
  :root body header .sectionTab { font-size: 9.5px !important; letter-spacing: -.02em; }
}

@media (prefers-reduced-motion: reduce) {
  :root body header :is(.headerLogoLink, .sectionTab) { transition: none; }
}

/* ── Mobile menu: a little retro window under the bar ── */
:root body .mobileMenu {
  position: fixed; top: calc(var(--hdr-h) + 8px); left: 8px; right: 8px;
  max-height: calc(100svh - var(--hdr-h) - 16px); overflow-y: auto;
  padding: 0 0 14px; color: var(--mb-ink); background: #fff;
  border: 2px solid; border-color: var(--mb-raised); border-radius: 4px;
  box-shadow: 0 0 0 1px var(--mb-deep), 0 18px 40px rgba(20, 24, 28, .18);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  z-index: calc(var(--z-header, 4000) - 1);
}
:root body .mobileMenu::before {          /* title bar in the CRT blue */
  content: "Menu"; display: block; margin: 0 0 6px; padding: 9px 14px;
  background: var(--mb-blue); color: #fff;
  font: 600 11px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .12em;
}
:root body .mobileMenu .mobileMenu__nav { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0 16px; list-style: none; }
:root body .mobileMenu .mobileMenu__nav a {
  display: block; padding: 14px 0; border-bottom: 1px solid rgba(50, 64, 79, .1);
  font: 500 20px/1.2 var(--font-sans); letter-spacing: -.015em; color: #111; opacity: 1; text-decoration: none;
}
:root body .mobileMenu .mobileMenu__nav a:hover,
:root body .mobileMenu .mobileMenu__nav a:focus-visible { background: var(--mb-blue); color: #fff; padding-left: 8px; margin: 0 -8px; padding-right: 8px; outline: none; }
:root body .mobileMenu .mobileMenu__nav a[aria-current="page"] { color: rgba(50, 64, 79, .45); }
:root body .mobileMenu__contact { margin: 18px 0 0; padding: 0 16px; border: 0; }
:root body .mobileMenu__contactLabel,
:root body .mobileMenu > .mobileMenu__contactLabel {
  margin: 0 0 4px; padding: 0 16px; font: 400 11px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: rgba(50, 64, 79, .55);
}
:root body .mobileMenu__contact .mobileMenu__contactLabel { padding: 0; }
:root body .mobileMenu .mobileMenu__contactList { list-style: none; margin: 0; padding: 0; }
:root body .mobileMenu .mobileMenu__contactList a {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  font: 400 16px/1.2 var(--font-sans); letter-spacing: 0; color: var(--mb-ink); opacity: 1; text-decoration: none;
}
:root body .mobileMenu .mobileMenu__contactList a i { width: 18px; text-align: center; color: rgba(50, 64, 79, .55); opacity: 1; }
:root body .mobileMenu__back { display: flex; gap: 22px; margin: 4px 0 16px; padding: 0 16px; }
:root body .mobileMenu__back a { font: 500 11px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--mb-ink); text-decoration: none; }

@media (prefers-reduced-motion: reduce) { :root body header .headerStatus__dot { animation: none; } }

/* ── Page margins on the hub pages (About, Art, UX/UI): line their content up with the header's logo +
   stickers, and stop it growing past --page-max on big monitors. (The home page does this itself; case
   studies use their own centred reading column.) ── */
:root body:not(.csLight) { --gutter-x: var(--edge); }
:root body:not(.csLight) .container { padding-left: var(--edge); padding-right: var(--edge); }
