:root {
    --bg: #09080f;
    --surface: #100e1a;
    --surface2: #161224;
    --border: rgba(255,255,255,0.07);
    --border-hover: rgba(167,139,250,0.35);
    --purple: #a78bfa;
    --purple-bright: #c4b5fd;
    --purple-dim: #7c3aed;
    --purple-glow: rgba(167,139,250,0.18);
    --white: #f0eeff;
    --muted: #6b6880;
    --muted2: #2a2540;
}
  
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
  
body {
    background: var(--bg);
    color: var(--white);
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}
  
  /* ── BACKGROUND ── */
  .bg {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  }
  /* angled grid */
  .bg::before {
    content: '';
    position: absolute;
    top: -30%; left: -15%; right: -15%; bottom: -30%;
    background-image:
      linear-gradient(rgba(167,139,250,0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(167,139,250,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    transform: rotate(-8deg) skewY(-2deg);
  }
  /* top glow */
  .bg::after {
    content: '';
    position: absolute;
    top: -180px; left: 50%; transform: translateX(-50%);
    width: 900px; height: 700px;
    background: radial-gradient(ellipse, rgba(124,58,237,0.12) 0%, transparent 65%);
  }
  /* bottom right subtle glow */
  .bg-accent {
    position: absolute;
    bottom: -200px; right: -150px;
    width: 700px; height: 500px;
    background: radial-gradient(ellipse, rgba(167,139,250,0.05) 0%, transparent 65%);
  }
  
  /* ── CARD ── */
  .card {
    position: relative; z-index: 1;
    width: 100%;
    max-width: 520px;
    padding: 48px 24px 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  
  /* ── AVATAR ── */
  .avatar-wrap {
    position: relative;
    margin-bottom: 20px;
  }
  .avatar-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #7c3aed, #a78bfa, #c4b5fd, #7c3aed);
    animation: spin 4s linear infinite;
    opacity: 0.85;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  .avatar-ring-inner {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #7c3aed, #a78bfa, #c4b5fd, #7c3aed);
    animation: spin 4s linear infinite;
    filter: blur(6px);
    opacity: 0.4;
  }
  .avatar-img {
    position: relative;
    width: 96px; height: 96px;
    border-radius: 50%;
    object-fit: cover;
    image-rendering: pixelated;
    border: 3px solid var(--bg);
    background: var(--surface);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
  }
  .avatar-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
  }
  .avatar-emoji {
    font-size: 44px;
    line-height: 1;
  }
  /* online badge */
  .avatar-badge {
    position: absolute;
    bottom: 4px; right: 4px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #22c55e;
    border: 3px solid var(--bg);
    box-shadow: 0 0 8px rgba(34,197,94,0.7);
    animation: badgePulse 2.4s ease-in-out infinite;
  }
  @keyframes badgePulse {
    0%,100% { box-shadow: 0 0 6px rgba(34,197,94,0.6); }
    50% { box-shadow: 0 0 14px rgba(34,197,94,0.9); }
  }
  
  /* ── NAME & BIO ── */
  .profile-name {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(13px, 3.5vw, 17px);
    color: var(--white);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 10px;
  }
  .profile-name em {
    color: var(--purple);
    font-style: normal;
  }
  .profile-tag {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .12em;
    color: var(--purple);
    margin-bottom: 12px;
  }
  .profile-tag::before, .profile-tag::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167,139,250,0.4));
  }
  .profile-tag::after {
    background: linear-gradient(90deg, rgba(167,139,250,0.4), transparent);
  }
  .profile-bio {
    font-size: 14px; font-weight: 400;
    color: var(--muted);
    text-align: center;
    line-height: 1.75;
    max-width: 360px;
    margin-bottom: 36px;
  }
  
  /* ── STATS ROW ── */
  .stats-row {
    display: flex; gap: 0;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 32px;
  }
  .stat-item {
    flex: 1; padding: 14px 10px;
    text-align: center;
    border-right: 1px solid var(--border);
    transition: background .18s;
    cursor: default;
  }
  .stat-item:last-child { border-right: none; }
  .stat-item:hover { background: var(--surface2); }
  .stat-n {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(10px, 2.5vw, 14px);
    color: var(--purple-bright);
    margin-bottom: 4px;
  }
  .stat-l { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
  
  /* ── SECTION LABEL ── */
  .section-label {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .12em;
    color: var(--muted);
    margin-bottom: 12px;
    margin-left: 2px;
  }
  .section-label::before { content: ''; width: 12px; height: 1px; background: var(--muted); border-radius: 1px; }
  
  /* ── LINK BUTTON ── */
  .links-list {
    display: flex; flex-direction: column; gap: 10px;
    width: 100%;
    margin-bottom: 32px;
  }
  .link-btn {
    display: flex; align-items: center; gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px 18px;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .2s, background .18s, transform .16s, box-shadow .2s;
    position: relative;
    overflow: hidden;
    animation: slideIn .4s ease both;
  }
  .link-btn::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--purple-glow), transparent 60%);
    opacity: 0;
    transition: opacity .2s;
  }
  .link-btn:hover {
    border-color: var(--border-hover);
    background: var(--surface2);
    transform: translateY(-2px) translateX(2px);
    box-shadow: 0 8px 32px rgba(124,58,237,0.15), -2px 0 0 rgba(167,139,250,0.5);
  }
  .link-btn:hover::before { opacity: 1; }
  
  .link-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    position: relative; z-index: 1;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.04);
    overflow: hidden;
  }
  .link-icon img { width: 24px; height: 24px; object-fit: contain; }
  .link-icon svg { width: 22px; height: 22px; }
  
  .link-text { flex: 1; position: relative; z-index: 1; min-width: 0; }
  .link-name { font-size: 15px; font-weight: 600; color: var(--white); }
  .link-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
  
  .link-arrow {
    position: relative; z-index: 1;
    color: var(--muted); transition: color .18s, transform .18s;
    flex-shrink: 0;
  }
  .link-btn:hover .link-arrow { color: var(--purple-bright); transform: translateX(3px); }
  
  @keyframes slideIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  
  /* ── FEATURED BUTTON ── */
  .link-btn.featured {
    border-color: rgba(167,139,250,0.3);
    background: linear-gradient(120deg, rgba(124,58,237,0.12), var(--surface));
  }
  .link-btn.featured .link-icon {
    background: rgba(167,139,250,0.15);
    border-color: rgba(167,139,250,0.3);
  }
  
  /* ── FOOTER ── */
  .page-footer {
    position: relative; z-index: 1;
    text-align: center;
    padding: 0 24px 40px;
  }
  .footer-brand {
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    color: var(--muted2);
    margin-bottom: 8px;
  }
  .footer-copy { font-size: 11px; color: var(--muted2); }
  
  /* ── RESPONSIVE ── */
  @media (max-width: 480px) {
    .card { padding: 36px 16px 48px; }
    .stats-row { display: grid; grid-template-columns: 1fr 1fr; }
    .stat-item:nth-child(2) { border-right: none; }
    .stat-item:nth-child(1), .stat-item:nth-child(2) { border-bottom: 1px solid var(--border); }
  }