:root {
  /* Branding Ailing: negro, blanco y fucsia intenso. */
  --black: #050505;
  --black-soft: #111111;
  --black-card: rgba(8, 8, 8, 0.94);
  --white: #ffffff;
  --gray: #bdbdbd;
  --gray-dark: #242424;
  --pink: #ff005c;
  --pink-dark: #b80045;
  --pink-soft: rgba(255, 0, 92, 0.16);
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.68);
  --radius-lg: 28px;
  --radius-md: 18px;
  --transition: 220ms ease;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--white);
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 0, 92, 0.1), transparent 20rem),
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.055), transparent 16rem),
    radial-gradient(circle at 86% 78%, rgba(184, 0, 69, 0.18), transparent 22rem),
    linear-gradient(145deg, var(--black), #000000 72%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
}

body::before {
  inset: 0;
  opacity: 0.22;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.16) 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255, 0, 92, 0.18) 1px, transparent 2px);
  background-position: 0 0, 34px 41px;
  background-size: 92px 92px, 138px 138px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 74%);
}

body::after {
  width: 46vw;
  max-width: 560px;
  min-width: 260px;
  height: 96px;
  top: 7%;
  right: -7%;
  background: linear-gradient(90deg, transparent 0 8%, var(--pink) 9% 72%, transparent 73% 100%);
  filter: drop-shadow(0 0 24px rgba(255, 0, 92, 0.32));
  opacity: 0.9;
  transform: rotate(-13deg) skewX(-17deg);
  clip-path: polygon(0 38%, 12% 18%, 20% 35%, 36% 14%, 52% 31%, 70% 12%, 100% 38%, 91% 55%, 100% 74%, 63% 60%, 42% 82%, 27% 59%, 8% 76%);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.page-shell::before,
.page-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.page-shell::before {
  width: min(540px, 92vw);
  height: min(540px, 92vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 0, 92, 0.17), transparent 64%);
  filter: blur(22px);
  opacity: 0.68;
}

.page-shell::after {
  width: 34vw;
  max-width: 430px;
  min-width: 220px;
  height: 72px;
  left: -8%;
  bottom: 12%;
  background: linear-gradient(90deg, transparent 0 6%, var(--pink-dark) 7% 70%, transparent 71% 100%);
  opacity: 0.74;
  transform: rotate(-16deg) skewX(-18deg);
  clip-path: polygon(0 42%, 18% 18%, 31% 35%, 52% 13%, 100% 37%, 92% 58%, 100% 78%, 54% 63%, 35% 84%, 20% 60%);
}

.profile-card {
  position: relative;
  width: min(100%, 430px);
  padding: 36px 22px 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 36%),
    var(--black-card);
  border: 1px solid rgba(255, 0, 92, 0.26);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), 0 0 34px rgba(255, 0, 92, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  animation: cardIn 680ms ease forwards;
}

.profile-card::before,
.profile-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.profile-card::before {
  inset: 0;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 0, 92, 0.12), transparent 14rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 26%, rgba(255, 0, 92, 0.08));
  opacity: 0.88;
}

.profile-card::after {
  left: 22px;
  right: 22px;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--pink), var(--white), var(--pink), transparent);
  opacity: 0.9;
}

.profile-header,
.link-list {
  position: relative;
  z-index: 1;
}

.share-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 30;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--white);
  cursor: pointer;
  background: rgba(5, 5, 5, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), color var(--transition);
}

.share-button svg,
.share-button i,
.share-button span {
  pointer-events: none;
}

.share-button:hover,
.share-button:focus-visible {
  transform: translateY(-2px);
  color: var(--pink);
  border-color: rgba(255, 0, 92, 0.72);
  box-shadow: 0 0 24px rgba(255, 0, 92, 0.26);
  outline: none;
}

.profile-header {
  position: relative;
  z-index: 1;
  text-align: center;
}

.profile-photo {
  width: min(124px, 44vw);
  height: auto;
  aspect-ratio: 1;
  display: block;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 2px solid var(--white);
  object-fit: contain;
  background: var(--black);
  box-shadow:
    0 0 0 6px rgba(255, 0, 92, 0.08),
    0 0 34px rgba(255, 0, 92, 0.3),
    0 16px 36px rgba(0, 0, 0, 0.6);
}

