/* === Reset & Base === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #050505;
  --color-surface: rgba(255, 255, 255, 0.03);
  --color-surface-hover: rgba(255, 255, 255, 0.06);
  --color-text: #F0F0F0;
  --color-text-muted: #666666;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.15);
  --color-accent: #7C3AED;
  --color-orb-1: rgba(139, 92, 246, 0.15);
  --color-orb-2: rgba(16, 185, 129, 0.12);
  --color-orb-3: rgba(236, 72, 153, 0.08);
  --color-name-gradient: linear-gradient(135deg, #F0F0F0 0%, #A0A0A0 100%);
  --color-glow: rgba(139, 92, 246, 0.1);
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --color-bg: #FAFAF9;
    --color-surface: rgba(0, 0, 0, 0.02);
    --color-surface-hover: rgba(0, 0, 0, 0.04);
    --color-text: #1A1A1A;
    --color-text-muted: #888888;
    --color-border: rgba(0, 0, 0, 0.08);
    --color-border-hover: rgba(0, 0, 0, 0.12);
    --color-accent: #7C3AED;
    --color-orb-1: rgba(139, 92, 246, 0.12);
    --color-orb-2: rgba(16, 185, 129, 0.1);
    --color-orb-3: rgba(236, 72, 153, 0.07);
    --color-name-gradient: linear-gradient(135deg, #1A1A1A 0%, #555555 100%);
    --color-glow: rgba(139, 92, 246, 0.08);
  }
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* === Glowing Orbs === */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

.orb--1 {
  top: -15%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(circle, var(--color-orb-1) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.orb--2 {
  bottom: -20%;
  right: -15%;
  width: 45vw;
  height: 45vw;
  max-width: 550px;
  max-height: 550px;
  background: radial-gradient(circle, var(--color-orb-2) 0%, transparent 70%);
  animation: float 25s ease-in-out infinite reverse;
}

.orb--3 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30vw;
  height: 30vw;
  max-width: 400px;
  max-height: 400px;
  background: radial-gradient(circle, var(--color-orb-3) 0%, transparent 70%);
  animation: float 30s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* === Animated Pattern === */
.bg-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  color: var(--color-text);
  opacity: 0.15;
  animation: patternDrift 60s linear infinite;
}

.bg-pattern svg {
  width: 100%;
  height: 100%;
}

.dots-group {
  transform-origin: center;
  animation: patternRotate 120s linear infinite;
}

.dot {
  animation: dotPulse 4s ease-in-out infinite;
  transform-origin: center;
}

.dot--1 { animation-delay: 0s; }
.dot--2 { animation-delay: 0.3s; }
.dot--3 { animation-delay: 0.6s; }
.dot--4 { animation-delay: 0.9s; }
.dot--5 { animation-delay: 1.2s; }
.dot--6 { animation-delay: 1.5s; }
.dot--7 { animation-delay: 1.8s; }
.dot--8 { animation-delay: 2.1s; }
.dot--9 { animation-delay: 2.4s; }
.dot--10 { animation-delay: 2.7s; }
.dot--11 { animation-delay: 3.0s; }
.dot--12 { animation-delay: 3.3s; }

@keyframes patternDrift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-50px, -50px); }
}

@keyframes patternRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes dotPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* === Cursor Glow === */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 60%);
  opacity: 0.06;
  pointer-events: none;
  z-index: 2;
  filter: blur(60px);
  will-change: transform;
}

/* === Grain Texture === */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.3;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* === Container === */
.container {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 320px;
  padding: 2.5rem 2rem;
  text-align: center;
  opacity: 0;
  animation: fadeInUp 1s var(--ease-out) forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Header === */
.header {
  margin-bottom: 3rem;
}

.name {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  line-height: 1.1;
  background: var(--color-name-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  font-weight: 400;
  text-transform: lowercase;
}

/* === Links === */
.links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  transition:
    background 400ms var(--ease-spring),
    border-color 400ms var(--ease-spring),
    transform 400ms var(--ease-spring),
    box-shadow 400ms var(--ease-spring);
  animation: fadeInUp 1s var(--ease-out) forwards;
  opacity: 0;
}

.link:nth-child(1) { animation-delay: 0.15s; }
.link:nth-child(2) { animation-delay: 0.25s; }
.link:nth-child(3) { animation-delay: 0.35s; }

.link:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 8px 32px var(--color-glow),
    0 0 0 1px var(--color-border);
}

.link:active {
  transform: translateY(0) scale(0.96);
  transition: transform 100ms var(--ease-out);
}

.link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-accent);
  opacity: 0;
  pointer-events: none;
  border-radius: inherit;
}

.link:active::after {
  animation: ripple 400ms var(--ease-out);
}

@keyframes ripple {
  0% {
    opacity: 0.15;
    transform: scale(0.8);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

/* === Icons & Arrow === */
.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
}

.link:hover .icon {
  opacity: 1;
  transform: scale(1.1);
}

.arrow {
  position: absolute;
  right: 1.25rem;
  font-size: 0.875rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
}

.link:hover .arrow {
  opacity: 0.5;
  transform: translateX(0);
}

/* === Interest Tags === */
.interests {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.interest {
  padding: 0.375rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  opacity: 0;
  animation: fadeInUp 1s var(--ease-out) forwards;
}

.interest:nth-child(1) { animation-delay: 0.5s; }
.interest:nth-child(2) { animation-delay: 0.6s; }
.interest:nth-child(3) { animation-delay: 0.7s; }
.interest:nth-child(4) { animation-delay: 0.8s; }

/* === Responsive === */
@media (max-width: 360px) {
  .container {
    padding: 2rem 1.5rem;
    max-width: 280px;
  }

  .name {
    font-size: 1.75rem;
  }

  .link {
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb,
  .bg-pattern,
  .dots-group,
  .dot {
    animation: none;
  }

  .container,
  .link,
  .interest {
    animation: none;
    opacity: 1;
  }

  .link:hover {
    transform: none;
  }

  .link:active {
    transform: scale(0.98);
  }

  .link:hover .icon {
    transform: none;
  }

  .link:hover .arrow {
    transform: none;
  }
}

/* === Easter Egg === */
.easter-egg {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms var(--ease-out);
  cursor: pointer;
}

.easter-egg--active {
  opacity: 1;
  pointer-events: auto;
}

.easter-egg__content {
  background: #1A1A1A;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2.5rem 3rem;
  text-align: center;
  max-width: 90vw;
  transform: scale(0.9);
  transition: transform 400ms var(--ease-spring);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.easter-egg--active .easter-egg__content {
  transform: scale(1);
}

.easter-egg__art {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 1rem;
  line-height: 1.2;
  color: #F0F0F0;
  margin-bottom: 1.25rem;
  white-space: pre;
}

.easter-egg__text {
  font-size: 0.875rem;
  color: #999999;
  letter-spacing: 0.02em;
}

@media (prefers-reduced-motion: reduce) {
  .easter-egg {
    transition: none;
  }

  .easter-egg__content {
    transform: scale(1);
    transition: none;
  }
}