:root {
  --page-bg: #191b1f;
  --card-bg: #000;
  --accent: #bb8773;
  --button-text: #f9f4f4;
  --profile-width: 580px;
  --gap: 14px;
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: Domine, Georgia, serif;
  background: var(--page-bg);
  color: #fff;
}

body.is-no-scroll {
  overflow: hidden;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr minmax(320px, var(--profile-width)) 1fr;
  align-items: start;
  padding-top: 40px;
}

.profile {
  width: 100%;
  min-height: calc(100vh - 40px);
  background: var(--card-bg);
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  box-shadow: 0 24px 32px rgba(0, 0, 0, 0.15);
}

.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 340px;
  max-height: var(--profile-width);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.22) 62%, rgba(0, 0, 0, 0.66) 80%, #000 100%);
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__controls {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
}

.icon-button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.78);
  color: #111;
  cursor: pointer;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  backdrop-filter: blur(3px);
}

.icon-button svg {
  width: 22px;
  height: 22px;
  fill: #151515;
}

.profile__content {
  padding: 0 calc(var(--gap) * 2) 24px;
}

.brand-logo {
  width: min(74%, 320px);
  margin: -22px auto 10px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 2;
}

.brand-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.profile__bio {
  margin: 0;
  padding: 0 calc(var(--gap) * 3);
  text-align: center;
  color: var(--accent);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.social {
  display: flex;
  justify-content: center;
  margin: 8px 0 18px;
}

.social a {
  color: var(--accent);
  text-decoration: none;
  padding: 8px;
  line-height: 0;
  transition: transform 0.15s ease;
}

.social a:hover {
  transform: scale(1.08);
}

.social svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.links {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.link {
  min-height: 64px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 10px 64px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--button-text);
  text-decoration: none;
  font-family: Inter, Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.link--thumb {
  padding-left: 72px;
}

.link__thumb {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 48px;
  height: 48px;
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.link__thumb--round {
  border-radius: 50%;
}

.link__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.link__title {
  width: 100%;
  text-align: center;
  padding-right: 22px;
}

.link__dots {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  opacity: 0.55;
  font-size: 20px;
  line-height: 1;
}

.profile__footer {
  margin: 52px 0 6px;
  text-align: center;
  color: #d6d6d6;
  opacity: 0.92;
  font-family: Inter, Arial, sans-serif;
  font-size: 12px;
}

.profile__brand {
  margin-top: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.qr-panel {
  align-self: end;
  justify-self: end;
  padding: 0 26px 18px 0;
  text-align: center;
  font-family: Inter, Arial, sans-serif;
  color: #fff;
}

.qr-panel__label {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
}

.qr-panel__image {
  width: 118px;
  height: 118px;
  padding: 6px;
  border-radius: 10px;
  background: #fff;
  display: block;
}

.share-modal[hidden] {
  display: none;
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.share-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(2px);
}

.share-dialog {
  position: relative;
  width: min(450px, 100%);
  border-radius: 16px;
  background: #f4f4f4;
  color: #111;
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  font-family: Inter, Arial, sans-serif;
}

.share-dialog__header {
  position: relative;
  padding: 18px 16px 14px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.share-dialog__header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.share-dialog__close {
  position: absolute;
  right: 10px;
  top: 8px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #555;
  font-size: 28px;
  cursor: pointer;
}

.share-card {
  margin: 0 16px 14px;
  padding: 18px 16px;
  border-radius: 20px;
  text-align: center;
  background: #4d311f;
  color: #fff;
}

.share-card__avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.45);
  object-fit: cover;
  display: block;
}

.share-card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.share-card__handle {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
}

.share-actions {
  display: flex;
  gap: 12px;
  padding: 2px 12px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.share-actions::-webkit-scrollbar {
  display: none;
}

.share-action {
  min-width: 56px;
  text-align: center;
  border: none;
  background: none;
  color: #111;
  font-size: 12px;
  font-weight: 500;
  font-family: Inter, Arial, sans-serif;
  cursor: pointer;
  padding: 0;
}

.share-action__circle {
  width: 56px;
  height: 56px;
  margin: 0 auto 7px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.share-action__circle svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.share-action--copy .share-action__circle {
  background: #e6e7df;
  color: #222;
}

.share-action--x .share-action__circle {
  background: #000;
}

.share-action--facebook .share-action__circle {
  background: #1877f2;
}

.share-action--whatsapp .share-action__circle {
  background: #25d366;
}

.share-action--linkedin .share-action__circle {
  background: #0a66c2;
  font-size: 22px;
}

.share-action--messenger .share-action__circle {
  background: #2d6df6;
}

.share-action--snap .share-action__circle {
  background: #fffc00;
  color: #111;
}

.icon-button:focus-visible,
.share-dialog__close:focus-visible,
.share-action:focus-visible,
.link:focus-visible,
.social a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 1150px) {
  .layout {
    grid-template-columns: 1fr minmax(320px, var(--profile-width)) 0;
  }

  .qr-panel {
    display: none;
  }
}

@media (max-width: 1024px) and (min-width: 641px) {
  .layout {
    padding-top: 22px;
  }

  .profile {
    min-height: calc(100vh - 22px);
  }

  .profile__content {
    padding: 0 20px 20px;
  }

  .brand-logo {
    width: min(72%, 300px);
    margin-top: -18px;
    margin-bottom: 10px;
  }

  .profile__bio {
    font-size: 15px;
    padding: 0 28px;
  }

  .links {
    margin-top: 18px;
  }
}

@media (max-width: 640px) {
  .layout {
    grid-template-columns: 100%;
    padding-top: 0;
  }

  .profile {
    min-height: 100vh;
    border-radius: 0;
  }

  .hero {
    height: calc(100vw - 80px);
    min-height: 300px;
    max-height: none;
    aspect-ratio: auto;
  }

  .profile__content {
    padding: 0 var(--gap) 16px;
  }

  .brand-logo {
    width: min(78%, 260px);
    margin-top: -16px;
    margin-bottom: 8px;
  }

  .profile__bio {
    padding: 0 calc(var(--gap) * 3);
  }

  .links {
    margin-top: 20px;
  }

  .link {
    font-size: 14px;
    padding: 10px 56px;
  }

  .link--thumb {
    padding-left: 64px;
  }

  .link__thumb {
    width: 44px;
    height: 44px;
    top: 10px;
  }

  .share-dialog {
    width: min(440px, 100%);
  }
}
