/* Shared navigation and accessible interaction across the personal site. */
:root { --site-ink:#24332c; --site-paper:#f4f1ea; --site-accent:#944b39; }
html { scroll-padding-top:105px; }
body { -webkit-font-smoothing:antialiased; }
svg.arrow { display:inline-block; width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; vertical-align:middle; flex-shrink:0; }
.site-header nav a svg.arrow { width:14px; height:14px; }
[hidden] { display:none !important; }
:focus-visible { outline:2px solid var(--site-accent); outline-offset:6px; }
.skip-link { position:fixed; top:12px; left:16px; z-index:110; padding:12px 18px; background:var(--site-ink); color:white; transform:translateY(-160%); }
.skip-link:focus { transform:translateY(0); color:white; }
.site-header { position:sticky; top:0; z-index:100; background:rgba(244,241,234,.97); backdrop-filter:blur(16px); border-bottom:1px solid #d3d0c6; }
.site-header .shell { width:min(1240px,calc(100% - 80px)); min-height:86px; padding:0; display:flex; flex-direction:row; align-items:center; justify-content:space-between; gap:28px; }
.site-header .wordmark { width:191px; height:34px; }
.site-header nav { gap:28px; }
.site-header nav a { display:flex; align-items:center; min-height:44px; position:relative; font-size:.65rem; font-weight:600; letter-spacing:.1em; }
.site-header nav a::after { content:""; position:absolute; bottom:4px; left:0; width:100%; height:1px; background:currentColor; transform:scaleX(0); transform-origin:left; transition:transform .2s ease; }
.site-header nav a:hover::after,.site-header nav a[aria-current="page"]::after { transform:scaleX(1); }
.site-header nav a:last-child { gap:16px; border:1px solid #b8bdb5; padding:0 15px; }
.site-header nav a:last-child::after { display:none; }
.site-header nav a:last-child:hover { background:var(--site-ink); border-color:var(--site-ink); color:var(--site-paper); }
.nav-toggle { display:none; }
.site-header.inverse { background:#303638; border-color:#515954; }
.site-header.inverse .nav-toggle { color:var(--site-paper); }
.site-footer { margin-top:0; }
.site-footer a { text-decoration:underline; text-underline-offset:4px; }
.site-footer p { line-height:1.75; }
@media(max-width:760px) {
  html { scroll-padding-top:92px; }
  .site-header .shell { width:calc(100% - 40px); min-height:74px; flex-wrap:wrap; column-gap:16px; row-gap:0; }
  .site-header .wordmark { width:166px; height:30px; margin:20px 0; }
  .site-header nav { width:100%; flex-wrap:wrap; gap:4px 21px; padding-bottom:14px; }
  .site-header nav a { font-size:.63rem; }
  .nav-ready .nav-toggle { display:inline-flex; align-items:center; justify-content:center; gap:11px; min-height:44px; padding:0 0 0 12px; border:0; background:none; color:var(--site-ink); font:500 .68rem var(--mono); text-transform:uppercase; cursor:pointer; }
  .nav-toggle-icon { width:17px; height:10px; border-top:1px solid currentColor; border-bottom:1px solid currentColor; transition:transform .2s; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon { transform:rotate(-45deg); }
  .nav-ready .site-header nav { display:none; }
  .nav-ready .site-header nav[data-open] { display:flex; flex-direction:column; align-items:stretch; gap:0; padding:0 0 20px; }
  .nav-ready .site-header nav a { padding:12px 0; min-height:50px; border-top:1px solid #d3d0c6; font-size:.8rem; }
  .nav-ready .site-header nav a:last-child { padding-inline:14px; margin-top:8px; }
  .site-header.inverse nav a { border-color:#515954; }
}
@media(max-width:720px) {
  .chapters article > div { grid-column:1; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
