:root {
  --bg: #07070b;
  --bg-2: #0d0d16;
  --text: #ecebf5;
  --muted: #8b8aa3;
  --accent: #ff2d4f;
  --accent-2: #ff7a45;
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 600px at 50% -10%, rgba(255, 45, 79, 0.18), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(255, 122, 69, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(720px, 92vw);
  margin: 0 auto;
}

/* ---------- Hero (full viewport) ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 80px 0;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: bob 1.9s ease-in-out infinite;
  transition: color 0.2s ease;
}
.scroll-cue:hover { color: var(--text); }
.scroll-cue svg {
  width: 24px; height: 24px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 7px); }
}

/* ---------- Content (revealed on scroll) ---------- */
.content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 80px;
  scroll-margin-top: 0;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

.glass {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(9, 9, 15, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  backdrop-filter: blur(22px) saturate(190%);
  -webkit-backdrop-filter: blur(22px) saturate(190%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18),
              inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* ---------- Profile ---------- */
.profile {
  position: relative;
  isolation: isolate;
  text-align: center;
  padding: 76px 44px 64px;
  box-shadow: 0 0 90px 2px rgba(255, 45, 79, 0.32),
              0 0 40px rgba(255, 45, 79, 0.22),
              inset 0 1px 0 rgba(255, 255, 255, 0.20),
              inset 0 0 22px rgba(255, 255, 255, 0.05),
              inset 0 -1px 0 rgba(0, 0, 0, 0.26);
  transform-style: preserve-3d;
  will-change: transform;
  /* base sits at rest; JS scales it UP on hover so the card comes closer */
  transform: perspective(900px) scale(1);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.3s ease;
  animation: fadeIn 0.8s ease backwards;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* static top sheen */
.profile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 42%),
    radial-gradient(90% 60% at 50% -15%, rgba(255, 255, 255, 0.07), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* specular that pools under the cursor */
.profile::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(260px 260px at var(--mx, 50%) var(--my, 30%),
              rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 35%, transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}
.profile:hover::before { opacity: 1; }

/* liquid-glass rim light — a bright spot that chases the cursor along the edge */
.profile .rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.6px;
  background: radial-gradient(220px 220px at var(--mx, 50%) var(--my, 50%),
             rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.18) 32%, transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 2;
}
.profile:hover .rim { opacity: 1; }

.profile > * { position: relative; z-index: 1; }

.avatar-ring {
  width: 184px;
  height: 184px;
  margin: 0 auto 24px;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent));
  animation: spin 6s linear infinite;
  box-shadow: 0 0 60px rgba(255, 45, 79, 0.55);
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  background: var(--bg-2);
  animation: spin 6s linear infinite reverse; /* keep image upright */
}

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

.name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.85rem;
  letter-spacing: -0.02em;
}

.badge { width: 22px; height: 22px; fill: var(--accent); }
.badge .check { stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.bio {
  margin: 10px auto 0;
  max-width: 38ch;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.stats {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}
.stats strong { color: var(--text); }
.stats .dot { opacity: 0.5; }

/* ---------- Search ---------- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  position: sticky;
  top: 12px;
  z-index: 5;
}

.search-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }

#search {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}
#search::placeholder { color: var(--muted); }
#search::-webkit-search-cancel-button { filter: invert(0.6); }

.hint {
  font: 0.75rem/1 monospace;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 7px;
}

/* ---------- Links ---------- */
.links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.card {
  --brand: var(--accent);
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border-radius: 14px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(9, 9, 15, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px) saturate(170%);
  -webkit-backdrop-filter: blur(12px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
  color: var(--text);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.15s ease-out,
              border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

/* brand glow that follows the cursor */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120px 80px at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* glossy specular sheen across the top — the "liquid glass" highlight.
   z-index:0 keeps it BEHIND the icon/text so it doesn't wash them out. */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0) 40%),
    radial-gradient(80% 60% at 50% -10%, rgba(255, 255, 255, 0.045), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* brand edge light that follows the cursor — brightest where the pointer is,
   so it concentrates strongly when you're near a corner */
.card .rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: radial-gradient(130px 130px at var(--mx, 50%) var(--my, 50%),
             var(--brand), color-mix(in srgb, var(--brand) 35%, transparent) 32%, transparent 58%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 3;
}
.card:hover .rim { opacity: 1; }

/* keep card content above the glow and the sheen */
.card > * { position: relative; z-index: 1; }

.card:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
  box-shadow: 0 16px 40px -16px var(--brand), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
    rgba(9, 9, 15, 0.5);
}
.card:hover::before { opacity: 1; }

.card .icon {
  width: 26px;
  height: 26px;
  flex: none;
  background-color: #fff;
  -webkit-mask: var(--svg) center / contain no-repeat;
  mask: var(--svg) center / contain no-repeat;
  transition: background-color 0.18s ease, transform 0.18s ease;
}
.card:hover .icon { background-color: var(--brand); transform: scale(1.08); }

.card .meta { min-width: 0; }
.card .platform { font-weight: 600; font-size: 0.95rem; }
.card .handle {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card .arrow {
  margin-left: auto;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  color: var(--brand);
  flex: none;
}
.card:hover .arrow { opacity: 1; transform: translateX(0); }

/* staggered entrance — plays when the links section scrolls into view.
   `backwards` fill hides cards before they start but does NOT linger after,
   so the hover transform keeps working once they've appeared. */
.links .card { opacity: 0; }
.links.in .card {
  opacity: 1;
  animation: rise 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 24px 0;
}
.empty span { color: var(--text); }

.foot {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 8px;
}

@media (max-width: 460px) {
  .links { grid-template-columns: 1fr; }
  .hero { padding: 56px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .avatar-ring, .avatar, .scroll-cue { animation: none; }
  .links.in .card { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
