/* Quiet, theme-aware native scrolling throughout the portfolio. */
:root {
  --scroll-thumb: color-mix(in srgb, var(--ink, #555752) 34%, transparent);
  --scroll-thumb-hover: color-mix(in srgb, var(--ink, #555752) 55%, transparent);
  --scroll-thumb-active: color-mix(in srgb, var(--ink, #555752) 70%, transparent);
}
:root[data-theme="dark"], :root.dark, body.bg--black {
  --scroll-thumb: rgba(226, 228, 220, .3);
  --scroll-thumb-hover: rgba(226, 228, 220, .5);
  --scroll-thumb-active: rgba(226, 228, 220, .68);
}
/* Low specificity preserves intentionally hidden immersive/long-image tracks. */
:where(html, body, body *) {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}
:where(*)::-webkit-scrollbar { width: 8px; height: 8px; }
:where(*)::-webkit-scrollbar-track { background: transparent; border: 0; }
:where(*)::-webkit-scrollbar-thumb {
  min-height: 32px; min-width: 32px;
  border: 2px solid transparent; border-radius: 20px;
  background: var(--scroll-thumb); background-clip: padding-box;
}
:where(*)::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-thumb-hover); }
:where(*)::-webkit-scrollbar-thumb:active { background-color: var(--scroll-thumb-active); }
:where(*)::-webkit-scrollbar-corner { background: transparent; }
:where(*)::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
/* Chromium/Safari use the slimmer rounded thumb; Firefox uses native thin bars. */
@supports selector(::-webkit-scrollbar) {
  :where(html, body, body *) { scrollbar-width: auto; scrollbar-color: auto; }
  .jtrack { scrollbar-width: auto; scrollbar-color: auto; }
}
/* The white browser mockup uses a custom position indicator. */
.pv-vp .pv-sb { width: 3px; right: 4px; background: rgba(55,57,52,.3); border-radius: 20px; }
.pv-vp:hover .pv-sb { background: rgba(55,57,52,.5); }
/* Keep Windows high-contrast scrollbars fully legible and draggable. */
@media (forced-colors: active) {
  :where(html, body, body *) { scrollbar-color: auto; }
  :where(*)::-webkit-scrollbar-thumb { background-color: ButtonText; }
}
