/* =========================================================================
   Header: photo with the name written across it, tagline and buttons.
   It fills the first screen, with room at the bottom for the social icons;
   About starts just below.
   ========================================================================= */

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - var(--frame-w) * 2);
  min-height: calc(100svh - var(--frame-w) * 2);
  padding: 40px 0 calc(var(--dock-h) + 16px);
  text-align: center;
}

/* Safari can shrink items in a column like this, which pushed the photo
   and the name on top of each other. Never shrink them. */
.hero > * {
  flex-shrink: 0;
}

/* ---------- Photo + name ----------
   The name logo runs across the bottom of the photo like a signature,
   a little past the circle's edge and just below it.
   --photo: photo size, --name-w: logo width,
   --name-dip: how far the logo hangs below the photo.
   Where it links to: "photo" in links.json. */
.identity {
  --photo: 172px;
  --name-w: 196px;
  --name-dip: 14px;
  position: relative;
  display: block;
  width: var(--photo);
  margin: 0 auto;
  padding-bottom: var(--name-dip);
  -webkit-tap-highlight-color: transparent;
}

.avatar {
  position: relative;
  width: var(--photo);
  height: var(--photo);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 30px 20px -10px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 0, 0, 0.35);
}

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

/* darkens the bottom of the photo so the white name reads clearly */
.avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0) 58%);
  pointer-events: none;
}

.identity .logo {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: var(--name-w);
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55));
}

/* a gentle lift on hover, so it reads as clickable */
.identity .avatar,
.identity .logo {
  transition: transform 0.3s ease;
}

.identity:hover .avatar,
.identity:focus-visible .avatar {
  transform: scale(1.03);
}

.identity:hover .logo,
.identity:focus-visible .logo {
  transform: translateX(-50%) scale(1.03);
}

/* ---------- Tagline ---------- */

.tagline {
  margin: 22px 0 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  word-spacing: 2px;
  text-transform: uppercase;
  color: #9a9a9a;
}

/* ---------- Phones ---------- */

@media (max-width: 560px) {
  .hero {
    padding-top: 28px;
  }

  .identity {
    --photo: 136px;
    --name-w: 156px;
    --name-dip: 11px;
  }

  .tagline {
    font-size: 11px;
    letter-spacing: 2.5px;
  }
}

/* short phones: a smaller header so all buttons fit above the icons */
@media (max-height: 640px) and (max-width: 560px) {
  .hero {
    padding-top: 18px;
  }

  .identity {
    --photo: 104px;
    --name-w: 120px;
    --name-dip: 8px;
  }
}
