:root{
/* UPDATED: A slightly deeper, premium slate-grey background */
  --bg: #EAEFF2;          
  
/* UPDATED: A darker structural grey for alternate section contrast */
  --bg2: #DFE4E8;

 /* CHANGE THIS: Pale cyan-tinted panel backgrounds instead of pure white */
  --card: #F0F4F8;

 /* Deep Ink Charcoal matching the logo's typography text */
  --text: #111827;

/* Highly readable dark grey for secondary description strings */
  --muted: #4B5563;

/* Clean, professional border lines */
  --line: #D8DADF;

/* CHANGE THIS: Shift from bright red to an elegant, dark academic Crimson Maroon */
  --accent: #8A1C1C;

  --header-h: 72px;
  --container: 1100px;
  --radius: 12px;         /* Slightly sharper corners for a professional feel */
}
#top{
  scroll-margin-top: var(--header-h);
}


*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg); /* Removed the neon radial gradients */
  line-height:1.6;
}

/* Sticky header (pinned menu) */
.site-header{
  position: fixed;
  top:0;
  left:0;
  right:0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 1000;
}

.header-inner{
  height:100%;
  max-width: var(--container);
  margin:0 auto;
  padding: 0 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  color: var(--text);
  text-decoration:none;
  min-width: 220px;
}
/* Logo wrapper blends logo into dark header */
.brand-logo-wrap{
  background: rgba(11,13,18,0.95); /* same tone as header */
  padding: 6px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-logo{
  height: 38px;          /* controls visual size */
  width: auto;
  max-width: 60px;
  object-fit: contain;
  display: block;
}
.brand-title{
  font-weight: 800;
  letter-spacing: .5px;
}
.brand-subtitle{
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.site-nav{
  display:flex;
  gap: 14px;
  align-items:center;
}
.nav-link{
  color: var(--muted);
  text-decoration:none;
  padding: 10px 10px;
  border-radius: 10px;
  transition: background .15s ease, color .15s ease;
}
.nav-link:hover{
  color: var(--text);
  background: rgba(255,255,255,.06);
}
.nav-link.is-active{
  color: var(--text);
  background: rgba(122,162,255,.16);
  outline: 1px solid rgba(122,162,255,.25);
}

/* Mobile nav toggle */
.nav-toggle{
  display:none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  cursor:pointer;
}
.nav-toggle span{
  display:block;
  width: 18px;
  height: 2px;
  background: var(--text);
  margin: 5px auto;
  opacity: .9;
}

/* Layout helpers */
main{ padding-top: var(--header-h); }
.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 18px;
}

.section{
  padding: 84px 0;
  scroll-margin-top: calc(var(--header-h) + 14px); /* prevents anchor from hiding under fixed header */
}
.section.alt{
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.03), transparent);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-title{
 font-size: clamp(38px, 4.5vw, 56px);  /* BIGGER, responsive */
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.section-lead{
  color: var(--muted);
  margin: 0 0 26px 0;
  max-width: 850px;
}

.section.is-screen{
  min-height: calc(100vh - var(--header-h));
  display:flex;
  align-items:center;
}


/* On smaller screens keep spacing comfortable */
@media (max-width: 900px){
  .section.is-screen{
    min-height: auto;
    display:block;
  }
}

.reveal{
    opacity: 0;
    transform: translateY(18px);
    transition:
    opacity 1.1s ease,
    transform 1.1s ease;
}
.section-title.reveal{
  transition-delay: 0s;
}

.section-lead.reveal{
  transition-delay: 0.15s;
}

.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}
/* Modal blur */
body.modal-open main,
body.modal-open header,
body.modal-open footer{
  filter: blur(4px);
  transition: filter .2s ease;
}
/* Ensure all modal text is crisp dark grey/black */
.modal-body, 
.pi-bio, 
.course-desc, 
.research-text p, 
.research-bullets li {
  color: var(--text) !important; 
  opacity: 1 !important;         /* Removes the "blurred" look */
  font-size: 16px;
  line-height: 1.7;
}
.course-desc b {
  color: var(--accent); /* Highlights "Course description:" */
}
/* Lock page scrolling while modal is open */
body.modal-open{
  overflow: hidden;
}
/* Overlay */
.modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
  padding-top: 88px;
}

