* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Lexend', sans-serif;
  background: #0a0a0f;
  color: #fff;
}

.links-page {
  min-height: 100vh;
  padding: 64px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar-ring {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #3d5ce0, #7c5ce0, #e05c9a);
  animation: avatarPulse 3s ease-in-out infinite;
}

@keyframes avatarPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 92, 224, 0.35); }
  50% { box-shadow: 0 0 0 10px rgba(124, 92, 224, 0); }
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #14141c;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

h1 {
  margin-top: 20px;
  font-size: 1.5rem;
  font-weight: 700;
}

.handle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  margin-top: 4px;
}

.tagline {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  text-align: center;
  max-width: 320px;
  margin-top: 16px;
  line-height: 1.6;
}

.link-list {
  width: 100%;
  max-width: 440px;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Base card — every link now gets a colored glow (via --glow rgb triplet),
   a subtle tinted border, and a hover lift + shadow bloom. */
.link-card {
  --glow: 255, 255, 255;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(var(--glow), 0.22);
  border-radius: 16px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset,
              0 6px 16px -10px rgba(var(--glow), 0.35);
  transition: transform 0.22s ease, background 0.22s ease,
              border-color 0.22s ease, box-shadow 0.22s ease;
  opacity: 0;
  transform: translateY(10px);
  animation: cardIn 0.5s ease forwards;
}

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

.link-card:hover {
  transform: translateY(-3px) scale(1.012);
  background: rgba(var(--glow), 0.07);
  border-color: rgba(var(--glow), 0.45);
  box-shadow: 0 14px 30px -12px rgba(var(--glow), 0.55);
}

.link-card:active {
  transform: translateY(-1px) scale(1.0);
}

/* Every card now gets a slowly rotating gradient border in its own
   brand color (driven by --glow, set per-card in script.js). */
.link-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 17px;
  padding: 1.4px;
  background: linear-gradient(
    120deg,
    rgba(var(--glow), 0.9),
    rgba(255, 255, 255, 0.15),
    rgba(var(--glow), 0.9)
  );
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: featuredBorder 5s linear infinite;
  z-index: -1;
  opacity: 0.85;
}

/* Featured card keeps a brighter, faster, multi-color version */
.link-card--featured::before {
  background: linear-gradient(120deg, #3d5ce0, #7c5ce0, #e05c9a, #3d5ce0);
  background-size: 300% 300%;
  animation: featuredBorder 4s linear infinite;
  opacity: 1;
}

.link-card--featured {
  background: rgba(255, 255, 255, 0.06);
}

.link-card--featured:hover {
  background: rgba(255, 255, 255, 0.1);
}

@keyframes featuredBorder {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.featured-badge {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(120deg, #3d5ce0, #7c5ce0);
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 8px;
  vertical-align: middle;
}

.link-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.link-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(var(--glow), 0.6);
  transition: transform 0.22s ease;
}

.link-card:hover .link-icon {
  transform: scale(1.08) rotate(-4deg);
}

.link-label {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
}

.link-sub {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  margin-top: 2px;
}

.link-chevron {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
  transition: transform 0.22s ease, color 0.22s ease;
}

.link-card:hover .link-chevron {
  transform: translateX(3px);
  color: rgba(var(--glow), 0.9);
}

.footer-note {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.78rem;
  margin-top: 48px;
}

@media (max-width: 480px) {
  .links-page {
    padding: 40px 16px;
  }

  .avatar-ring {
    width: 92px;
    height: 92px;
  }

  h1 {
    font-size: 1.25rem;
    margin-top: 16px;
  }

  .handle {
    font-size: 0.82rem;
  }

  .tagline {
    font-size: 0.82rem;
    max-width: 280px;
    margin-top: 12px;
  }

  .link-list {
    margin-top: 28px;
    max-width: 100%;
    gap: 10px;
  }

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

  .link-left {
    gap: 11px;
  }

  .link-icon {
    width: 36px;
    height: 36px;
    font-size: 0.92rem;
    border-radius: 10px;
  }

  .link-label {
    font-size: 0.85rem;
  }

  .link-sub {
    font-size: 0.72rem;
  }

  .featured-badge {
    font-size: 0.56rem;
    padding: 1px 6px;
  }

  .footer-note {
    font-size: 0.72rem;
    margin-top: 36px;
    text-align: center;
  }
}

@media (max-width: 340px) {
  .link-label {
    font-size: 0.8rem;
  }

  .link-sub {
    font-size: 0.68rem;
  }

  /* on very narrow screens, badge drops to its own line instead of
     squeezing the name */
  .featured-badge {
    display: block;
    width: fit-content;
    margin: 3px 0 0;
  }
}

/* Respect users who've asked for less motion — skip the entrance
   animation, pulse, and rotating border, but keep everything visible */
@media (prefers-reduced-motion: reduce) {
  .link-card {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .avatar-ring {
    animation: none;
  }

  .link-card--featured::before,
  .link-card::before {
    animation: none;
  }
}

/* Larger phones / small tablets in between the two breakpoints above */
@media (min-width: 481px) and (max-width: 700px) {
  .link-list {
    max-width: 100%;
  }
}