/* Base reset, typography, a11y — shared */
@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/space-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/space-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("../assets/fonts/dm-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("../assets/fonts/dm-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("../assets/fonts/dm-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  /* Reserve scrollbar space so centered layout does not jump when overflow appears */
  scrollbar-gutter: stable;
  /* Same field as body — avoids a flat black strip above the glow */
  background-color: var(--bg);
  background-image: var(--field);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  min-height: 100%;
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--fg);
  background: transparent;
  /* Accidental drag-select on chrome/identity feels broken; copy via Resume PDF */
  -webkit-user-select: none;
  user-select: none;
}

input,
textarea,
[contenteditable="true"],
a[href^="mailto:"],
a[href^="mailto:"] *,
.contact-email,
.contact-email * {
  -webkit-user-select: text;
  user-select: text;
  cursor: pointer;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  padding: var(--space-2) var(--space-3);
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

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

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