.modal-overlay.is-open{
  display:flex;
}

/* Modal window slides forward (like moving toward viewer) */
.modal{
  width: 100%;
  max-width: 1120px;
  max-height: 88vh;
  overflow: auto;
  border-radius: 18px;
  padding: 32px;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  background: #FFFFFF !important; /* Forces pure white instead of the card tint */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  color: var(--text);
  backdrop-filter: blur(12px);

  transform: translateY(-2vh) scale(.96);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
  position: relative;
}

.modal-overlay.is-open .modal{
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Back arrow */
.modal-back{
  position: sticky;
  top: 0;
  left: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--text);
  cursor: pointer;
  margin: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
/* ============================
   PI modal layout
   ============================ */

.pi-modal{
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

.pi-photo img{
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.pi-bio{
  font-size: 16px;
  line-height: 1.7;
  color: var(--text) !important;
  opacity: 1 !important;         /* Removes the "blurred" look */
}
.pi-bio strong {
  color: var(--accent); /* Makes names/highlights pop in Cooper Red */
}
.pi-links p, 
.pi-links a, 
.pi-email {
  color: var(--text) !important;
  font-size: 16px;
  text-decoration: none;
  opacity: 1 !important;
}
.pi-links a:hover, 
.pi-email:hover {
  color: var(--accent) !important;
  text-decoration: underline;
}

.pi-bio p{
  margin-bottom: 14px;
}

/* PI links under photo — same scale as bio text */
.pi-links{
  margin-top: 16px;
}

.pi-links p{
  margin: 0 0 8px 0;
  font-size: 16px;          /* SAME as .pi-bio */
  line-height: 1.6;
}

.pi-links a:hover{
  text-decoration: underline;
}

.pi-email:hover{
  opacity: .85;
}

.pi-email.copied{
  color: #7dd3fc; /* subtle confirmation color */
}

/* Mobile fallback */
@media (max-width: 720px){
  .pi-modal{
    grid-template-columns: 1fr;
  }
  .pi-photo{
    max-width: 220px;
    margin: 0 auto;
  }
}

.modal-content{
  padding: 0 22px 22px 22px;
}

.modal-title{
  margin: 0 0 20px 0;
  font-size: 32px;
  font-weight: 800;
  color: var(--text);                /* Clear dark title */
  letter-spacing: -0.02em;
  border-bottom: 2px solid var(--accent); /* Adds a professional underline */
  padding-bottom: 10px;
}

.modal-body{
  color: var(--muted);
  line-height: 1.65;
}

/* Make person cards look clickable */
.person-trigger{
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;

/* Matches Research & Publication panels */
  background: var(--card) !important;
  border: 1px solid var(--line);
  border-radius: var(--radius) !important;
  padding: 28px 24px;
  min-height: 420px;

/* Lift and Shadow (Base state) */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transform: translateY(0);
}

/* ============================
   Wavepia-style full-screen hero
   ============================ */

/* Use full screen for intro hero */
.section.hero.is-screen{
  position: relative;
  padding: 0; /* remove padding so image fills */
  min-height: calc(100vh - var(--header-h));
  overflow: hidden;
}
/* Introduction hero must not inherit .section.is-screen flex layout */
#introduction.section.is-screen{
  display: block;
}


/* Background layer */
.hero-bg{
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img{
 position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  /* FORCE zoomed-out initial state */
  opacity: 0;
  transform: scale(0.97);

  will-change: opacity, transform;

  animation: heroFadeZoom 15s infinite ease-in-out;
  animation-fill-mode: both;   /* apply 0% frame during delay */
}

/* Stagger the three images */
.hero-bg-img.is-1{ animation-delay: 0s; }
.hero-bg-img.is-2{ animation-delay: 5s; }
.hero-bg-img.is-3{ animation-delay: 10s; }

/* Dark readability overlay (adjust to taste) */
.hero-shade{
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(900px 560px at 50% 40%, rgba(0,0,0,.10), rgba(0,0,0,.65)),
    linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.65));
}

/* Foreground content */
.hero-foreground{
  position: relative;
  z-index: 2;
  height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-copy{
  max-width: 980px;          /* slightly tighter for centered layout */
  margin: 0 auto;
  padding: 0 18px;
  text-align: center;        /* ADD */
}

.hero-headline{
  margin: 0 0 14px 0;
  font-size: clamp(44px, 6vw, 82px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #FFFFFF;                  /* Explicitly White */
  text-shadow: 0 2px 10px rgba(0,0,0,0.3); /* Adds a "lift" for readability */
  opacity: 0;
  transform: translateY(14px);
  animation: heroTextIn .9s ease forwards;
  animation-delay: .15s;
}

.hero-tagline{
  margin: 0;
  max-width: 70ch;
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255, 255, 255, 0.9); /* High-opacity white for readability */
  text-shadow: 0 1px 5px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translateY(14px);
  animation: heroTextIn .9s ease forwards;
  animation-delay: .30s;
  margin-left: auto;
  margin-right: auto;
}

/* Text fade-up */
@keyframes heroTextIn{
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

/* Background crossfade + gradual growth (Wavepia-like) */
@keyframes heroFadeZoom{
 /* Hidden: zoomed OUT */
  0%{
    opacity: 0;
    transform: scale(0.97);
  }

  /* Fade in, still zoomed OUT */
  8%{
    opacity: 1;
    transform: scale(0.97);
  }

  /* Gradual zoom IN */
  30%{
    opacity: 1;
    transform: scale(1.08);
  }

  /* Fade out near peak */
  46%{
    opacity: 0;
    transform: scale(1.10);
  }

  /* Reset fully */
  100%{
    opacity: 0;
    transform: scale(0.97);
  }
}

/* Hero */


.hero-inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 18px;
  display:grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
  align-items: start;
}
.hero-slides{
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  min-height: 340px;
}
.hero-slide{ display:none; }
.hero-slide.is-active{ display:block; }

.hero-title{
  font-size: 56px;
  line-height: 1.05;
  margin: 0 0 12px 0;
  letter-spacing: -0.03em;
}
.hero-title.smaller{
  font-size: 44px;
}
.hero-subtitle{
  margin: 0 0 18px 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 62ch;
}
.hero-cta{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn{
  display:inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration:none;
  color: var(--text);
  background: rgba(122,162,255,.18);
  border: 1px solid rgba(122,162,255,.30);
}
.btn:hover{ background: rgba(122,162,255,.24); }
.btn-ghost{
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
}
.btn-ghost:hover{ background: rgba(255,255,255,.07); }

.hero-bullets{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pill{
  font-size: 13px;
  color: var(--text);
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
}

.hero-controls{
  display:flex;
  gap: 8px;
  margin-top: 12px;
  padding-left: 8px;
}
.dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  cursor:pointer;
}
.dot.is-active{
  background: rgba(122,162,255,.35);
  border-color: rgba(122,162,255,.50);
}

.hero-card{
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  padding: 18px;
  margin-bottom: 12px;
}
.hero-card.muted{
  background: rgba(255,255,255,.02);
}
.hero-card-title{
  font-weight: 700;
  margin-bottom: 10px;
}
.hero-card-list{
  list-style:none;
  padding:0;
  margin:0;
  color: var(--muted);
}
.hero-card-list li{ margin: 8px 0; }
.hero-card-list span{
  color: var(--text);
  margin-right: 8px;
}
.hero-card-text{
  margin:0;
  color: var(--muted);
}

/* Cards / grids */
.grid{
  display:grid;
  gap: 14px;
}
.grid.cards{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid.people{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid.contact{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card{
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);

/* FIX 1: Round the corners identically to the rest of the site */
  border-radius: var(--radius); 
  
  /* FIX 2: Add space between the information text and the panel edges */
  padding: 32px 28px; 
  
  /* Ensures proper layout behaviors for inner items */
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card h3{ margin: 0 0 4px 0; }
.card p{ margin: 0; color: var(--muted); }
.card ul{ margin: 10px 0 0 18px; color: var(--muted); }

#contact .card a{
  color: #7aa2ff;
  text-decoration: none;
  font-weight: 500;
}

#contact .card a:hover{
  text-decoration: underline;
}
/* Ensure Contact->Links anchors are always clickable even if cards use overlays */
.contact-links-card{
  position: relative;
}

.contact-links-card a{
  position: relative;
  z-index: 5;
}

/* If your .card uses pseudo-element overlays for glow/hover, don't let them capture clicks */
.contact-links-card::before,
.contact-links-card::after{
  pointer-events: none;
}

.avatar{
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  margin-bottom: 12px;
}

.small{ font-size: 13px; }
.muted-text{ color: var(--muted); }

/* Publications */
/* Publication cards behave like People cards */
.pub-trigger{
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;

  background: var(--card);
--pub-surface: var(--card);
  color: var(--text);
  border: 1px solid var(--line);

  padding: 48px 40px;      /* bigger padding */
  min-height: 420px;       /* taller panels */
  border-radius: var(--radius);
  position: relative;   /* ADD */
  overflow: hidden;     /* ADD */

}
/* Hover highlight overlay for Publication cards (no background replacement) */
.pub-trigger::before{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(122,162,255,0.12); /* same highlight tint you like */
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
  z-index: 1;
}

.pub-trigger:hover::before,
.pub-trigger:focus-visible::before{
  opacity: 1;
}
.pub-trigger > *{
  position: relative;
  z-index: 2;
}


.pub-trigger h3{
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}

.pub-trigger p{
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}
/* Publication preview inside panels */
.pub-preview{
  position: relative;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.10);

  font-size: 14px;
  line-height: 1.6;
  color: var(--text);                /* Dark text for papers */

  max-height: none;                  /* Remove height restriction */
  overflow: visible;
}

/* soft fade at bottom */
.pub-preview::after{
  display: none;                     /* Removes the gradient overlay */
}

/* preview formatting */
.pub-preview .pub-year{
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent);              /* Use Cooper Red for the year */
}

.pub-preview ul{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);               /* Muted grey for the paper titles */
}

.pub-preview li{
  margin: 0 0 8px 0;
}

.pub-list{
  display:flex;
  flex-direction:column;
  gap: 12px;
  margin: 0;
  padding-left: 18px;
}
.pub{
  display:grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  border-radius: var(--radius);
  padding: 14px;
}

.pub-year-block{ margin: 0 0 18px 0; }

.pub-year{
  margin: 24px 0 12px 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.pub-items{
  margin: 0;
  padding-left: 18px;
}

.pub-items li{
  margin: 0 0 12px 0;
  line-height: 1.6;
  color: var(--muted);               /* Standardized readable grey */
}
/* Bold the authors and titles for academic feel */
.pub-items li em {
  color: var(--text);
  font-style: italic;
}

.pub-title{ font-weight: 700; }
.pub-meta, .pub-venue{ color: var(--muted); margin-top: 4px; }
.pub-links{ margin-top: 8px; display:flex; gap: 12px; flex-wrap:wrap; }
.pub-links a{ color: var(--text); opacity: .85; text-decoration:none; border-bottom: 1px solid rgba(255,255,255,.25); }
.pub-links a[aria-disabled="true"]{ opacity: .4; pointer-events:none; border-bottom-color: transparent; }

.pub-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 820px){
  .pub-grid{
    grid-template-columns: 1fr;
  }
}

/* 1. Base state: Define how the cards look normally */
.person-trigger,
.pub-trigger,
.research-trigger {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transform: translateY(0);
  /* Unified timing: 0.18s matches your Publication cards for a "snappy" feel */
  transition: 
    transform .18s cubic-bezier(.2, .8, .2, 1),
    box-shadow .18s cubic-bezier(.2, .8, .2, 1),
    background .18s ease,
    border-color .18s ease !important;
  position: relative;
  overflow: hidden; /* Necessary for the highlight overlay */
}

/* 2. Hover state: Define the "Lift" */
.person-trigger:hover,
.pub-trigger:hover,
.research-trigger:hover {
  background: var(--card);
/* UPDATED: Thicker border edge (2.5px) using the school's red accent */
  border: 2.5px solid var(--accent) !important;

  border-color: var(--accent) !important;
  transform: translateY(-8px) !important;
  box-shadow: 0 25px 40px -8px rgba(17, 24, 39, 0.25) !important;
}

/* This mimics the ::before effect currently on your .pub-trigger */
.person-trigger::before,
.pub-trigger::before,
.research-trigger::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(122, 162, 255, 0.12); /* Light blue highlight */
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
  z-index: 1;
}

