@font-face {
  font-family: "Vow Energy Serif";
  src: url("../assets/fonts/VowEnergySerif-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: "Vow Energy Serif";
  src: url("../assets/fonts/VowEnergySerif-Italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: block;
}

:root {
  color-scheme: dark;
  --bg: rgba(0, 0, 0, 0.95);
  --text: rgba(255, 255, 255, 0.95);
  --text-muted: rgba(255, 255, 255, 0.5);
  --caret-hue: 0deg;
  --caret-sat: 1.55;
  --caret-bright: 1.06;
  --panel-y: 110vh;
  --content-y: 0px;
  --panel-opacity: 0;
  --press-scale: 1;
  --edge-x: 50%;
  --edge-y: 50%;
  --tooltip-angle: 0deg;
  --tooltip-hue: 0deg;
  --tooltip-hot-x: 50%;
  --tooltip-hot-y: 50%;
  background: var(--bg);
  font-family: "Vow Energy Serif", Georgia, serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

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

body {
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
}

.site-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent calc(var(--edge-x) - 0.5px), rgba(255, 255, 255, 0.025) var(--edge-x), transparent calc(var(--edge-x) + 0.5px)),
    linear-gradient(180deg, transparent calc(var(--edge-y) - 0.5px), rgba(255, 255, 255, 0.02) var(--edge-y), transparent calc(var(--edge-y) + 0.5px)),
    var(--bg);
}

.intro-view,
.bio-panel {
  position: fixed;
  inset: 0;
}

.intro-view {
  display: grid;
  place-items: center;
  z-index: 1;
  transform: translateZ(0);
}

.intro-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transform: translate3d(0, 0, 0) scale(var(--press-scale));
  transition: opacity 420ms ease;
  will-change: transform, opacity;
}

.is-info-open .intro-lockup {
  opacity: 0;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: 84px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.intro-lockup h1:empty {
  width: 0;
}

.hero-caret {
  display: inline-block;
  width: 0.75px;
  height: 99px;
  flex: 0 0 auto;
  background: linear-gradient(
    180deg,
    rgb(94, 63, 137) 0%,
    rgb(79, 233, 224) 35.096%,
    rgb(251, 252, 234) 70.192%,
    rgb(254, 249, 150) 84.135%,
    rgb(247, 95, 83) 100%
  );
  filter: hue-rotate(var(--caret-hue)) saturate(var(--caret-sat)) contrast(1.12) brightness(var(--caret-bright));
  animation: caret-pulse 1.06s steps(1, end) infinite;
  transform-origin: center;
  will-change: filter, opacity, transform;
}

.is-typing-intro .hero-caret {
  animation: none;
  opacity: 1;
}

.info-toggle {
  position: fixed;
  top: 7px;
  right: 7px;
  z-index: 30;
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transform: translateZ(0) scale(var(--press-scale));
  transition: color 220ms ease;
  -webkit-tap-highlight-color: transparent;
}

.info-toggle:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.65);
}

.info-svg {
  display: block;
  width: 70px;
  height: 70px;
  overflow: visible;
  pointer-events: none;
}

.info-ring {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 2.4;
}

.info-glyph {
  color: inherit;
  transform: rotate(0deg);
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 720ms cubic-bezier(0.16, 1, 0.24, 1);
}

.cross-x,
.stem-x {
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
  transition:
    opacity 430ms cubic-bezier(0.16, 1, 0.24, 1),
    transform 720ms cubic-bezier(0.16, 1, 0.24, 1);
}

.dot-i {
  fill: currentColor;
  transform-box: fill-box;
  transform-origin: center;
  transition:
    opacity 360ms cubic-bezier(0.16, 1, 0.24, 1),
    transform 560ms cubic-bezier(0.16, 1, 0.24, 1);
}

.cross-x {
  opacity: 0;
  transform: scaleX(0.12);
}

