/* Mobile-first. Desktop just gets a centered card fallback - see the
   min-width media query at the bottom. */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
}

body {
  min-height: 100dvh;
  background: #111;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  position: relative;
  overflow-x: hidden;
}

.backdrop {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #2a1f1a, #d8b59a, #1a1a1a);
  filter: blur(40px) saturate(1.2);
  transform: scale(1.2);
  z-index: 0;
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100dvh;
  margin: 0 auto;
  background: #0d0d0d;
  padding-bottom: env(safe-area-inset-bottom);
  overflow-x: hidden;
}

.profile {
  text-align: center;
  padding-bottom: clamp(12px, 4vw, 16px);
  padding-top: env(safe-area-inset-top);
}

.profile__avatar {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: #1a1a1a;
}

.profile__name {
  color: #fff;
  margin: 14px 16px 0;
  font-size: clamp(20px, 5.5vw, 26px);
  word-break: break-word;
}

.profile__handle {
  color: #999;
  margin: 2px 0 8px;
  font-size: clamp(13px, 3.5vw, 15px);
}

.profile__meta {
  color: #ddd;
  font-size: clamp(13px, 3.5vw, 15px);
  margin: 0 0 6px;
  padding: 0 16px;
}

.profile__status {
  color: #ccc;
  font-size: 12px;
  letter-spacing: 1px;
  margin: 0;
}

.profile__status.online::after {
  content: " 🟢";
}

.socials {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  padding: 0 16px;
}

.social-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}

.social-icon svg {
  width: 16px;
  height: 16px;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.link-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}

.link-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 320px;
  object-fit: cover;
  display: block;
  background: #1a1a1a;
}

.link-card__image--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(36px, 12vw, 48px);
  font-weight: bold;
  color: #555;
}

.link-card__icon {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  font-size: 16px;
}

.link-card__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  font-size: clamp(14px, 4vw, 16px);
  font-weight: 600;
  text-align: center;
}

.footer {
  text-align: center;
  color: #666;
  font-size: 11px;
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
}

/* Desktop fallback: we don't optimize beyond this. */
@media (min-width: 600px) {
  body {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .card {
    width: 420px;
    min-height: 0;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  }
}
