/* ==========================================================================
   robertmihai.com — base styles
   The font, a small reset and the colour variables. The design itself is in
   site.css (and case-study.css); the page transition is in page-transition.css.
   ========================================================================== */

/* Inter is the only font on the site: a variable font, one file for every
   weight, Latin characters only. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inter-v20-latin.woff2") format("woff2");
}

:root {
  --background-color: #fff; /* the white behind every page */
  --transition-color: #fff; /* page transition cells + the canvas under the page */
  --black: #0e0e0e;
  --beige: #eceae5;
}

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

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background-color: var(--background-color);
  color: #000;
  font-family: Inter, sans-serif;
  font-size: 14px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[hidden] {
  display: none;
}

img {
  display: inline-block;
  max-width: 100%;
  border: 0;
  vertical-align: middle;
}

/* AVIF with a WebP fallback: the <picture> wrapper takes no space of its own */
picture {
  display: contents;
}

picture > source {
  display: none; /* otherwise it would count as an (empty) item in flex/grid gaps */
}

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

::selection {
  background: var(--black);
  color: var(--beige);
}
