/* ===========================
   LINK-IN-BIO — Premium Design
   =========================== */

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

:root {
  /* Color Palette — rich, warm-to-cool gradient feel */
  --clr-bg-start: #0a0015;
  --clr-bg-end: #0d1b2a;
  --clr-card-bg: rgba(255, 255, 255, 0.06);
  --clr-card-border: rgba(255, 255, 255, 0.1);
  --clr-text-primary: #f0edf6;
  --clr-text-secondary: rgba(240, 237, 246, 0.65);
  --clr-accent-1: #e040fb; /* magenta */
  --clr-accent-2: #7c4dff; /* deep purple */
  --clr-accent-3: #00e5ff; /* cyan */
  --clr-accent-4: #ff6d00; /* amber */

  /* Button Palette */
  --btn-youtube: #ff1744;
  --btn-instagram: linear-gradient(
    135deg,
    #f09433,
    #e6683c,
    #dc2743,
    #cc2366,
    #bc1888
  );
  --btn-tiktok: #00f2ea;
  --btn-twitter: #f0edf6;
  --btn-website: #7c4dff;

  /* Typography */
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;

  /* Sizing */
  --avatar-size: 120px;
  --btn-radius: 16px;
  --card-radius: 28px;
  --container-max: 440px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--clr-text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Animated Background --- */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: linear-gradient(
    135deg,
    #0a0015 0%,
    #1a0030 20%,
    #0d1b2a 40%,
    #0a2540 60%,
    #1a0030 80%,
    #0a0015 100%
  );
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  25% {
    background-position: 100% 0%;
  }
  50% {
    background-position: 100% 100%;
  }
  75% {
    background-position: 0% 100%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
}

/* Floating Orbs */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.orb-1 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--clr-accent-1), transparent 70%);
  top: -10%;
  left: -10%;
  animation: orbFloat1 18s ease-in-out infinite;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--clr-accent-3), transparent 70%);
  bottom: -5%;
  right: -8%;
  animation: orbFloat2 22s ease-in-out infinite;
}

.orb-3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--clr-accent-2), transparent 70%);
  top: 40%;
  left: 50%;
  animation: orbFloat3 16s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(60px, 80px) scale(1.15);
  }
  66% {
    transform: translate(-40px, 50px) scale(0.9);
  }
}

@keyframes orbFloat2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-50px, -60px) scale(1.1);
  }
  66% {
    transform: translate(30px, -40px) scale(0.95);
  }
}

@keyframes orbFloat3 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(40px, -50px) scale(1.2);
  }
  66% {
    transform: translate(-60px, 30px) scale(0.85);
  }
}

/* --- Container & Card --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  padding: 32px 20px;
  margin: 0 auto;
}

.card {
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  background: var(--clr-card-bg);
  border: 1px solid var(--clr-card-border);
  border-radius: var(--card-radius);
  padding: 40px 28px 32px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: cardReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
  transform: translateY(24px);
}

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

/* --- Profile Section --- */
.profile-section {
  text-align: center;
  margin-bottom: 32px;
}

.avatar-ring {
  width: calc(var(--avatar-size) + 8px);
  height: calc(var(--avatar-size) + 8px);
  border-radius: 50%;
  margin: 0 auto 20px;
  padding: 4px;
  background: linear-gradient(
    135deg,
    var(--clr-accent-1),
    var(--clr-accent-2),
    var(--clr-accent-3),
    var(--clr-accent-4)
  );
  background-size: 300% 300%;
  animation: ringRotate 4s linear infinite;
  box-shadow: 0 0 30px rgba(224, 64, 251, 0.3);
}

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

.avatar {
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--clr-bg-start);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.avatar:hover {
  transform: scale(1.05);
}

.profile-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  background: linear-gradient(
    135deg,
    var(--clr-text-primary),
    var(--clr-accent-3)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-bio {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--clr-text-secondary);
  max-width: 320px;
  margin: 0 auto;
}

/* --- Link Buttons --- */
.links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.link-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--btn-radius);
  text-decoration: none;
  color: var(--clr-text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  animation: btnSlideIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
  transform: translateX(-20px);
}

.link-btn:nth-child(1) {
  animation-delay: 0.2s;
}
.link-btn:nth-child(2) {
  animation-delay: 0.32s;
}
.link-btn:nth-child(3) {
  animation-delay: 0.44s;
}
.link-btn:nth-child(4) {
  animation-delay: 0.56s;
}
.link-btn:nth-child(5) {
  animation-delay: 0.68s;
}

@keyframes btnSlideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Shimmer hover effect */
.link-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.06),
    transparent
  );
  transition: left 0.5s ease;
}

.link-btn:hover::before {
  left: 100%;
}

.link-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.link-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Individual button accent colors */
#btn-youtube {
  border-color: rgba(255, 23, 68, 0.25);
}
#btn-youtube:hover {
  background: rgba(255, 23, 68, 0.15);
  box-shadow: 0 8px 24px rgba(255, 23, 68, 0.2);
}
#btn-youtube .link-icon {
  color: var(--btn-youtube);
}

#btn-instagram {
  border-color: rgba(225, 48, 108, 0.25);
}
#btn-instagram:hover {
  background: rgba(225, 48, 108, 0.15);
  box-shadow: 0 8px 24px rgba(225, 48, 108, 0.2);
}
#btn-instagram .link-icon {
  color: #e1306c;
}

#btn-tiktok {
  border-color: rgba(0, 242, 234, 0.2);
}
#btn-tiktok:hover {
  background: rgba(0, 242, 234, 0.1);
  box-shadow: 0 8px 24px rgba(0, 242, 234, 0.15);
}
#btn-tiktok .link-icon {
  color: var(--btn-tiktok);
}

#btn-twitter {
  border-color: rgba(240, 237, 246, 0.15);
}
#btn-twitter:hover {
  background: rgba(240, 237, 246, 0.08);
  box-shadow: 0 8px 24px rgba(240, 237, 246, 0.1);
}
#btn-twitter .link-icon {
  color: var(--btn-twitter);
}

#btn-website {
  border-color: rgba(124, 77, 255, 0.25);
}
#btn-website:hover {
  background: rgba(124, 77, 255, 0.15);
  box-shadow: 0 8px 24px rgba(124, 77, 255, 0.2);
}
#btn-website .link-icon {
  color: var(--btn-website);
}

.link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.3s ease;
}

.link-btn:hover .link-icon {
  transform: rotate(-5deg) scale(1.1);
}

.link-label {
  flex: 1;
  text-align: left;
}

.link-arrow {
  font-size: 1.1rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s ease;
  color: var(--clr-text-secondary);
}

.link-btn:hover .link-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding-top: 8px;
  animation: fadeIn 1s ease 1s forwards;
  opacity: 0;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.footer p {
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--clr-text-secondary);
  letter-spacing: 0.04em;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .container {
    padding: 20px 12px;
  }

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

  :root {
    --avatar-size: 100px;
  }

  .profile-name {
    font-size: 1.65rem;
  }

  .profile-bio {
    font-size: 0.88rem;
  }

  .link-btn {
    padding: 14px 16px;
    font-size: 0.9rem;
    gap: 12px;
  }

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

  .link-icon svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 360px) {
  .card {
    padding: 24px 14px 20px;
  }

  .link-btn {
    padding: 12px 14px;
  }
}

/* --- Accessible Focus States --- */
.link-btn:focus-visible {
  outline: 2px solid var(--clr-accent-3);
  outline-offset: 3px;
}

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