* {
    box-sizing: border-box;
  }
  
/*   body {
    margin: 0;
    padding: 40px;
    background: #f5f5f7;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
                 "Segoe UI", sans-serif;
  } */
  
  /* Main outer card */
  .student-card {
    width: 100%;
    margin: 0 auto 32px;
    padding: 28px;
  
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 28px;
  
    box-shadow:
      0 24px 55px rgba(30, 40, 65, 0.12),
      0 5px 14px rgba(30, 40, 65, 0.06),
      inset 0 1px 0 #fff;
  
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
  
  /* Image and student information */
  .student-card__top {
    display: grid;
    grid-template-columns: minmax(240px, 400px) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
    height: auto;
  }
  
  .student-card__photo {
    display: block;
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(30, 40, 65, 0.16); 
  }
  
  /* Inner card containing student name */
  .student-card__details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
  
    background: linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.96),
      rgba(245, 246, 249, 0.82)
    );
  
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 20px;
  
    box-shadow:
      0 12px 28px rgba(30, 40, 65, 0.09),
      inset 0 1px 0 #fff;
  }
  
  .student-card__details h2 {
    margin: 0 0 12px;
    color: #1d1d1f;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.05;
    letter-spacing: -0.04em;
  }
  
  .student-card__details p {
    margin: 0;
    color: #3a3a3c;
    font-size: 16px;
    font-weight: 650;
  }
  
  /* Bottom card takes the full width */
  .student-card__school {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 24px;
    padding: 20px;
    gap: 20px;
  
    background: linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.96),
      rgba(245, 246, 249, 0.82)
    );
  
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 20px;
  
    box-shadow:
      0 12px 28px rgba(30, 40, 65, 0.09),
      inset 0 1px 0 #fff;
  }
  
  .student-card__school img {
    /* width: 100px;
    height: 85px; */
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 12px;
  }
  
  .student-card__school p {
    margin: 0 0 6px;
    color: #3a3a3c;
    font-size: 16px;
  }
  
  .student-card__school a {
    color: #b00000;
    font-weight: 650;
    text-decoration: none;
  }
  
  .student-card__school a:hover {
    color: #0071e3;
    text-decoration: underline;
  }

  .student-card,
  .student-card__details,
  .student-card__school {
    height: auto;
    min-width: 0;
  }
  
  .student-card__details h2,
  .student-card__details p,
  .student-card__school p,
  .student-card__school a {
    overflow-wrap: anywhere;
  }  

  .student-card-link,
  .student-card-link:hover,
  .student-card-link:focus {
      border-bottom: none !important;
      text-decoration: none !important;
      background-image: none !important;
  }

  @media (max-width: 600px) {
    body {
      padding: 20px;
    }
  
    .student-card {
      padding: 18px;
    }
  
    .student-card__top {
      grid-template-columns: 1fr;
    }
  
    .student-card__photo {
      width: 100%;
      height: 340px;
    }
  
    .student-card__details {
      padding: 24px;
    }
  
    .student-card__school {
      align-items: flex-start;
    }
  }

  @media (max-width: 750px) {
    .student-card__top {
      grid-template-columns: 1fr;
    }
  
    .student-card__photo {
      height: auto;
      max-height: 500px;
      aspect-ratio: 4 / 3;
    }
  }

/* Dialog */

#imageDialog {
  width: min(900px, 92vw);
  max-height: 90vh;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #222;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

#imageDialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
}

.image-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 18px;
  background: #900;
  color: #fff;
}

#imageDialogTitle {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

#closeImageDialog {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

#closeImageDialog:hover,
#closeImageDialog:focus-visible {
  background: #fff;
  color: #900;
}

#closeImageDialog:focus-visible {
  outline: 3px solid #fc0;
  outline-offset: 2px;
}

.image-dialog__content {
  padding: 20px;
  overflow: auto;
}

#imageDialog #imageDialogImage {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(90vh - 110px);
  margin: 0 auto;
  padding: 0 !important;
  object-fit: contain;
}

.image-dialog-link,
.image-dialog-link:hover,
.image-dialog-link:focus {
    border-bottom: none !important;
    text-decoration: none !important;
    background-image: none !important;
}

.image-dialog-thumbnail {
  display: inline-block;
  line-height: 0;
  border-bottom: none !important;
  text-decoration: none !important;
}

@media (max-width: 600px) {
  #imageDialog {
      width: calc(100vw - 24px);
  }

  .image-dialog__header,
  .image-dialog__content {
      padding: 12px;
  }
}