.biography-section {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  height: calc(65vh - 60px); /* Reduced from 75vh to leave more bottom space */
  margin-top: 5px;
  background-color: rgba(235, 220, 220, 0.5);
  border-radius: 25px;
}

/* Update header styling */
.biography-section h2 {
  margin: 0 0 1rem 0;
  font-size: 1.75rem;
  padding: 10px 20px;
  background: rgba(235, 220, 220, 0.5);
  border-radius: 15px;
}

.statement-section,
.biography-proper-section {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Style for the content containers */
.statement-content,
.biography-content {
  padding: 0 20px;
  overflow-y: scroll;
  height: calc(65vh - 120px); /* Adjusted to match new container height */
  scrollbar-width: thin;
  scrollbar-color: rgba(75, 83, 32, 0.3) transparent;
}

/* Maintain scrollbar styling */
.statement-content::-webkit-scrollbar-thumb,
.biography-content::-webkit-scrollbar-thumb {
  background-color: rgba(75, 83, 32, 0.3);
  border-radius: 10px;
}

/* .statement-content::-webkit-scrollbar-track,
.biography-content::-webkit-scrollbar-track {
  background: transparent;
} */

.statement-content::-webkit-scrollbar-thumb,
.biography-content::-webkit-scrollbar-thumb {
  background-color: rgba(75, 83, 32, 0.3);
  border-radius: 4px;
}

.biography-section p {
  text-align: justify;
  line-height: 1.6;
  margin-bottom: 1.2rem;
  color: #4B5320;
  padding-right: 10px;
}

.biography-section p:last-of-type {
  margin-bottom: 0;
}

#portrait {
  float: left;
  margin: 0 2rem 1rem 0;
  border-radius: 10px;
  max-width: 200px;
  height: auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cv-link {
  position: absolute;
  top: 7.5px;
  right: 30px;
  padding: 30px 30px;
  background-color: rgba(75, 83, 32, 0.1);
  font-weight: bold;
  color: #4B5320;
  opacity: 0.8;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
  z-index: 2;
}

/* Adjust mobile responsiveness */
@media (max-width: 968px) {
  .biography-section {
    grid-template-columns: 1fr;
    gap: 1rem;
    height: calc(65vh - 60px); /* Adjusted for mobile */
    margin-top: 5px;
    border-radius: 20px;
  }

  .statement-content,
  .biography-content {
    height: calc(32.5vh - 80px); /* Adjusted proportionally for mobile */
  }

  #portrait {
    float: none;
    display: block;
    margin: 0 auto 1.5rem auto;
  }

  .cv-link {
    position: relative;
    top: auto;
    right: auto;
    display: inline-block;
    margin-top: 1.5rem;
  }

  .biography-section p {
    text-align: left;
  }
}
