/* ===== Tokens ===== */
:root {
  --bg: #0a0a0f;
  --bg-soft: #12121a;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5f5f7;
  --text-dim: #9a9aa8;
  --accent: #7c5cff;
  --accent-2: #2dd4bf;
  --grad: linear-gradient(120deg, #7c5cff 0%, #2dd4bf 100%);
  --radius: 22px;
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
}

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

html { scroll-behavior: smooth; }

body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  gap: 1.25rem;
  grid-template-rows: 1fr auto;
  padding: clamp(1rem, 4vw, 2.5rem);
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  position: relative;
}

/* ===== Animated background ===== */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 40%, transparent 100%);
}

.bg-glow {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
  pointer-events: none;
}

.bg-glow--1 {
  width: 460px;
  height: 460px;
  background: #7c5cff;
  top: -120px;
  left: -80px;
  animation: float1 14s ease-in-out infinite;
}

.bg-glow--2 {
  width: 420px;
  height: 420px;
  background: #2dd4bf;
  bottom: -140px;
  right: -80px;
  animation: float2 16s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 50px) scale(1.1); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, -40px) scale(1.08); }
}

/* ===== Card ===== */
.card {
  width: min(440px, 100%);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 5vw, 2.5rem);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.35;
  pointer-events: none;
}

/* ===== Top / Avatar ===== */
.card__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.avatar {
  position: relative;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad);
  font-family: "Space Grotesk", sans-serif;
  box-shadow: 0 0 0 6px rgba(124, 92, 255, 0.12);
}

.avatar__initials {
  font-size: 1.9rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

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

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.6); }
  50% { box-shadow: 0 0 0 7px rgba(45, 212, 191, 0); }
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 500;
}

/* ===== Hero ===== */
.hero { margin-top: 1.5rem; }

.hero__name {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 7vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero__role {
  margin-top: 0.4rem;
  font-size: clamp(1rem, 4vw, 1.15rem);
  font-weight: 500;
  display: flex;
  justify-content: center;
  gap: 0.4ch;
  flex-wrap: wrap;
}

.hero__static { color: var(--text-dim); }

.hero__rotator {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
  position: relative;
}

.hero__rotator::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  background: var(--accent-2);
  vertical-align: text-bottom;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero__bio {
  margin: 1.1rem auto 0;
  max-width: 34ch;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== Stack chips ===== */
.stack {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.chip {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.chip:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 92, 255, 0.5);
  color: #fff;
}

/* ===== Actions ===== */
.actions {
  margin-top: 1.8rem;
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.btn {
  flex: 1 1 0;
  min-width: 150px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.1rem;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn--primary {
  color: #0a0a0f;
  background: var(--grad);
  box-shadow: 0 10px 30px -8px rgba(124, 92, 255, 0.6);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -8px rgba(124, 92, 255, 0.7);
}

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

.btn--ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.07);
}

/* ===== Socials ===== */
.socials {
  margin-top: 1.8rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 0.8rem;
}

.social {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.social:hover {
  transform: translateY(-3px);
  color: #fff;
  border-color: rgba(124, 92, 255, 0.5);
}

/* ===== Signature ===== */
.signature {
  font-size: 0.8rem;
  color: var(--text-dim);
  opacity: 0.8;
}

.signature span { color: var(--accent-2); }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 120%);
  padding: 0.7rem 1.2rem;
  border-radius: 12px;
  background: var(--grad);
  color: #0a0a0f;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  z-index: 10;
}

.toast.show { transform: translate(-50%, 0); }

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
