/* ==================== TWILIGHT PROFILE PAGE ====================
   Scoped to page-profile.php. Redeclares --tw-* tokens (same convention
   as about.css / card-creators.css) so this works standalone regardless
   of load order.
*/

:root {
  --tw-purple: #8b5cf6;
  --tw-purple-light: #a78bfa;
  --tw-blue: #4f8cff;
  --tw-blue-light: #7db2ff;
  --tw-gold: #f5c518;
  --tw-card-bg: rgba(20, 16, 38, 0.5);
  --tw-card-bg-hover: rgba(30, 23, 56, 0.7);
  --tw-border: rgba(139, 92, 246, 0.2);
  --tw-border-hover: rgba(139, 92, 246, 0.5);
  --tw-radius: 18px;
}

.tw-profile-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 7rem 6vw 6rem;
  position: relative;
  z-index: 1;
}

.tw-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--tw-blue-light);
  margin-bottom: 0.5rem;
}

.tw-profile-state {
  text-align: center;
  padding: 5rem 0;
  color: var(--text-secondary);
}

.tw-profile-state p {
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* ==================== HERO ==================== */
.tw-profile-hero {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

/* The ring is a gradient/conic background with padding, and the avatar
   sits on top with the page's own background color — the classic
   "gradient ring" trick without needing border-image or extra markup.
   The gradient itself is set inline per-frame by profile.js. */
.tw-profile-avatar-ring {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--tw-purple), var(--tw-blue));
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.3);
}

.tw-profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #0d0b18;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.9rem;
  color: var(--text-primary);
}

.tw-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tw-profile-hero-info {
  flex: 1;
  min-width: 200px;
}

.tw-profile-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.tw-profile-tick {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
}

.tw-profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tw-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  border: 1px solid var(--tw-border);
  background: var(--tw-card-bg);
  color: var(--text-secondary);
}

.tw-profile-badge.tw-profile-badge-level {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(79, 140, 255, 0.18));
  border-color: var(--tw-border-hover);
  color: var(--tw-purple-light);
}

.tw-profile-badge.tw-profile-badge-verified {
  background: rgba(0, 255, 136, 0.08);
  border-color: rgba(0, 255, 136, 0.3);
  color: var(--accent-green);
}

.tw-profile-badge.tw-profile-badge-unverified {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--tw-border);
  color: var(--text-muted);
}

/* ==================== BIO ==================== */
.tw-profile-bio-wrap {
  background: var(--tw-card-bg);
  border: 1px solid var(--tw-border);
  border-radius: var(--tw-radius);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
}

.tw-profile-bio {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==================== STATS ==================== */
.tw-profile-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.tw-profile-stat {
  background: var(--tw-card-bg);
  border: 1px solid var(--tw-border);
  border-radius: var(--tw-radius);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

.tw-profile-stat:hover {
  border-color: var(--tw-border-hover);
  background: var(--tw-card-bg-hover);
  transform: translateY(-3px);
}

.tw-profile-stat-label {
  font-family: var(--font-heading);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.tw-profile-stat-value {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--tw-purple-light), var(--tw-blue-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tw-profile-stat-soon {
  border-style: dashed;
}

.tw-profile-soon {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  background: none;
  -webkit-text-fill-color: var(--text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .tw-profile-page { padding: 6rem 1.5rem 4rem; }

  .tw-profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .tw-profile-hero {
    flex-direction: column;
    text-align: center;
  }

  .tw-profile-badges {
    justify-content: center;
  }
}
