/* ============================================================
   Link in Bio — page-specific styles
   Reuses design tokens, canvas, cursor & theme toggle from styles.css
   ============================================================ */

.bio {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(4.5rem, 10vh, 7rem) 1.2rem 3rem;
  position: relative;
  z-index: 1;
}

/* ---------- Top bar (back link + theme toggle) ---------- */
.bio-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 5vw, 2rem);
}
.bio-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.bio-back:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.bio-back svg { transition: transform 0.3s var(--ease); }
.bio-back:hover svg { transform: translateX(-3px); }

/* ---------- Card ---------- */
.bio-card {
  width: 100%;
  max-width: 470px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(1.5rem, 5vw, 2.4rem);
  border: 1px solid var(--border);
  border-radius: 26px;
  background: color-mix(in srgb, var(--bg-soft) 55%, transparent);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.55);
}

/* ---------- Avatar with rotating halo ---------- */
.bio-avatar {
  position: relative;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
}
.bio-avatar::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  animation: spin 6s linear infinite;
  z-index: 0;
}
.bio-avatar::after {
  /* mask ring so the gradient shows only as a border */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--bg-soft);
  z-index: 1;
}
.bio-avatar__img {
  position: relative;
  z-index: 2;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-strong);
}
.bio-avatar__fallback {
  position: relative;
  z-index: 2;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: none;
  place-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 2.2rem;
  color: #06121a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.bio-avatar.is-empty .bio-avatar__fallback { display: grid; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .bio-avatar::before { animation: none; }
}

/* live status dot on avatar */
.bio-avatar__badge {
  position: absolute;
  z-index: 3;
  right: 4px;
  bottom: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

/* ---------- Identity ---------- */
.bio-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}
.bio-name b {
  font-weight: 700;
  background: linear-gradient(120deg, var(--accent), var(--accent-2) 55%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bio-handle {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}
.bio-handle .dot { color: var(--accent); margin: 0 0.35rem; }
.bio-blurb {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 34ch;
  margin: 0 auto 1.1rem;
}

/* availability + local-time pills */
.bio-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.6rem;
}
.bio-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.bio-pill__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2.4s infinite;
}

/* ---------- Link stack ---------- */
.bio-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.link {
  --brand: var(--accent);
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
  text-align: left;
}
.link::before {
  /* cursor-following spotlight, tinted by the link's brand color */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}
.link:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  background: var(--surface-strong);
}
.link:hover::before { opacity: 1; }

.link__icon {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.link:hover .link__icon {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 55%, var(--border));
  box-shadow: 0 0 22px -4px color-mix(in srgb, var(--brand) 65%, transparent);
  transform: scale(1.06);
}
.link__meta { position: relative; z-index: 1; display: flex; flex-direction: column; min-width: 0; }
.link__label { font-weight: 600; font-size: 0.98rem; color: var(--text); }
.link__sub {
  font-size: 0.78rem;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link__arrow {
  position: relative;
  z-index: 1;
  margin-left: auto;
  color: var(--text-faint);
  transition: color 0.35s var(--ease), transform 0.35s var(--ease);
}
.link:hover .link__arrow { color: var(--brand); transform: translate(3px, -3px); }

/* featured link: rotating gradient border */
.link--featured { border-color: transparent; }
.link--featured::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin 6s linear infinite;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .link--featured::after { animation: none; }
}

/* stagger reveal of the link rows */
.bio [data-reveal] { transition-delay: calc(var(--i, 0) * 0.05s); }

/* ---------- Compact social row ---------- */
.bio-mini {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.3rem;
}
.bio-mini a {
  --brand: var(--accent);
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.bio-mini a:hover {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 55%, var(--border));
  transform: translateY(-3px);
}

/* ---------- Share button ---------- */
.bio-share {
  margin-top: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.bio-share:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }

/* ---------- Footer ---------- */
.bio-foot {
  margin-top: 2rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--text-faint);
  text-align: center;
}
.bio-foot a { color: var(--text-muted); }
.bio-foot a:hover { color: var(--accent); }

/* ---------- Sections ---------- */
.bio-sections {
  width: 100%;
  max-width: 470px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 0.9rem;
}
.bio-section {
  width: 100%;
  padding: clamp(1.1rem, 4vw, 1.5rem);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: color-mix(in srgb, var(--bg-soft) 55%, transparent);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 20px 60px -30px rgba(0, 0, 0, 0.5);
}
.bio-section__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}
.bio-section__icon {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  font-size: 0.85rem;
}
.bio-section__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.bio-section__action {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.bio-section__action:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }

/* ---------- Spotify embed ---------- */
.spotify {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  min-height: 80px;
}
.spotify + .spotify { margin-top: 0.6rem; }
.spotify iframe { display: block; width: 100%; border: 0; }

/* ---------- Social grid ---------- */
.social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}
.social-card {
  --brand: var(--accent);
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.social-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  background: var(--surface-strong);
}
.social-card__icon {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.social-card:hover .social-card__icon {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 55%, var(--border));
  box-shadow: 0 0 18px -4px color-mix(in srgb, var(--brand) 65%, transparent);
}
.social-card__meta { display: flex; flex-direction: column; min-width: 0; }
.social-card__name { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.social-card__sub {
  font-size: 0.72rem;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 380px) { .social-grid { grid-template-columns: 1fr; } }

/* center the standalone share button */
.bio-share--center { margin: 0.4rem auto 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 20px);
  z-index: 300;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-soft) 85%, transparent);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast i { color: #34d399; }
