/* VARIRABLES, COLOURS & FONT FEATURES */

:root,
button {
  font-family: Inter, sans-serif;
  font-feature-settings: "liga" 1, "calt" 1;
  font-size: 16px;
}

@supports (font-variation-settings: normal) {
  :root {
    font-family: InterVariable, sans-serif;
  }
}

.recolorsvg {
  filter: var(--img-fg);
}

body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  text-align: center;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
  margin: 0;
  color: var(--fg);
}

/* TEXT STYLING */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  width: 64vw;
}

h1 {
  font-weight: 700;
  font-size: 2.25rem;
}

h2 {
  font-weight: 500;
  font-size: 1.75rem;
}

.social-links {
  /* Setting position */
  position: absolute;
  top: calc(100dvh - 4rem);
  display: flex;
  gap: 2rem;
  align-items: center;
}

.social-links img {
  height: auto;
  width: 1.25rem;
}

.color-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: absolute;
  align-items: center;
  top: 16px;
  left: 16px;
  width: 90vw;
}

button {
  padding: 4px 12px;
  border: none;
  border-radius: 4px;
  background-color: var(--accent);
  color: var(--fg);
  font-size: 1.25rem;
  cursor: pointer;
}

button:hover {
  opacity: 0.6;
}

button:focus {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

a[class="link"] {
  color: var(--fg);
  text-decoration: none;
}

a[class="link"]:hover::before {
  content: "↗";
  padding-right: 4px;
}

a[class="link"]::after {
  content: "";
  background-color: var(--accent);
  width: 100%;
  height: 1px;
  position: relative;
  top: -1px;
  left: 0.5px;
  display: block;
  transition: all 250ms ease-in-out;
}

a[class="link"]:hover::after {
  background-color: var(--fg);
  height: 2px;
  transform: translate(0, 2px);
}

/* RESPONSIVE WEB DESIGN + MOBILE FIRST */
@media only screen and (min-width: 600px) {
  h1,
  h2 {
    width: 80vw;
  }

  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  button {
    font-size: 1.125rem;
  }
}

@media only screen and (min-width: 850px) {
  h1,
  h2 {
    width: 40vw;
  }

  h1 {
    font-size: 2.25rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  button {
    font-size: 1rem;
  }
}

@media (prefers-contrast: high) {
  body {
    background: black;
    color: white;
  }
  button {
    background-color: white;
    color: black;
  }
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: white;
  }
}
