@charset "utf-8";

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

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

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

/* GLOBAL */
html {
  scroll-behavior: smooth;

  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg-dark);
}

body {
  overflow-x: clip;

  font-family: var(--font-body);
  font-size: var(--fs-body);
  background: var(--bg);
  color: var(--text);

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open,
body.loading {
  overflow: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

h4 {
  font-size: var( --fs-h4);
}

p {
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 60ch;
  letter-spacing: 0.2px;
}

/* INPUT */
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

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

svg {
  display: block;
}

/* LINKS */
a {
  text-decoration: none;
  color: inherit;
}

/* BUTTONS */
button {
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

/* LIST */
ul {
  list-style: none;
  padding: 0;
}

/* SECTION */
section {
  position: relative;
}

/* ========================
    ANIMATED SCROLLBAR
======================== */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

/* Animated Thumb */
::-webkit-scrollbar-thumb {
  box-shadow: 0 0 10px var(--secondary-glow-xl);
  background: linear-gradient(
    180deg,
    var(--primary),
    var(--secondary),
    var(--primary)
  );

  background-size: 100% 300%;

  border-radius: 50px;

  animation: scrollbarFlow 5s linear infinite;
}

/* Hover */
::-webkit-scrollbar-thumb:hover {
  filter: brightness(1.1);
}

/* Animation */
@keyframes scrollbarFlow {
  0% {
    background-position: 0% 0%;
  }

  100% {
    background-position: 0% 300%;
  }
}