@font-face {
  font-family: Inter;
  font-weight: 100 900;
  font-display: block;
  src: url("assets/fonts/Inter.woff2") format("woff2");
}

:root {
  --bg: #000000;
  --text: #ffffff;
  --icon-hover: #262626;
  --orb-size: 12px;
  --orb-intro-duration: 3750ms;
  --intro-title-size: 2rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --text: #000000;
    --icon-hover: #e6e6e6;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

main {
  width: min(100%, 42.5rem);
  padding: 2rem;
}

.is-animating .reveal-word {
  opacity: 0;
  visibility: hidden;
  animation: fade-in var(--reveal-duration) linear forwards;
  animation-delay: calc(var(--orb-intro-duration) + var(--reveal-delay));
}

h1 {
  position: relative;
  padding-bottom: 20px;
  font-size: var(--intro-title-size);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.is-animating h1::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc((var(--intro-title-size) * 1.08 - var(--orb-size)) / 2);
  width: var(--orb-size);
  height: var(--orb-size);
  border-radius: 50%;
  background: currentColor;
  transform: scale(0);
  opacity: 0;
  animation: orb-intro var(--orb-intro-duration) linear forwards;
}

p {
  padding-bottom: 16px;
  line-height: 1.5;
  letter-spacing: -0.0125em;
}

p a {
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.25em;
  transition: opacity 250ms;
}

p a:hover {
  opacity: 0.5;
}

footer {
  display: flex;
  transform: translateX(-6px);
}

footer a {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  text-decoration: none;
}

footer a:is(:hover, :focus-visible) {
  background: var(--icon-hover);
}

footer a::after {
  content: attr(aria-label);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 7px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

footer a:is(:hover, :focus-visible)::after {
  opacity: 1;
}

footer svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes fade-in {
  0% {
    opacity: 0;
    visibility: visible;
  }

  to {
    opacity: 1;
    visibility: visible;
  }
}

@keyframes orb-intro {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  16.67% {
    transform: scale(1.25);
    opacity: 1;
  }

  33.33% {
    transform: scale(0.75);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.25);
    opacity: 1;
  }

  66.67% {
    transform: scale(0.75);
    opacity: 0.5;
  }

  83.33% {
    transform: scale(1.25);
    opacity: 1;
  }

  100% {
    transform: scale(0);
    opacity: 0;
  }
}
