/* Self-hosted Inter — drop the woff2 files in assets/fonts/ (falls back to system-ui until then). */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

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

html {
  color-scheme: dark;
}

/* Safety net for icon() output: an SVG with only a viewBox (no width/height) defaults
   to the UA's intrinsic 300x150 box, which is why an unstyled icon renders as an
   oversized, clipped smear instead of a glyph. Specific contexts (.sidebar__item svg,
   etc.) override this with their own size. */
svg {
  width: 20px;
  height: 20px;
}

body {
  /* A barely-there halo instead of a flat fill — visible only as a soft lift near the
     top of the page, never competing with content. Fixed so it doesn't tile or shift
     as the page scrolls. */
  background-color: var(--color-bg);
  background-image:
    radial-gradient(1200px 600px at 15% -10%, rgba(38, 217, 163, 0.06), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(87, 169, 255, 0.04), transparent 55%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font-family: inherit;
}

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

/* Thin, unobtrusive scrollbars — keeps the "beaucoup de vide" feel intact. */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-surface-hover) transparent;
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-thumb {
  background: var(--color-surface-hover);
  border-radius: var(--radius-pill);
}

/* Fluid page entrance animation, applied to a wrapper around each page's main content. */
.page-enter {
  animation: page-enter 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
