/* ============================================================
   vnkyy — standalone profile
   No external fonts, images, trackers or runtime network calls.
   ============================================================ */

:root {
  --bg-0: #07020d;
  --bg-1: #12041f;
  --bg-2: #2a0a4a;
  --purple-400: #c084fc;
  --purple-500: #a855f7;
  --purple-600: #9333ea;
  --purple-700: #7e22ce;

  --text: #f5f3ff;
  --text-dim: rgba(237, 233, 254, 0.62);
  --text-faint: rgba(237, 233, 254, 0.42);

  --card-bg: rgba(24, 8, 40, 0.52);
  --card-border: rgba(192, 132, 252, 0.22);
  --card-inner: rgba(255, 255, 255, 0.06);

  --badge-bg: rgba(255, 255, 255, 0.055);
  --badge-border: rgba(255, 255, 255, 0.12);

  --glow: rgba(168, 85, 247, 0.55);
  --glow-soft: rgba(168, 85, 247, 0.22);

  --radius-card: 26px;
  --radius-badge: 15px;
  --blur: 22px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ------------------------------------------------------------
   Background — layered gradient + drifting aurora blobs + grain
   ------------------------------------------------------------ */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% -20%, #2a0a4a 0%, transparent 60%),
    radial-gradient(90% 80% at 85% 110%, #3b0a63 0%, transparent 55%),
    linear-gradient(165deg, #07020d 0%, #12041f 42%, #1e0733 78%, #07020d 100%);
}

.bg__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.55;
  will-change: transform;
}

.bg__blob--a {
  width: 46vmax;
  height: 46vmax;
  top: -18vmax;
  left: -12vmax;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.55), transparent 62%);
  animation: drift-a 24s ease-in-out infinite alternate;
}

.bg__blob--b {
  width: 40vmax;
  height: 40vmax;
  bottom: -18vmax;
  right: -10vmax;
  background: radial-gradient(circle, rgba(126, 34, 206, 0.6), transparent 62%);
  animation: drift-b 30s ease-in-out infinite alternate;
}

.bg__blob--c {
  width: 30vmax;
  height: 30vmax;
  top: 40%;
  left: 55%;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.28), transparent 65%);
  animation: drift-c 36s ease-in-out infinite alternate;
}

.bg__grain {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  pointer-events: none;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(14vmax, 10vmax, 0) scale(1.18); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(-12vmax, -9vmax, 0) scale(0.92); }
}
@keyframes drift-c {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-10vmax, 12vmax, 0) scale(1.2); }
}

/* ------------------------------------------------------------
   Layout
   ------------------------------------------------------------ */
.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 28px 16px calc(28px + env(safe-area-inset-bottom));
}

/* ------------------------------------------------------------
   Card
   ------------------------------------------------------------ */
.card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  width: min(92vw, 420px);
  max-width: 100%;
  padding: clamp(30px, 6.5vw, 44px) clamp(22px, 5.5vw, 36px) clamp(26px, 5vw, 34px);
  border-radius: var(--radius-card);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow:
    0 30px 70px -24px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(0, 0, 0, 0.25) inset,
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 0 90px -40px var(--glow);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  text-align: center;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.25s var(--ease);
  animation: card-in 0.9s var(--ease) both;
}

/* top sheen */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 22%),
    radial-gradient(120% 60% at 50% -30%, rgba(192, 132, 252, 0.22), transparent 60%);
  pointer-events: none;
}

/* pointer-follow glow */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    260px circle at var(--mx, 50%) var(--my, 50%),
    rgba(192, 132, 252, 0.18),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}
.card:hover::before { opacity: 1; }

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

@keyframes card-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ------------------------------------------------------------
   Avatar
   ------------------------------------------------------------ */
.avatar {
  position: relative;
  width: clamp(96px, 25vw, 112px);
  height: clamp(96px, 25vw, 112px);
  margin: 0 auto 20px;
  border-radius: 50%;
  padding: 3px;
  background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02) 58%, transparent 72%);
  border: 1px solid rgba(192, 132, 252, 0.28);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 28px var(--glow-soft),
    0 0 60px rgba(168, 85, 247, 0.18);
}

.avatar__ring {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  padding: 1px;
  background: conic-gradient(from 0deg, transparent 0 55%, rgba(192, 132, 252, 0.85) 75%, transparent 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px));
  animation: ring-spin 6s linear infinite;
  pointer-events: none;
}

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

.avatar__img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
}

