:root {
  --bg-top: #070d20;
  --bg-mid: #0c1737;
  --bg-bottom: #060a15;
  --ink: #f7f8ff;
  --line: rgba(185, 204, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.22);
  --panel: rgba(255, 255, 255, 0.07);
  --pink: rgba(244, 157, 208, 0.36);
  --cyan: rgba(112, 222, 255, 0.24);
  --drift-x: 0px;
  --drift-y: 0px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at 18% 18%, rgba(244, 157, 208, 0.18), transparent 22%),
    radial-gradient(circle at 84% 14%, rgba(112, 222, 255, 0.12), transparent 18%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 56%, var(--bg-bottom) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, transparent 45%, rgba(5, 9, 21, 0.4) 100%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03) 0 1px,
      transparent 1px 16px
    );
  background-position: center, 0 0;
  animation: vertical-stripes-drift 24s linear infinite;
  pointer-events: none;
  will-change: background-position;
}

.scene {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.ambient,
.sun,
.floor {
  position: absolute;
  pointer-events: none;
}

.ambient {
  border-radius: 50%;
  filter: blur(72px);
  animation: float 18s ease-in-out infinite alternate;
}

.ambient--pink {
  top: -12rem;
  left: -6rem;
  width: 22rem;
  height: 22rem;
  background: var(--pink);
}

.ambient--cyan {
  right: -7rem;
  bottom: 12%;
  width: 20rem;
  height: 20rem;
  background: var(--cyan);
  animation-duration: 22s;
}

.sun {
  top: clamp(4rem, 10vw, 7rem);
  right: clamp(1.5rem, 8vw, 5rem);
  width: min(24vw, 18rem);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(180deg, #ffe7b2 0%, #f3a2cf 100%);
  box-shadow: 0 0 80px rgba(243, 162, 207, 0.16);
  transform: translate3d(calc(var(--drift-x) * -0.08), calc(var(--drift-y) * 0.08), 0);
}

.sun::before {
  content: "";
  position: absolute;
  inset: 48% 0 0 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(8, 13, 30, 0.98) 0 5px,
    transparent 5px 31px
  );
  animation: stripe-rise 11s linear infinite;
  will-change: background-position;
}

.floor {
  left: -10%;
  right: -10%;
  bottom: -16%;
  height: 38vh;
  border-top: 1px solid rgba(182, 198, 255, 0.36);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.52;
  transform-origin: bottom center;
  transform:
    perspective(1100px)
    rotateX(76deg)
    translate3d(calc(var(--drift-x) * -0.04), calc(var(--drift-y) * 0.02), 0);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(42rem, calc(100% - 2rem));
  min-height: 100svh;
  margin: 0 auto;
  padding: 3rem 0 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.name {
  margin: 0;
  max-width: 11ch;
  font-family: "Newsreader", serif;
  font-size: clamp(3.1rem, 12vw, 6.2rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.9;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  text-transform: lowercase;
}

.projects {
  display: grid;
  gap: 0.9rem;
  width: min(24rem, 100%);
  margin-top: 2rem;
}

.project-link {
  display: block;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: clamp(0.98rem, 2.3vw, 1.08rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  text-transform: lowercase;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.project-link--brand {
  text-transform: none;
}

.project-link:hover,
.project-link:focus-visible {
  border-color: rgba(123, 222, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(8px);
  outline: none;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.js.is-ready [data-reveal] {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(1.5rem, -1rem, 0);
  }
}

@keyframes stripe-rise {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 0 -31px;
  }
}

@keyframes vertical-stripes-drift {
  from {
    background-position: center, 0 0;
  }
  to {
    background-position: center, 16px 0;
  }
}

@media (max-width: 720px) {
  body {
    overflow-y: auto;
  }

  .shell {
    width: calc(100% - 2rem);
    justify-content: center;
    align-items: center;
    padding: 8.5rem 0 4rem;
    text-align: center;
  }

  .sun {
    top: 2.75rem;
    left: calc(50% - 4.75rem);
    right: auto;
    width: 9.5rem;
  }

  .floor {
    bottom: -10%;
    height: 30vh;
  }

  .name {
    max-width: 8ch;
    font-size: clamp(2.9rem, 14vw, 4.35rem);
  }

  .projects {
    width: min(20rem, 100%);
    justify-items: center;
  }

  .project-link {
    width: 100%;
    text-align: center;
  }
}

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

  .sun,
  .floor {
    transform: none !important;
  }
}
