
:root {
  color-scheme: dark;
  --page-bg: #050505;
  --entry-background: url('entry-background.gif');
  --profile-background: url('main-background.gif');
  --white: #f7f7f7;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--page-bg);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page-bg);
  color: var(--white);
  font-family: 'Space Mono', monospace;
  overflow-x: hidden;
}

/* Main GIF background */
body.profile-active::before {
  content: '';
  position: fixed;
  z-index: 0;
  inset: -22vh 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(0,0,0,.12), rgba(0,0,0,.12)),
    var(--profile-background) center center / cover no-repeat;
  transform: translate3d(0, var(--background-drift, 0px), 0);
  will-change: transform;
}

button {
  color: inherit;
  font: inherit;
}

.entry-screen,
.profile-screen {
  position: fixed;
  inset: 0;
  min-height: 100svh;
  background-color: var(--page-bg);
  background-image: var(--entry-background);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.entry-screen {
  z-index: 5;
  display: grid;
  cursor: pointer;
  outline: none;
  place-items: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 850ms cubic-bezier(.22,.7,.2,1), visibility 850ms;
}

.entry-screen::before,
.profile-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.28);
  pointer-events: none;
}

.enter-button {
  position: relative;
  z-index: 1;
  border: 0;
  padding: 18px 24px;
  background: transparent;
  color: #fff;
  font-size: clamp(17px, 2vw, 25px);
  font-weight: 700;
  letter-spacing: -.07em;
  cursor: inherit;
  pointer-events: none;
  text-shadow: 0 1px 12px rgba(255,255,255,.28);
  transition: opacity .25s ease, transform .35s ease, letter-spacing .35s ease;
}

.entry-screen:hover .enter-button {
  transform: scale(1.06);
  letter-spacing: -.035em;
}

.entry-screen:focus-visible {
  outline: 2px solid rgba(255,255,255,.8);
  outline-offset: -8px;
}

.entry-screen.leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.entry-screen.leaving .enter-button {
  transform: scale(.96);
  opacity: 0;
}

.profile-screen {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.025);
  transition: opacity 950ms ease, transform 1200ms cubic-bezier(.2,.7,.2,1), visibility 950ms;
}

.profile-screen.visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.profile-content {
  position: relative;
  z-index: 1;
  width: min(92vw, 650px);
  transform: translateY(-1vh);
}

.identity-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.avatar {
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
}

.avatar svg {
  width: 100%;
  height: 100%;
  fill: #fff;
}

.identity-copy { min-width: 0; }

.name-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(17px, 1.65vw, 21px);
  line-height: 1.2;
  letter-spacing: -.07em;
  font-weight: 700;
  text-shadow: 0 2px 9px rgba(0,0,0,.8);
}

.verified {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  filter: drop-shadow(0 0 3px rgba(255,255,255,.9));
  animation: badgeGlow 3.4s ease-in-out infinite;
}

.verified svg {
  width: 100%;
  height: 100%;
  fill: #fff;
}

.verified .check {
  fill: none;
  stroke: #aaa;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.typed-line {
  min-height: 17px;
  margin: 4px 0 0;
  color: rgba(255,255,255,.67);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -.025em;
  text-shadow: 0 1px 6px #000;
}

.caret {
  display: inline-block;
  margin-left: 1px;
  animation: blink 1s steps(2, start) infinite;
}

.stars {
  margin-top: 47px;
  text-align: center;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: .08em;
  text-shadow: 0 0 13px rgba(255,255,255,.28);
}

.scroll-cue {
  position: absolute;
  z-index: 2;
  bottom: 24px;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translateX(-50%);
  color: #fff;
}

.scroll-cue span {
  font-family: 'Permanent Marker', cursive;
  font-size: 11px;
  white-space: nowrap;
  text-shadow: 0 1px 7px #000;
}

.scroll-cue svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: arrowBob 1.7s ease-in-out infinite;
}

.more-section {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: transparent;
  scroll-margin-top: 0;
}

.more-mark {
  color: rgba(255,255,255,.12);
  font-size: 30px;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 900ms ease, transform 900ms cubic-bezier(.2,.7,.2,1);
}

.more-section.in-view .more-mark {
  opacity: 1;
  transform: translateY(0);
}

@keyframes badgeGlow {
  0%,100% { filter: drop-shadow(0 0 2px rgba(255,255,255,.55)); }
  50% { filter: drop-shadow(0 0 6px rgba(255,255,255,.95)); }
}

@keyframes blink {
  to { visibility: hidden; }
}

@keyframes arrowBob {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

@media (max-width: 520px) {
  .avatar {
    width: 69px;
    height: 69px;
    flex-basis: 69px;
  }

  .identity-row { gap: 13px; }
  .stars { margin-top: 39px; }
  .scroll-cue { bottom: 20px; }
}

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