h1 {
  position: relative;
  display: inline-block;
  margin: 0;
  color: var(--white);
  font-size: clamp(2rem, 9vw, 2.75rem);
  font-weight: 850;
  line-height: 1;
}

h1::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -9px;
  height: 4px;
  background: var(--pink);
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(255, 0, 92, 0.5);
  transform: skewX(-18deg);
}

.username {
  margin: 20px 0 0;
  color: var(--pink);
  font-size: 0.94rem;
  font-weight: 850;
  text-transform: uppercase;
}

.bio {
  max-width: 320px;
  margin: 14px auto 0;
  color: var(--gray);
  font-size: 0.96rem;
  line-height: 1.55;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 22px;
}

.social-links a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(5, 5, 5, 0.78);
  color: var(--white);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), color var(--transition);
}

.social-links a:hover,
.social-links a:focus-visible {
  transform: translateY(-3px);
  color: var(--pink);
  border-color: rgba(255, 0, 92, 0.78);
  box-shadow: 0 0 24px rgba(255, 0, 92, 0.28);
  outline: none;
}

.link-list {
  display: grid;
  gap: 12px;
}

.link-button {
  --delay: 0ms;
  position: relative;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 0 18px;
  overflow: hidden;
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
  background:
    linear-gradient(var(--black-soft), var(--black-soft)) padding-box,
    linear-gradient(115deg, rgba(255, 255, 255, 0.2), var(--pink), rgba(255, 255, 255, 0.14)) border-box;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  opacity: 0;
  transform: translateY(12px);
  transition: transform var(--transition), box-shadow var(--transition), color var(--transition), background var(--transition);
  animation: buttonIn 540ms ease forwards;
  animation-delay: var(--delay);
}

.link-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 92, 0.22), transparent);
  transform: translateX(-120%);
  transition: transform 520ms ease;
}

.link-button span,
.link-button i {
  position: relative;
  z-index: 1;
}

.link-button i {
  color: var(--white);
  font-size: 1.02rem;
  transition: color var(--transition), transform var(--transition);
}

.link-button:hover,
.link-button:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 0 28px rgba(255, 0, 92, 0.25), 0 16px 34px rgba(0, 0, 0, 0.42);
  outline: none;
}

.link-button:hover i,
.link-button:focus-visible i {
  color: var(--pink);
  transform: translateX(2px);
}

.link-button:hover::after,
.link-button:focus-visible::after {
  transform: translateX(120%);
}

.qr-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 3;
  width: 138px;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 14px;
  color: var(--white);
  background: rgba(5, 5, 5, 0.86);
  border: 1px solid rgba(255, 0, 92, 0.38);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 28px rgba(255, 0, 92, 0.16);
  backdrop-filter: blur(14px);
}

.qr-panel span {
  font-size: 0.82rem;
  font-weight: 850;
  text-align: center;
}

.qr-code {
  width: 98px;
  height: 98px;
  display: grid;
  place-items: center;
  padding: 6px;
  background: var(--white);
  border-radius: 14px;
}

.qr-code img,
.qr-code canvas {
  width: 86px;
  height: 86px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 5;
  padding: 12px 16px;
  color: var(--white);
  background: rgba(5, 5, 5, 0.94);
  border: 1px solid rgba(255, 0, 92, 0.56);
  border-radius: 999px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.45), 0 0 22px rgba(255, 0, 92, 0.16);
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

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

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

@media (max-width: 760px) {
  .qr-panel {
    display: none;
  }
}

@media (max-width: 520px) {
  body::after {
    width: 72vw;
    height: 62px;
    top: 4%;
    right: -28%;
    opacity: 0.55;
  }

  .page-shell {
    padding: 18px 12px;
  }

  .page-shell::after {
    width: 64vw;
    height: 48px;
    left: -28%;
    bottom: 7%;
    opacity: 0.5;
  }

  .profile-card {
    padding: 32px 16px 18px;
    border-radius: 22px;
  }

  .profile-photo {
    width: min(108px, 42vw);
    height: auto;
  }

  .social-links {
    gap: 9px;
  }

  .social-links a {
    width: 39px;
    height: 39px;
  }

  .link-button {
    min-height: 52px;
    padding-inline: 15px;
    font-size: 0.95rem;
  }
}

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