
.people-subnav {
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 1rem 0;
  border-bottom: 1px solid var(--slate-300);
}

.people-subnav a {
  border-radius: 4px;
  color: var(--slate-700);
  font-size: 1.1rem;
  padding: 0.5rem 1rem;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.2s, color 0.2s;
}

.people-subnav a:hover {
  background-color: var(--slate-200);
  color: var(--stone-700);
}

.people-subnav a.active {
  background-color: var(--slate-300);
  color: var(--slate-700);
}

.person {
  align-items: start;
  /* border-top: solid 1px var(--slate-400); */
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-bottom: 2rem;
  margin-top: 2rem;
}


.bio {
  max-width: 600px;
  padding: 0 2rem 0 0;
  flex: 1 1 auto;  /* Allow bio to shrink */

  h2 {
    margin-top: 0;
  }

  h2 ~ p {
    margin-left: 1rem;
    margin-right: 1rem;
  }
}

.portrait {
  background-image: linear-gradient(to bottom, var(--slate-300), var(--slate-100));
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  margin-top: 57px;
  overflow: hidden;
  padding: 10px 0 0 0;
  width: 250px;
  flex: 0 0 250px;  /* Don't grow or shrink, stay at 200px */
}

.portrait-image {
  width: 100%;  /* Fill the portrait container */
  height: auto;
  display: block;
  margin: 0;
}

/* Responsive layout for small screens */
@media (max-width: 768px) {
  .person {
    flex-direction: column-reverse;
    align-items: center;
  }

  .bio {
    padding: 0;
    max-width: 100%;
  }

  .portrait {
    margin: 0 auto 2rem auto;
  }
}

/* fade in images to prevent alt text flash */
.fade-in-image {
  /* Start with the image completely transparent */
  opacity: 0;

  /* Define the transition for the opacity property */
  transition: opacity 1s ease-in-out;
}

.fade-in-image.loaded {
  /* The final state: fully visible */
  opacity: 1;
}
