:root {
  --bio-bg: #0a0807;
  --bio-surface: #14100c;
  --bio-elevated: #1c1813;
  --bio-gold: #d4af37;
  --bio-gold-bright: #f5d77a;
  --bio-text: #f5ecd6;
  --bio-muted: #c9b88c;
  --bio-radius: 10px;
  --bio-image: url('/hero-necklace.webp');
  --heading-font: 'Reem Kufi', sans-serif;
  --body-font: 'Tajawal', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bio-bg); }

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--bio-bg);
  color: var(--bio-text);
  font-family: var(--body-font);
  line-height: 1.65;
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.bio-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 8%, color-mix(in srgb, var(--bio-gold) 13%, transparent), transparent 30%),
    radial-gradient(circle at 14% 74%, color-mix(in srgb, var(--bio-gold) 5%, transparent), transparent 28%),
    linear-gradient(180deg, #090706 0%, var(--bio-bg) 54%, #070605 100%);
}

body.has-image .bio-scene { opacity: 1; }

.bio-shell {
  position: relative;
  width: min(calc(100% - 28px), 660px);
  max-width: 100%;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 0 max(36px, env(safe-area-inset-bottom));
}

.hero-showcase,
.primary-wrap,
.link-groups,
.bio-footer {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
}

.hero-showcase {
  position: relative;
  min-height: clamp(440px, 72svh, 590px);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid color-mix(in srgb, var(--bio-gold) 30%, transparent);
  border-radius: 14px;
  background: #120d08;
  animation: showcase-enter 720ms cubic-bezier(.16, 1, .3, 1) both;
}

.hero-product {
  position: absolute;
  inset: 0;
  z-index: -3;
  background: var(--bio-image) 62% center / cover no-repeat;
  transform: scale(1.025);
  animation: product-settle 1100ms cubic-bezier(.16, 1, .3, 1) both;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(4, 3, 2, .08) 0%, rgba(5, 4, 3, .14) 33%, rgba(7, 5, 3, .9) 78%, #090706 100%),
    linear-gradient(90deg, rgba(4, 3, 2, .28), transparent 48%);
}

.hero-showcase::after {
  content: '';
  position: absolute;
  inset: 8px;
  z-index: -1;
  border: 1px solid color-mix(in srgb, var(--bio-gold-bright) 24%, transparent);
  border-radius: 9px;
  pointer-events: none;
}

.hero-showcase::before {
  content: '';
  position: absolute;
  inset: -28% auto -28% -36%;
  z-index: 1;
  width: 32%;
  background: linear-gradient(90deg, transparent, rgba(255, 226, 151, .16), transparent);
  transform: skewX(-12deg) translateX(0);
  pointer-events: none;
  animation: showcase-light 1200ms 220ms cubic-bezier(.16, 1, .3, 1) both;
}

.bio-actions {
  position: absolute;
  inset: 14px 14px auto auto;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-action {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--bio-gold-bright) 48%, transparent);
  border-radius: 50%;
  color: var(--bio-gold-bright);
  background: rgba(10, 8, 7, .72);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1), border-color 180ms ease, background 180ms ease;
}

.icon-action:hover { transform: translateY(-2px); border-color: var(--bio-gold-bright); background: rgba(20, 16, 12, .92); }
.icon-action svg { width: 21px; height: 21px; }
.icon-action:active { transform: scale(.94); transition-duration: 100ms; }
.icon-action:hover svg { transform: scale(1.08); }
.icon-action svg { transition: transform 180ms cubic-bezier(.22, 1, .36, 1); }

.profile-head {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: end;
  gap: 12px 15px;
  padding: 34px 28px 24px;
  text-align: right;
  min-width: 0;
}

.profile-logo {
  display: block;
  width: 82px;
  height: 82px;
  object-fit: contain;
  padding: 5px;
  border: 1px solid color-mix(in srgb, var(--bio-gold-bright) 48%, transparent);
  border-radius: 50%;
  background: rgba(8, 6, 4, .84);
  animation: seal-reveal 640ms 240ms cubic-bezier(.16, 1, .3, 1) both;
}

.profile-copy { min-width: 0; animation: copy-reveal 600ms 320ms cubic-bezier(.16, 1, .3, 1) both; }

.profile-head h1 {
  margin: 0;
  color: var(--bio-text);
  font-family: var(--heading-font);
  font-size: clamp(1.45rem, 5vw, 2rem);
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.profile-tagline { margin: 5px 0 0; color: var(--bio-gold-bright); font-size: .96rem; font-weight: 700; }
.profile-description { max-width: 40ch; margin: 3px 0 0; color: var(--bio-text); font-size: .84rem; opacity: .82; text-wrap: pretty; }

.social-quick {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 0;
}

.social-quick a {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--bio-gold-bright) 38%, transparent);
  border-radius: 50%;
  color: var(--bio-gold-bright);
  background: rgba(12, 9, 6, .72);
  text-decoration: none;
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1), background 180ms ease;
  animation: icon-arrive 420ms calc(420ms + var(--i, 0) * 45ms) cubic-bezier(.16, 1, .3, 1) both;
}

