:root {
  --bg: #080808;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);

  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-tertiary: rgba(255, 255, 255, 0.4);

  --accent: #b8ff5a;
  --accent-hover: #c8ff7d;
  --accent-ink: #0c1402;
  --accent-glow: rgba(184, 255, 90, 0.55);
  --accent-glow-hover: rgba(184, 255, 90, 0.6);

  --free: #00aff0;
  --free-hover: #1fbbf5;
  --free-ink: #ffffff;
  --free-glow: rgba(0, 175, 240, 0.55);
  --free-glow-hover: rgba(0, 175, 240, 0.6);

  --hot: #ff2e7e;
  --hot-hover: #ff4a91;
  --hot-ink: #ffffff;
  --hot-glow: rgba(255, 46, 126, 0.55);
  --hot-glow-hover: rgba(255, 46, 126, 0.6);
  --hot-tint: rgba(255, 46, 126, 0.075);
  --hot-tint-hover: rgba(255, 46, 126, 0.14);
  --hot-border: rgba(255, 46, 126, 0.2);
  --hot-border-hover: rgba(255, 46, 126, 0.45);

  --radius: 16px;
  --link-height: 58px;
  --link-gap: 10px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font:
    Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background-color: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 255, 255, 0.06),
      transparent 35%
    ),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
}

p,
h1 {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
}

.card {
  width: 100%;
  max-width: 480px;
  padding: 36px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 28px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.035) 0%,
    rgba(255, 255, 255, 0.012) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 40px 80px -40px rgba(0, 0, 0, 0.9);
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 32px;
}

.avatar {
  position: relative;
  isolation: isolate;
  width: clamp(180px, 54vw, 216px);
  aspect-ratio: 1;
  margin-bottom: 24px;
}

.avatar::before {
  content: '';
  position: absolute;
  inset: -22%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(184, 255, 90, 0.14) 0%,
    rgba(255, 255, 255, 0.04) 45%,
    transparent 70%
  );
  filter: blur(10px);
}

.avatar__ring {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.32) 0%,
    rgba(255, 255, 255, 0.06) 42%,
    rgba(255, 255, 255, 0.04) 60%,
    rgba(184, 255, 90, 0.38) 100%
  );
  box-shadow:
    0 24px 48px -16px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.avatar__photo,
.avatar__fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--bg);
  background-color: #141414;
}

.avatar__photo {
  object-fit: cover;
  object-position: center 25%;
}

.avatar__fallback {
  display: none;
  place-items: center;
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-secondary);
}

.avatar--fallback .avatar__photo {
  display: none;
}

.avatar--fallback .avatar__fallback {
  display: grid;
}

