/* ============================================================
   LINK-IN-BIO — MASTER STYLESHEET
   ============================================================
   This file controls ALL visual styling for the landing page.
   Key sections are clearly marked so you can find and edit
   colors, sizes, and animations quickly.
   ============================================================ */


/* ============================================================
   § FONTS
   ============================================================
   We load two Google Fonts:
     • "Inter"   — used for body / card text
     • "Outfit"  — used for the profile name heading
   EDIT: swap these @import URLs if you prefer different fonts.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');


/* ============================================================
   § CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================
   EDIT these variables to quickly re‑theme the entire page.
   ============================================================ */
:root {
  /* ── Background ── */
  --bg-primary:       #0f1524;       /* dark blue‑gray page background   */
  --bg-secondary:     #141b2d;       /* slightly lighter panel tone      */

  /* ── Card Colors ── */
  --card-bg:          #1a1040;       /* deep royal purple card fill      */
  --card-bg-hover:    #22154d;       /* slightly lighter on hover        */
  --card-border:      #c9a84c;       /* thin gold border                 */
  --card-border-hover:#e2c366;       /* brighter gold on hover           */

  /* ── Gold Accent ── */
  --gold:             #c9a84c;
  --gold-light:       #e2c366;
  --gold-glow:        rgba(201, 168, 76, 0.25);

  /* ── Text ── */
  --text-primary:     #f0ece4;       /* warm off‑white                   */
  --text-secondary:   #a8a0b8;       /* muted lavender                   */
  --text-muted:       #6b6380;


  /* ── Misc ── */
  --radius:           14px;
  --transition-base:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ============================================================
   § RESET & BASE
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}


/* ============================================================
   § AMBIENT BACKGROUND PARTICLES (Pure CSS)
   ============================================================
   Creates soft, floating "space dust" dots that drift infinitely
   across the dark background. Fully GPU‑accelerated via
   transform + will‑change so it stays smooth on mobile.

   The particles are generated with a single element that uses
   multiple radial‑gradient backgrounds, each animated with a
   different keyframe to look organic.
   ============================================================ */

/* — Particle Layer 1 (small, slow) — */
.particles-layer-1 {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particles-layer-1::before,
.particles-layer-1::after {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  will-change: transform;
}

/* Small bright dots — luminous celestial dust */
.particles-layer-1::before {
  background-image:
    radial-gradient(1.5px 1.5px at  80px  120px, rgba(201,168,76,0.70) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 260px  340px, rgba(201,168,76,0.55) 50%, transparent 100%),
    radial-gradient(2px 2px at 420px  90px, rgba(255,255,255,0.50) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 580px 260px, rgba(201,168,76,0.60) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 150px 450px, rgba(255,255,255,0.40) 50%, transparent 100%),
    radial-gradient(2px 2px at 700px 180px, rgba(201,168,76,0.50) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 350px 550px, rgba(255,255,255,0.45) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 500px 400px, rgba(201,168,76,0.48) 50%, transparent 100%),
    radial-gradient(2px 2px at  50px 600px, rgba(201,168,76,0.58) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 640px 520px, rgba(255,255,255,0.38) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 200px 700px, rgba(201,168,76,0.42) 50%, transparent 100%),
    radial-gradient(2px 2px at 480px 650px, rgba(255,255,255,0.35) 50%, transparent 100%);
  background-size: 750px 800px;
  animation: drift-slow 90s linear infinite;
}

/* Medium glow dots — brighter celestial dust */
.particles-layer-1::after {
  background-image:
    radial-gradient(2.5px 2.5px at 120px  200px, rgba(201,168,76,0.60) 50%, transparent 100%),
    radial-gradient(2.5px 2.5px at 380px  100px, rgba(255,255,255,0.45) 50%, transparent 100%),
    radial-gradient(3px 3px at 600px 350px, rgba(201,168,76,0.50) 50%, transparent 100%),
    radial-gradient(2.5px 2.5px at 200px  500px, rgba(255,255,255,0.38) 50%, transparent 100%),
    radial-gradient(2.5px 2.5px at 500px  600px, rgba(201,168,76,0.55) 50%, transparent 100%),
    radial-gradient(3px 3px at  60px 300px, rgba(201,168,76,0.42) 50%, transparent 100%),
    radial-gradient(2.5px 2.5px at 450px 150px, rgba(255,255,255,0.40) 50%, transparent 100%),
    radial-gradient(2.5px 2.5px at 700px 500px, rgba(201,168,76,0.48) 50%, transparent 100%);
  background-size: 800px 750px;
  animation: drift-medium 70s linear infinite reverse;
}

/* — Particle Layer 2 (larger, subtle) — */
.particles-layer-2 {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particles-layer-2::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  will-change: transform;
  background-image:
    radial-gradient(3.5px 3.5px at 300px 250px, rgba(201,168,76,0.32) 50%, transparent 100%),
    radial-gradient(3px 3px at 100px 400px, rgba(255,255,255,0.25) 50%, transparent 100%),
    radial-gradient(3.5px 3.5px at 550px 150px, rgba(201,168,76,0.28) 50%, transparent 100%),
    radial-gradient(3px 3px at 400px 500px, rgba(255,255,255,0.22) 50%, transparent 100%),
    radial-gradient(3.5px 3.5px at 650px 400px, rgba(201,168,76,0.26) 50%, transparent 100%);
  background-size: 900px 700px;
  animation: drift-large 120s linear infinite;
}

@keyframes drift-slow {
  from { transform: translate(0, 0); }
  to   { transform: translate(-375px, -400px); }
}

@keyframes drift-medium {
  from { transform: translate(0, 0); }
  to   { transform: translate(-400px, -375px); }
}

@keyframes drift-large {
  from { transform: translate(0, 0); }
  to   { transform: translate(-450px, -350px); }
}



/* ============================================================
   § AMBIENT BACKGROUND GRADIENT
   ============================================================
   A very subtle radial glow behind the main content area.
   ============================================================ */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 600px 400px at 50% 25%, rgba(26, 16, 64, 0.50) 0%, transparent 70%),
    radial-gradient(ellipse 400px 600px at 30% 70%, rgba(201,168,76,0.03) 0%, transparent 60%),
    radial-gradient(ellipse 400px 600px at 70% 60%, rgba(201,168,76,0.02) 0%, transparent 60%);
}


