* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { background: #07070b; overflow-x: hidden; -webkit-font-smoothing: antialiased; }

.bio-root {
  --muted: rgba(var(--text-rgb), 0.64);
  --faint: rgba(var(--text-rgb), 0.4);
  position: relative;
  min-height: 100vh; min-height: 100dvh;
  color: var(--text);
  font-family: var(--font);
  background: var(--bg-color);
}

.bio-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg-color); }
.bio-bg.glow {
  background:
    radial-gradient(ellipse at 50% 15%, rgba(var(--accent-rgb), 0.16), transparent 60%),
    radial-gradient(ellipse at 85% 95%, color-mix(in srgb, var(--accent2) 14%, transparent), transparent 55%),
    var(--bg-color);
}
.bio-bg-media { position: absolute; inset: -40px; }
.bio-bg-media img, .bio-bg-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.bio-bg-dim { position: absolute; inset: 0; background: #000; }
.bio-fx { position: absolute; inset: 0; width: 100%; height: 100%; }
.bio-bg::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.55) 100%);
}

.bio-enter {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; cursor: pointer;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
.bio-enter span {
  font-size: clamp(16px, 2.2vw, 20px); letter-spacing: 0.32em;
  color: var(--muted); animation: bio-pulse 2.2s ease-in-out infinite;
  padding: 0 16px; text-align: center;
}
.bio-enter.gone { opacity: 0; visibility: hidden; }
@keyframes bio-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.bio-stage {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center;
  grid-template-columns: minmax(0, 1fr);
  padding: 48px 16px;
  perspective: 1200px;
}
.bio-card {
  position: relative;
  width: min(var(--card-width), 100%);
  padding: 34px 26px 24px;
  border-radius: var(--card-radius);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(var(--card-blur)) saturate(1.3);
  -webkit-backdrop-filter: blur(var(--card-blur)) saturate(1.3);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.65), var(--card-glow);
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out;
  opacity: 0; translate: 0 18px;
}
.entered .bio-card {
  opacity: 1; translate: 0 0;
  transition: transform 0.25s ease-out, opacity 0.8s ease, translate 0.8s cubic-bezier(.2, .8, .2, 1);
}
.bio-shine {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.07), transparent 40%);
}
.bio-views {
  position: absolute; top: 14px; left: 16px;
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums;
}

.bio-profile { display: flex; flex-direction: column; align-items: center; text-align: center; }
.bio-avatar-wrap { position: relative; margin-bottom: 14px; transform: translateZ(30px); }
.bio-avatar {
  width: 104px; height: 104px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2)) center / cover no-repeat;
  display: grid; place-items: center;
  font-size: 42px; font-weight: 600; color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06), 0 0 34px -6px rgba(var(--accent-rgb), 0.75);
}
.avatar-rounded .bio-avatar { border-radius: 26%; }
.avatar-square .bio-avatar { border-radius: 10px; }
.bio-status {
  position: absolute; right: 4px; bottom: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 4px solid var(--card-solid); background: #80848e;
}
.avatar-rounded .bio-status, .avatar-square .bio-status { right: -4px; bottom: -4px; }
.bio-status.online { background: #23a55a; }
.bio-status.idle { background: #f0b232; }
.bio-status.dnd { background: #f23f43; }

.bio-name {
  position: relative;
  font-size: 30px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15;
  transform: translateZ(24px);
  overflow-wrap: anywhere;
}
.bio-name.fx-glow, .bio-name.fx-sparkle {
  text-shadow: 0 0 18px var(--name-glow), 0 0 2px rgba(255, 255, 255, 0.6);
}
.bio-name.fx-rainbow, .bio-name.fx-gradient {
  background: linear-gradient(90deg, #ff5f6d, #ffc371, #47e891, #3fa7ff, #b065ff, #ff5f6d);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: bio-shift 4s linear infinite;
  filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.35));
}
.bio-name.fx-gradient {
  background-image: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent));
}
@keyframes bio-shift { to { background-position: 200% center; } }

.bio-name.fx-glitch { text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5); }
.bio-name.fx-glitch::before, .bio-name.fx-glitch::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
}
.bio-name.fx-glitch::before { color: #ff2bd6; animation: bio-glitch 2.4s infinite steps(1); }
.bio-name.fx-glitch::after { color: #2be4ff; animation: bio-glitch 2.4s infinite steps(1) reverse; }
@keyframes bio-glitch {
  0%, 86%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  88% { clip-path: inset(10% 0 55% 0); transform: translate(-3px, 1px); }
  91% { clip-path: inset(60% 0 8% 0); transform: translate(3px, -1px); }
  94% { clip-path: inset(30% 0 40% 0); transform: translate(-2px, 0); }
  97% { clip-path: inset(75% 0 2% 0); transform: translate(2px, 1px); }
}

.bio-sparkle {
  position: absolute; pointer-events: none; font-size: 10px; color: #fff;
  -webkit-text-fill-color: #fff;
  animation: bio-sparkle 1.6s ease-out forwards;
  text-shadow: 0 0 8px var(--name-glow);
}
@keyframes bio-sparkle {
  from { opacity: 1; transform: translate(0, 0) scale(1); }
  to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.3); }
}

.bio-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.bio-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; color: var(--muted);
  background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.07);
}
.bio-badge i { color: var(--accent); font-size: 11px; }