.social-quick a:hover { transform: translateY(-2px); background: rgba(28, 24, 19, .94); }
.social-quick svg { width: 22px; height: 22px; }
.social-quick a:active { transform: scale(.93); transition-duration: 100ms; }
.social-quick a:hover svg { transform: scale(1.1); }
.social-quick svg { transition: transform 180ms cubic-bezier(.22, 1, .36, 1); }
.social-quick a[data-icon="whatsapp"] { border-color: #25d366; color: #fff; background: #25d366; }
.social-quick a[data-icon="instagram"] { border-color: #d946ef; color: #fff; background: linear-gradient(135deg, #833ab4, #fd1d1d 58%, #fcb045); }
.social-quick a[data-icon="tiktok"] { border-color: #25f4ee; color: #fff; background: #090909; box-shadow: inset 2px 0 #fe2c55, inset -2px 0 #25f4ee; }
.social-quick a[data-icon="snapchat"] { border-color: #fffc00; color: #090909; background: #fffc00; }

.primary-wrap { margin-block: 12px 18px; }

.primary-link {
  position: relative;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 12px;
  color: #171108;
  background: var(--bio-gold-bright);
  box-shadow: 0 4px 8px color-mix(in srgb, var(--bio-gold) 24%, transparent);
  font-size: 1.08rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1), filter 180ms ease;
  isolation: isolate;
  overflow: hidden;
}

.primary-link:hover { transform: translateY(-2px); filter: brightness(1.04); }
.primary-link svg { width: 23px; height: 23px; }
.primary-link:active { transform: scale(.985); transition-duration: 100ms; }
.primary-icon { display: grid; place-items: center; animation: primary-icon-in 540ms 500ms cubic-bezier(.16, 1, .3, 1) both; }
.primary-link[data-icon="whatsapp"] .primary-icon { width: 36px; height: 36px; border-radius: 50%; color: #fff; background: #128c4b; }
.primary-link:hover .primary-icon { transform: translateX(-3px); }
.primary-link::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 -42%;
  z-index: -1;
  width: 32%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.32), transparent);
  transform: skewX(-14deg);
  animation: primary-gleam 900ms 720ms cubic-bezier(.16, 1, .3, 1) both;
}

.link-groups { display: grid; gap: 24px; }
.link-group, .link-stack { width: 100%; max-width: 100%; min-width: 0; }

.link-group h2 {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: max-content minmax(24px, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding-inline: 1px;
  color: var(--bio-text);
  font-family: var(--heading-font);
  font-size: 1rem;
  line-height: 1.5;
  direction: rtl;
}

.link-group h2 span {
  min-width: 0;
  white-space: nowrap;
}

.link-group h2::after {
  content: '';
  width: 100%;
  min-width: 0;
  height: 1px;
  background: color-mix(in srgb, var(--bio-gold) 35%, transparent);
}

.link-stack { display: grid; gap: 9px; }
.link-group:first-child .link-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.link-group:first-child .link-stack > .bio-link { height: 100%; }

.bio-link {
  position: relative;
  min-height: 58px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 24px;
  align-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--bio-gold) 20%, transparent);
  border-radius: min(var(--bio-radius), 12px);
  color: var(--bio-text);
  background: var(--bio-surface);
  text-decoration: none;
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1), background 180ms ease, border-color 180ms ease;
  animation: link-arrive 440ms calc(520ms + var(--i, 0) * 42ms) cubic-bezier(.16, 1, .3, 1) both;
}

.bio-link:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--bio-gold) 55%, transparent); background: var(--bio-elevated); }
.link-group:first-child .bio-link { min-height: 86px; grid-template-columns: 48px minmax(0, 1fr) 22px; border-color: color-mix(in srgb, var(--bio-gold) 42%, transparent); background: var(--bio-elevated); }
.link-group:first-child .link-icon { background: var(--bio-gold-bright); }