/* ============================================================
   § MAIN CONTAINER
   ============================================================
   Centers the card column on desktop (max‑width ≈ 450px)
   while filling the screen on mobile.
   ============================================================ */
.container {
  position: relative;
  z-index: 1;
  max-width: 450px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  min-height: 100vh;
}


/* ============================================================
   § PROFILE SECTION
   ============================================================
   Circular avatar with gold ring, display name, and bio text.
   ============================================================ */
.profile {
  text-align: center;
  margin-bottom: 36px;
  animation: fadeInUp 0.6s ease-out both;
}

/* ── EDIT AVATAR SIZE HERE ── */
.avatar-wrapper {
  width: 120px;
  height: 120px;
  margin: 0 auto 18px;
  position: relative;
}

/* Gold ring around the avatar */
.avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow:
    0 0 14px var(--gold-glow),
    inset 0 0 14px var(--gold-glow);
  animation: ringPulse 4s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { box-shadow: 0 0 14px var(--gold-glow), inset 0 0 14px var(--gold-glow); }
  50%      { box-shadow: 0 0 22px var(--gold-glow), inset 0 0 22px var(--gold-glow); }
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--bg-secondary);
}

/* ── Profile Name ── */
.profile-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.55rem;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

/* ── Profile Bio ── */
.profile-bio {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.55;
  font-weight: 400;
}


/* ============================================================
   § LINK CARDS
   ============================================================
   Every card uses:
     • Solid deep royal purple background (no pattern)
     • Transparent border that fades to gold on hover / tap
     • Holographic sweep ::before pseudo‑element on hover
     • Scale‑up to 1.05 with golden glow on hover
     • Staggered fade‑in on page load
   ============================================================ */
.links-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background-color: var(--card-bg);
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-primary);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.5s ease;
}

/* ── Holographic Sweep (::before pseudo‑element) ──
   A rotated translucent gold‑to‑white gradient that sits
   hidden (opacity: 0) and sweeps downward on hover via
   translateY(100%). Uses the snippet's physics with our
   royal‑purple / gold palette. */
.link-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    0deg,
    transparent,
    transparent 30%,
    rgba(212, 175, 55, 0.18) 60%,
    rgba(255, 255, 255, 0.10) 80%,
    rgba(212, 175, 55, 0.12)
  );
  transform: rotate(-45deg);
  transition: all 0.5s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