/* ------------------------------------------------------------
   Text
   ------------------------------------------------------------ */
.name {
  margin: 0 0 6px;
  font-size: clamp(1.9rem, 7.5vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  background: linear-gradient(180deg, #ffffff 0%, #ede9fe 45%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 18px rgba(168, 85, 247, 0.28));
}

.handle {
  margin: 0 0 26px;
  font-size: clamp(0.85rem, 3.4vw, 0.95rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-dim);
}

/* ------------------------------------------------------------
   Badge row
   ------------------------------------------------------------ */
.badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-badge);
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 10px 24px -14px rgba(0, 0, 0, 0.8);
  transition:
    transform 0.22s var(--ease),
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}

.badge__icon {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
  transition: transform 0.22s var(--ease), filter 0.22s ease;
}

.badge__icon--faceit { filter: drop-shadow(0 0 6px rgba(255, 85, 0, 0.35)); }
.badge__icon--funpay { filter: drop-shadow(0 0 6px rgba(67, 132, 208, 0.4)); }
.badge__icon--stratz { filter: drop-shadow(0 0 6px rgba(0, 180, 200, 0.35)); }

.badge:hover,
.badge:focus-visible {
  transform: translateY(-5px);
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(192, 132, 252, 0.7);
  box-shadow:
    0 0 0 1px rgba(192, 132, 252, 0.25),
    0 14px 34px -12px var(--glow),
    0 0 26px -6px var(--glow);
  outline: none;
}

.badge:hover .badge__icon,
.badge:focus-visible .badge__icon {
  transform: scale(1.12);
}

.badge:active { transform: translateY(-2px) scale(0.98); }

.badge:focus-visible {
  outline: 2px solid var(--purple-400);
  outline-offset: 3px;
}

/* tooltip */
.badge__tip {
  position: absolute;
  z-index: 2;
  bottom: calc(100% + 11px);
  left: 50%;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(3, 20, 11, 0.92);
  border: 1px solid rgba(192, 132, 252, 0.22);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.badge__tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(3, 20, 11, 0.92);
}

.badge:hover .badge__tip,
.badge:focus-visible .badge__tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ------------------------------------------------------------
   Hello intro
   ------------------------------------------------------------ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 90% at 50% 38%, #1a0630 0%, rgba(5, 1, 12, 0.98) 62%),
    #000;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  transition: opacity 0.7s ease;
}

.intro.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.intro__art {
  width: min(74vw, 520px);
}

.intro__art svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.intro__stroke {
  fill: none;
  stroke: #f5f3ff;
  stroke-width: 11;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 16px rgba(168, 85, 247, 0.45));
}

/* Handwriting draw — enabled only when JS can measure the path. */
.intro.is-drawing .intro__stroke {
  stroke-dasharray: var(--len) var(--len);
  stroke-dashoffset: var(--len);
  animation: intro-draw 2.4s cubic-bezier(0.5, 0.05, 0.2, 1) forwards;
}

@keyframes intro-draw {
  to { stroke-dashoffset: 0; }
}

.intro__hint {
  position: absolute;
  bottom: max(2.75rem, calc(1.75rem + env(safe-area-inset-bottom)));
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  font: inherit;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.8s ease 0.2s, color 0.2s ease;
}

.intro.is-ready .intro__hint {
  opacity: 1;
}

.intro__hint:hover,
.intro__hint:focus-visible {
  color: rgba(255, 255, 255, 0.82);
}

.intro__hint:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

/* ------------------------------------------------------------
   Small screens
   ------------------------------------------------------------ */
@media (max-width: 380px) {
  :root { --radius-card: 22px; --radius-badge: 13px; }
  .card { padding: 28px 18px 24px; }
  .badges { gap: 13px; }
  .badge { width: 46px; height: 46px; }
  .badge__icon { width: 24px; height: 24px; }
}

/* ------------------------------------------------------------
   Fallback when backdrop-filter is unsupported
   ------------------------------------------------------------ */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card { background: rgba(20, 6, 34, 0.94); }
  .badge { background: rgba(30, 10, 50, 0.85); }
}

/* ------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .bg__blob,
  .avatar__ring { animation: none; }
  .intro.is-drawing .intro__stroke { animation: none; stroke-dashoffset: 0; }
  .intro { transition: none; }
  .card,
  .badge,
  .badge__icon,
  .badge__tip { animation: none; transition: none; }
  .card { transform: none !important; }
}
