:root {
  --bg: #080b0f;
  --panel: rgba(12, 17, 19, 0.82);
  --panel-strong: rgba(20, 27, 28, 0.96);
  --line: rgba(246, 247, 239, 0.16);
  --ink: #f7f8ee;
  --muted: #aab6ad;
  --teal: #2ee6c1;
  --cyan: #77dcff;
  --coral: #ff705c;
  --lime: #dbff6f;
  --gold: #ffd36f;
  --violet: #9f7aff;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.44);
  color-scheme: dark;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(46, 230, 193, 0.12), transparent 30%),
    linear-gradient(315deg, rgba(255, 112, 92, 0.11), transparent 34%),
    var(--bg);
  overflow-x: hidden;
}

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

body::before {
  z-index: -3;
  background-image: url("assets/stream-hero.png");
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  filter: saturate(1.15) contrast(1.04);
}

body::after {
  z-index: -2;
  background:
    linear-gradient(rgba(246, 247, 239, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 247, 239, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(46, 230, 193, 0.2), transparent 34%),
    rgba(8, 11, 15, 0.66);
  background-size: 34px 34px, 34px 34px, auto, auto;
}

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

.page-shell {
  display: grid;
  width: min(590px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 34px) 0;
  place-items: center;
}

.link-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(246, 247, 239, 0.17);
  border-radius: 22px;
  padding: clamp(18px, 4vw, 28px);
  background:
    linear-gradient(145deg, rgba(46, 230, 193, 0.08), transparent 32%),
    linear-gradient(330deg, rgba(255, 112, 92, 0.09), transparent 34%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.link-card::before {
  position: absolute;
  top: -1px;
  left: 28px;
  right: 28px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--teal), var(--coral), transparent);
}

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

.avatar {
  display: block;
  width: 128px;
  height: 128px;
  margin: 0 auto 18px;
  overflow: hidden;
  border: 1px solid rgba(46, 230, 193, 0.58);
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(from 210deg, var(--teal), var(--lime), var(--coral), var(--cyan), var(--teal));
  box-shadow: 0 0 36px rgba(46, 230, 193, 0.28);
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 40%;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 10vw, 4.1rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.bio {
  max-width: 430px;
  margin: 14px auto 24px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.links-stack {
  display: grid;
  gap: 12px;
}

.link-row {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  overflow: hidden;
  border: 1px solid rgba(246, 247, 239, 0.13);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(9, 14, 16, 0.7);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.link-row:hover,
.link-row:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(46, 230, 193, 0.62);
  background: rgba(20, 30, 30, 0.86);
  box-shadow: 0 16px 40px rgba(46, 230, 193, 0.1);
  outline: none;
}

.link-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 12px;
  color: #08120f;
  background: var(--teal);
  font-size: 0.9rem;
  font-weight: 950;
  box-shadow: inset 0 -8px 18px rgba(0, 0, 0, 0.12);
}

.link-icon img {
  display: block;
  width: 24px;
  height: 24px;
}

.link-icon.mono {
  overflow: hidden;
  background: #0d0d11;
}

.link-icon.mono img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.link-icon.donatello {
  background: #171d2d;
}

.link-icon.donatello img {
  width: 32px;
  height: 32px;
}

.link-icon.telegram {
  background: #229ed9;
}

.link-icon.discord {
  background: #5865f2;
}

.link-icon.twitch {
  background: #9146ff;
}

.link-icon.tiktok {
  background: #111111;
  box-shadow: inset 3px 0 #25f4ee, inset -3px 0 #fe2c55;
}

.link-copy {
  min-width: 0;
}

.link-copy strong,
.link-copy small {
  display: block;
}

.link-copy strong {
  margin-bottom: 3px;
  overflow-wrap: anywhere;
  font-size: 1.02rem;
}

.link-copy small {
  overflow-wrap: anywhere;
  color: var(--muted);
  line-height: 1.35;
}

.link-action {
  justify-self: end;
  border: 1px solid rgba(246, 247, 239, 0.14);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: rgba(246, 247, 239, 0.06);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  color: rgba(246, 247, 239, 0.54);
  font-size: 0.84rem;
  text-align: center;
}

.footer-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
}

.ripple {
  position: absolute;
  width: var(--ripple-size);
  height: var(--ripple-size);
  left: var(--ripple-x);
  top: var(--ripple-y);
  border-radius: 50%;
  background: rgba(246, 247, 239, 0.28);
  transform: scale(0);
  animation: ripple 650ms ease-out;
  pointer-events: none;
}

@keyframes ripple {
  to {
    opacity: 0;
    transform: scale(4);
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 20px, 590px);
    padding: 18px 0 42px;
    place-items: start center;
  }

  .link-card {
    border-radius: 16px;
    padding: 15px 14px 16px;
  }

  .avatar {
    width: 84px;
    height: 84px;
    margin-bottom: 12px;
  }

  h1 {
    font-size: 2rem;
    line-height: 1;
  }

  .bio {
    margin: 10px auto 16px;
    font-size: 0.89rem;
    line-height: 1.42;
  }

  .links-stack {
    gap: 9px;
  }

  .link-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 68px;
    border-radius: 12px;
    padding: 9px 10px;
  }

  .link-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .link-icon img {
    width: 21px;
    height: 21px;
  }

  .link-icon.donatello img {
    width: 29px;
    height: 29px;
  }

  .link-copy strong {
    margin-bottom: 2px;
    font-size: 0.93rem;
  }

  .link-copy small {
    font-size: 0.76rem;
    line-height: 1.28;
  }

  .link-action {
    grid-column: auto;
    justify-self: end;
    margin: 0;
    padding: 5px 7px;
    font-size: 0.67rem;
  }

  .card-footer {
    gap: 7px;
    margin-top: 12px;
    font-size: 0.72rem;
  }
}

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