/* ── Staggered Fade‑In Keyframes ── */
.link-card:nth-child(1) { animation: fadeInUp 0.5s ease-out 0.15s both; }
.link-card:nth-child(2) { animation: fadeInUp 0.5s ease-out 0.30s both; }
.link-card:nth-child(3) { animation: fadeInUp 0.5s ease-out 0.45s both; }
.link-card:nth-child(4) { animation: fadeInUp 0.5s ease-out 0.60s both; }
.link-card:nth-child(5) { animation: fadeInUp 0.5s ease-out 0.75s both; }
.link-card:nth-child(6) { animation: fadeInUp 0.5s ease-out 0.90s both; }
.link-card:nth-child(7) { animation: fadeInUp 0.5s ease-out 1.05s both; }
.link-card:nth-child(8) { animation: fadeInUp 0.5s ease-out 1.20s both; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Hover State (PC) ──
   Gold border fades in, card scales up to 1.05,
   soft golden glow radiates outward. */
.link-card:hover,
.link-card:focus-visible {
  transform: scale(1.05);
  border-color: var(--card-border);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* Holographic sweep activates on hover */
.link-card:hover::before,
.link-card:focus-visible::before {
  opacity: 1;
  transform: rotate(-45deg) translateY(100%);
}

/* ── Active / Tap State (Mobile) ──
   Same gold border + glow effect for touch devices. */
.link-card:active {
  transform: scale(1.05);
  border-color: var(--card-border);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.link-card:active::before {
  opacity: 1;
  transform: rotate(-45deg) translateY(100%);
}

/* ── Card Icon ── */
.card-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.card-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--gold);
  transition: fill var(--transition-base);
}

.link-card:hover .card-icon svg {
  fill: var(--gold-light);
}

/* ── Card Text ── */
.card-text {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.card-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ── Card Arrow ── */
.card-arrow {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 2;
  opacity: 0.4;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.card-arrow svg {
  width: 100%;
  height: 100%;
  fill: var(--text-secondary);
}

.link-card:hover .card-arrow {
  opacity: 0.8;
  transform: translateX(3px);
}


/* ============================================================
   § DISABLED CARD STATE & TOOLTIP WRAPPER
   ============================================================ */

/* ── Positioning Context Wrapper ── */
.disabled-card-wrapper {
  position: relative;
  width: 100%;
}

/* ── Inactive Visual Styling ── */
.disabled-card {
  background-color: #0d0822 !important; /* Darker, desaturated purple */
  cursor: default !important;
}

.disabled-card .card-icon,
.disabled-card .card-text,
.disabled-card .card-arrow {
  opacity: 0.6 !important;
}

/* Disable Hover Scales, Borders, and Glows */
.disabled-card:hover,
.disabled-card:focus-visible,
.disabled-card:active {
  transform: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  background-color: #0d0822 !important;
  cursor: default !important;
}

.disabled-card:hover .card-arrow,
.disabled-card:focus-visible .card-arrow {
  opacity: 0.6 !important;
  transform: none !important;
}

.disabled-card:hover .card-icon svg,
.disabled-card:focus-visible .card-icon svg {
  fill: var(--gold) !important;
}

/* Disable Holographic Shine Sweep */
.disabled-card::before {
  display: none !important;
}

/* ── Tooltip Bubble Styling ── */
.disabled-card-wrapper .tooltip-bubble {
  position: absolute;
  top: 50%;
  right: 16px; /* Right-aligned inside card area on mobile to prevent horizontal overflow */
  transform: translateY(-50%);
  background-color: #f5f5f7; /* Off-white / light silver */
  color: #1d1d1f; /* Crisp dark text */
  padding: 5px 11px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
  z-index: 100; /* High z-index to overlay background elements securely */
}

/* Show Tooltip smoothly only when hovering over or focusing the card */
.disabled-card:hover + .tooltip-bubble,
.disabled-card:focus-visible + .tooltip-bubble,
.disabled-card:active + .tooltip-bubble {
  opacity: 1;
  visibility: visible;
}

/* Desktop Tooltip Positioning & Pointer Triangle */
@media (min-width: 768px) {
  /* Position tooltip bubble outside the card to the right */
  .disabled-card-wrapper .tooltip-bubble {
    right: auto;
    left: calc(100% + 12px);
  }

  /* Add pointer triangle pointing to the card */
  .disabled-card-wrapper .tooltip-bubble::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -4px; /* Protrudes 4px to the left of the tooltip bubble */
    transform: translateY(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background-color: #f5f5f7;
    pointer-events: none;
    z-index: -1;
  }
}




/* ============================================================
   § FOOTER
   ============================================================ */
.footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  animation: fadeInUp 0.5s ease-out 1.0s both;
}

.footer p {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.footer a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer a:hover {
  color: var(--gold-light);
}


/* ============================================================
   § RESPONSIVE — TABLET (≥ 480px)
   ============================================================ */
@media (min-width: 480px) {
  .container {
    padding: 50px 24px 70px;
  }

  .avatar-wrapper {
    width: 130px;
    height: 130px;
  }

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

  .link-card {
    padding: 18px 22px;
  }
}


/* ============================================================
   § RESPONSIVE — DESKTOP (≥ 768px)
   ============================================================
   On larger screens the container stays at 450px centered,
   creating the "dashboard widget" look.
   ============================================================ */
@media (min-width: 768px) {
  .container {
    padding: 60px 0 80px;
  }

  .avatar-wrapper {
    width: 140px;
    height: 140px;
  }

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

  .link-card {
    padding: 18px 24px;
    gap: 16px;
  }

  .card-icon svg {
    width: 30px;
    height: 30px;
  }
}


/* ============================================================
   § ACCESSIBILITY — Reduced Motion
   ============================================================
   Disables all animations for users who prefer reduced motion.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
