/* Gate pending: hide all site content until a theme is chosen */
html.gate-pending #site {
  visibility: hidden;
}
/* Theme picker overlay */
.theme-picker {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px 16px;
  background: radial-gradient(ellipse at center, rgba(20, 20, 40, 0.92), rgba(0, 0, 0, 0.96));
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-family: 'Nunito', sans-serif;
  overflow-y: auto;
}

.theme-picker h2 {
  margin: 0;
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  color: #ffffff;
}

.theme-picker-sub {
  margin: -12px 0 0;
  font-size: 0.95rem;
  color: #9a9ac0;
  letter-spacing: 0.04em;
  text-align: center;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 960px;
}

.theme-card {
  background: linear-gradient(180deg, #232344, #15152c);
  border: 1px solid #3a3a66;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.theme-card:hover,
.theme-card:focus-visible {
  border-color: #7c6cff;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(124, 108, 255, 0.25);
  outline: none;
}

.theme-preview {
  height: 120px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-preview-card {
  padding: 12px 16px;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .theme-card { transition: none; }
  .theme-card:hover, .theme-card:focus-visible { transform: none; }
}

/* Profile card */
.profile-card {
  max-width: 480px;
  margin: 48px auto;
  padding: var(--card-padding, 32px);
  background: var(--card-bg, #ffffff);
  color: var(--color-text, var(--card-color, #1a1a1a));
  border: var(--card-border, none);
  border-radius: var(--card-radius, 16px);
  box-shadow: var(--card-shadow, none);
  font-family: var(--card-font, sans-serif);
  text-align: center;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-name {
  margin: 12px 0 4px;
  font-size: var(--h1, 2rem);
  color: var(--color-heading, inherit);
}

.profile-tagline {
  margin: 0 0 16px;
  opacity: 0.8;
}

.profile-bio {
  margin: 0 0 20px;
  line-height: 1.5;
}

.profile-socials {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.social-link {
  color: var(--color-link, inherit);
}

.profile-email {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--color-primary, #7c6cff);
  color: #ffffff;
  text-decoration: none;
}

#change-theme {
  position: fixed;
  right: 16px;
  bottom: 16px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  cursor: pointer;
  font-size: 0.85rem;
}
@keyframes deco-float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -30px); }
}

.deco-float {
  animation: deco-float 12s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .deco-float {
    animation: none;
  }
}

.glitch-line {
  position: fixed;
  left: 0;
  right: 0;
  height: 3px;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.7), rgba(255, 0, 110, 0.7), transparent);
  opacity: 0;
  animation: glitch-jump 2.4s steps(1, end) infinite;
}

@keyframes glitch-jump {
  0%, 88%, 100% { opacity: 0; transform: translateX(0); }
  89% { opacity: 0.9; transform: translateX(-12px); }
  91% { opacity: 0.9; transform: translateX(10px); }
  93% { opacity: 0; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .glitch-line { animation: none; opacity: 0; }
}
.deco-float {
  animation: deco-float 12s ease-in-out infinite, deco-pulse 5s ease-in-out infinite;
  animation-delay: 0s, 0s;
}

.deco-float:nth-child(3n) { animation-delay: 0s, -1.7s; }
.deco-float:nth-child(3n + 1) { animation-delay: 0s, -3.1s; }
.deco-float:nth-child(3n + 2) { animation-delay: 0s, -4.4s; }

@keyframes deco-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .deco-float { animation: none; }
}
.neon-burst {
  position: fixed;
  width: 6px;
  height: 6px;
  pointer-events: none;
  z-index: 9999;
}
.svg-pop {
  position: fixed;
  width: 48px;
  height: 48px;
  pointer-events: none;
  z-index: 9999;
}
.jelly-bubble {
  position: fixed;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), rgba(124,108,255,0.3) 60%, rgba(255,107,157,0.2));
  border: 1px solid rgba(255,255,255,0.4);
  pointer-events: none;
  z-index: 9999;
}
.profile-name.neon-glitch {
  text-shadow: 2px 0 #ff00ff, -2px 0 #00ffff;
  animation: neon-glitch-shift 500ms 1;
}
@keyframes neon-glitch-shift {
  0%, 100% { text-shadow: 2px 0 #ff00ff, -2px 0 #00ffff; }
  25% { text-shadow: -3px 0 #ff00ff, 3px 0 #00ffff; }
  50% { text-shadow: 0 0 #ff00ff, 0 0 #00ffff; }
  75% { text-shadow: 3px 0 #ff00ff, -3px 0 #00ffff; }
}
.profile-card.neon-glitch-card {
  animation: neon-glitch-card-shift 500ms 1;
}
@keyframes neon-glitch-card-shift {
  0%, 100% { transform: translate(0); }
  25% { transform: translate(-2px); box-shadow: 3px 0 #ff00ff, -3px 0 #00ffff; }
  50% { transform: translate(2px); box-shadow: -3px 0 #ff00ff, 3px 0 #00ffff; }
  75% { transform: translate(-1px); box-shadow: 2px 0 #ff00ff, -2px 0 #00ffff; }
}