/* index.css */

/* Center container */
.center-container {
  position: relative;
  min-height: 80vh;
  padding: clamp(1.5rem, 4vh, 3rem) clamp(1rem, 3vw, 2rem);
}

/* Content wrapper using CSS Grid */
.content-wrapper {
  display: grid;
  /* Adaptive sidebar width: min 16rem, ideal 25vw, max 22rem */
  grid-template-columns: clamp(16rem, 25vw, 22rem) 1fr;
  gap: clamp(2rem, 5vw, 5rem); /* Adaptive gap based on screen width */
  max-width: 90rem; /* ~1440px */
  margin: 0 auto;
  align-items: start;
}

/* Card Style for clean minimalist look */
.card {
  background-color: #ffffff;
  border-radius: 1rem; /* 16px */
  padding: clamp(2rem, 4vw, 3rem); /* Adaptive padding, made bigger */
  box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.05); /* very soft shadow */
}

/* Sidebar Specifics */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vh, 2rem); /* space between profile and map */
}

.profile {
  text-align: center;
}

.profile .headshot {
  width: clamp(7rem, 15vw, 9.5rem);
  height: clamp(7rem, 15vw, 9.5rem);
  border-radius: 50%;
  margin: 0 auto clamp(0.75rem, 2vh, 1.25rem);
  display: block;
  object-fit: cover;
}

.profile .name {
  font-weight: bold;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  margin-bottom: 0.3rem;
}

.profile .short {
  font-size: 1rem;
  color: #666;
  margin-bottom: 0.6rem;
}

.profile .email {
  font-size: 0.875rem;
  color: #888;
}

/* Horizontal Social Links */
#links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  list-style-type: none;
  margin-top: 1.25rem;
  padding: 0;
}

#links li {
  margin: 0;
}

#links li a {
  text-decoration: none;
  font-size: 1.5rem;
  transition: transform 0.2s ease, color 0.2s ease;
  display: inline-block;
}

#links li a:hover {
  transform: scale(1.1);
  color: #ed1b2f !important; /* McGill Red inspired */
}

.link-text {
  display: none;
}

/* Glassmorphism for Visitor Map */
.glass-map-container {
  background: rgba(150, 160, 180, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 1rem;
  padding: clamp(1rem, 2vw, 1.25rem);
  box-shadow: 0 0.5rem 2rem rgba(31, 38, 135, 0.08);
}

.glass-map-container h1 {
  font-size: 1.25rem;
  text-align: center;
  margin-bottom: 1rem;
}

/* About me section */
.personal-content {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.content-section h1 {
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  margin-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 0.6rem;
  color: #222;
}

.content-section p, .content-section ul {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #444;
}

.content-section ul {
  padding-left: 1.5rem;
  margin-top: 1rem;
}

.content-section li {
  margin-bottom: 0.5rem;
}

.content-section a {
  color: #ed1b2f;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.content-section a:hover {
  color: #b01423;
  text-decoration: underline;
}

/* Timeline Layout */
.timeline {
  position: relative;
  padding-left: 2.5rem;
  margin-top: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #e0e0e0;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 0.25rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: #ed1b2f;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px #ed1b2f;
  z-index: 1;
}

.timeline-date {
  font-weight: bold;
  color: #ed1b2f;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.timeline-content {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.timeline-image-container {
  flex: 0 0 clamp(150px, 20vw, 250px); /* Adaptive width */
  min-height: clamp(100px, 15vw, 150px); /* Adaptive minimum height */
  background-color: #f8f9fa;
  border: 1px dashed #ccc;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.timeline-image-container img {
  width: 100%;
  height: auto;
  display: block;
}

.timeline-image-placeholder {
  color: #999;
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
}

.timeline-text {
  flex: 1;
}

.timeline-text h3 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
  color: #222;
}

.timeline-text p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0.4rem;
  color: #444;
}

.timeline-text .timeline-authors {
  font-family: Arial, sans-serif;
  font-style: italic;
  color: #999; /* Diluted color for other authors */
  font-size: 0.95rem;
}

.timeline-text .timeline-authors strong {
  font-family: Arial, sans-serif !important;
  font-weight: 800; /* Explicitly make it bold */
  color: #111; /* Make it darker to stand out */
}
.timeline-text .timeline-authors sup {
  font-family: Arial, sans-serif !important;
  font-size: 1.0em; /* Make the superscripts more legible */
}

.timeline-text .conference {
  font-family: Arial, sans-serif;
}

.paper-link {
  display: inline-flex;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  font-weight: bold;
  color: #ed1b2f;
  text-decoration: none;
  transition: opacity 0.2s;
}

.paper-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .timeline-content {
    flex-direction: column;
    gap: 1rem;
  }
  .timeline-image-container {
    width: 100%;
    flex: none;
  }
}

/* Media Query for Mobile Responsiveness */
@media (max-width: 768px) {
  .content-wrapper {
    grid-template-columns: 1fr; /* Stack layout on smaller screens */
    gap: 2rem;
  }
  
  .sidebar {
    order: -1; /* Ensure sidebar is on top */
  }
}
