/*
  Portfolio / Alex Rudnicki
  Design system, visual design, and front-end code by Alex Rudnicki.
  © 2026 Alex Rudnicki. All rights reserved.
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + env(safe-area-inset-top));
  background: var(--cream-nav);
  overscroll-behavior: none;

  scrollbar-color: var(--border-dark) transparent;
  scrollbar-width: thin;
}

body {
  position: relative;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--type-root);
  font-weight: var(--weight-body);
  line-height: var(--leading-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
  font-optical-sizing: auto;
  isolation: isolate;
}

::-webkit-scrollbar { width: var(--scrollbar-size); height: var(--scrollbar-size); }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-dark);
  border-radius: var(--radius-control);
}
::-webkit-scrollbar-thumb:hover { background: var(--subtle); }

::selection {
  background: var(--selection-bg);
  color: var(--selection-text);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
ul, ol { list-style: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

p, li {
  overflow-wrap: break-word;
  text-wrap: pretty;
  hanging-punctuation: first last;
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: 0;
  font-kerning: normal;
  font-optical-sizing: none;
  font-feature-settings: normal;
  word-spacing: normal;
  text-wrap: balance;
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-focus);
}
#main:focus,
#main:focus-visible,
.case-hero:focus,
.case-hero:focus-visible { outline: none; }

main,
footer {
  position: relative;
  z-index: 1;
}
