:root {
  --ink: #fff8f0;
  --ink-soft: rgba(255, 248, 240, .82);
  --sand: #b8623a;          /* shown until the photo has loaded */
  --pill-bg: rgba(20, 8, 4, .28);
  --pill-border: rgba(255, 255, 255, .22);
  --px: 0;
  --py: 0;
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--sand);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ---------- photo ---------- */
.scene { position: fixed; inset: 0; overflow: hidden; background: var(--sand); }

.photo {
  position: absolute; inset: -4%;
  width: 108%; height: 108%;
  object-fit: cover;
  object-position: 50% 55%;           /* keeps the lone figure in frame on tall phones */
  opacity: 0;
  transform: translate3d(calc(var(--px) * -10px), calc(var(--py) * -8px), 0) scale(1.04);
  animation: reveal 1.6s .05s ease-out forwards, slowzoom 40s 1.6s ease-in-out infinite alternate;
  will-change: transform;
}

/* legibility: dark at the top (title) and bottom (footer), photo shows through in the middle */
.shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(28, 10, 4, .62) 0%, rgba(28, 10, 4, .28) 34%, rgba(28, 10, 4, 0) 58%),
    linear-gradient(0deg, rgba(28, 10, 4, .6) 0%, rgba(28, 10, 4, 0) 26%);
}

.grain {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; opacity: .35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- content ---------- */
.content {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: max(env(safe-area-inset-top), 0px) 24px 0;
  padding-top: calc(clamp(56px, 13svh, 150px) + env(safe-area-inset-top));
  gap: 16px;
}

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 500; letter-spacing: .03em;
  color: var(--ink-soft);
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  animation: rise .9s .3s both cubic-bezier(.2, .7, .2, 1);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #62e08f; animation: ping 2.8s infinite; }

h1 {
  font-size: clamp(40px, 10.5vw, 112px);
  line-height: 1.03; letter-spacing: -.035em; font-weight: 700;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(28, 10, 4, .35);
  animation: rise 1s .45s both cubic-bezier(.2, .7, .2, 1);
}

.lead {
  font-size: clamp(17px, 2.3vw, 24px); font-weight: 400; letter-spacing: -.01em;
  color: var(--ink-soft);
  text-shadow: 0 1px 14px rgba(28, 10, 4, .4);
  animation: rise 1s .6s both cubic-bezier(.2, .7, .2, 1);
}
.lead a { color: inherit; text-decoration: underline; text-underline-offset: 4px; }

.foot {
  position: fixed; z-index: 2; left: 0; right: 0;
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 0 20px;
  font-size: 12.5px; letter-spacing: .04em; text-align: center;
  color: var(--ink-soft);
  animation: rise 1s .9s both;
}
.line { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 10px; }
.sep { opacity: .5; }
.contact {
  margin-top: 6px;
  color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 500; letter-spacing: .02em;
  padding: 9px 16px; border-radius: 999px;
  background: var(--pill-bg); border: 1px solid var(--pill-border);
  -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
  transition: background .2s, transform .2s;
}
.contact:hover, .contact:focus-visible { background: rgba(255, 255, 255, .2); transform: translateY(-1px); }
.contact:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.credit { font-size: 11px; opacity: .6; color: inherit; text-decoration: none; }
.credit:hover, .credit:focus-visible { opacity: 1; text-decoration: underline; }

/* ---------- motion ---------- */
@keyframes reveal { to { opacity: 1; } }
@keyframes slowzoom { from { scale: 1; } to { scale: 1.06; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(98, 224, 143, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(98, 224, 143, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
  .photo { opacity: 1; transform: none; }
}

/* ---------- small / short screens ---------- */
@media (max-width: 480px) {
  .content { gap: 14px; padding-left: 20px; padding-right: 20px; }
  .foot { font-size: 12px; }
}
@media (max-height: 460px) and (orientation: landscape) {
  .content { padding-top: calc(28px + env(safe-area-inset-top)); gap: 8px; }
  h1 { font-size: clamp(32px, 8vw, 56px); }
  .foot .credit { display: none; }
}
