/* ============================================
   Andreas Bölian — Social Linktree
   ============================================ */

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

:root {
  --bg-deep: #0a0e1a;
  --bg-mid: #111832;
  --bg-light: #1a2444;
  --accent: #e89a78;
  --accent-soft: rgba(232, 154, 120, 0.12);
  --accent-glow: rgba(232, 154, 120, 0.3);
  --text-primary: #f2f2f7;
  --text-secondary: rgba(242, 242, 247, 0.6);
  --text-muted: rgba(242, 242, 247, 0.35);
  --card-border: rgba(255, 255, 255, 0.06);
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --shadow-soft: 0 2px 20px rgba(0, 0, 0, 0.3);
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
  font-family: var(--font);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(26, 36, 68, 0.8) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(20, 30, 60, 0.6) 0%, transparent 50%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Background Glows */
.bg-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 154, 120, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
  animation: glowFloat 8s ease-in-out infinite;
}

.bg-glow--bottom {
  top: auto;
  bottom: -20%;
  background: radial-gradient(circle, rgba(100, 120, 220, 0.08) 0%, transparent 70%);
  animation-delay: -4s;
  animation-duration: 10s;
}

@keyframes glowFloat {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.15); }
}

/* Container */
.container {
  position: relative;
  z-index: 1;
  max-width: 440px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2.5rem;
}

/* ---- Profile ---- */
.profile {
  text-align: center;
  margin-bottom: 1.75rem;
}

.avatar-ring {
  display: inline-block;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), #c97a5a, #d4836a, var(--accent));
  margin-bottom: 1rem;
  position: relative;
}

.avatar-ring::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--accent-glow), transparent, var(--accent-glow));
  z-index: -1;
  filter: blur(12px);
  animation: ringRotate 6s linear infinite;
}

@keyframes ringRotate {
  to { transform: rotate(360deg); }
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--bg-deep);
}

.name {
  font-family: 'Caveat', cursive;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  background: linear-gradient(135deg, #fff 20%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.claim {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 0.3rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---- Hero ---- */
.hero {
  text-align: center;
  margin-bottom: 2.25rem;
}

.hero-text {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-secondary);
}

.hero-line {
  display: block;
}

.hero-line--accent {
  color: var(--accent);
  font-weight: 500;
  font-style: italic;
}

.subline {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

/* ---- Links ---- */
.links {
  margin-bottom: 3rem;
}

.links-grid {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

/* Link Card */
.link-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0;
  border-radius: var(--radius-2xl);
  text-decoration: none;
  color: var(--text-primary);
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

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

/* Platform Color Bar */
.link-bar {
  width: 4px;
  align-self: stretch;
  border-radius: 0 0 0 0;
  flex-shrink: 0;
  transition: width var(--transition);
}

.link-card:hover .link-bar {
  width: 5px;
}

/* Platform Icon */
.link-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  transition: transform var(--transition);
}

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

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

/* Content */
.link-content {
  flex: 1;
  min-width: 0;
  padding: 0.9rem 0;
}

.link-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  display: block;
}

.link-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
  display: block;
  font-weight: 400;
}

/* Arrow */
.link-arrow {
  color: var(--text-muted);
  margin-right: 1rem;
  transition: color var(--transition), transform var(--transition);
  display: flex;
}

.link-arrow svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-card:hover .link-arrow {
  color: var(--text-secondary);
  transform: translateX(3px);
}

