/* ============================================================
   PAPER CARD COMPONENT
   ============================================================ */
.paper {
  display: flex;
  gap: 20px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  align-items: flex-start;
}

.paper img {
  width: 100px;
  flex-shrink: 0;
  border: 1px solid #ddd;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.08);
}

.paper-text h5 {
  font-family: 'DM Serif Display', serif;
  color: #7a0019;
  margin: 0 0 8px;
  font-size: 1.1rem;
  line-height: 1.3;
}

.paper-text p {
  font-size: 0.95rem;
  margin-bottom: 10px;
  line-height: 1.6;
}

.paper-link {
  font-size: 0.85rem;
  text-decoration: none;
  color: #7a0019;
  border-bottom: 1px solid #c9a227;
  padding-bottom: 1px;
  transition: opacity 0.2s;
}

.paper-link:hover {
  opacity: 0.65;
}


/* ============================================================
   PEOPLE SECTION
   ============================================================ */
.people {
  padding: 80px 20px 60px;
  background: #f8f5f2;
  text-align: center;
}

.people h2 {
  font-family: 'DM Serif Display', serif;
  color: #7a0019;
  margin: 0 0 35px;
  font-size: 1.8rem;
}

/* Populated dynamically by team.js */
.people-list {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  max-width: 960px;
  margin: 0 auto;
}

/* Individual person card */
.person {
  background: white;
  padding: 28px 24px 22px;
  border: 1px solid #e5e5e5;
  min-width: 180px;
  max-width: 220px;
  text-align: center;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.person:hover {
  border-color: #c9a227;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(201,162,39,0.12);
}

/* Photo or initial placeholder */
.person .photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #c9a227;
  display: block;
  margin: 0 auto 12px;
}

.person .name {
  font-family: 'DM Serif Display', serif;
  color: #7a0019;
  margin: 0 0 5px;
  font-size: 1.05rem;
}

.person .role {
  font-size: 0.85rem;
  color: #666;
  margin: 0 0 4px;
}

.person .location {
  font-size: 0.78rem;
  color: #aaa;
  margin: 0;
  font-style: italic;
}

/* ============================================================
   CARD GRID (Past / Present / Future)
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  align-items: stretch;
  margin-top: 30px;
}

.concept-card {
  background: #fff;
  border: 1px solid #e7dfb0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.concept-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  border-color: #c9a227;
}

.concept-card .tag {
  align-self: flex-start;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #eee;
  color: #555;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
  font-weight: 500;
}

.concept-card h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  color: #7a0019;
  margin: 0 0 10px;
  line-height: 1.25;
}

.concept-card .summary {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #444;
  flex-grow: 1;
}

/* ============================================================
   GLOBAL MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-panel {
  background: white;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.3s;
}

.modal-overlay.active .modal-panel {
  transform: scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  margin: 0;
  font-family: 'DM Serif Display', serif;
  color: #7a0019;
  font-size: 1.5rem;
}

.btn-close {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: #888;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.btn-close:hover {
  background: #f0f0f0;
  color: #333;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  line-height: 1.7;
  color: #333;
}

.modal-body p {
  margin-top: 0;
  margin-bottom: 16px;
}

.modal-body ul {
  padding-left: 20px;
  margin-bottom: 20px;
}

.modal-body h4 {
  font-family: 'DM Serif Display', serif;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #7a0019;
}

/* ============================================================
   ANNOTATIONS (Popover)
   ============================================================ */
.annotation {
  border-bottom: 2px dotted #c9a227;
  cursor: help;
  position: relative;
  font-weight: 500;
  color: #7a0019;
  display: inline-block;
}

.annotation .annotation-content {
  visibility: hidden;
  opacity: 0;
  width: max-content;
  max-width: 280px;
  background-color: #1a1a1a;
  color: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 12px;
  position: absolute;
  z-index: 10;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  font-size: 0.85rem;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-weight: normal;
}

