/* Atmospheric background */

body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  z-index: 0;
}

body::before {
  width: 40vw;
  height: 40vw;
  top: -10vh;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-glow-sm) 0%, transparent 70%);
  filter: blur(60px);
}

body::after {
  width: 50vw;
  height: 50vw;
  bottom: -15vh;
  left: 30%;
  background: radial-gradient(circle, var(--accent-dim-glow) 0%, transparent 70%);
  filter: blur(80px);
}

.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.02;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Page layout */

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(32px, 8vh, 64px) clamp(20px, 5vw, 32px) clamp(32px, 6vh, 48px);
}

.main-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 460px;
  flex: 0 0 auto;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.brand-mark {
  position: absolute;
  top: clamp(24px, 6vw, 40px);
  left: clamp(24px, 6vw, 40px);
  z-index: 3;
  opacity: 0.6;
  transition: opacity 300ms ease;
  line-height: 0;
}

.brand-mark:hover {
  opacity: 0.9;
}

.profile-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: clamp(36px, 9vw, 52px);
}

.profile-block .avatar {
  margin-bottom: clamp(20px, 5vw, 28px);
}

.profile-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 8vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: clamp(12px, 3vw, 16px);
}

.profile-bio {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(16px, 4.2vw, 18px);
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  max-width: 340px;
  margin: 0 auto;
}

.links-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 3vw, 16px);
}

.footer-block {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  margin-top: 0;
  text-align: center;
}

.footer-text {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(10px, 2.5vw, 11px);
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  opacity: 0.35;
}

.footer-link {
  position: relative;
  color: inherit;
  transition: color var(--transition-fast);
}

.footer-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  opacity: 0.3;
  transition: opacity 200ms ease;
}

.footer-link:hover::after {
  opacity: 1;
}

/* Staggered fade-in-up on load */

.profile-block,
.links-block > .button,
.footer-block {
  opacity: 0;
  transform: translateY(12px);
  animation: fade-in-up 600ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.profile-block { animation-delay: 80ms; }
.links-block > .button:nth-child(1) { animation-delay: 240ms; }
.links-block > .button:nth-child(2) { animation-delay: 320ms; }
.footer-block { animation-delay: 400ms; }

/* Primary button needs both fade-in-up AND breathing glow */
.links-block > .button-primary {
  animation:
    fade-in-up 600ms cubic-bezier(0.4, 0, 0.2, 1) forwards,
    glow-breathing 3s ease-in-out 1000ms infinite;
}

@keyframes fade-in-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reduced-motion .profile-block,
.reduced-motion .links-block > .button,
.reduced-motion .footer-block {
  opacity: 1;
  transform: none;
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    display: none;
  }
  .profile-block,
  .links-block > .button,
  .footer-block {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}
