@font-face {
  font-family: "Fahkwang Local";
  src: url("../fonts/fahkwang.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Madefor";
  src: url("../fonts/madefor.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --ink: #030304;
  --paper: #e9e7e0;
  --muted: #96959b;
  --blue: #4554ff;
  --display: "Fahkwang Local", "Times New Roman", serif;
  --body: "Madefor", "Trebuchet MS", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--ink);
  color-scheme: dark;
}

body {
  position: relative;
  display: grid;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: -30%;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(ellipse 28% 24% at 50% 48%, rgba(69, 84, 255, 0.12), transparent 72%),
    radial-gradient(ellipse 42% 35% at 48% 54%, rgba(143, 216, 232, 0.035), transparent 72%);
  animation: atmosphere 14s ease-in-out infinite alternate;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 5;
  content: "";
  pointer-events: none;
  opacity: 0.13;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.24'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

::selection {
  background: var(--blue);
  color: #fff;
}

.identity {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(94vw, 58rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.identity__mark {
  position: relative;
  width: clamp(18rem, 32vw, 25rem);
  max-width: 100%;
  aspect-ratio: 69 / 87;
  overflow: hidden;
  opacity: 0;
  filter: saturate(0.92) brightness(0.94) drop-shadow(0 1.5rem 4rem rgba(69, 84, 255, 0.11));
  animation: emerge 1.6s var(--ease) 80ms forwards;
}

.identity__logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 182%;
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%);
}

h1 {
  margin: clamp(-0.75rem, -1vw, -0.25rem) 0 0;
  opacity: 0;
  color: var(--paper);
  font-family: var(--display);
  font-size: clamp(2.25rem, 5vw, 4.75rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
  animation: emerge 1.5s var(--ease) 260ms forwards;
}

.identity__link {
  position: relative;
  opacity: 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.55vw, 1.3rem);
  font-weight: 400;
  letter-spacing: 0.045em;
  line-height: 1.4;
  text-decoration: none;
  transition: color 300ms ease;
}

.identity__site {
  margin-top: clamp(1.15rem, 2vw, 1.7rem);
  color: #b7b5b0;
  animation: emerge 1.5s var(--ease) 420ms forwards;
}

.identity__email {
  margin-top: 0.55rem;
  animation: emerge 1.5s var(--ease) 540ms forwards;
}

.identity__link::after {
  position: absolute;
  right: 0;
  bottom: -0.45rem;
  left: 0;
  height: 1px;
  content: "";
  background: var(--blue);
  transform: scaleX(0.18);
  transform-origin: center;
  opacity: 0.55;
  transition: transform 450ms var(--ease), opacity 300ms ease;
}

.identity__link:hover,
.identity__link:focus-visible {
  color: var(--paper);
}

.identity__link:hover::after,
.identity__link:focus-visible::after {
  transform: scaleX(1);
  opacity: 0.9;
}

.identity__link:focus-visible {
  outline: 1px solid var(--blue);
  outline-offset: 0.65rem;
}

@keyframes emerge {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
    filter: blur(0.7rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes atmosphere {
  from {
    transform: scale(0.96) translate3d(-1%, 1%, 0);
  }
  to {
    transform: scale(1.04) translate3d(1%, -1%, 0);
  }
}

@media (max-height: 680px) {
  .identity__mark {
    width: clamp(15rem, 51vh, 22rem);
  }

  h1 {
    font-size: clamp(2rem, 7vh, 3.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  .identity__mark,
  h1,
  .identity__site,
  .identity__email {
    animation: none;
  }

  .identity__mark,
  h1,
  .identity__site,
  .identity__email {
    opacity: 1;
  }
}
