/* Variable fonts usage:
:root { font-family: "Inter", sans-serif; }
@supports (font-variation-settings: normal) {
  :root { font-family: "InterVariable", sans-serif; font-optical-sizing: auto; }
} */
/*
 @font-face {
   font-family: InterVariable;
   font-style: normal;
   font-weight: 100 900;
   font-display: swap;
   src: url('../assets/InterVariable.woff2') format('woff2');
 }
 @font-face {
   font-family: InterVariable;
   font-style: italic;
   font-weight: 100 900;
   font-display: swap;
   src: url('../assets/InterVariable-Italic.woff2') format('woff2');
}
*/

:root {
  color-scheme: light dark;

  /* Atom One Light */
  --syntax-hue-light: 230;
  --syntax-saturation-light: 1%;
  --syntax-lightness-light: 98%;

  /* Atom One Dark */
  --syntax-hue-dark: 220;
  --syntax-saturation-dark: 13%;
  --syntax-lightness-dark: 18%;

  /* Monochrome ----------------------------------- */
  /* default text color */
  --mono-1-light: hsl(var(--syntax-hue-light), 8%, 24%);
  --mono-1-dark: hsl(var(--syntax-hue-dark), 14%, 71%);

  --mono-2-light: hsl(var(--syntax-hue-light), 6%, 44%);
  --mono-2-dark: hsl(var(--syntax-hue-dark), 9%, 55%);

  --mono-3-light: hsl(var(--syntax-hue-light), 4%, 64%);
  --mono-3-dark: hsl(var(--syntax-hue-dark), 10%, 40%);

  /* Colors --------------------------------------- */
  --hue-1: hsl(187, 47%, 55%); /* <-cyan */
  --hue-2: hsl(207, 82%, 66%); /* <-blue */
  --hue-3: hsl(286, 60%, 67%); /* <-purple */
  --hue-4: hsl(95, 38%, 62%); /* <-green */

  --hue-5: hsl(355, 65%, 65%); /* <-red 1 */
  --hue-5-2: hsl(5, 48%, 51%); /* <-red 2 */

  --hue-6: hsl(29, 54%, 61%); /* <-orange 1 */
  --hue-6-2: hsl(39, 67%, 69%); /* <-orange 2 */

  --syntax-bg-2: hsl(var(--syntax-hue), var(--syntax-saturation), 24%);

  /* Base colors */
  --bg-dark: hsl(
    var(--syntax-hue-dark),
    var(--syntax-saturation-dark),
    var(--syntax-lightness-dark)
  );
  --bg-light: hsl(
    var(--syntax-hue-light),
    var(--syntax-saturation-light),
    var(--syntax-lightness-light)
  );
  --bg-1: var(--syntax-bg-2);
  --fg-dark: var(--mono-1-dark);
  --fg-light: var(--mono-1-light);

  /* layout */
  --max-page-width: 52rem;
  --radius: 0.5rem;

  /* Navigation */
  --nav-height: 3rem;
  --nav-bg-dark: var(--bg-dark);
  --nav-bg-light: var(--bg-light);
  --nav-shadow: 0 0 10px -3px var(--bg-dark);
  --nav-border: 1px solid light-dark(var(--fg-dark), transparent);
}

.light {
  color-scheme: light;
}

.dark {
  color-scheme: dark;
}

/*** Reset ***/
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
  padding: 0;
  border: 0 solid transparent;
}
html:focus-within {
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
}
audio,
canvas,
embed,
iframe,
img,
object,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  line-height: inherit;
  color: inherit;
}
a {
  cursor: pointer;
  color: inherit;
  text-decoration: inherit;
}
a:not([class]) {
  text-decoration-skip-ink: auto;
}
button,
[role='button'] {
  cursor: pointer;
  background-color: transparent;
}
code {
  font: inherit;
  font-size: inherit;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}
ul[role='list'],
ol[role='list'] {
  list-style: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
textarea {
  vertical-align: top;
  overflow: auto;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:root {
  --font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir,
    segoe ui, helvetica neue, Adwaita Sans, Cantarell, Ubuntu, roboto, noto,
    helvetica, arial, sans-serif;

  font-family: var(--font-family);
  font-size: 100%;
}

h1 {
  color: light-dark(var(--hue-5-2), var(--hue-4));
}

html,
body {
  background-color: light-dark(var(--bg-light), var(--bg-dark));
  color: light-dark(var(--fg-light), var(--fg-dark));
  margin: 0;
  padding: 0;
  text-rendering: optimizeLegibility;
}

h1 {
  font-weight: 800;
  font-size: 2.875rem;
}

h2,
h3,
h4 {
  font-weight: 700;
  color: light-dark(var(--hue-1), var(--hue-5));
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 2rem;
}

h4 {
  font-size: 1.5rem;
}

p,
li,
blockquote {
  line-height: 1.8;
}

input,
textarea {
  color: var(--bg);
}

code {
  font-family: monospace;
  display: inline-block;
  background-color: light-dark(transparent, var(--fg-dark));
  color: var(--fg-light);
  border-radius: 3px;
  padding: 0 0.2rem;
}

@supports not (color: light-dark(black, white)) {
  html,
  body {
    background-color: var(--bg-dark);
    color: var(--fg-dark);
  }

  h1 {
    color: var(--hue-4);
  }

  h2,
  h3,
  h4 {
    color: var(--hue-5);
  }
}

@media (max-width: 48rem) {
  h1 {
    font-size: 2.4rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  h4 {
    font-size: 1.2rem;
  }
}
