*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: var(--fs-base); line-height: var(--lh-body);
  font-feature-settings: "cv11", "ss03"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0 0 var(--s-3); line-height: var(--lh-tight); letter-spacing: -0.015em; font-weight: 700; text-wrap: balance; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; font-optical-sizing: auto; }
h1 { font-size: var(--fs-h1); letter-spacing: -0.022em; line-height: 1.04; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
p { margin: 0 0 var(--s-4); text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .site-footer :focus-visible, .project-tag :focus-visible, .section--dark :focus-visible { outline-color: var(--focus-on-dark); }
::selection { background: var(--blue-100); color: var(--ink); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--s-4); top: -100px; z-index: 1000; background: var(--ink); color: var(--white); padding: var(--s-3) var(--s-4); border-radius: var(--radius-sm); font-weight: 600; }
.skip-link:focus { top: var(--s-3); color: var(--white); }
code, kbd { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 4px; padding: 0.1em 0.35em; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
/* The hidden attribute must always win over component display rules (buttons, flex rows). */
[hidden] { display: none !important; }
