:root {
  --bg: #050505;
  --card: #0a0a0a;
  --surface: #161616;
  --surface-hover: #1e1e1e;
  --text: #ffffff;
  --muted: #a3a3a3;
  --accent: #e10600;
  --accent-soft: rgba(225, 6, 0, 0.28);
  --border: rgba(255, 255, 255, 0.1);
  --radius-shell: 1.35rem;
  --radius-btn: 1rem;
  --card-max: 26.5rem;
  --font: "Outfit", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --touch: 44px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: #000;
  line-height: 1.4;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

img {
  max-width: 100%;
  height: auto;
}

/* Blurred hero wallpaper — lighter on mobile for GPU */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;
  pointer-events: none;
}

.backdrop-img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130%;
  height: 130%;
  max-width: none;
  object-fit: cover;
  object-position: center 20%;
  transform: translate(-50%, -50%);
  /* Mobile: smaller blur = cheaper paint */
  filter: blur(28px) brightness(0.42) saturate(1.15);
  opacity: 1;
}

.backdrop-img[hidden] {
  display: none !important;
}

.backdrop-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.62) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.65) 100%);
}

.backdrop.is-fallback .backdrop-scrim {
  background: radial-gradient(ellipse 70% 50% at 50% 30%, rgba(225, 6, 0, 0.4), #050505 65%);
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding:
    max(0.65rem, var(--safe-top))
    max(0.65rem, var(--safe-right))
    max(1.25rem, calc(var(--safe-bottom) + 0.75rem))
    max(0.65rem, var(--safe-left));
}

/* Center profile card */
.card {
  width: min(100%, var(--card-max));
  background: var(--card);
  border-radius: var(--radius-shell);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(225, 6, 0, 0.06);
  animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Hero — leave room for links on short phones */
.hero {
  position: relative;
  width: 100%;
  height: clamp(12.5rem, 42vh, 22rem);
  background: #111;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  object-position: center 18%;
}

.hero-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 80% 60% at 50% 35%, rgba(225, 6, 0, 0.35), transparent 60%),
    linear-gradient(165deg, #1a1a1a 0%, #0a0a0a 50%, #1a0505 100%);
}

.hero-fallback[hidden] {
  display: none !important;
}

.hero-img[hidden] {
  display: none !important;
}

.hero-fallback span {
  font-size: clamp(3.25rem, 16vw, 5rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 0 48px rgba(225, 6, 0, 0.45);
}

.hero-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background: linear-gradient(to top, var(--card) 0%, transparent 100%);
  pointer-events: none;
}

.card-body {
  padding: 0.1rem 1rem 1.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  width: 100%;
  padding: 0 0.25rem;
}

.name-row {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-width: 100%;
  font-size: clamp(1.45rem, 6.5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  word-break: break-word;
}

.verified {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.handle {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Socials — 44px touch targets */
.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 0.05rem;
}

.social {
  width: var(--touch);
  height: var(--touch);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #111;
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
  transition:
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.18s ease;
}

.social:active {
  transform: scale(0.94);
}

@media (hover: hover) and (pointer: fine) {
  .social:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(225, 6, 0, 0.25);
  }
}

.social:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.social svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

.social[data-id="youtube"] {
  color: #ff0000;
}
.social[data-id="instagram"] {
  color: #e1306c;
}
.social[data-id="tiktok"] {
  color: #000;
}

/* Link cards */
.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.15rem;
}

.link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.95rem 1rem;
  min-height: var(--touch);
  border-radius: var(--radius-btn);
  background: var(--surface);
  border: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  text-align: left;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  transition:
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.link-card:active {
  transform: scale(0.985);
}

@media (hover: hover) and (pointer: fine) {
  .link-card:hover {
    transform: translateY(-2px);
    background: var(--surface-hover);
    border-color: rgba(225, 6, 0, 0.4);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  }

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

  .link-card.has-media:hover .link-media img {
    transform: scale(1.06);
  }
}

.link-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.link-card.is-accent {
  border-color: rgba(225, 6, 0, 0.55);
  background: linear-gradient(135deg, #1c0909 0%, #161616 50%, #1a0a0a 100%);
  box-shadow: 0 0 0 1px rgba(225, 6, 0, 0.1), 0 8px 24px rgba(225, 6, 0, 0.12);
}

/* Media cards */
.link-card.has-media {
  min-height: 7.25rem;
  padding: 0;
  align-items: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0d0d0d;
}

.link-card.has-media.is-accent {
  border-color: rgba(225, 6, 0, 0.45);
}

.link-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.link-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

.link-card.has-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.5) 48%,
    rgba(0, 0, 0, 0.18) 100%
  );
  pointer-events: none;
}

.link-card.has-media .link-copy,
.link-card.has-media .link-arrow {
  position: relative;
  z-index: 2;
}

.link-card.has-media .link-copy {
  padding: 0.9rem 0 0.9rem 1rem;
  min-width: 0;
}

.link-card.has-media .link-arrow {
  padding: 0.9rem 1rem 0.9rem 0;
  color: rgba(255, 255, 255, 0.75);
  align-self: flex-end;
}

.link-card.has-media .link-subtitle {
  color: rgba(255, 255, 255, 0.7);
}

.link-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  display: grid;
  place-items: center;
  background: rgba(225, 6, 0, 0.14);
  color: var(--accent);
}

.link-icon svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.link-title {
  display: block;
  font-weight: 650;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.link-subtitle {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.link-arrow {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.18s ease, color 0.18s ease;
}

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

.tagline {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
}

.tagline:empty {
  display: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Very small / short phones */
@media (max-height: 700px) {
  .hero {
    height: clamp(11rem, 36vh, 16rem);
  }

  .card-body {
    gap: 0.6rem;
    padding-bottom: 1.1rem;
  }

  .link-card.has-media {
    min-height: 6.5rem;
  }
}

@media (max-width: 360px) {
  .shell {
    padding-left: max(0.45rem, var(--safe-left));
    padding-right: max(0.45rem, var(--safe-right));
  }

  .card-body {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .link-title {
    font-size: 0.88rem;
  }
}

/* Tablet / desktop */
@media (min-width: 640px) {
  :root {
    --radius-shell: 1.75rem;
    --radius-btn: 1.15rem;
  }

  .shell {
    align-items: center;
    padding: 2rem max(1.25rem, var(--safe-right)) 2rem max(1.25rem, var(--safe-left));
  }

  .backdrop-img {
    width: 140%;
    height: 140%;
    filter: blur(52px) brightness(0.48) saturate(1.25);
    transform: translate(-50%, -50%) scale(1.08);
  }

  .hero {
    height: min(52vh, 26rem);
  }

  .card-body {
    padding: 0.15rem 1.35rem 1.75rem;
    gap: 0.85rem;
  }

  .link-card.has-media {
    min-height: 8.5rem;
  }

  .link-title {
    font-size: 0.98rem;
  }

  .name-row {
    font-size: clamp(1.65rem, 4vw, 1.95rem);
  }
}

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