.bio-bio { margin-top: 14px; min-height: 1.5em; font-size: 15.5px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.bio-caret { margin-left: 1px; color: var(--accent); animation: bio-blink 1s steps(1) infinite; }
@keyframes bio-blink { 50% { opacity: 0; } }
.bio-location { margin-top: 8px; font-size: 13px; color: var(--faint); }

.bio-presence {
  display: flex; align-items: center; gap: 12px;
  margin-top: 20px; padding: 12px; border-radius: 14px;
  background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}
.bio-presence-art {
  position: relative; flex: none; width: 52px; height: 52px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.06) center / cover no-repeat;
  display: grid; place-items: center; color: var(--faint); font-size: 20px;
}
.bio-small-art {
  position: absolute; right: -5px; bottom: -5px; width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid var(--card-solid); background: center / cover no-repeat;
}
.bio-presence-info { flex: 1 1 0; width: 0; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bio-presence-kind { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.bio-presence-title { font-size: 14.5px; font-weight: 600; }
.bio-presence-line { font-size: 13px; color: var(--muted); }
.bio-presence-title, .bio-presence-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bio-presence-bar { margin-top: 6px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.bio-presence-bar > span { display: block; height: 100%; width: 0; background: #1db954; }

.bio-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.bio-social {
  position: relative; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-size: 19px;
  color: var(--text); text-decoration: none; font-family: inherit; cursor: pointer;
  background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.icons-brand .bio-social { color: var(--brand, var(--accent)); }
.icons-accent .bio-social { color: var(--accent); }
.bio-social:hover, .bio-social:focus-visible {
  transform: translateY(-3px); outline: none;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px -8px var(--brand, var(--accent));
}
.icons-hover .bio-social:hover, .icons-hover .bio-social:focus-visible { color: var(--brand, var(--accent)); }
.icons-accent .bio-social:hover, .icons-white .bio-social:hover { box-shadow: 0 8px 24px -8px var(--accent); }
.bio-social[data-tip]::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 50%; translate: -50% 4px;
  padding: 4px 9px; border-radius: 7px; white-space: nowrap;
  font-size: 12px; color: #f4f4f8;
  background: rgba(10, 10, 14, 0.92); border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0; pointer-events: none; transition: opacity 0.15s, translate 0.15s;
}
.bio-social:hover::after, .bio-social:focus-visible::after { opacity: 1; translate: -50% 0; }

.bio-links { display: flex; flex-direction: column; gap: 9px; margin-top: 20px; }
.bio-link {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-radius: 14px;
  color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500;
  background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.bio-link > i:first-child { width: 20px; text-align: center; color: var(--accent); }
.bio-link > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bio-arrow { margin-left: auto; font-size: 12px; color: var(--faint); transition: transform 0.2s ease; }
.bio-link:hover, .bio-link:focus-visible {
  transform: translateY(-2px); outline: none;
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.1);
}
.bio-link:hover .bio-arrow { transform: translate(2px, -2px); color: var(--text); }

.bio-player {
  display: flex; align-items: center; gap: 12px;
  margin-top: 20px; padding: 10px; border-radius: 14px;
  background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.06);
}
.bio-cover {
  flex: none; width: 46px; height: 46px; border-radius: 10px;
  display: grid; place-items: center; color: var(--accent);
  background: rgba(var(--accent-rgb), 0.15) center / cover no-repeat;
}
.bio-player.playing .bio-cover:not(.has-img) i { animation: bio-bob 1.2s ease-in-out infinite; }
@keyframes bio-bob { 50% { transform: translateY(-2px) scale(1.08); } }
.bio-player-main { flex: 1 1 0; width: 0; min-width: 0; }
.bio-player-meta { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.bio-player-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bio-player-artist { font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bio-player-bar { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.bio-time { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; min-width: 28px; }
.bio-time:last-child { text-align: right; }
.bio-seek {
  -webkit-appearance: none; appearance: none;
  flex: 1; width: 100%; min-width: 0; height: 4px; border-radius: 4px; cursor: pointer;
  background: linear-gradient(to right, var(--accent) var(--p, 0%), rgba(255, 255, 255, 0.12) var(--p, 0%));
}
.bio-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 0; }
.bio-seek::-moz-range-thumb { width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 0; }
.bio-player-controls { display: flex; align-items: center; gap: 4px; }
.bio-play {
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  display: grid; place-items: center; cursor: pointer;
  color: #fff; background: var(--accent); font-size: 14px;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.bio-play:hover { transform: scale(1.07); filter: brightness(1.1); }
.bio-play.small { width: 30px; height: 30px; font-size: 12px; background: rgba(255, 255, 255, 0.08); }

.bio-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60;
  translate: -50% 20px; opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 12px; font-size: 14px; color: #f4f4f8;
  background: rgba(14, 14, 20, 0.92); border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: opacity 0.25s, translate 0.25s;
}
.bio-toast.show { opacity: 1; translate: -50% 0; }
.bio-sound {
  position: fixed; top: 16px; right: 16px; z-index: 40;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  color: var(--text); font-size: 15px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; transition: opacity 0.6s ease, transform 0.15s ease;
}
.entered .bio-sound { opacity: 1; }
.bio-sound:hover { transform: scale(1.08); }
.bio-trail { position: fixed; inset: 0; pointer-events: none; z-index: 70; }
.bio-trail-dot {
  position: absolute; left: 0; top: 0;
  width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  will-change: transform; opacity: 0;
}

@media (max-width: 480px) {
  .bio-card { padding: 30px 18px 18px; }
  .bio-name { font-size: 26px; }
  .bio-avatar { width: 92px; height: 92px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