.person-trigger:hover::before,
.pub-trigger:hover::before,
.research-trigger:hover::before {
  opacity: 1;
}

/* Ensure content stays above the highlight */
.person-trigger > *,
.pub-trigger > *,
.research-trigger > * {
  position: relative;
  z-index: 2;
}

/* Footer */
.footer{
  border-top: 1px solid var(--line);
  padding: 18px 0;
  color: var(--muted);
}
.footer-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
}
.to-top{
  color: var(--text);
  text-decoration:none;
  opacity: .85;
}
.to-top:hover{ opacity: 1; }

/* Responsive */
@media (max-width: 900px){
  .hero-inner{ grid-template-columns: 1fr; }
  .grid.cards, .grid.people, .grid.contact{ grid-template-columns: 1fr; }
  .site-nav {
    position: absolute;
    top: calc(var(--header-h) + 8px);
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    background: #FFFFFF !important; /* Forces pure white instead of the card tint */
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 1000;
  }
  .section.is-screen{
    min-height: auto;
    display:block;
  }
  .site-nav.is-open{ display:flex; }
  .nav-toggle{ display:block; }
  .brand{ min-width: unset; }
}

/* ============================
   People section – card labels
   ============================ */
/* People card icon (outline group) */
.people-icon{
  color: rgba(235,240,255,.92);
  opacity: .95;
}

