/* Base reset + global accessibility defaults.
   Loaded on every page, after tokens.css. */

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

/* Every typeface on the site ships in one weight only (Perandory,
   IM Fell English, Sue Ellen Francisco), so a browser-faked bold is
   never allowed: emphasis comes from size, italics, or color instead. */
html {
  -webkit-text-size-adjust: 100%;
  font-synthesis-weight: none;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: normal;
  line-height: 1.15;
  margin: 0 0 var(--space-3);
}

p { margin: 0 0 var(--space-4); }

/* Bold in essay bodies etc.: color, not weight (see html rule above). */
strong, b {
  font-weight: normal;
  color: var(--color-crimson);
}

img, video { max-width: 100%; display: block; }

a { color: inherit; }

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

button {
  cursor: pointer;
  padding: var(--space-2) var(--space-3);
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  background: transparent;
}

ul, ol { padding: 0; margin: 0; list-style: none; }

/* Visible keyboard focus everywhere — never remove without replacing */
:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--color-focus-gap);
}

/* Skip link — first focusable element on every page */
.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -3rem;
  background: var(--color-near-black);
  color: var(--color-cream);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: var(--space-3);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Respect reduced-motion preferences site-wide */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Line arrow from the About Figma (resume-link "Arrow 1"): used instead
   of the "\2192" character, which none of the site's fonts include.
   A mask, so it takes the surrounding text color. */
.arrow-line {
  display: inline-block;
  width: 1.1em;
  height: 0.7em;
  vertical-align: 0.05em;
  background-color: currentColor;
  -webkit-mask: url('/assets/icons/arrow-line.svg') no-repeat center / contain;
  mask: url('/assets/icons/arrow-line.svg') no-repeat center / contain;
}
