:root {
  --cursor-x: 50vw;
  --cursor-y: 50vh;
  --spotlight-size: 138px;
  --spotlight-softness: 18px;
  --ui-x: 0px;
  --ui-y: 0px;
  --grid-x: 0px;
  --grid-y: 0px;
  --portrait-position-x: 50%;
  --portrait-position-y: 50%;
  --ink: #111111;
  --paper: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
}

a {
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: var(--paper);
  cursor: auto;
  touch-action: none;
}

.portrait,
.grid-field,
.echo-layer,
.spotlight-ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.portrait {
  background-position: var(--portrait-position-x) var(--portrait-position-y);
  background-repeat: no-repeat;
  background-size: cover;
}

.portrait-primary {
  z-index: 1;
  background-image: url("assets/amaete-f2.jpg");
}

.grid-field {
  z-index: 3;
  opacity: 0.24;
  transform: translate3d(var(--grid-x), var(--grid-y), 0);
  transition: opacity 300ms ease;
}

.grid-field::before,
.grid-field::after {
  position: absolute;
  inset: -48px;
  content: "";
  background-image:
    linear-gradient(rgba(10, 18, 20, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 18, 20, 0.075) 1px, transparent 1px);
  background-position: center;
  background-size: 42px 42px;
  animation: grid-drift 16s linear infinite;
}

.grid-field::after {
  opacity: 0.5;
  background-size: 168px 168px;
  animation-duration: 28s;
  animation-direction: reverse;
}

.echo-layer {
  z-index: 5;
  overflow: visible;
}

.trail-image {
  opacity: 0;
}

#main-blob,
.trail-blob {
  fill: #ffffff;
}

.hero.is-spotlighting .trail-image {
  opacity: 1;
}

.trail-blob {
  transform-box: fill-box;
  transform-origin: center;
  animation: echo-fade 460ms ease-out forwards;
}

.spotlight-ring {
  z-index: 7;
  width: calc(var(--spotlight-size) + var(--spotlight-size));
  height: calc(var(--spotlight-size) + var(--spotlight-size));
  inset: 0 auto auto 0;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  transform: translate3d(
    calc(var(--cursor-x) - var(--spotlight-size)),
    calc(var(--cursor-y) - var(--spotlight-size)),
    0
  );
  opacity: 0;
  will-change: transform;
}

.hero.is-spotlighting .spotlight-ring {
  opacity: 1;
}

.site-chrome,
.social-links {
  position: absolute;
  z-index: 12;
}

.site-chrome {
  inset: 0;
  pointer-events: none;
}

.brand,
.nav,
.social-links {
  pointer-events: auto;
}

.parallax-target {
  transform: translate3d(var(--ui-x), var(--ui-y), 0);
  transition: color 300ms ease;
}

.brand {
  position: absolute;
  top: 34px;
  left: 38px;
  display: inline-flex;
  flex-direction: column;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 72px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.86;
  text-rendering: geometricPrecision;
}

.nav {
  position: absolute;
  top: 42px;
  right: 42px;
}

.nav-link {
  display: inline-flex;
  flex-direction: column;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  transition:
    color 300ms ease,
    opacity 300ms ease,
    transform 300ms ease;
}

.nav-link::after {
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 7px;
  background: currentColor;
  content: "";
  transform: scaleX(0.52);
  transform-origin: right;
  transition: transform 300ms ease;
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

.social-links {
  right: 34px;
  bottom: 32px;
  display: flex;
  gap: 16px;
}

.social-link {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--ink);
  filter:
    drop-shadow(0 0 5px rgba(255, 255, 255, 0.86))
    drop-shadow(0 2px 10px rgba(255, 255, 255, 0.5));
  transition:
    color 300ms ease,
    filter 300ms ease,
    opacity 300ms ease,
    transform 300ms ease;
}

.social-link svg {
  display: block;
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-2px);
}

.invert-target.is-lit {
  color: #ffffff;
  text-shadow: 0 8px 34px rgba(0, 0, 0, 0.28);
}

.social-link.is-lit {
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.34));
}

.brand:focus-visible,
.nav-link:focus-visible,
.social-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

@keyframes echo-fade {
  0% {
    opacity: 1;
    transform: scale(1);
  }

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

@keyframes grid-drift {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(42px, 42px, 0);
  }
}

@media (max-width: 760px) {
  :root {
    --spotlight-size: 88px;
    --spotlight-softness: 12px;
    --portrait-position-x: 50%;
    --portrait-position-y: 50%;
  }

  .brand {
    top: calc(env(safe-area-inset-top, 0px) + 22px);
    left: calc(env(safe-area-inset-left, 0px) + 20px);
    max-width: calc(100vw - 150px);
    font-size: clamp(40px, 12vw, 52px);
    text-shadow: 0 1px 16px rgba(255, 255, 255, 0.74);
  }

  .nav {
    top: calc(env(safe-area-inset-top, 0px) + 24px);
    right: calc(env(safe-area-inset-right, 0px) + 20px);
    z-index: 14;
  }

  .nav-link {
    min-width: 78px;
    min-height: 44px;
    align-items: flex-end;
    font-size: 11px;
    text-align: right;
    text-shadow:
      0 1px 12px rgba(255, 255, 255, 0.86),
      0 1px 2px rgba(255, 255, 255, 0.72);
  }

  .social-links {
    right: calc(env(safe-area-inset-right, 0px) + 20px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
    z-index: 14;
    gap: 10px;
  }

  .social-link {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    filter:
      drop-shadow(0 0 6px rgba(255, 255, 255, 0.94))
      drop-shadow(0 6px 16px rgba(0, 0, 0, 0.18));
  }

  .social-link svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 430px) {
  :root {
    --portrait-position-x: 49%;
  }

  .brand {
    top: calc(env(safe-area-inset-top, 0px) + 20px);
    left: calc(env(safe-area-inset-left, 0px) + 18px);
    max-width: calc(100vw - 142px);
  }

  .nav {
    top: calc(env(safe-area-inset-top, 0px) + 22px);
    right: calc(env(safe-area-inset-right, 0px) + 18px);
  }

  .social-links {
    right: calc(env(safe-area-inset-right, 0px) + 18px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  }
}

@media (max-width: 380px) {
  .brand {
    font-size: 38px;
    max-width: calc(100vw - 132px);
  }

  .nav {
    right: calc(env(safe-area-inset-right, 0px) + 16px);
  }

  .nav-link {
    min-width: 72px;
    font-size: 10px;
  }

  .social-links {
    right: calc(env(safe-area-inset-right, 0px) + 16px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  }
}

@media (hover: none), (pointer: coarse) {
  .hero {
    cursor: auto;
  }

  .hero.is-spotlighting .spotlight-ring {
    opacity: 0.62;
  }
}

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