/* about.css */

/* Inherit color variables from style.css (index page) */

/* Make sure the header is always at the very top */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100; /* ensures the header is above other content */
}

/* Increase top margin for main content so header won't overlap */
.wrapper {
  margin-top: 90px; /* or 120px if you prefer extra space */
}

.top-header h1 {
  font-size: 36px; /* Increased size */
  color: #333;
  display: inline-block; /* Make width wrap to content */
  text-align: center;
  border-bottom: 3px solid #6e57e0; /* Purple underline */
  padding-bottom: 5px;
  margin: 0 auto 50px auto;
}



/* TIMELINE */
.timeline {
  position: relative;
  width: 90%;
  max-width: 1000px;
  margin: 80px auto 50px;
  padding: 20px 0;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #ddd;
}

/* TIMELINE ITEMS */
.timeline-item {
  position: relative;
  width: 45%;
  margin: 20px 0;
  padding: 15px 20px;
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  
  /* intersection observer animation */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.timeline-item.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Alternating items (floats) */
.timeline-item.right {
  float: right;
  clear: both;
  text-align: left;
}
.timeline-item.left {
  float: left;
  clear: both;
  text-align: right;
}
.timeline-item::after {
  content: '';
  position: absolute;
  top: 20px;
  width: 12px;
  height: 12px;
  background: var(--first-color);
  border-radius: 50%;
  z-index: 2;
}
.timeline-item.right::after {
  right: -6px;
}
.timeline-item.left::after {
  left: -6px;
}





/* details/summary styling */
.timeline-item details {
  cursor: pointer;
}
.timeline-item summary {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  cursor: pointer;
  /* Using the primary purple for summary text */
  color: #6e57e0;
  outline: none;
}
.timeline-item summary small {
  /* Slightly softer grey for small text */
  color: #888;
}
.timeline-item summary::-webkit-details-marker {
  display: none;
}
.timeline-item p {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 10px;
  /* Using a medium-dark grey for body text */
  color: #555;
}

/* Clear floats at end of timeline */
.timeline::after {
  content: "";
  display: table;
  clear: both;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .timeline-item {
    float: none;
    width: 100%;
    margin: 20px 0;
    text-align: left;
  }
  .timeline::before {
    left: 20px;
  }
  .timeline-item::after {
    left: 10px;
  }
}

/* Updated Section Header with Purple Accent */
.supervisor-comments-section-alt .section-header {
  text-align: center;
  margin-bottom: 50px;
}

.supervisor-comments-section-alt .section-header h1 {
  font-size: 32px;
  /* Use a strong dark grey for the header text */
  color: #333;
  border-bottom: 3px solid #6e57e0; /* Purple underline */
  display: inline-block;
  padding-bottom: 5px;
  margin: 0 auto;
}

/* Alternative Supervisor Cards Layout */
.supervisor-cards-alt {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

/* Alternative Supervisor Card */
.supervisor-card-alt {
  display: flex;
  align-items: flex-start;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
}

/* When in view, animate to final state */
.supervisor-card-alt.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Avatar Styling with Purple Fallback */
.supervisor-card-alt .avatar {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #6e57e0;  /* Purple fallback */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  margin-right: 20px;
  overflow: hidden;
}

.supervisor-card-alt .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Content Styling with Purple Accent for Names */
.supervisor-card-alt .content h3 {
  margin: 0;
  font-size: 20px;
  /* Use the primary purple for names */
  color: #6e57e0;
}

.supervisor-card-alt .content .title {
  font-size: 14px;
  /* Changed from #666 to a slightly darker grey */
  color: #555;
  margin: 5px 0;
}

.supervisor-card-alt .content .date {
  font-size: 12px;
  /* Changed from #999 to a warmer grey */
  color: #777;
  margin-bottom: 10px;
}

.supervisor-card-alt .content .comment {
  font-size: 15px;
  line-height: 1.6;
  /* Body text remains a solid dark grey */
  color: #444;
}

/* Hover Effects with Purple Accents */
.supervisor-card-alt:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 15px rgba(110, 87, 224, 0.3);
  border-color: #6e57e0;
}

/* Optional: Add a subtle hover lift for timeline items */
.timeline-item:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

/* ============================= */
/* New Zoom-In-Up Animation      */
/* ============================= */
@keyframes zoomInUp {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  60% {
    opacity: 1;
    transform: translateY(-5px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Apply new animation to timeline items, supervisor cards, and alternative supervisor cards */
.timeline-item,
.supervisor-card,
.supervisor-card-alt {
  opacity: 0;
  transform: translateY(20px);
}

.timeline-item.in-view,
.supervisor-card.in-view,
.supervisor-card-alt.in-view {
  animation: zoomInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Letters of Recommendation Section */
.recommendation-section {
  padding: 4em 0;
  text-align: center;
  background: #fafafa;
  margin-bottom: 350px;
}
.recommendation-section .section-header h1 {
  font-size: 36px; /* Increased size */
  color: #333;
  display: inline-block; /* Make width wrap to content */
  border-bottom: 3px solid #6e57e0; /* Purple underline under the text only */
  padding-bottom: 5px;
  margin: 0 auto 50px auto;
}
.letter-cards {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.letter-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  width: 300px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.letter-card h3 {
  margin-bottom: 10px;
  color: #555 !important;
  font-size: 18px;
}


.letter-card button {
  padding: 10px 20px;
  background: #6e57e0;
  border: none;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-size: 14px;
}
.letter-card button:hover {
  background: #5a45c1;
}
/* Modal for Full Screen Letter */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0, 0, 0, 0.9);
  padding: 40px;
}
.modal.active {
  display: block;
}
.modal-content {
  background: #fff;
  margin: auto;
  padding: 20px;
  max-width: 800px;
  border-radius: 8px;
  position: relative;
}
.modal-content h2 {
  margin-bottom: 20px;
  color: #6e57e0;
  font-size: 24px;
}
.modal-content p {
  line-height: 1.6;
  color: #333;
  white-space: pre-wrap;
  font-size: 16px;
}
.modal-content .close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 30px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: color 0.3s ease;
}
.modal-content .close:hover {
  color: #777;
}

/* Keyframes for the zoomInUp animation */
@keyframes zoomInUp {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  60% {
    opacity: 1;
    transform: translateY(-5px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Apply initial state to letter cards */
.letter-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* When in view, animate using zoomInUp */
.letter-card.in-view {
  animation: zoomInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