/* SVG wrapper uses the same frame as .person-photo (PI photo sizing) */
.person-icon-wrap{
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;          /* keeps it clean inside the photo frame */
}

/* SVG itself: keep square + crisp geometry */
.people-icon-lg{
  width: 86%;                /* controls how large inside the frame */
  height: 86%;
  color: rgba(235,240,255,.92);
}

/* Main label: PI / MS-UG / Alumni */
.person-trigger h3{
  font-size: 28px;                 /* larger, readable */
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text) !important;
  margin-bottom: 8px;
}

/* Secondary description text */
.person-trigger p{
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

/* Small muted line */
.person-trigger .muted-text{
  color: var(--muted);
  margin-top: 6px;
}


/* Remove default button styles */
.person-trigger{
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  align-items: flex-start;
}
/* PI portrait inside People card (rectangular, contained) */
.person-photo{
  width: 100%;
  max-width: 140px;        /* controls visual size */
  height: 170px;           /* portrait aspect */
  object-fit: cover;       /* crop nicely */
  border-radius: 10px;     /* subtle rounding */
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  margin-bottom: 0;
}

/* Alumni icon: make it appear larger inside the same frame */
.person-icon--alumni{
  padding: 10px;   /* smaller than 18px -> icon looks bigger */
}


/* Make placeholder avatar match the photo size */
.person-trigger .avatar{
  width: 58px;
  height: 58px;
}

/* Stagger animation for People cards (Wavepia-like sequencing) */
.grid.people .reveal{
  transition: opacity .65s ease, transform .65s ease;
}

/* Delay each card slightly */
.grid.people .reveal:nth-child(1){ transition-delay: 0ms; }
.grid.people .reveal:nth-child(2){ transition-delay: 120ms; }
.grid.people .reveal:nth-child(3){ transition-delay: 240ms; }

/* Force-center the Introduction hero text (final override) */
#introduction .hero-foreground{
  justify-content: center !important;
  text-align: center !important;
}

