*, *::before, *::after { box-sizing: border-box; }
:root {
  --bg: #1a0e0b; --card: #221a17; --text: #fff; --muted: #f6dde4;
  --accent: #e8344a; --accent2: #f78fb0; --accentText: #fff;
  color-scheme: dark;
}
html, body { margin: 0; }
body {
  min-height: 100dvh; overflow-x: hidden;
  background: var(--bg); color: var(--text);
  font: 16px/1.5 Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 16px max(16px, env(safe-area-inset-bottom));
}

/* Whole screen: blurred copy of the photo fills everything (no dark side bars on desktop). */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(28px) brightness(.45); transform: scale(1.15); }

/* Sharp photo on top, ends at the chest; text sits right below it. Phone: portrait crop, wide screens: whole photo. */
.hero {
  flex: 1 1 auto; min-height: 50dvh; width: calc(100% + 32px); margin: 0 -16px -28px;
  position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent);
}
.bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%;
  transform-origin: 50% 100%; animation: zoom 20s ease-in-out infinite alternate;
}
/* Wide screens: photo covers the whole screen, text sits on a dark fade at the bottom. */
@media (min-aspect-ratio: 1/1) {
  .hero { position: fixed; inset: 0; z-index: -1; width: auto; margin: 0; -webkit-mask-image: none; mask-image: none; }
  .hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgb(26 14 11 / .7) 72%, rgb(26 14 11 / .92) 100%); }
  .bg { object-position: 50% 20%; transform-origin: 50% 30%; }
  main { margin-top: auto; }
}

main {
  position: relative; width: 100%; max-width: 420px; text-align: center;
  animation: rise .8s ease-out both;
}
h1 {
  margin: 0 0 6px;
  font: 600 clamp(2.6rem, 13vw, 3.4rem)/1.05 "Playfair Display", Georgia, serif;
  letter-spacing: .02em; text-shadow: 0 2px 24px rgb(0 0 0 / .5);
}
.bio { margin: 0 auto 18px; max-width: 32ch; color: var(--muted); font-style: italic; font-weight: 300; letter-spacing: .02em; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 58px; padding: 16px 20px;
  border: 1px solid rgb(255 255 255 / .22); border-radius: 99px;
  background: rgb(255 255 255 / .1); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--text); font: inherit; font-size: 1.05rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: var(--accentText);
  border: 0; font-size: 1.15rem; letter-spacing: .02em;
  animation: glow 3s ease-in-out infinite, shake 3s ease-in-out 1s infinite;
}
.promo-badge {
  padding: 2px 9px; border-radius: 99px; background: var(--accent); color: var(--accentText);
  font-size: .85rem; font-weight: 700;
}
.btn.primary .promo-badge { background: #fff; color: var(--accent); }
.promo { margin: 6px 0 0; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.badge {
  display: inline-block; margin: 22px 0 0; padding: 2px 10px; border-radius: 99px;
  border: 1px solid rgb(255 255 255 / .4); color: var(--muted); font-size: .75rem; font-weight: 600;
}
footer { padding-top: 10px; max-width: 420px; color: rgb(255 255 255 / .55); font-size: .75rem; text-align: center; }

dialog {
  width: min(92vw, 400px); padding: 26px 22px; border: 1px solid rgb(255 255 255 / .12); border-radius: 26px;
  background: rgb(30 22 20 / .92); backdrop-filter: blur(20px); color: var(--text); text-align: center;
}
dialog::backdrop { background: rgb(0 0 0 / .6); backdrop-filter: blur(6px); }
dialog h2 { margin: 0 0 8px; font: 600 1.7rem/1.2 "Playfair Display", Georgia, serif; }
dialog p { margin: 0 0 20px; color: var(--muted); }
dialog .btn + .btn { margin-top: 10px; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes zoom { to { transform: scale(1.08); } }
/* Strong shake (~0.8s) at the start of every 3s cycle, then still */
@keyframes shake {
  0%, 27%, 100% { transform: translateX(0) rotate(0); }
  3%, 9%, 15%, 21% { transform: translateX(-9px) rotate(-2deg); }
  6%, 12%, 18%, 24% { transform: translateX(9px) rotate(2deg); }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 4px 20px color-mix(in srgb, var(--accent) 45%, transparent); }
  50% { box-shadow: 0 6px 34px color-mix(in srgb, var(--accent) 75%, transparent); }
}
@media (prefers-reduced-motion: reduce) { main, .bg, .btn.primary { animation: none; } .btn { transition: none; } }
