/* ===== Reset & tokens ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

:root {
  --bg: #0d0f14;
  --text: #f8fafc;
  --muted: #c3c7d1;
  --accent: #a3e635;
  --glass: rgb(255 255 255 / 0.08);
  --glass-border: rgb(255 255 255 / 0.18);
  --radius: 28px;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* ===== Animated background ===== */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.blob {
  position: absolute;
  width: 42vmax;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  animation: drift 18s ease-in-out infinite alternate;
}

.blob--lime {
  --dx: 12vmax;
  --dy: 8vmax;
  top: -14%;
  left: -10%;
  background: #a3e635;
}

.blob--teal {
  --dx: -14vmax;
  --dy: -6vmax;
  right: -12%;
  bottom: -20%;
  background: #2dd4bf;
  animation-delay: -6s;
}

.blob--violet {
  --dx: -10vmax;
  --dy: 10vmax;
  top: 30%;
  left: 50%;
  width: 30vmax;
  background: #8b5cf6;
  animation-delay: -12s;
}

@keyframes drift {
  to {
    transform: translate(var(--dx), var(--dy)) scale(1.15);
  }
}

/* ===== Glass card ===== */
.scene {
  width: 100%;
  display: grid;
  place-items: center;
  perspective: 1000px;
}

.card {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
  position: relative;
  width: min(100%, 360px);
  padding: 2rem 1.75rem 1.75rem;
  border-radius: var(--radius);
  text-align: center;
  background: linear-gradient(135deg, rgb(255 255 255 / 0.12), rgb(255 255 255 / 0.03)), rgb(13 15 20 / 0.45);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow:
    0 24px 60px rgb(0 0 0 / 0.45),
    inset 0 1px 0 rgb(255 255 255 / 0.25);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.25s ease-out;
  animation: card-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes card-in {
  from {
    opacity: 0;
    translate: 0 40px;
    scale: 0.96;
  }
}

.card__glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mx) var(--my), rgb(255 255 255 / 0.22), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover .card__glare {
  opacity: 1;
}

/* ===== Avatar ===== */
.avatar {
  position: relative;
  width: 104px;
  aspect-ratio: 1;
  margin: 0 auto 1rem;
  padding: 4px;
  border-radius: 50%;
}

.avatar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(#a3e635, #2dd4bf, #8b5cf6, #a3e635);
  animation: spin 6s linear infinite;
}

.avatar__img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--bg);
}

.avatar__status {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  animation: pulse 2s ease-out infinite;
}

@keyframes spin {
  to {
    rotate: 1turn;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(163 230 53 / 0.6);
  }
  70%,
  100% {
    box-shadow: 0 0 0 10px rgb(163 230 53 / 0);
  }
}

/* ===== Text ===== */
.card__name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card__role {
  margin-top: 0.25rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card__bio {
  max-width: 30ch;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== Stats ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 1.5rem 0;
  padding: 1rem 0;
  list-style: none;
  border-block: 1px solid var(--glass-border);
}

.stats__item {
  display: grid;
  gap: 0.15rem;
}

.stats__item + .stats__item {
  border-left: 1px solid var(--glass-border);
}

.stats__value {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stats__label {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===== Tags ===== */
.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.tag {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  transition: background 0.2s, border-color 0.2s, translate 0.2s;
}

.tag:hover {
  background: rgb(163 230 53 / 0.15);
  border-color: rgb(163 230 53 / 0.5);
  translate: 0 -2px;
}

/* ===== Buttons ===== */
.card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1rem;
  border: 1px solid transparent;
  border-radius: 14px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: scale 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:active {
  scale: 0.96;
}

.btn--primary {
  color: #111318;
  background: var(--accent);
  box-shadow: 0 8px 24px rgb(163 230 53 / 0.35);
}

.btn--primary:hover {
  box-shadow: 0 10px 32px rgb(163 230 53 / 0.55);
}

.btn--primary[data-following="true"] {
  color: var(--accent);
  background: transparent;
  border-color: var(--accent);
  box-shadow: none;
}

.btn--ghost {
  color: var(--text);
  background: var(--glass);
  border-color: var(--glass-border);
}

.btn--ghost:hover {
  background: rgb(255 255 255 / 0.16);
}

.ripple {
  position: absolute;
  width: 12px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  translate: -50% -50%;
  pointer-events: none;
  animation: ripple 0.6s ease-out forwards;
}

@keyframes ripple {
  to {
    scale: 30;
    opacity: 0;
  }
}

/* ===== Social links ===== */
.socials {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.socials__link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--muted);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  transition: color 0.2s, background 0.2s, translate 0.2s;
}

.socials__link:hover {
  color: #111318;
  background: var(--accent);
  translate: 0 -3px;
}

.socials__link svg {
  width: 20px;
  height: 20px;
}

.btn:focus-visible,
.socials__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ===== Responsive & motion ===== */
@media (max-width: 400px) {
  .card {
    padding: 1.75rem 1.25rem 1.5rem;
  }

  .avatar {
    width: 88px;
  }

  .card__actions {
    gap: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
