/* Minimal accent tweaks for a professional academic vibe */
:root {
  --bs-primary: #553590;
  --bs-secondary: #6c757d;
}
.navbar-brand { font-weight: 700; }
h1, h2, h3 { scroll-margin-top: 6rem; }
.listing-bibliography .csl-entry { margin-bottom: 0.65rem; }
footer { font-size: 0.9rem; }

/* Grid Layout Enhancements */
/* Default grid margin for all pages except index */
.grid {
  margin: 2rem 0;
}

/* Remove grid margin only for index.qmd (homepage) */
body.page-index .grid {
  margin: 0 !important;
}

.grid .g-col-4 img {
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.grid .g-col-4 img:hover {
  transform: scale(1.02);
}

/* Timeline Styling */
.timeline {
  padding: 1rem;
  background: linear-gradient(to bottom, #f8f9fa, #ffffff);
  border-radius: 8px;
  border-left: 4px solid var(--bs-primary);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.timeline p {
  margin-bottom: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e9ecef;
}

.timeline p:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.timeline strong {
  color: var(--bs-primary);
  font-weight: 600;
}

/* Slideshow Container */
.slideshow-placeholder {
  height: 100%;
}

.slideshow-container {
  min-height: 300px;
  transition: all 0.3s ease;
}

.slideshow-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .grid .g-col-4,
  .grid .g-col-6,
  .grid .g-col-8 {
    margin-bottom: 2rem;
  }
  
  .timeline {
    margin-bottom: 2rem;
  }
}

/* Publications counts grid: keep 4 columns on desktop, switch to 2x2 on narrow screens */
.pub-counts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* desktop: 4 columns */
  gap: 0.5rem;
  align-items: center;
}

/* Ensure the Quarto .g-col-3 span rule doesn't force wide spans inside this custom grid */
.pub-counts-grid > .g-col-3 {
  grid-column: auto / span 1;
}
@media (max-width: 768px) {
  .pub-counts-grid {
    grid-template-columns: repeat(2, 1fr); /* mobile: 2 columns x 2 rows */
  }
  .pub-counts-grid .g-col-3 {
    text-align: center;
  }
  .pub-counts-grid h1 {
    font-size: 2.25rem; /* slightly smaller headings to avoid crowding */
  }
}

/* Awards page summary styling */
details summary {
  color: var(--bs-primary);
  cursor: pointer;
}

details summary:hover {
  color: #4a2d7a;
}

/* Floating toggle button for awards */
.awards-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  background-color: var(--bs-secondary);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.awards-toggle:hover {
  background-color: #4a2d7a;
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.awards-toggle:active {
  transform: scale(0.95);
}

/* Hide toggle on small screens */
@media (max-width: 768px) {
  .awards-toggle {
    display: none;
  }
}