.annotation .annotation-content::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #1a1a1a transparent transparent transparent;
}

.annotation:hover .annotation-content {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}



/* ============================================================
   TEAM CARDS
   ============================================================ */

.team-section {
  padding: 60px 20px;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.team-groups-container {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.team-group {
  margin: 0;
}
.team-group h2 {
  font-family: 'DM Serif Display', serif;
  color: #7a0019;
  font-size: 1.8rem;
  margin: 0 0 35px;
  text-align: center;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.team-grid.centered-grid {
  justify-content: center;
  grid-template-columns: repeat(auto-fit, 280px);
}

.team-card {
  background: #fffbf2;
  border: 1px solid #e7dfb0;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  text-align: center;
  height: 100%;
  box-sizing: border-box;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}
.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.photo-placeholder {
  width: 100%;
  padding-top: 125%; /* 4:5 aspect portrait */
  position: relative;
  background: #f0f0f0;
  border: none;
  border-bottom: 1px solid #e7dfb0;
  box-sizing: border-box;
  overflow: hidden;
}
.photo-placeholder::before {
  display: none;
}

.card-name {
  font-family: 'DM Serif Display', serif;
  color: #7a0019;
  margin: 16px 18px 4px;
  font-size: 1.05rem;
}

.card-institution {
  font-size: 0.88rem;
  color: #666;
  margin: 0 18px 18px;
}

.in-memoriam {
  background-color: #7a0019 !important;
  color: #fff !important;
}

.in-memoriam .card-name {
  color: #f8f5f2;
}

.in-memoriam .card-institution {
  color: rgba(255, 255, 255, 0.75);
}

.in-memoriam .photo-placeholder {
  border: none;
}
.in-memoriam .photo-placeholder::before {
  display: none;
}

.card-note {
  font-size: 0.82rem;
  font-style: italic;
  color: #666;
  margin: 0 18px 18px;
}
.in-memoriam .card-note {
  color: rgba(255,255,255,0.95);
}

/* ============================================================
   MAP WRAPPER (inside People section)
   ============================================================ */
.map-wrapper {
  max-width: 960px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

#map-container {
  width: 100%;
  height: 500px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(0,0,0,0.18);
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-section {
  background-color: #ffffff;
  border-top: 1px solid #eaeaea;
  padding: 100px 20px;
}

.contact-container {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.contact-container h2 {
  font-family: 'DM Serif Display', serif;
  color: #7a0019;
  font-size: 2.2rem;
  margin: 0 0 60px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  align-items: start;
}

.contact-card {
  text-align: center;
  padding: 10px;
}

.contact-name {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: #7a0019;
  margin-bottom: 6px;
}

.contact-role {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 15px;
}

.contact-email-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7a0019;
  transition: transform 0.2s ease, color 0.2s ease;
  margin-top: 5px;
}

.contact-email-icon:hover {
  color: #c9a227;
  transform: translateY(-2px);
}

/* ============================================================
   FOOTER — crimson, with real logos
   ============================================================ */
.site-footer {
  background: #7a0019 !important;
  border-top: none !important;
  color: rgba(255,255,255,0.7) !important;
}

.footer-copy {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  margin: 0;
  padding-bottom: 10px;
}

.logo-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 50px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding: 10px 0;
}

.sponsor-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.sponsor-logo-link:hover {
  opacity: 0.8;
}

/* Transparent-bg logos (Trinity webp) — show as-is, no blending needed */
.sponsor-logo--transparent {
  height: 70px;
  width: auto;
  opacity: 0.95;
}

/* Dark-bg logos (St John's, Wellcome) — screen blend knocks out black bg */
.sponsor-logo--dark-bg {
  height: 55px;
  width: auto;
  mix-blend-mode: screen;
  opacity: 0.95;
}

@media (max-width: 640px) {
  .logo-banner { gap: 28px; }
  .sponsor-logo--transparent { height: 50px; }
  .sponsor-logo--dark-bg { height: 40px; }
}