#introduction .hero-copy{
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  text-align: center !important;
}

#introduction .hero-headline,
#introduction .hero-tagline{
  text-align: center !important;
}

/* ============================
   Research cards title styling
   ============================ */

.research-trigger h3{
  font-size: 24px;           /* larger */
  font-weight: 700;          /* bold */
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0 0 10px 0;
}

.research-trigger p{
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}
/* Research panels: same base look/behavior as Publication cards */
.research-trigger{
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;

  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);

  padding: 32px 28px;     /* ↓ smaller */
  min-height: 220px;      /* ↓ about 2/3 of a tall card */
  width: 100%;

  transform: translateY(0);
  transition:
    transform .18s cubic-bezier(.2,.8,.2,1),
    box-shadow .18s cubic-bezier(.2,.8,.2,1),
    background .18s ease,
    border-color .18s ease;
}
/* FINAL OVERRIDE: keep Research hover consistent */
/*
.research-trigger:hover,
.research-trigger:focus-visible{
  background: rgba(122,162,255,0.12) !important;
  border-color: rgba(122,162,255,0.55) !important;
  transform: translateY(-8px) !important;
  box-shadow: 0 18px 40px rgba(0,0,0,0.45) !important;
}
*/
.course-term{
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 14px 0;
}

.course-block{
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.course-header{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.course-name{
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
}

.course-code{
  color: var(--muted);
  font-weight: 700;
}

.course-link{
color: var(--accent) !important;
  font-weight: 700;
}

.course-link:hover{
  text-decoration: underline;
}

/* ============================
   Light (warm) modal for Research Theme1
   ============================ */

.modal.light-modal{
  background: #fbf8f3;
  color: #1a1a1a;
}

/* Override text colors inside */
.modal.light-modal h3,
.modal.light-modal h4,
.modal.light-modal p,
.modal.light-modal li{
  color: #1a1a1a;
}

/* Optional: softer border for bright theme */
.modal.light-modal{
  border: 1px solid rgba(0,0,0,0.08);
}

/* Close button visibility */
.modal.light-modal .modal-back{
  color: #333;
}

/* Diagram styling */
.research-diagram{
  width: 100%;
  max-width: 700px;
  display: block;
  margin: 0 auto 20px auto;
  border-radius: 8px;
}

/* ============================
   Research paper-style layout (ADD ONLY)
   ============================ */

.research-paper{
  max-width: 900px;
  margin: 0 auto;
}

/* Centered figure like conference paper */
.research-figure{
  margin: 0 0 26px 0;
  text-align: center;
}

.research-diagram{
  display: block;
  width: 100%;
  max-width: 760px;
  margin: 0 auto 10px auto;
  height: auto;
}

/* Caption under figure */
.research-caption{
  font-size: 14px;
  line-height: 1.5;
  color: #555;              /* slightly softer than text */
  font-style: italic;
}

/* Paragraph spacing */
.research-text{
  color: var(--muted);   /* match Course modal */
}

.research-text p{
  margin: 0 0 16px 0;
  line-height: 1.75;
  color: inherit;        /* ensures consistency */
}

/* Bullet contributions */
.research-bullets{
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}

.research-bullets li{
  margin: 0 0 14px 0;
  line-height: 1.75;
  color: var(--muted);
}

.grid.research-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}

@media (max-width: 900px){
  .grid.research-grid{
    grid-template-columns: 1fr;
  }
}

/* ============================
   MS Students modal layout
   ============================ */

.students-modal{
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 100%;
}

.student-card{
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: start;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.student-photo{
  width: 100%;
  max-width: 180px;
  height: 220px;
  object-fit: cover;
  object-position: center top;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}

.student-photo-top{
  object-position: center top;
}

.student-info{
  min-width: 0;
}

.student-name{
  margin: 0 0 10px 0;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.student-topic,
.student-contact{
  margin: 0 0 12px 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}
/* Make "Thesis" and "Current Affiliation" labels bold and accented */
.student-topic strong {
  color: var(--text);
  font-weight: 700;
}
.student-topic:has(em), 
.student-topic:contains("Current Affiliation") {
  padding: 8px 12px;
  background: var(--bg2); /* Subtle warm grey background */
  border-radius: 6px;
  display: inline-block;
  border-left: 3px solid var(--accent); /* Professional red accent line */
}
/* Ensure the Alumni/Student icons have a professional container */
.person-photo.person-icon {
  width: 100%;
  max-width: 140px;        /* Matches PI max-width */
  height: 170px;           /* Matches PI height */
  object-fit: cover;     
  padding: 0;           /* Provides breathing room inside the frame */
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;  /* Fixes the black background issue */
  opacity: 1 !important;
  display: block;
}

.person-icon--alumni {
transform: scale(1.1);
}

.student-topic a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.student-topic a::before {
  content: "↓"; /* Simple download arrow */
  font-weight: 900;
}

.student-topic a:hover {
  text-decoration: underline;
}

.student-contact a{
  color: #7aa2ff;
  text-decoration: none;
}

.student-contact a:hover{
  text-decoration: underline;
}

@media (max-width: 760px){
  .student-card{
    grid-template-columns: 1fr;
  }

  .student-photo{
    max-width: 220px;
  }
}

/* Section title inside MS modal (matches modal title style) */
.student-section-title{
  font-size: 26px;           /* same scale as modal title */
  font-weight: 700;
  color: var(--text) !important;
  margin: 30px 0 10px 0;
  letter-spacing: -0.02em;
}

.copy-email{
  color: #7aa2ff;
  cursor: pointer;
}

.copy-email:hover{
  text-decoration: underline;
}

/* ============================
   Research popup hero slideshow (ADD ONLY)
   ============================ */

.research-hero{
  position: relative;
  width: 100%;
  height: 360px;
  margin: 0 0 26px 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: #f6f1e8;
}

.research-hero-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.97);
  will-change: opacity, transform;
  animation: researchFadeZoom 12s infinite ease-in-out;
  animation-fill-mode: none;
}

.research-hero-img.is-1{ animation-delay: 0s; }
.research-hero-img.is-2{ animation-delay: 6s; }

.research-hero-shade{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  pointer-events: none;
}

@keyframes researchFadeZoom{
  0%{
    opacity: 1;
    transform: scale(0.97);
  }
  42%{
    opacity: 1;
    transform: scale(1.02);
  }
  50%{
    opacity: 0;
    transform: scale(1.04);
  }
  100%{
    opacity: 0;
    transform: scale(0.97);
  }
}
.research-text strong,
.research-bullets strong{
  color: var(--accent);
}

/*
   Create this NEW RULE to target the header icons.
   Make sure this rule comes after the general h2 styling, or after the general image styling.
*/
h2 img.header-icon {
    /* 1. Ensure the background of the image is transparent */
    background-color: transparent;

    /* 2. Optional but highly recommended styles for better alignment and spacing: */
    height: 1em; /* Set the icon height to be relative to the text size */
    width: auto; /* Maintain the image's aspect ratio */
    vertical-align: middle; /* Align the icon with the middle of the text */
    margin-right: 10px; /* Add a little space between the icon and the text */
}