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

body {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: #0f1a0c;
  cursor: default;
}

.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background:
    radial-gradient(ellipse 130% 60% at 50% -10%, rgba(28, 48, 22, 1) 0%, transparent 60%),
    radial-gradient(ellipse 90% 45% at 35% 35%, rgba(32, 55, 24, 0.8) 0%, transparent 55%),
    radial-gradient(ellipse 85% 40% at 70% 30%, rgba(26, 44, 20, 0.75) 0%, transparent 55%),
    radial-gradient(ellipse 100% 50% at 50% 55%, rgba(22, 38, 16, 0.7) 0%, transparent 50%),
    radial-gradient(ellipse 80% 30% at 40% 70%, rgba(18, 30, 12, 0.6) 0%, transparent 45%),
    radial-gradient(ellipse 70% 25% at 65% 75%, rgba(16, 26, 10, 0.55) 0%, transparent 45%),
    linear-gradient(to bottom,
      rgba(22, 36, 16, 1) 0%,
      rgba(20, 34, 14, 1) 25%,
      rgba(16, 28, 10, 1) 50%,
      rgba(12, 20, 6, 1) 100%
    );
  filter: blur(4px);
  transition: filter 1.8s ease-out;
}

.background.unblurred {
  filter: blur(0px);
}

.horizon-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 15% at 50% 70%, rgba(180, 130, 40, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 12% at 55% 72%, rgba(200, 140, 35, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 70% 20% at 45% 65%, rgba(160, 110, 30, 0.06) 0%, transparent 65%);
}

.edge-light {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 100% at 0% 0%, rgba(40, 65, 30, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse 100% 100% at 100% 0%, rgba(38, 60, 28, 0.22) 0%, transparent 50%),
    radial-gradient(ellipse 100% 100% at 0% 100%, rgba(35, 55, 25, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse 100% 100% at 100% 100%, rgba(38, 60, 28, 0.22) 0%, transparent 50%);
}

#particles {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3;
}

/* ── intro ── */

.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9;
  background: #0f1a0c;
  animation: overlayFade 1.2s ease-in 2.6s forwards;
  pointer-events: none;
}

.intro-content {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.intro-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(180, 200, 100, 0.5);
  animation: avatarIn 0.8s ease-out 0.3s both;
}

.intro-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 50, 20, 0.8);
  color: rgba(200, 220, 140, 0.7);
  font-family: "Courier New", monospace;
  font-size: 2rem;
  letter-spacing: 0.3rem;
}

.intro-text {
  margin-top: 1.8rem;
  font-family: "Courier New", monospace;
  font-size: 1.3rem;
  color: rgba(210, 220, 140, 0.75);
  letter-spacing: 0.4rem;
  text-shadow: 0 0 30px rgba(220, 220, 120, 0.3);
  animation: textIn 0.8s ease-out 0.7s both;
}

@keyframes avatarIn {
  0%   { opacity: 0; transform: scale(0.7); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes textIn {
  0%   { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes overlayFade {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

/* ── navbar ── */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2rem;
  opacity: 0;
  animation: navIn 0.9s ease-out 3.6s forwards;
  background: linear-gradient(to bottom, rgba(15, 26, 12, 0.85) 0%, transparent 100%);
  border-bottom: 1px solid rgba(160, 190, 100, 0.15);
  pointer-events: none;
}

.navbar.visible {
  pointer-events: auto;
}

.nav-brand {
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
  color: rgba(220, 235, 160, 0.85);
  text-decoration: none;
  letter-spacing: 0.15rem;
  transition: color 0.3s;
}

.nav-brand:hover {
  color: rgba(245, 250, 200, 0.95);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  color: rgba(210, 225, 150, 0.75);
  text-decoration: none;
  letter-spacing: 0.1rem;
  transition: color 0.3s;
}

.nav-link:hover {
  color: rgba(240, 250, 190, 0.9);
}

@keyframes navIn {
  0%   { opacity: 0; transform: translateY(-12px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ── mute button ── */

.mute-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 20;
  width: 44px;
  height: 44px;
  border: 2px solid rgba(220, 235, 160, 0.5);
  border-radius: 50%;
  background: rgba(220, 235, 160, 0.12);
  color: rgba(220, 235, 160, 0.8);
  font-family: "Courier New", monospace;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  user-select: none;
  transition: all 0.35s ease;
  animation: pulseGlow 2s ease-in-out infinite;
}

.mute-btn.muted {
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.25);
  animation: none;
  box-shadow: none;
  transform: scale(0.92);
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 4px rgba(220, 235, 160, 0.15);
  }
  50% {
    box-shadow: 0 0 14px rgba(220, 235, 160, 0.55), 0 0 24px rgba(220, 235, 160, 0.2);
  }
}

/* ── scratch banner ── */

.scratch-banner {
  position: fixed;
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  font-family: "Courier New", monospace;
  font-size: 0.82rem;
  color: rgba(240, 248, 210, 0.9);
  letter-spacing: 0.06rem;
  text-align: center;
  background: rgba(15, 26, 12, 0.8);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(240, 248, 210, 0.35);
  border-radius: 3px;
  padding: 0.7rem 1.4rem;
  max-width: 90vw;
  width: max-content;
  white-space: normal;
  word-break: break-word;
}

.scratch-text {
  position: relative;
}

.scratch-text::after {
  content: "|";
  animation: blink 0.7s step-end infinite;
  color: rgba(255, 255, 255, 0.8);
}

.scratch-text.done::after {
  display: none;
}

.scratch-banner.fade-out {
  animation: scratchOut 0.8s ease-out forwards;
}

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

@keyframes scratchOut {
  0%   { opacity: 1; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) scale(0.9) translateY(-10px); }
}

/* ── hamburger ── */

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 30;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(220, 235, 160, 0.8);
  border-radius: 1px;
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
  .navbar {
    padding: 1rem 1.2rem;
  }

  .nav-brand {
    font-size: 0.82rem;
    letter-spacing: 0.08rem;
  }

  .hamburger {
    display: flex;
    margin-left: auto;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 220px;
    background: rgba(15, 26, 12, 0.95);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 25;
    border-left: 1px solid rgba(220, 235, 160, 0.15);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 0.9rem;
  }
}
