/* Shared navigation and layout contract across the portfolio. */
:root {
  --header-height: 76px;
  --theme-accent: #F56632;
  --theme-accent-rgb: 245, 102, 50;
  --theme-accent-strong: #C24D23;
  --primary: var(--theme-accent);
  --secondary: var(--theme-accent-strong);
  --accent: var(--theme-accent);
  --glow: var(--theme-accent);
  --buttonGlow: var(--theme-accent);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --theme-accent: #4BAA97;
  --theme-accent-rgb: 75, 170, 151;
  --theme-accent-strong: #357A69;
  color-scheme: dark;
}
html { min-height: 100%; height: auto; background: var(--bg); scroll-padding-top: calc(var(--header-height) + 20px); scroll-behavior: smooth; }
body { min-height: 100vh; height: auto; overflow-x: clip; overflow-y: visible; background-color: var(--bg); isolation: isolate; }
main { min-width: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
:where(a, button, input, select):focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
:where(button, a) { -webkit-tap-highlight-color: transparent; }
.skip-link { position: fixed; top: 8px; left: 12px; z-index: 300; padding: 12px 18px; border-radius: 8px; color: var(--text); background: var(--bg); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.site-header { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 4px 20px rgba(0,0,0,.04); backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-header *, .site-context * { box-sizing: border-box; }
.site-bar { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 20px; max-width: 1250px; margin: 0 auto; padding: 14px clamp(16px, 3vw, 28px); min-height: 76px; }
.site-brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: var(--text); }
.site-brand svg { flex: 0 0 32px; color: var(--primary); }
.site-brand strong { font: 750 15px/1.25 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.035em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-primary { display: block; min-width: 0; }
.site-header .site-links { display: flex; align-items: center; gap: 4px; }
.site-links a { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; border-radius: 10px; font: 600 13px/1.4 Inter, ui-sans-serif, system-ui, sans-serif; color: var(--muted); text-decoration: none; white-space: nowrap; }
.site-links a:hover, .site-links a[aria-current="page"] { background: var(--primarySoft, rgba(var(--theme-accent-rgb),.14)); color: var(--text); }
.site-links a[aria-current="page"] { box-shadow: inset 0 -2px var(--primary); }
.site-controls { display: flex; align-items: center; gap: 4px; }
html:not(.js-enabled) .site-controls { display: none; }
.site-header .site-controls button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--text); font: 700 12px/1 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer; }
.site-header .site-controls button:hover { background: var(--primarySoft, rgba(var(--theme-accent-rgb),.14)); }
.site-header #theme-toggle { color: var(--primary); }
.site-header #theme-toggle svg { width: 22px; height: 22px; }
.site-header #theme-toggle .theme-moon { display: none; }
[data-theme="dark"] .site-header #theme-toggle .theme-sun { display: none; }
[data-theme="dark"] .site-header #theme-toggle .theme-moon { display: block; }
.site-header #menu-toggle { display: none !important; }
.site-context { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 20px; max-width: 1250px; margin: 0 auto; padding: 8px clamp(16px, 3vw, 28px); }
.section-nav { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 4px 16px; min-width: 0; }
.section-nav a { padding: 10px 0; min-height: 44px; font: 500 12px/24px Inter, ui-sans-serif, system-ui, sans-serif; color: var(--muted); }
.section-nav a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 5px; }
.site-context .social-links { display: flex; gap: 6px; margin-left: auto; }
.site-context .social-link { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); color: var(--text); border-radius: 10px; background: transparent; }
.site-context .social-link:hover { color: var(--primary); border-color: var(--primary); }
.site-context .social-link svg { width: 17px; height: 17px; }
/* The viewport background must never move with document scroll. */
.bg { transform: none; pointer-events: none; z-index: -3; }
.bg-grid { left: 0; width: 100%; height: 100%; will-change: auto; }
.reveal, .reveal.on { opacity: 1; transform: none; filter: none; transition: none; will-change: auto; }
.blob-deco, .blob-deco-2 { pointer-events: none; max-width: 75vw; max-height: 75vw; }
.intro { display: none; }
.landing { min-height: calc(100svh - var(--header-height) - 60px); }
.landing .choice-shell { min-height: clamp(460px, calc(100svh - 210px), 760px); }
body > .site-header ~ .landing { padding-top: 16px; }
footer { color: var(--muted); }
@media (max-width: 999px) {
  .site-bar { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding-block: 10px; min-height: 64px; }
  .site-primary { grid-row: 2; grid-column: 1 / -1; }
  .site-controls { grid-column: 2; grid-row: 1; }
  .site-header .site-links { flex-wrap: wrap; }
  .js-enabled .site-primary { display: contents; }
  .js-enabled .site-header .site-links { display: none; position: absolute; top: 100%; left: 16px; right: 16px; padding: 10px; border: 1px solid var(--line); border-radius: 0 0 16px 16px; background: var(--bg); box-shadow: 0 16px 32px rgba(0,0,0,.16); max-height: calc(100dvh - 90px); overflow-y: auto; }
  .js-enabled .site-header .site-links.active { display: flex; flex-direction: column; align-items: stretch; }
  .js-enabled .site-header #menu-toggle { display: grid !important; }
  .site-links a { padding: 12px 14px; }
  .site-brand { gap: 8px; }
  .site-brand strong { font-size: 14px; }
  .site-brand svg { flex-basis: 26px; width: 26px; }
  .site-context { justify-content: center; }
  .section-nav { gap: 4px 14px; justify-content: center; width: 100%; }
  .site-context .social-links { margin: 0 auto; }
}
@media (max-width: 420px) {
  .site-brand svg { display: none; }
  .site-context { padding-block: 4px; }
  .section-nav { gap: 4px 12px; }
  .section-nav a { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
