:root {
  --bg: #0b0c10;
  --bg-glow-1: #6c5ce7;
  --bg-glow-2: #00d2d3;
  --card-bg: rgba(20, 21, 28, 0.65);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #f2f2f7;
  --text-dim: #9a9aa6;
  --accent: #8f7bff;
  --online: #43b581;
  --idle: #faa61a;
  --dnd: #f04747;
  --offline: #747f8d;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  padding: 32px 16px 48px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(600px circle at 20% 20%, color-mix(in srgb, var(--bg-glow-1) 25%, transparent), transparent 60%),
    radial-gradient(600px circle at 80% 80%, color-mix(in srgb, var(--bg-glow-2) 20%, transparent), transparent 60%);
  background-attachment: fixed;
}

.page {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  width: 100%;
  padding: 24px 24px;
  text-align: left;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.hero { padding: 32px 28px; text-align: center; }

.avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: #1c1d26;
  border: 2px solid var(--card-border);
}

.presence-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--offline);
  border: 3px solid #14151c;
  transition: background 0.3s ease;
}

.presence-dot[data-status="online"] { background: var(--online); }
.presence-dot[data-status="idle"] { background: var(--idle); }
.presence-dot[data-status="dnd"] { background: var(--dnd); }
.presence-dot[data-status="offline"] { background: var(--offline); }

.name {
  margin: 0 0 4px;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0 0 6px;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.roles {
  margin: 0 0 20px;
  color: var(--text-dim);
  font-size: 0.78rem;
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  font-size: 0.9rem;
}

.status-emoji:empty { display: none; }

.activity-line {
  margin: 0 0 20px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.status-line + .activity-line { margin-top: -2px; }

.links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--card-border));
  transform: translateY(-1px);
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.65rem;
  font-weight: 700;
}

.section-title {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.friends {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.friend-card {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.friend-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--card-border));
  transform: translateY(-1px);
}

.friend-name {
  font-size: 0.88rem;
  font-weight: 600;
}

.friend-url {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.footer {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 84px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
}

.stat b { font-size: 1.05rem; }
.stat span { font-size: 0.68rem; color: var(--text-dim); }

.prose { margin: 0 0 8px; font-size: 0.92rem; line-height: 1.55; }
.prose.dim, .dim { color: var(--text-dim); }
.prose:last-child { margin-bottom: 0; }

.list { display: flex; flex-direction: column; gap: 8px; }

.item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--card-border));
  transform: translateY(-1px);
}

.item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.item-name { font-size: 0.9rem; font-weight: 600; overflow-wrap: anywhere; }
.item-desc { font-size: 0.8rem; line-height: 1.5; color: var(--text-dim); }
.repo-meta { font-size: 0.7rem; color: var(--text-dim); white-space: nowrap; }

code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85em;
}

.bullets { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 0.88rem; line-height: 1.55; }
.bullets a { color: var(--accent); text-decoration: none; }
.bullets a:hover { text-decoration: underline; }

.quote blockquote {
  margin: 0;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  font-size: 0.92rem;
  line-height: 1.6;
  font-style: italic;
  color: var(--text-dim);
}

.sub-title {
  margin: 16px 0 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.76rem;
}

.support-links { margin: 12px 0; }

.wallets { display: flex; flex-direction: column; gap: 8px; }
.wallet {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.02);
}
.wallet-chain { grid-column: 1 / -1; font-size: 0.7rem; color: var(--text-dim); }
.wallet code { overflow-wrap: anywhere; background: none; padding: 0; font-size: 0.76rem; }

.copy {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}
.copy:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--card-border)); }

.note { margin: 12px 0 0; font-size: 0.72rem; line-height: 1.5; color: var(--text-dim); }

@media (max-width: 480px) {
  .links { grid-template-columns: 1fr; }
  .hero { padding: 28px 18px; }
  .card { padding: 20px 16px; }
}

.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.badges.left { justify-content: flex-start; margin-top: 0; }
.badges.support-links { justify-content: flex-start; margin: 12px 0; }
.badges a { display: inline-flex; transition: transform 0.15s ease, filter 0.15s ease; }
.badges a:hover { transform: translateY(-2px); filter: brightness(1.12); }
.badges img { display: block; height: 28px; width: auto; }
.sub-title.first { margin-top: 0; }

/* everything centred */
.card { text-align: center; }
.section-title { text-align: center; }
.badges.left, .badges.support-links { justify-content: center; }
.item-head { justify-content: center; }
.chips { justify-content: center; }
.bullets { list-style: none; padding-left: 0; }
.bullets li { text-align: center; }
.quote blockquote { padding-left: 0; border-left: 0; }
.wallet { text-align: center; grid-template-columns: 1fr; justify-items: center; }
.wallet-chain { grid-column: auto; }
.friend-card { flex-direction: column; align-items: center; gap: 2px; }
.friends { align-items: stretch; }
