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

:root {
  --clr-bg:          #0b0d14;
  --clr-surface:     rgba(255,255,255,0.05);
  --clr-surface-hov: rgba(255,255,255,0.09);
  --clr-border:      rgba(255,255,255,0.08);
  --clr-border-hov:  rgba(139,92,246,0.55);
  --clr-accent:      #8b5cf6;
  --clr-accent2:     #6366f1;
  --clr-accent3:     #38bdf8;
  --clr-text:        #f1f5f9;
  --clr-muted:       #94a3b8;
  --clr-online:      #22c55e;
  --clr-idle:        #eab308;
  --clr-dnd:         #ef4444;
  --clr-offline:     #6b7280;
  --radius:          18px;
  --radius-sm:       12px;
  --transition:      0.3s cubic-bezier(0.4,0,0.2,1);
  --font:            'Inter', system-ui, sans-serif;
  --glow-purple:     0 0 40px rgba(139,92,246,0.25);
  --glow-blue:       0 0 40px rgba(99,102,241,0.2);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--clr-bg);
  color: var(--clr-text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ============================================================
   BACKGROUND
   ============================================================ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(139,92,246,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 10% 80%,  rgba(99,102,241,0.12) 0%, transparent 55%),
    radial-gradient(ellipse 50% 50% at 90% 90%,  rgba(56,189,248,0.08) 0%, transparent 55%),
    linear-gradient(160deg, #0b0d14 0%, #0f111c 50%, #0b0d14 100%);
  pointer-events: none;
  z-index: 0;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: url('bg.png') center/cover no-repeat;
  opacity: 0.08;
  z-index: 0;
  pointer-events: none;
}

/* ============================================================
   PARTICLES
   ============================================================ */
.particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: float-up linear infinite;
}

@keyframes float-up {
  0%   { transform: translateY(0) scale(1);   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(-100vh) scale(0.4); opacity: 0; }
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  padding: 48px 20px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

/* ============================================================
   PROFILE
   ============================================================ */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  width: 100%;
}

/* ---- Avatar ---- */
.avatar-wrapper {
  position: relative;
  width: 108px;
  height: 108px;
}

.avatar {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(139,92,246,0.5);
  box-shadow: 0 0 0 6px rgba(139,92,246,0.10), var(--glow-purple);
  transition: transform var(--transition), box-shadow var(--transition);
}

.avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 8px rgba(139,92,246,0.18), 0 0 60px rgba(139,92,246,0.4);
}

/* Spinning ring */
.avatar-wrapper::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(
    rgba(139,92,246,0.9) 0deg,
    rgba(99,102,241,0.7) 90deg,
    rgba(56,189,248,0.5) 180deg,
    rgba(139,92,246,0.1) 270deg,
    rgba(139,92,246,0.9) 360deg
  );
  animation: spin 4s linear infinite;
  z-index: -1;
  mask: radial-gradient(circle, transparent 44px, black 47px);
  -webkit-mask: radial-gradient(circle, transparent 44px, black 47px);
}

@keyframes spin { to { transform: rotate(360deg); } }


/* Status dot */
.status-dot {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--clr-offline);
  border: 3px solid var(--clr-bg);
  z-index: 2;
  transition: background var(--transition), box-shadow var(--transition);
}

.status-dot.online  { background: var(--clr-online); box-shadow: 0 0 10px var(--clr-online); }
.status-dot.idle    { background: var(--clr-idle);   box-shadow: 0 0 10px var(--clr-idle); }
.status-dot.dnd     { background: var(--clr-dnd);    box-shadow: 0 0 10px var(--clr-dnd); }
.status-dot.offline { background: var(--clr-offline);}

/* ---- Activity Status (Mini Card) ---- */
.activity-mini-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.03);
  padding: 12px 16px;
  border-radius: 16px;
  margin-top: 20px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(255,255,255,0.05);
  opacity: 0;
  transform: translateY(10px);
  visibility: hidden;
  transition: all 0.4s ease;
}

.activity-mini-card.visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.activity-mini-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-mini-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-fallback {
  font-size: 1.5rem;
}

