/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: white;
  color: black;
  line-height: 1.6;
  font-weight: 400;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 2rem 1rem 2rem;
}

/* Header & name */
header {
  margin-bottom: 2rem;
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
}

.site-name {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 2.5rem;
  letter-spacing: -0.3px;
  color: black;
  margin-bottom: 0.25rem;
}

.tagline {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 1rem;
}

/* Navigation */
nav {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;  /* Pushes nav buttons to the right */
}

nav a {
  color: black;
  text-decoration: none;
  margin-left: 1.8rem;  /* Changed from margin-right to margin-left */
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s;
}

nav a:hover {
  color: #bb2525;
}
nav a.active {
  color: #bb2525;
}

/* First nav button shouldn't have left margin */
nav a:first-of-type {
  margin-left: 0;
}

/* Links everywhere */
a {
  color: #bb2525;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* About page grid */
.about-grid {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.about-text {
  flex: 1.5;
}

.about-text h2 {
  font-family: 'Source Serif 4', serif;
  font-weight: 500;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.about-text p {
  margin-bottom: 1rem;
    text-align: justify;
  text-justify: inter-word;
}
.research-left p {
  margin-bottom: 1rem;
    text-align: justify;
  text-justify: inter-word;
}

.research-left p:last-child {
  margin-bottom: 0;
}

.about-image {
  flex: 1;
}

.about-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* RESEARCH PAGE – two column layout */
.research-layout {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.research-left {
  flex: 2.5;
}

.research-right {
  flex: 1;
}

.research-left h2 {
  font-family: 'Source Serif 4', serif;
  font-weight: 500;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}


/* Expandable cards (left column) */
.research-card {
  background: #f9f9f9;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  transition: box-shadow 0.2s;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  background: white;
  border-radius: 12px;
}


.card-header:hover .card-title {
  color: #bb2525;
}

.expand-icon {
  font-size: 1.4rem;
  font-weight: 400;
  color: #bb2525;
  transition: transform 0.2s;
}

.card-details {
  font-size: .95rem;
  display: none;
  padding: 0 1.25rem 1.25rem 1.25rem;
  border-top: 1px solid #eaeaea;
  background: white;
  border-radius: 0 0 12px 12px;
}

.card-details p, .card-details ul {
  margin-bottom: 0.75rem;
}

.card-details ul {
  margin-left: 1.5rem;
}

/* Expanded state */
.research-card.expanded .card-details {
  display: block;
}

.research-card.expanded .expand-icon {
  transform: rotate(45deg);
}

/* Right column boxes */
.right-box {
  background: #f9f9f9;
  padding: 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  border: 1px solid #eaeaea;
}

.right-box h3 {
  font-family: 'Source Serif 4', serif;
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.right-box ul, .right-box p {
  font-size: 0.95rem;
}

.right-box li {
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eaeaea;
  text-align: center;
  font-size: 0.85rem;
  color: #666;
}

/* Responsive */
@media (max-width: 800px) {
  .research-layout {
    flex-direction: column;
  }
  .about-grid {
    flex-direction: column;
  }
  .container {
    padding: 1.5rem;
  }
  nav a {
    margin-right: 1rem;
  }
}

/* ===== STICKY COLLAPSING NAVIGATION ===== */
.sticky-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  border-bottom: 1px solid #eaeaea;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transform: translateY(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1000;
  padding: 1rem 2rem;  
}
.sticky-nav.visible {
  transform: translateY(0);
}

.sticky-nav .sticky-container {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sticky-nav nav {
  margin-top: 0;
  align-items: center;
}

.sticky-nav .sticky-name {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 1.5rem;  /* Slightly larger */
  color: black;
  text-decoration: none;
    line-height: 1;
}

.sticky-nav nav a {
  color: black;
  text-decoration: none;
  margin-left: 1.2rem;  /* Reduced from 1.8rem — closer together */
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
}

/* First nav link in sticky nav shouldn't have left margin */
.sticky-nav nav a:first-of-type {
  margin-left: 0;
}

.sticky-nav nav a:hover {
  color: #bb2525;
}

.sticky-nav nav a.active {
  color: #bb2525;
}

/* Add padding to body so sticky nav doesn't cover content */
body {
  padding-top: 0;
}

/* Small adjustment for when sticky nav is visible */
.sticky-nav.visible + .container {
  padding-top: 0;
}

/* Social links under photo — subtle style like presentations */
.social-links {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0;
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
}

.social-link:hover {
  color: #bb2525;
  text-decoration: none;
}

.social-link i {
  width: 1.4rem;
  font-size: 1rem;
  text-align: center;
  color: #666;
  transition: color 0.2s ease;
}

.social-link:hover i {
  color: #bb2525;
}

.social-link span {
  font-weight: 400;
}

/* Last social link shouldn't have a border */
.social-link:last-child {
  border-bottom: none;
}

/* ===== RESEARCH PAGE NEW STYLES ===== */

/* Research blurb at top */
.research-blurb {
  margin-bottom: 2rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

/* Section headings */
.section-heading {
  font-family: 'Source Serif 4', serif;
  font-weight: 500;
  font-size: 1.5rem;
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #eaeaea;
}

.section-heading:first-of-type {
  margin-top: 0;
}

/* "Serious" collapsible cards — less flashy, more academic */
/* "Serious" collapsible cards — matching presentations style */
.research-card {
  background: white;
  border: none;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 0;
  border-radius: 0;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  cursor: pointer;
  font-weight: 500;
  font-size: 1rem;
  background: transparent;
  border-radius: 0;
  transition: background 0.15s ease;
}

.card-title {
  color: #222;
  font-size: 1rem;
}

.expand-icon {
  font-size: 1.1rem;
  font-weight: 400;
  color: #aaa;
  transition: color 0.15s, transform 0.15s;
}

.card-header:hover .expand-icon {
  color: #bb2525;
}

.card-details {
  display: none;
  padding: 0 0 1rem 0;
  border-top: none;
  background: white;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #444;
}

.card-details p {
  margin-bottom: 0.6rem;
}

.card-details strong {
  color: #222;
  font-weight: 600;
}

.research-card.expanded .card-details {
  display: block;
}

.research-card.expanded .expand-icon {
  transform: rotate(45deg);
  color: #bb2525;
}

.research-card.expanded .card-header {
  background: transparent;
  border-bottom: none;
}

/* Presentations list — clean, minimal */
.presentations-list {
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

.presentation-item {
  display: flex;
  flex-direction: column;  /* Changed from row to column */
  padding: 0.6rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.presentation-title {
  font-weight: 500;
  color: #222;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.course-name {

}

/* Badge container - groups all badges together */
.badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
}

.semester-badge {
  background-color: #f0f0f0;
  color: #555;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  white-space: nowrap;
  margin-top: 0.3rem;
}

.semester-badge.link {
  background-color: #faf0f0;  /* Faint red, matching your site's accent */
  color: #bb2525;              /* Your site's red */
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.semester-badge.link:hover {
  background-color: #bb2525;   /* Your site's red on hover */
  color: white;
  text-decoration: none;
}

.presentation-venue {
  color: #666;
  font-size: 0.8rem;
}


/* Right column photos — keep consistent */
.photo-caption {
  margin-bottom: 1.5rem;
  text-align: center;
}

.photo-caption img {
  width: 100%;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.photo-caption .caption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #666;
  font-style: normal;
  line-height: 1.3;
}
/* Refereed note beside Presentations heading */
.ref-note {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  color: #888;
  margin-left: 0.75rem;
  font-style: normal;
}
/* Teaching page specific column sizes */
.teaching-layout .research-left {
  flex: 1.8;   /* adjust as needed */
}

.teaching-layout .research-right {
  flex: 1.2;   /* adjust as needed */
}

/* Sticky nav mobile toggle button (hidden on desktop) */
.sticky-mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: black;
  padding: 0.5rem;
  line-height: 1;
}

/* ===== MOBILE MENU ===== */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: black;
  padding: 0.5rem;
}

@media (max-width: 768px) {
  /* Hide the regular nav on mobile */
  header nav {
    display: none;
    width: 100%;
    flex-direction: column;
    margin-top: 1rem;
  }
  
  header nav.open {
    display: flex;
  }
  
  header nav a {
    margin-left: 0;
    padding: 0.75rem 0;
    border-top: 1px solid #eaeaea;
  }
  
  header nav a:first-of-type {
    border-top: none;
  }
  
  /* Show the hamburger button */
  .mobile-toggle {
    display: block;
  }
  
  /* Adjust header layout for mobile */
  header {
    position: relative;
    flex-wrap: wrap;
  }
  
  .name-title {
    flex: 1;
  }
  
  /* === STICKY NAV MOBILE CHANGES === */
  /* Hide sticky nav links by default on mobile */
  .sticky-nav nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid #eaeaea;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }
  
  /* Show links when open class is added */
  .sticky-nav nav.open {
    display: flex;
  }
  
  /* Style for the hamburger button in sticky nav */
  .sticky-mobile-toggle {
    display: block !important;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: black;
    padding: 0.5rem;
    line-height: 1;
  }
  
  /* Adjust sticky nav container to allow absolute positioning */
  .sticky-nav .sticky-container {
    position: relative;
  }
  
  /* Style sticky nav links on mobile */
  .sticky-nav nav a {
    margin: 0;
    padding: 0.75rem 0;
    border-top: 1px solid #eaeaea;
  }
  
  .sticky-nav nav a:first-of-type {
    border-top: none;
    margin-left: 0;
  }
  
  /* Adjust sticky nav padding */
  .sticky-nav {
    padding: 0.8rem 1rem;
  }
  
  .sticky-nav .sticky-name {
    font-size: 1.2rem;
  }
}

/* Page heading - larger than section headings */
.page-heading {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: black;
}
