:root {
  --bg: #F4F2ED;
  --ink: #141311;
  --accent: #C64B2A;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.15;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

.stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8vw 6vw;
}

.wordmark {
  position: relative;
  width: min(88vw, 1100px);
  aspect-ratio: 682.9808 / 56;
  margin: 0;
  padding: 0;
}

.tagline {
  margin: 1.75em 0 0;
  color: var(--ink);
  opacity: 0.5;
  font: 300 18px/1 "Inter", system-ui, sans-serif;
  letter-spacing: 0.04em;
}

.links {
  position: fixed;
  left: 50%;
  bottom: 50px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3.5em;
  width: max-content;
  max-width: calc(100vw - 32px);
}

.links-divider {
  width: 1px;
  height: 16px;
  background: var(--ink);
  opacity: 0.2;
}

.link {
  display: flex;
  align-items: center;
  gap: 0.6em;
  color: var(--ink);
  opacity: 0.6;
  text-decoration: none;
  font: 300 13px/1 "Inter", system-ui, sans-serif;
  letter-spacing: 0.02em;
  transition: opacity 0.18s ease;
}

.link:hover,
.link:focus-visible {
  opacity: 1;
}

.link-icon {
  display: block;
  flex-shrink: 0;
}

.link-icon--photo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.link-icon--mail {
  width: 22px;
  height: auto;
  color: var(--ink);
}

.letter {
  position: absolute;
  left: var(--l);
  top: 0;
  width: var(--w);
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  animation: letter-intro 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes letter-intro {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wordmark .letter:nth-child(1) { animation-delay: 0ms; }
.wordmark .letter:nth-child(2) { animation-delay: 60ms; }
.wordmark .letter:nth-child(3) { animation-delay: 120ms; }
.wordmark .letter:nth-child(4) { animation-delay: 180ms; }
.wordmark .letter:nth-child(5) { animation-delay: 240ms; }
.wordmark .letter:nth-child(6) { animation-delay: 300ms; }
.wordmark .letter:nth-child(7) { animation-delay: 360ms; }
.wordmark .letter:nth-child(8) { animation-delay: 420ms; }
.wordmark .letter:nth-child(9) { animation-delay: 480ms; }
.wordmark .letter:nth-child(10) { animation-delay: 540ms; }
.wordmark .letter:nth-child(11) { animation-delay: 600ms; }

.letter-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.letter-face {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 100%;
  overflow: visible;
  transform: translateY(-50%) translateY(var(--slide, 0%));
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.letter-face.is-entering {
  --slide: 100%;
  opacity: 0;
}

.letter-face.is-leaving {
  --slide: -100%;
  opacity: 0;
}

.letter path {
  fill: currentColor;
}

.letter-face--lottie svg path,
.letter-face--lottie svg polyline,
.letter-face--lottie svg polygon {
  stroke: currentColor !important;
  stroke-linejoin: round !important;
}

.letter-face--lottie:not(.letter-face--keep-clip) svg {
  overflow: visible;
}

.letter-face--lottie:not(.letter-face--keep-clip) svg [clip-path] {
  clip-path: none !important;
}

.letter-face--keep-clip svg [clip-path] {
  /* keep left/right clipped (the assembling pieces travel in from off
     to the sides) but let stroke overflow the top/bottom freely */
  clip-path: inset(-200% 0% -200% 0%) !important;
}

.letter:focus-visible {
  outline: 2px dashed var(--ink);
  outline-offset: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .letter-face {
    transition: opacity 0.18s ease;
  }
  .letter-face.is-entering,
  .letter-face.is-leaving {
    transform: translateY(-50%);
  }

  .letter {
    animation: none;
    opacity: 1;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141311;
    --ink: #F4F2ED;
    --accent: #E8703A;
  }

  body::before {
    opacity: 0.35;
    mix-blend-mode: overlay;
  }
}

@media (max-width: 480px) {
  .links {
    gap: 1.25em;
  }
}
