.wrap {
  min-height: 100vh;
  min-height: 100svh; /* excludes mobile browser chrome, so 100% ≠ taller than the visible area */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vh 6vw;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

main {
  max-width: 560px;
  width: 100%;
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: rise 0.7s ease-out 0.1s forwards;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

h1 {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  margin: 0 0 0.9rem;
}

.role {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin: 0 0 2.1rem;
  line-height: 1.55;
  max-width: 30em;
}

.contact {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
}

.contact a {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: opacity 0.15s ease;
}

.contact a:hover,
.contact a:focus-visible {
  opacity: 0.78;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin-top: 0.4rem;
}

.links a {
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.links a:hover,
.links a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--ink-soft);
}

footer {
  position: absolute;
  bottom: 6vh;
  left: 6vw;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-soft);
}

/* On short viewports, such as a laptop at 200% zoom, the footer would sit on top of the links. */
@media (max-height: 420px) {
  footer { display: none; }
}

@media (max-width: 560px) {
  /* ---- Mobile tuning knobs (see notes below) ----------------------------
     --wash-scale  width of the artwork as a % of viewport width. At 150%,
                   its rendered height is 93.75vw (800×500 aspect), so the
                   spiral's apex lands roughly 9vw below the image top.
     --wash-x/y    background-position. y:0 pins the artwork to the very top.
     --content-top top padding on the text column. Keep it comfortably above
                   ~9vw and the spiral apex stays clear of the eyebrow line. */
  :root {
    --wash-scale: 150%;
    --wash-x: 58%;
    --wash-y: 0%;
    --content-top: clamp(4.5rem, 45vw, 6.5rem);
  }

  /* Top-align instead of vertically centering: on a short viewport, centering
     a tall block pushes its head off-screen and buries the tail below the fold.
     The remaining top offset drops the text below the crown of the spiral. */
  .wrap {
    align-items: flex-start;
    min-height: auto;
    padding: var(--content-top) 7vw 3rem;
    overflow: visible;
  }

  /* Portrait viewports crop the 800×500 artwork hard — pull it back, pin it to
     the top, and lighten it so it stays a texture, not a picture. The mask
     centre rides up with it so the fade still surrounds the artwork rather
     than slicing its top off. */
  body::before {
    background-size: var(--wash-scale) auto;
    background-position: var(--wash-x) var(--wash-y);
    -webkit-mask-image: radial-gradient(ellipse 92% 50% at 55% 20%, var(--mask-solid) 30%, transparent 82%);
            mask-image: radial-gradient(ellipse 92% 50% at 55% 20%, var(--mask-solid) 30%, transparent 82%);
  }
  @keyframes washIn {
    from { opacity: 0; }
    to   { opacity: 0.16; }
  }
  footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  main { animation: none; opacity: 1; }
}