.link-icon { align-self: stretch; display: grid; place-items: center; color: #171108; background: var(--bio-gold); }
.link-icon svg { width: 22px; height: 22px; }
.link-icon img { width: 100%; height: 100%; object-fit: cover; }
.link-copy { min-width: 0; padding: 10px 12px; }
.link-copy strong { display: block; overflow-wrap: anywhere; font-size: .96rem; line-height: 1.55; }
.link-copy small { display: block; margin-top: 1px; color: var(--bio-muted); font-size: .78rem; }
.link-arrow { width: 100%; display: grid; place-items: center; color: var(--bio-gold-bright); text-align: center; }
.link-arrow svg { width: 17px; height: 17px; stroke-width: 2; }
.link-icon svg, .link-arrow { transition: transform 180ms cubic-bezier(.22, 1, .36, 1); }
.bio-link:hover .link-icon svg { transform: rotate(-6deg) scale(1.08); }
.bio-link:hover .link-arrow { transform: translateX(-3px); }
.bio-link:active { transform: scale(.985); transition-duration: 100ms; }
.bio-link[data-icon="whatsapp"] .link-icon { color: #fff; background: #25d366; }
.bio-link[data-icon="instagram"] .link-icon { color: #fff; background: linear-gradient(135deg, #833ab4, #fd1d1d 58%, #fcb045); }
.bio-link[data-icon="tiktok"] .link-icon { color: #fff; background: #090909; box-shadow: inset 3px 0 #fe2c55, inset -3px 0 #25f4ee; }
.bio-link[data-icon="snapchat"] .link-icon { color: #090909; background: #fffc00; }

body.variant-solid .bio-link { border-color: transparent; color: #171108; background: var(--bio-gold); }
body.variant-solid .link-icon { background: color-mix(in srgb, var(--bio-bg) 12%, transparent); }
body.variant-solid .link-arrow, body.variant-solid .link-copy small { color: #2d210d; }
body.variant-outline .bio-link { border-color: var(--bio-gold); background: transparent; }
body.variant-outline .link-icon { color: var(--bio-gold-bright); background: transparent; }

.bio-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 52px;
  color: var(--bio-gold-bright);
  font-family: var(--heading-font);
  font-size: .88rem;
  text-align: center;
  padding-inline: 8px;
}

.bio-footer img { opacity: .9; }
.bio-footer span, .bio-footer small { max-width: 100%; overflow-wrap: anywhere; }
.bio-footer small { color: var(--bio-muted); font-family: var(--body-font); font-size: .74rem; }

.bio-toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 10;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 8px;
  color: var(--bio-bg);
  background: var(--bio-text);
  font-weight: 700;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms cubic-bezier(.22, 1, .36, 1);
}

.bio-toast.show { opacity: 1; transform: translate(-50%, 0); }
.noscript { margin: 0 auto 20px; color: var(--bio-muted); text-align: center; }
.unavailable { padding: 42px 18px; color: var(--bio-muted); text-align: center; }
.unavailable h2 { margin: 0 0 8px; color: var(--bio-text); font-family: var(--heading-font); }
:focus-visible { outline: 3px solid var(--bio-gold-bright); outline-offset: 3px; }

@media (min-width: 760px) {
  .bio-shell { padding-top: 22px; }
  .primary-wrap { margin-block-end: 24px; }
  .link-groups { gap: 30px; }
}

@media (max-width: 520px) {
  .hero-showcase { min-height: 510px; }
  .hero-product { background-position: 60% center; }
  .profile-head { grid-template-columns: 70px minmax(0, 1fr); padding: 30px 20px 20px; }
  .profile-logo { width: 70px; height: 70px; }
  .profile-head h1 { font-size: clamp(1.3rem, 6vw, 1.6rem); }
  .bio-link { grid-template-columns: 46px minmax(0, 1fr) 22px; }
  .link-group:first-child .bio-link { grid-template-columns: 46px minmax(0, 1fr) 18px; }
  .link-group:first-child .link-copy { padding-inline: 6px; }
  .link-group:first-child .link-copy strong { font-size: .86rem; line-height: 1.55; text-wrap: balance; }
  .link-group:first-child .link-icon svg { width: 20px; height: 20px; }
  .link-arrow svg { width: 15px; height: 15px; }
}

@media (max-width: 339px) {
  .profile-description { font-size: .8rem; }
  .link-group:first-child .link-stack { grid-template-columns: 1fr; }
  .link-group:first-child .bio-link { grid-template-columns: 46px minmax(0, 1fr) 22px; min-height: 70px; }
  .link-group:first-child .link-copy { padding-inline: 10px; }
  .link-group:first-child .link-copy strong { font-size: .93rem; }
}

@media (pointer: coarse) {
  .bio-link, .primary-link, .icon-action, .social-quick a { min-height: 44px; }
}

@keyframes showcase-enter {
  from { opacity: .78; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes product-settle {
  from { transform: scale(1.08); filter: brightness(.78); }
  to { transform: scale(1.025); filter: brightness(1); }
}

@keyframes showcase-light {
  from { opacity: 0; transform: skewX(-12deg) translateX(0); }
  35% { opacity: 1; }
  to { opacity: 0; transform: skewX(-12deg) translateX(820px); }
}

@keyframes seal-reveal {
  from { opacity: 0; transform: scale(.82) rotate(7deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes copy-reveal {
  from { opacity: .25; transform: translateY(10px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes icon-arrive {
  from { opacity: .35; transform: translateY(8px) scale(.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes primary-icon-in {
  from { opacity: .2; transform: scale(.7) rotate(10deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes primary-gleam {
  from { transform: skewX(-14deg) translateX(0); }
  to { transform: skewX(-14deg) translateX(460px); }
}

@keyframes link-arrive {
  from { opacity: .45; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; }
}
