/* ============================================================
   LINK IN BIO — Rodrigo Rocha (Premium Glass Edition)
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap");

:root {
  --bg-deep: #030308;
  --bg-main: #080812;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.06);
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #8b5cf6;
  --accent-light: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.3);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: "Outfit", system-ui, sans-serif;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ── Dynamic Animated Background ── */
.bg-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg-deep);
  overflow: hidden;
}

.bg-ambient::before,
.bg-ambient::after {
  content: "";
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  animation: float 20s infinite alternate ease-in-out;
}

.bg-ambient::before {
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -10%;
  left: -10%;
}

.bg-ambient::after {
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  bottom: -10%;
  right: -10%;
  animation-delay: -10s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(10%, 10%) scale(1.1);
  }
}

/* ── Card ── */
.card {
  width: 100%;
  max-width: 440px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 48px 32px 32px;
  box-shadow:
    0 24px 80px -12px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px var(--glass-border);
  animation: cardReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Profile ── */
.profile {
  text-align: center;
  margin-bottom: 40px;
}

.avatar-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: none;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.avatar-wrap::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  z-index: 1;
  animation: pulseRotate 8s linear infinite;
}

@keyframes pulseRotate {
  0% {
    transform: rotate(0deg) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: rotate(180deg) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: rotate(360deg) scale(1);
    opacity: 0.8;
  }
}

.verified-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  z-index: 3;
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.profile-name {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  background: linear-gradient(to bottom, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.profile-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  /* text-transform: uppercase; removed */
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.profile-title strong {
  color: var(--accent-light);
}

.profile-work {
  font-size: 0.95rem;
  color: var(--accent-light);
  font-weight: 600;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.icon-sm { font-size: 1.1rem; }
.company-name { opacity: 0.9; }

.profile-bio {
  font-size: 0.93rem;
  color: var(--text-muted);
  max-width: 340px;
  margin: 0 auto;
}

/* ── Tabs ── */
.tabs-wrap {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px;
  border-radius: 100px;
  border: 1px solid var(--glass-border);
  margin-bottom: 24px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 10px 12px;
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: #fff;
  color: #000;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* ── Link Items ── */
.links-panel {
  display: none;
}
.links-panel.active {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
  transform: translateY(15px);
  text-decoration: none;
  color: inherit;
}

.link-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.link-item:hover {
  background: var(--glass-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.02);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.3);
}

.link-text {
  flex: 1;
  min-width: 0;
}

.link-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-arrow {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.link-arrow svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  transition: var(--transition);
}

.link-item:hover .link-arrow {
  background: var(--accent);
}

.link-item:hover .link-arrow svg {
  stroke: #fff;
  transform: translate(2px, -2px);
}

/* ── Socials ── */
.socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
}

.social-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  transition: var(--transition);
  text-decoration: none;
}

.social-btn:hover {
  color: #fff;
  background: var(--accent-glow);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.social-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* ── Footer ── */
.card-footer {
  text-align: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
}

.footer-logo {
  max-height: 50px;
  width: auto;
  opacity: 0.6;
  transition: var(--transition);
  filter: brightness(0) invert(1);
}

.footer-logo:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 10px;
  border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  body {
    padding: 20px 12px 40px;
  }
  .card {
    padding: 40px 24px 24px;
    border-radius: var(--radius-lg);
  }
  .profile-name {
    font-size: 1.5rem;
  }
}