.stem-x {
  transform: translateY(5.25px) scaleY(0.45);
}

.dot-i {
  opacity: 1;
  transform: scale(1);
}

.is-info-open .info-glyph {
  transform: rotate(225deg);
}

.is-info-opening .info-glyph {
  animation: info-glyph-open-settle 1440ms linear both;
  transition: none;
}

.is-info-closing .info-glyph {
  animation: info-glyph-close-settle 1440ms linear both;
  transition: none;
}

.is-info-open .cross-x {
  opacity: 1;
  transform: scaleX(1);
}

.is-info-open .stem-x {
  transform: translateY(0) scaleY(1);
}

.is-info-open .dot-i {
  opacity: 0;
  transform: scale(0.05);
}

.bio-panel {
  z-index: 10;
  overflow: hidden;
  overscroll-behavior: none;
  pointer-events: none;
  background: var(--bg);
  opacity: var(--panel-opacity);
  transform: translate3d(0, var(--panel-y), 0);
  touch-action: none;
  will-change: transform, opacity;
  -webkit-overflow-scrolling: touch;
}

.is-info-open .bio-panel {
  pointer-events: auto;
}

.is-bio-dragging,
.is-bio-dragging * {
  user-select: none;
}

.bio-content {
  display: flex;
  width: min(929px, calc(100vw - 96px));
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  align-items: flex-start;
  gap: 54px;
  padding: 78px 0 80px 63px;
  color: var(--text);
  font-size: 32px;
  line-height: 38px;
  transform: translate3d(0, var(--content-y), 0);
  will-change: transform;
}

.bio-content p {
  max-width: 929px;
  margin: 0;
  font-weight: 400;
  letter-spacing: 0;
  transform: translate3d(0, 44px, 0);
  transform-origin: left center;
  opacity: 0;
  will-change: transform, opacity;
}

.soft-underline {
  text-decoration-line: underline;
  text-decoration-color: var(--text-muted);
  text-decoration-thickness: 0.045em;
  text-underline-offset: 0.08em;
}

.acronym {
  outline: none;
}

.acronym:focus-visible {
  color: #fcfdf3;
  text-decoration-color: rgba(79, 233, 224, 0.75);
}

.tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: fit-content;
  max-width: min(340px, calc(100vw - 32px));
  padding: 8px 10px 9px;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(28, 28, 28, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid transparent;
  border-radius: 7px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 16px;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  white-space: normal;
  transform: translate3d(-999px, -999px, 0);
  transition: opacity 140ms ease;
  will-change: transform, opacity;
}

.tooltip::before {
  position: absolute;
  inset: -1px;
  z-index: -1;
  padding: 1px;
  content: "";
  background: conic-gradient(
    from var(--tooltip-angle) at var(--tooltip-hot-x) var(--tooltip-hot-y),
    rgb(94, 63, 137),
    rgb(79, 233, 224),
    rgb(251, 252, 234),
    rgb(254, 249, 150),
    rgb(247, 95, 83),
    rgb(94, 63, 137)
  );
  border-radius: inherit;
  filter: hue-rotate(var(--tooltip-hue)) saturate(2.15) contrast(1.22) brightness(1.12);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.98;
  pointer-events: none;
}

.tooltip.is-visible {
  opacity: 1;
}

@keyframes caret-pulse {
  0%,
  52% {
    opacity: 1;
  }
  52.1%,
  100% {
    opacity: 0;
  }
}

@keyframes info-glyph-open-settle {
  0% {
    transform: rotate(0deg);
  }
  4% {
    transform: rotate(10.9deg);
  }
  8% {
    transform: rotate(36.4deg);
  }
  13% {
    transform: rotate(76.5deg);
  }
  18% {
    transform: rotate(116.5deg);
  }
  24% {
    transform: rotate(157.4deg);
  }
  30% {
    transform: rotate(187.7deg);
  }
  36% {
    transform: rotate(207.9deg);
  }
  43% {
    transform: rotate(221.4deg);
  }
  50% {
    transform: rotate(227.6deg);
  }
  58% {
    transform: rotate(229.5deg);
  }
  66% {
    transform: rotate(228.9deg);
  }
  75% {
    transform: rotate(227.5deg);
  }
  84% {
    transform: rotate(226.2deg);
  }
  92% {
    transform: rotate(225.5deg);
  }
  100% {
    transform: rotate(225deg);
  }
}