.profile__name {
  font-size: clamp(28px, 8vw, 38px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.profile__about {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.profile__role {
  --dot: 8px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  position: relative;
}

.profile__role::before {
  content: '';
  width: var(--dot);
  height: var(--dot);
  flex-shrink: 0;
  border-radius: 50%;
  background-color: var(--hot);
  box-shadow: 0 0 12px var(--hot-glow);
}

.profile__role::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: var(--dot);
  height: var(--dot);
  margin-top: calc(var(--dot) / -2);
  border-radius: 50%;
  background-color: var(--hot);
  opacity: 0.75;
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.profile__bio {
  max-width: 32ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
  text-wrap: balance;
}

.links__list {
  display: flex;
  flex-direction: column;
  gap: var(--link-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--link-height);
  padding: 8px 18px 8px 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition:
    transform 0.35s var(--ease-out),
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    color 0.25s var(--ease),
    box-shadow 0.35s var(--ease);
}

.social-link::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    180px circle at var(--x, 50%) var(--y, 50%),
    rgba(255, 255, 255, 0.07),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.social-link__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  background-color: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition:
    background-color 0.25s var(--ease),
    color 0.25s var(--ease);
}

.social-link__icon svg,
.social-link__arrow {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-link__icon svg {
  width: 21px;
  height: 21px;
}

.social-link__emoji {
  font-size: 20px;
  line-height: 1;
}

.social-link__emoji--fire {
  display: inline-block;
  transform-origin: 50% 90%;
  animation: flame 1.6s ease-in-out infinite;
}

.social-link__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-link__arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-tertiary);
  transition:
    transform 0.35s var(--ease-out),
    color 0.25s var(--ease);
}

.social-link--primary {
  border-color: transparent;
  background-color: var(--accent);
  color: var(--accent-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 12px 28px -14px var(--accent-glow);
}

.social-link--primary::before {
  background: radial-gradient(
    180px circle at var(--x, 50%) var(--y, 50%),
    rgba(255, 255, 255, 0.28),
    transparent 70%
  );
}

.social-link--primary .social-link__icon {
  background-color: rgba(12, 20, 2, 0.1);
  box-shadow: none;
}

.social-link--primary .social-link__arrow {
  color: var(--accent-ink);
}

.social-link--free {
  border-color: transparent;
  background-color: var(--free);
  color: var(--free-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 12px 28px -14px var(--free-glow);
}

.social-link--free::before {
  background: radial-gradient(
    180px circle at var(--x, 50%) var(--y, 50%),
    rgba(255, 255, 255, 0.22),
    transparent 70%
  );
}

.social-link--free .social-link__icon {
  background-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.social-link--free .social-link__arrow {
  color: var(--free-ink);
}

.social-link--hot {
  border-color: var(--hot-border);
  background-color: var(--hot-tint);
  color: var(--hot);
}

.social-link--hot::before {
  background: radial-gradient(
    180px circle at var(--x, 50%) var(--y, 50%),
    var(--hot-tint-hover),
    transparent 70%
  );
}

.social-link--hot .social-link__icon {
  background-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.social-link--hot .social-link__arrow {
  color: var(--hot);
}

@media (hover: hover) and (pointer: fine) {
  .social-link:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    background-color: var(--surface-hover);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 14px 30px -18px rgba(0, 0, 0, 0.9);
  }

  .social-link:hover::before {
    opacity: 1;
  }

  .social-link:hover .social-link__icon {
    background-color: rgba(255, 255, 255, 0.09);
  }

  .social-link:hover .social-link__arrow {
    color: var(--text);
    transform: translate(2px, -2px);
  }

  .social-link--primary:hover {
    border-color: transparent;
    background-color: var(--accent-hover);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.4),
      0 16px 34px -14px var(--accent-glow-hover);
  }

  .social-link--primary:hover .social-link__icon {
    background-color: rgba(12, 20, 2, 0.14);
  }

  .social-link--primary:hover .social-link__arrow {
    color: var(--accent-ink);
  }

  .social-link--free:hover {
    border-color: transparent;
    background-color: var(--free-hover);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.35),
      0 16px 34px -14px var(--free-glow-hover);
  }

  .social-link--free:hover .social-link__icon {
    background-color: rgba(255, 255, 255, 0.22);
  }

  .social-link--free:hover .social-link__arrow {
    color: var(--free-ink);
  }

  .social-link--hot:hover {
    border-color: var(--hot-border-hover);
    background-color: var(--hot-tint-hover);
    color: var(--hot-hover);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 14px 32px -16px var(--hot-glow);
  }

  .social-link--hot:hover .social-link__icon {
    background-color: var(--hot-tint-hover);
  }

  .social-link--hot:hover .social-link__arrow {
    color: var(--hot-hover);
  }
}

.social-link:active {
  transform: scale(0.985);
  transition-duration: 0.12s;
}

.social-link:focus {
  outline: none;
}

.social-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes ping {
  75%,
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

@keyframes flame {
  0%,
  100% {
    transform: rotate(-3deg) scale(1, 1);
    filter: drop-shadow(0 0 3px rgba(255, 120, 40, 0.35));
  }
  25% {
    transform: rotate(2deg) scale(0.96, 1.06);
    filter: drop-shadow(0 0 6px rgba(255, 120, 40, 0.6));
  }
  50% {
    transform: rotate(-1deg) scale(1.03, 0.97);
    filter: drop-shadow(0 0 4px rgba(255, 120, 40, 0.45));
  }
  75% {
    transform: rotate(3deg) scale(0.97, 1.05);
    filter: drop-shadow(0 0 7px rgba(255, 120, 40, 0.65));
  }
}

@keyframes reveal-photo {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
}

.reveal,
.links__list > li {
  animation: reveal 0.7s var(--ease-out) both;
}

.avatar.reveal {
  animation-name: reveal-photo;
  animation-duration: 0.8s;
  animation-delay: 0.05s;
}

.profile__name.reveal {
  animation-delay: 0.15s;
}
.profile__about.reveal {
  animation-delay: 0.24s;
}

.links__list > li:nth-child(1) {
  animation-delay: 0.34s;
}
.links__list > li:nth-child(2) {
  animation-delay: 0.39s;
}
.links__list > li:nth-child(3) {
  animation-delay: 0.44s;
}
.links__list > li:nth-child(4) {
  animation-delay: 0.49s;
}
.links__list > li:nth-child(5) {
  animation-delay: 0.54s;
}
.links__list > li:nth-child(6) {
  animation-delay: 0.59s;
}
.links__list > li:nth-child(7) {
  animation-delay: 0.64s;
}
.links__list > li:nth-child(n + 8) {
  animation-delay: 0.69s;
}

@media (max-height: 700px) {
  :root {
    --link-height: 54px;
    --link-gap: 8px;
  }

  .avatar {
    width: 168px;
    margin-bottom: 18px;
  }

  .profile {
    margin-bottom: 24px;
  }

  .card {
    padding-top: 28px;
  }

  .social-link__icon {
    width: 36px;
    height: 36px;
  }
}

@media (min-width: 640px) {
  .card {
    max-width: 500px;
    padding: 48px 40px 40px;
    border-radius: 32px;
  }

  .avatar {
    width: 222px;
  }

  .social-link {
    --link-height: 60px;
  }
}

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

  .profile__role::after {
    display: none;
  }

  .social-link:hover,
  .social-link:active,
  .social-link:hover .social-link__arrow {
    transform: none !important;
  }
}
