/* Shared frame for every page: one floating glass dock, same place everywhere.
   The CV tints it light and formal; the playful pages use the dark glass. */
:root {
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --accent: #e2b07f;
  --accent-ink: #aa7954;
  --radius-lg: 22px;
  --radius: 14px;
  --radius-sm: 10px;
  --dock-h: 3rem;
  /* dark glass (default) */
  --glass-bg: rgba(16, 18, 22, .46);
  --glass-menu: rgba(16, 18, 22, .72);
  --glass-line: rgba(255, 255, 255, .14);
  --glass-hi: rgba(255, 255, 255, .14);
  --glass-shadow: rgba(0, 0, 0, .38);
  --dock-muted: rgba(255, 255, 255, .74);
  --dock-ink: #fff;
  --dock-hover: rgba(255, 255, 255, .08);
  --dock-active: rgba(255, 255, 255, .15);
}
/* Larger type on big, tall screens so the UI does not shrink to specks. */
@media (min-width: 1900px) and (min-height: 1050px) { html:root { font-size: 18px } }
@media (min-width: 2500px) and (min-height: 1300px) { html:root { font-size: 20px } }

@view-transition { navigation: auto }
::view-transition-group(dock), ::view-transition-group(dock-active) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2, .8, .2, 1) }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none } }

.dock {
  position: fixed; z-index: 50; top: 14px; left: 50%; translate: -50% 0;
  display: flex; align-items: center; gap: .25rem; padding: .3rem;
  border-radius: 999px; background: var(--glass-bg);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid var(--glass-line);
  box-shadow: 0 12px 32px var(--glass-shadow), inset 0 1px 0 var(--glass-hi);
  font: 500 .88rem/1 var(--font); letter-spacing: .005em;
  view-transition-name: dock;
}
.dock nav { display: flex; align-items: center; gap: .1rem; font-size: inherit; color: inherit }
.dock a, .dock summary {
  display: inline-flex; align-items: center; gap: .5rem; min-height: var(--dock-h);
  padding: 0 1rem; border-radius: 999px; white-space: nowrap;
  color: var(--dock-muted); text-decoration: none; font-weight: 500;
  transition: color .2s, background-color .2s;
}
.dock a:hover, .dock summary:hover { color: var(--dock-ink); background: var(--dock-hover) }
.dock-pages > a[aria-current], .dock .visual-menu:has(a[aria-current]) > summary {
  color: var(--dock-ink); background: var(--dock-active);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 1px 4px #0002;
  view-transition-name: dock-active;
}
.dock-pages > a[aria-current]::before, .dock .visual-menu:has(a[aria-current]) > summary::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
}
.dock .short { display: none }
.dock .languages { gap: 0; margin-left: .15rem; padding-left: .25rem; border-left: 1px solid var(--glass-line) }
.dock .languages a { padding: 0 .65rem; font-size: .76rem; letter-spacing: .09em }
.dock .languages a[aria-current] { color: var(--dock-ink); font-weight: 650 }

/* Vibed Visuals menu, as a glass sheet under the dock */
.dock .visual-menu { position: relative }
.dock .visual-menu ul {
  position: absolute; top: calc(100% + .7rem); left: 50%; translate: -50% 0;
  min-width: 15rem; width: max-content; max-width: min(20rem, 90vw);
  margin: 0; padding: .35rem; list-style: none;
  border-radius: var(--radius); background: var(--glass-menu);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid var(--glass-line); box-shadow: 0 18px 40px var(--glass-shadow), inset 0 1px 0 var(--glass-hi);
}
.dock .visual-menu li { margin: 0 }
.dock .visual-menu ul a { display: flex; min-height: 2.75rem; padding: 0 .9rem; border-radius: var(--radius-sm); color: var(--dock-ink) }
.dock .visual-menu ul a[aria-current] { background: var(--dock-hover); font-weight: 600 }
.dock .visual-menu ul a[aria-current]::after { content: ""; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--accent) }

/* Name, top left, where the CV puts it too */
.brand {
  position: absolute; z-index: 40; top: calc(14px + .3rem); left: clamp(18px, 4vw, 70px);
  display: flex; align-items: center; min-height: var(--dock-h);
  font: 1.25rem/1 var(--serif); letter-spacing: -.03em; color: #fff; text-decoration: none;
}

/* Cursor-lit glass panels */
.glass { position: relative }
.glass::before {
  content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .08), transparent 45%);
  opacity: 0; transition: opacity .35s;
}
.glass:hover::before { opacity: 1 }

.site-foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.5rem;
  padding: 1.6rem clamp(18px, 4vw, 70px) 2rem;
  font-size: .85rem; color: var(--dock-muted);
}
.site-foot a { color: inherit; text-underline-offset: .25em }
.site-foot a:hover { color: var(--dock-ink) }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px }

@media (max-width: 1100px) { .brand { display: none } }
@media (max-width: 720px) {
  .dock { top: 10px; left: 10px; right: 10px; translate: none; justify-content: space-between; font-size: .84rem }
  .dock a, .dock summary { padding: 0 .7rem; min-height: 2.75rem; gap: .4rem }
  .dock .long { display: none }
  .dock .short { display: inline }
  .dock .languages a[aria-current] { display: none }
  .dock .visual-menu ul { left: 50%; translate: -50% 0 }
}
@media (max-width: 380px) {
  .dock { font-size: .78rem; padding: .25rem }
  .dock a, .dock summary { padding: 0 .5rem }
  .dock-pages > a[aria-current]::before, .dock .visual-menu:has(a[aria-current]) > summary::before { display: none }
}
@media (prefers-reduced-motion: reduce) { .dock a, .dock summary, .glass::before { transition: none } }
