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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter",
    "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #fff;
  background: #08090c;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}

/* Backdrop = same image, full bleed (visible only on desktop where phone is centered) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("public/background.jpg") center/cover no-repeat;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: -1;
}

/* ----- Mobile: full-bleed card ----- */
.card {
  position: relative;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 56px 24px 40px;
  background: url("public/background.jpg") center/cover no-repeat;
  overflow: hidden;
  min-height: 100dvh;
}

/* Dark overlay inside the card for legibility */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.55) 60%,
    rgba(0, 0, 0, 0.7) 100%
  );
  z-index: 0;
  pointer-events: none;
}

.card > * {
  position: relative;
  z-index: 1;
}

.head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin-top: 8px;
}

.avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  background: #2a2a2e;
}

.name {
  margin: 6px 0 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.verified {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.bio {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  opacity: 0.88;
  max-width: 38ch;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.link {
  display: block;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  color: #0a0a0a;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  padding: 17px 20px;
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.18s ease, background 0.18s ease;
}

.link:hover,
.link:focus-visible {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  background: #fff;
  outline: none;
}

.link:active {
  transform: translateY(0) scale(0.99);
}

.socials {
  display: flex;
  gap: 28px;
  margin-top: auto;
  padding-top: 16px;
}

.footer {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 14px;
  padding-bottom: 4px;
}

.counter {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.counter #visit-count {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
}

.social {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0.92;
  transition: opacity 0.15s ease, transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.social:hover,
.social:focus-visible {
  opacity: 1;
  transform: translateY(-2px);
  outline: none;
}

.social svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* ----- Desktop: show card inside an iPhone-like frame ----- */
@media (min-width: 768px) {
  body {
    align-items: center;
    padding: 48px 20px;
  }

  /* Blur the page backdrop so the phone pops */
  body::before {
    filter: blur(28px) brightness(0.45) saturate(1.05);
    transform: scale(1.1);
  }
  body::after {
    background: rgba(0, 0, 0, 0.45);
  }

  .card {
    width: 390px;
    max-width: 390px;
    min-height: 0;
    height: min(844px, 92vh);
    border-radius: 52px;
    padding: 80px 26px 36px;
    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.06),
      0 0 0 12px #0c0c0e,
      0 40px 80px -20px rgba(0, 0, 0, 0.7),
      0 25px 50px -15px rgba(0, 0, 0, 0.5);
  }

  /* iPhone-style dynamic island / notch */
  .card::after {
    content: "";
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 32px;
    background: #000;
    border-radius: 20px;
    z-index: 3;
  }
}
