/* Site header: one header for every page.
   Wide screens: a quiet single bar (name left, links + theme button right).
   Phones: the name centred, links and theme button centred beneath it. */
.site-top{position:sticky;top:0;z-index:50;background:color-mix(in srgb,var(--bg) 90%,transparent);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-bottom:1px solid var(--line);transition:background .3s,border-color .3s}
.site-top .st-in{max-width:1120px;margin:0 auto;padding:0 28px;height:60px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.st-brand{font:800 18px/1 var(--display);letter-spacing:-.02em;text-decoration:none;color:var(--fg);white-space:nowrap;transition:opacity .2s}
.st-brand:hover{opacity:.78}
[data-theme="dark"] .st-brand{font-weight:500}
[data-theme="dark"] .st-brand em{color:var(--accent);font-style:italic}
.st-right{display:flex;align-items:center;gap:22px}
.st-nav{display:flex;align-items:center;gap:26px;font:600 15px/1 var(--ui)}
.st-nav a{position:relative;display:inline-block;padding:8px 0;color:var(--soft);text-decoration:none;transition:color .2s}
.st-nav a::after{content:"";position:absolute;left:0;right:0;bottom:1px;height:2px;border-radius:2px;background:var(--accent);transform:scaleX(0);transform-origin:center;transition:transform .25s ease}
.st-nav a:hover{color:var(--fg)}
.st-nav a:hover::after{transform:scaleX(.6)}
.st-nav a.on{color:var(--fg)}
.st-nav a.on::after{transform:scaleX(1)}
.site-top .theme-toggle{display:grid;place-items:center;width:38px;height:38px;padding:0;border:1.5px solid var(--line);border-radius:999px;background:transparent;color:var(--soft);cursor:pointer;flex:none;transition:color .2s,border-color .2s}
.site-top .theme-toggle:hover{color:var(--fg);border-color:var(--ink-line)}
.site-top .theme-toggle svg{width:18px;height:18px;fill:currentColor;stroke:currentColor;stroke-width:0}
.site-top .theme-toggle .i-sun{display:none;fill:none;stroke-width:2;stroke-linecap:round}
.site-top .theme-toggle .i-sun circle{fill:currentColor;stroke:none}
[data-theme="dark"] .site-top .theme-toggle .i-moon{display:none}
[data-theme="dark"] .site-top .theme-toggle .i-sun{display:block}
@media (max-width:600px){
  .site-top{position:relative}
  .site-top .st-in{height:auto;flex-direction:column;gap:6px;padding:16px 16px 8px;text-align:center}
  .st-brand{font-size:21px}
  .st-right{gap:24px}
  .st-nav{gap:24px}
  .site-top .theme-toggle{width:34px;height:34px}
}
@media (prefers-reduced-motion:reduce){.st-nav a::after,.st-brand,.st-nav a{transition:none}}
