@import url('https://fonts.googleapis.com/css2?family=Bevan:ital@0;1&display=swap');

body {
  background: linear-gradient(180deg, rgba(42, 61, 74, 1) 0%, rgba(209, 98, 66, 0.8) 40%);
  font-family: "Bevan", serif;
  font-weight: 400;
  font-style: normal;
  padding: 0;
  margin: 0;
}

main {
  display: flex;
  /* simpler than grid for this layout */
  flex-direction: column;
  /* stack image, name, and icons */
  align-items: center;
  /* center horizontally */
  justify-content: center;
  /* center vertically */
  text-align: center;
  min-height: 100vh;
  min-width: 100vw;
  gap: 1.5rem;
  /* nice breathing space between elements */
}

h1 {
  color: #dbdad5;
  margin: 0;
  font-size: 2rem;
}

.image-container {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 470 / 709;
  overflow: hidden;
  cursor: pointer;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.25);
  background: #00192F;
  /* fallback behind contain images */
}

/* stacked images exactly overlapping */
.image-container img {
  position: absolute;
  inset: 0;
  /* shorthand for top:0; right:0; bottom:0; left:0; */
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* show whole portrait without cropping */
  object-position: center;
  /* keep subject centered */
  display: block;
  transition: opacity 1.2s ease, transform 0.6s ease;
  will-change: opacity, transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* ensure only top (visible) image receives pointer events */
.image-container img {
  pointer-events: none;
}

.image-container .primary {
  z-index: 2;
}

.image-container .secondary {
  z-index: 1;
}

/* toggle state */
.image-container .secondary {
  opacity: 0;
  transform: scale(1);
}

.image-container.alt .secondary {
  opacity: 1;
  z-index: 3;
  pointer-events: auto;
  transform: scale(1);
}

.image-container.alt .primary {
  opacity: 0;
  pointer-events: none;
  transform: scale(1);
}

/* Responsive scaling */
@media (max-width: 600px) {
  .image-container {
    max-width: 90%;
  }

  h1 {
    font-size: 1.5rem;
    white-space: nowrap;
    /* keeps your name on one line */
  }
}

.social-media {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.social-media a {
  color: #dbdad5;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.social-media svg {
  width: 2rem;
  height: 2rem;
  fill: currentColor;
  transition: transform 0.25s ease;
}

.social-media a:hover svg {
  transform: scale(1.1);
}
