:root {
  --bg: #07070b;
  --glow: #8b7bff;
  --text: #eaeaf2;
  --muted: #6f6f85;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  background: var(--bg);
  overflow: hidden;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

canvas#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(7,7,11,0.55) 70%, rgba(7,7,11,0.95) 100%);
  z-index: 1;
}

.hero {
  position: relative;
  z-index: 2;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-text {
  position: relative;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  text-align: center;
}

.name {
  position: relative;
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.8rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
  text-shadow:
    3px 0 0 rgba(255, 90, 140, 0.5),
    -3px 0 0 rgba(120, 200, 255, 0.3),
    0 0 26px rgba(139, 123, 255, 0.2);
  animation: breathe 6s ease-in-out infinite, nameJitter 3s ease-in-out infinite;
}

.name::before,
.name::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
}

.name::before {
  color: #7dd3fc;
  animation: glitchFlashTop 3s ease-in-out infinite;
}

.name::after {
  color: #ff7bd6;
  animation: glitchFlashBottom 3s ease-in-out infinite;
}

@keyframes nameJitter {
  0%, 92%, 100% { transform: translate(0, 0); filter: brightness(1); }
  92.5% { transform: translate(-2px, 1px); filter: brightness(1.4); }
  93% { transform: translate(2px, -1px); filter: brightness(0.7); }
  93.5% { transform: translate(-1px, 0); filter: brightness(1.3); }
  94% { transform: translate(1px, 1px); filter: brightness(0.9); }
  94.5% { transform: translate(0, 0); filter: brightness(1); }
}

@keyframes glitchFlashTop {
  0%, 91%, 96%, 100% { opacity: 0; transform: translate(0, 0); clip-path: inset(0 0 60% 0); }
  92% { opacity: 0.7; transform: translate(-4px, -1px); clip-path: inset(0 0 40% 0); }
  93% { opacity: 0.5; transform: translate(3px, 1px); clip-path: inset(20% 0 30% 0); }
  94% { opacity: 0.7; transform: translate(-3px, 0); clip-path: inset(10% 0 50% 0); }
  95% { opacity: 0; }
}

@keyframes glitchFlashBottom {
  0%, 91%, 96%, 100% { opacity: 0; transform: translate(0, 0); clip-path: inset(60% 0 0 0); }
  92% { opacity: 0.7; transform: translate(4px, 1px); clip-path: inset(40% 0 0 0); }
  93% { opacity: 0.5; transform: translate(-3px, -1px); clip-path: inset(30% 0 20% 0); }
  94% { opacity: 0.7; transform: translate(3px, 0); clip-path: inset(50% 0 10% 0); }
  95% { opacity: 0; }
}

.tagline {
  margin-top: 1.2em;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.8rem, 1.6vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.cursor {
  display: inline-block;
  margin-left: 2px;
  color: var(--glow);
  animation: cursorBlink 1s steps(1) infinite;
}

@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

.social {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 3;
  display: flex;
  gap: 0.6rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  border-radius: 12px;
  background: rgba(139, 123, 255, 0.05);
  border: 1px solid rgba(139, 123, 255, 0.18);
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  animation: boxBreathe 5s ease-in-out infinite;
  transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

.social-link:hover,
.social-link:focus-visible {
  background: rgba(139, 123, 255, 0.12);
  border-color: rgba(139, 123, 255, 0.45);
  color: var(--text);
  animation-play-state: paused;
  box-shadow: 0 0 18px rgba(139, 123, 255, 0.25);
}

@keyframes boxBreathe {
  0%, 100% { box-shadow: 0 0 10px rgba(139, 123, 255, 0.06); }
  50% { box-shadow: 0 0 18px rgba(139, 123, 255, 0.16); }
}

@keyframes breathe {
  0%, 100% {
    text-shadow:
      3px 0 0 rgba(255, 90, 140, 0.5),
      -3px 0 0 rgba(120, 200, 255, 0.3),
      0 0 26px rgba(139, 123, 255, 0.2);
  }
  50% {
    text-shadow:
      3px 0 0 rgba(255, 90, 140, 0.65),
      -3px 0 0 rgba(120, 200, 255, 0.4),
      0 0 42px rgba(139, 123, 255, 0.32);
  }
}