/* ---- Platform Colors ---- */
.platform-instagram .link-bar {
  background: linear-gradient(180deg, #F58529, #DD2A7B, #8134AF);
}
.platform-instagram .link-icon {
  background: linear-gradient(135deg, rgba(245, 133, 41, 0.15), rgba(221, 42, 123, 0.15));
}

.platform-tiktok .link-bar {
  background: linear-gradient(180deg, #25F4EE, #FE2C55);
}
.platform-tiktok .link-icon {
  background: linear-gradient(135deg, rgba(37, 244, 238, 0.12), rgba(254, 44, 85, 0.12));
}

.platform-spotify .link-bar {
  background: #1DB954;
}
.platform-spotify .link-icon {
  background: rgba(29, 185, 84, 0.12);
}

.platform-whatsapp .link-bar {
  background: #25D366;
}
.platform-whatsapp .link-icon {
  background: rgba(37, 211, 102, 0.12);
}

/* Hover glow per platform */
.platform-instagram:hover {
  box-shadow: 0 8px 32px rgba(221, 42, 123, 0.15), 0 0 0 1px rgba(221, 42, 123, 0.15);
}
.platform-tiktok:hover {
  box-shadow: 0 8px 32px rgba(254, 44, 85, 0.12), 0 0 0 1px rgba(37, 244, 238, 0.1);
}
.platform-spotify:hover {
  box-shadow: 0 8px 32px rgba(29, 185, 84, 0.15), 0 0 0 1px rgba(29, 185, 84, 0.15);
}
.platform-whatsapp:hover {
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.12), 0 0 0 1px rgba(37, 211, 102, 0.15);
}

/* ---- Music Player ---- */
.player-section {
  margin-bottom: 2.5rem;
  text-align: center;
}

.player-label {
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}

/* Carousel */
.player-carousel {
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
  margin: 0 auto 1rem;
  width: 100%;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.carousel-track {
  display: flex;
  align-items: center;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.carousel-track.dragging {
  transition: none;
}

.carousel-slide {
  flex: 0 0 60%;
  max-width: 60%;
  padding: 0 6px;
  transition: transform 0.45s ease, opacity 0.45s ease, filter 0.45s ease;
  opacity: 0.4;
  transform: scale(0.82);
  filter: blur(1.5px) brightness(0.6);
  cursor: pointer;
}

.carousel-slide.active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0) brightness(1);
  z-index: 2;
}

.cover-art {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.carousel-slide.active .cover-art {
  box-shadow: 0 12px 48px rgba(232, 154, 120, 0.2), 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Player Info */
.player-info {
  margin-bottom: 0.8rem;
}

.player-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.player-artist {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

/* Controls */
.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 0.8rem;
}

.player-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 50%;
  transition: color var(--transition), transform var(--transition), background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-btn:hover {
  color: var(--text-primary);
  transform: scale(1.1);
}

.player-btn:active {
  transform: scale(0.95);
}

.player-btn--prev svg,
.player-btn--next svg {
  width: 22px;
  height: 22px;
}

.player-btn--play {
  width: 52px;
  height: 52px;
  background: var(--accent);
  color: var(--bg-deep);
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(232, 154, 120, 0.35);
}

.player-btn--play:hover {
  color: var(--bg-deep);
  background: #f0a888;
  box-shadow: 0 6px 28px rgba(232, 154, 120, 0.5);
}

.player-btn--play svg {
  width: 24px;
  height: 24px;
}

.player-btn--play .icon-play {
  margin-left: 2px;
}

/* Progress Bar */
.progress-bar {
  width: 70%;
  max-width: 280px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin: 0 auto 0.4rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.progress-bar:hover {
  height: 6px;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.15s linear;
  position: relative;
}

/* Time */
.player-time {
  display: flex;
  justify-content: space-between;
  width: 70%;
  max-width: 280px;
  margin: 0 auto;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ---- Footer ---- */
.footer {
  text-align: center;
  padding-bottom: 2rem;
}

.footer-divider {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 0 auto 1.5rem;
  border-radius: 1px;
}

.footer-text {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-muted);
  font-weight: 300;
}

.footer-copy {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  opacity: 0.5;
}

/* ---- Fade-in Animations ---- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.link-card.fade-in {
  transition-delay: calc(var(--i, 0) * 0.08s);
}

/* ---- Focus ---- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---- Selection ---- */
::selection {
  background: var(--accent);
  color: var(--bg-deep);
}

/* ---- Responsive ---- */
@media (min-width: 640px) {
  .container {
    padding-top: 5rem;
    padding-bottom: 3rem;
  }

  .name {
    font-size: 3rem;
  }

  .hero-text {
    font-size: 1.15rem;
  }

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

@media (min-width: 768px) {
  .container {
    max-width: 480px;
  }
}

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

  .fade-in {
    opacity: 1;
    transform: none;
  }
}
