/* ============================================================
   RESET — Modern CSS Reset (Andy Bell style)
   https://piccalil.li/blog/a-more-modern-css-reset/
   ============================================================ */

/* Box sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Remove default margin / padding */
* {
  margin: 0;
  padding: 0;
}

/* Prevent font size inflation on mobile */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  min-height: 100svh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Headings — wrap balance + tight line-height */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.1;
  text-wrap: balance;
}

p, li, figcaption, blockquote {
  text-wrap: pretty;
  max-width: 75ch;
}

/* Media defaults */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Form elements inherit font */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}

/* Buttons */
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Lists used as semantic markup */
ul[role='list'],
ol[role='list'],
nav ul {
  list-style: none;
}

/* Anchor defaults */
a {
  color: inherit;
  text-decoration: none;
}

/* Smooth scrolling honoring user prefs */
html:focus-within {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Avoid orphans on resize */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anchor scroll-padding to nav */
:target {
  scroll-margin-block: 5rem;
}

/* Avoid horizontal scroll from rotated photos */
html, body {
  overflow-x: hidden;
}