@keyframes info-glyph-close-settle {
  0% {
    transform: rotate(405deg);
  }
  4% {
    transform: rotate(385.4deg);
  }
  8% {
    transform: rotate(339.5deg);
  }
  13% {
    transform: rotate(267.3deg);
  }
  18% {
    transform: rotate(195.3deg);
  }
  24% {
    transform: rotate(121.7deg);
  }
  30% {
    transform: rotate(67.1deg);
  }
  36% {
    transform: rotate(30.8deg);
  }
  43% {
    transform: rotate(6.5deg);
  }
  50% {
    transform: rotate(-4.7deg);
  }
  58% {
    transform: rotate(-8.1deg);
  }
  66% {
    transform: rotate(-7deg);
  }
  75% {
    transform: rotate(-4.5deg);
  }
  84% {
    transform: rotate(-2.2deg);
  }
  92% {
    transform: rotate(-0.9deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@keyframes mobile-caret-spectrum {
  0% {
    filter: hue-rotate(0deg) saturate(1.9) contrast(1.14) brightness(1.08);
  }
  20% {
    filter: hue-rotate(72deg) saturate(1.9) contrast(1.14) brightness(1.08);
  }
  40% {
    filter: hue-rotate(144deg) saturate(1.9) contrast(1.14) brightness(1.08);
  }
  60% {
    filter: hue-rotate(216deg) saturate(1.9) contrast(1.14) brightness(1.08);
  }
  80% {
    filter: hue-rotate(288deg) saturate(1.9) contrast(1.14) brightness(1.08);
  }
  100% {
    filter: hue-rotate(360deg) saturate(1.9) contrast(1.14) brightness(1.08);
  }
}

@media (hover: none), (pointer: coarse) {
  .hero-caret {
    animation:
      caret-pulse 1.06s steps(1, end) infinite,
      mobile-caret-spectrum 5.3s steps(5, end) infinite;
  }

  .is-typing-intro .hero-caret {
    animation: mobile-caret-spectrum 5.3s steps(5, end) infinite;
    opacity: 1;
  }

  .tooltip {
    max-width: min(300px, calc(100vw - 48px));
    text-align: center;
    white-space: normal;
  }
}

@media (max-width: 1024px) {
  h1 {
    font-size: 68px;
  }

  .hero-caret {
    height: 82px;
  }

  .bio-content {
    width: min(780px, calc(100vw - 72px));
    min-height: 100vh;
    min-height: 100dvh;
    gap: 40px;
    padding: 48px 0 72px 48px;
    font-size: 27px;
    line-height: 33px;
  }
}

@media (max-width: 700px) {
  .info-toggle {
    top: 5px;
    right: 5px;
    width: 64px;
    height: 64px;
  }

  .info-svg {
    width: 64px;
    height: 64px;
  }

  h1 {
    font-size: 46px;
  }

  .hero-caret {
    height: 56px;
  }

  .bio-content {
    width: calc(100vw - 48px);
    min-height: 100vh;
    min-height: 100dvh;
    gap: 30px;
    padding: 64px 0 56px 24px;
    font-size: 22px;
    line-height: 28px;
  }

  .tooltip {
    max-width: min(280px, calc(100vw - 48px));
    padding: 9px 11px 10px;
    text-align: center;
    white-space: normal;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 40px;
  }

  .hero-caret {
    height: 50px;
  }

  .bio-content {
    font-size: 20px;
    line-height: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
