/* ==========================================================================
   base.css — RESET & DEFAULT ELEMENT STYLES
   Styles for plain HTML elements (body, headings, links, images...).
   No classes here except the page background.
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  color-scheme: dark;
}

body {
  min-height: 100vh;
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  background-image: var(--gradient-page-glow), var(--image-page-background);
  background-repeat: no-repeat;
  background-size: 100% 100%, cover;
  background-attachment: scroll;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--color-accent-primary);
  color: var(--button-primary-text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-heading);
  color: var(--color-text-primary);
  text-wrap: balance;
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

p {
  color: var(--color-text-secondary);
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-link-hover);
}

/* Keyboard focus is an outline, so it stays visible on buttons and cards
   that already use box-shadow for their own look. */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

hr,
.divider {
  height: 1px;
  margin-block: var(--space-xl);
  border: 0;
  background: var(--gradient-divider);
}

img,
svg,
picture,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