.activity-mini-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  min-width: 0;
}

.mini-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--clr-accent3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.mini-details {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--clr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-details span {
  color: var(--clr-muted);
  font-weight: 400;
}

/* ---- Name ---- */
.name {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #e2d9ff 0%, #a78bfa 40%, #818cf8 70%, #7dd3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

/* ---- Bio ---- */
.bio {
  font-size: 0.95rem;
  color: var(--clr-muted);
  font-weight: 400;
  letter-spacing: 0.01em;
}



/* ============================================================
   CHAPTER HEADERS
   ============================================================ */
.chapter-container {
  width: 100%;
  margin-top: 24px;
  margin-bottom: 8px;
  padding-left: 16px;
  border-left: 3px solid var(--clr-accent);
  position: relative;
  text-align: left;
  animation: fade-in-up 0.5s ease both;
}

.chapter-container::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: -3px;
  width: 40px;
  height: 3px;
  background: var(--clr-accent);
  box-shadow: var(--glow-purple);
}

.chapter-subtitle {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--clr-accent);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: 4px;
}

.chapter-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #fff;
  text-shadow: var(--glow-purple);
}

/* ============================================================
   LINKS SECTION
   ============================================================ */
.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  text-decoration: none;
  color: var(--clr-text);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    background var(--transition),
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
  animation: fade-in-up 0.5s ease both;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* Sheen sweep on hover */
.link-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
}

.link-btn:hover::before { left: 160%; }

.link-btn:hover {
  background: var(--clr-surface-hov);
  border-color: var(--clr-border-hov);
  transform: translateY(-3px) scale(1.015);
  box-shadow: 0 12px 40px rgba(139,92,246,0.15), 0 2px 8px rgba(0,0,0,0.3);
}

.link-btn:active { transform: translateY(-1px) scale(1.005); }

.link-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.link-btn:hover .link-icon { transform: rotate(-6deg) scale(1.1); }

.link-text {
  flex: 1;
  min-width: 0;
}

.link-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.link-subtitle {
  font-size: 0.78rem;
  color: var(--clr-muted);
  margin-top: 2px;
}

.link-arrow {
  font-size: 1rem;
  color: var(--clr-muted);
  transition: transform var(--transition), color var(--transition);
}

.link-btn:hover .link-arrow {
  transform: translateX(4px);
  color: var(--clr-accent);
}

/* ============================================================
   FOOTER
   ============================================================ */
.bottom-left {
  position: absolute;
  bottom: 20px;
  left: 24px;
  font-size: 0.72rem;
  color: var(--clr-muted);
  opacity: 0.8;
  z-index: 50;
  pointer-events: auto;
}

.voidnest-link {
  color: var(--clr-text);
  text-decoration: none;
  font-weight: 700;
  transition: color var(--transition);
}

.voidnest-link:hover {
  text-decoration: underline;
  color: var(--clr-accent);
}

.bottom-right-btn {
  position: absolute;
  bottom: 20px;
  right: 24px;
  font-size: 0.72rem;
  color: var(--clr-muted);
  opacity: 0.8;
  z-index: 50;
  pointer-events: auto;
  text-decoration: none;
  font-weight: 700;
  transition: color var(--transition);
}

.bottom-right-btn:hover {
  color: var(--clr-accent);
  text-decoration: underline;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger delays for links */
.link-btn:nth-child(1) { animation-delay: 0.05s; }
.link-btn:nth-child(2) { animation-delay: 0.10s; }
.link-btn:nth-child(3) { animation-delay: 0.15s; }
.link-btn:nth-child(4) { animation-delay: 0.20s; }
.link-btn:nth-child(5) { animation-delay: 0.25s; }
.link-btn:nth-child(6) { animation-delay: 0.30s; }
.link-btn:nth-child(7) { animation-delay: 0.35s; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.35); border-radius: 99px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
  .container { padding: 36px 16px 64px; gap: 28px; }
  .name { font-size: 1.7rem; }
  .link-btn { padding: 14px 16px; gap: 12px; }
  .link-icon { width: 38px; height: 38px; font-size: 1.15rem; }
}
