:root {
  --bg: #1c1f24;
  --card-bg: #23272e;
  --fg: #f5f7fa;
  --muted: #a3b1c2;
  --accent: #47d1b1;
  --accent-hover: #66ffe0;
  --alt-section-bg: #262b31;
  --card-border: #2f343c;
  --nav-bg: #1c1f24;
}



* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; }
a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
a:hover { border-bottom-color: var(--accent); }

.container { max-width: var(--mx); margin: 0 auto; padding: 0 1rem; }


.card,
.research-fig,
.software-card,
.award {
  background: var(--card-bg);
  border-color: var(--card-border);
}

.award:hover {
  box-shadow: 0 4px 20px rgba(255,255,255,0.05);
}

.footer {
  border-top: 1px solid var(--card-border);
}

.research-desc,
.card-desc,
.award-summary,
.person-role {
  color: var(--muted);
}

.research-title a,
.award-title a,
.software-text a {
  color: var(--link);
}
.research-title a:hover,
.award-title a:hover,
.software-text a:hover {
  border-bottom-color: var(--link);
}
.site-header {
  background: var(--nav-bg);
  color: #fff;
}
.section-block:nth-of-type(even) {
  background: #141414;
  border-radius: 10px;
  padding: 2rem;
}


/* --- Cards under the hero --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); /* was 12rem */
  gap: 0.75rem;   /* tighter spacing */
  margin: 2rem auto; /* reduce vertical spacing */
}

.card {
  display: grid;
  gap: .2rem;
  padding: 0.75rem 0.75rem;  /* was 1.25rem 1rem */
  border: 1px solid #e7e7e7;
  border-radius: 10px;       /* slightly smaller radius */
  transition: transform .1s ease, box-shadow .1s ease, border-color .1s ease;
}
.card-title {
  font-weight: 600;
  font-size: 1rem;           /* smaller title */
}
.card-desc {
  color: var(--muted);
  font-size: 0.85rem;        /* smaller description */
}


.card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.06); border-color: #ddd; }

.footer { border-top: 1px solid #eee; margin-top: 3rem; }
.footer p { margin: 0; padding: 1.25rem; text-align: center; color: var(--muted); font-size: .95rem; }

/* --- Hero slider (image-first header) --- */
.hero { position: relative; width: 100%; }
.hero-slider { position: relative; height: clamp(340px, 65vh, 720px); overflow: hidden; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }

/* Overlayed title/tagline on the image
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.45), rgba(0,0,0,.10) 40%, rgba(0,0,0,0) 70%); display: grid; place-items: center; text-align: center; padding: 2rem; }
.hero-overlay .lab-title { color: #fff; font-size: clamp(2rem, 5vw, 3.5rem); margin: 0 0 .75rem; letter-spacing: -0.01em; text-shadow: 0 2px 14px rgba(0,0,0,.35); }
.hero-overlay .lab-tagline { margin: 0; font-size: clamp(1rem, 2.2vw, 1.25rem); color: #f4f4f4; text-shadow: 0 1px 10px rgba(0,0,0,.25); } */

.hero-caption {
  text-align: center;
  margin: 2rem auto 0;
}
.hero-caption .lab-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.hero-caption .lab-tagline {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0;
}

/* Dots */
.hero-dots { position: absolute; left: 50%; transform: translateX(-50%); bottom: 14px; display: flex; gap: .5rem; }
.hero-dots .dot { width: 10px; height: 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.3); padding: 0; cursor: pointer; }
.hero-dots .dot.is-active { background: rgba(255,255,255,.95); }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}
.top-banner {
  background: #222;           /* dark background */
  color: #fff;                /* white text */
  text-align: center;
  padding: 0.4rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem 1.25rem;
  margin-top: 1rem;
}

.research-card {
  display: grid;
  gap: .5rem;
}

.research-fig {
  width: 100%;
  aspect-ratio: 16/9;            /* keeps a nice consistent box */
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
}
.research-fig img {
  width: 100%;
  height: 100%;
  object-fit: contain;            /* preserves your illustrations */
  display: block;
}

.research-title {
  font-size: 1.25rem;
  margin: .25rem 0 0;
  line-height: 1.2;
}
.research-title a { text-decoration: none; border-bottom: 1px solid transparent; }
.research-title a:hover { border-bottom-color: currentColor; }

.research-desc {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

/* optional subtle hover lift */
.research-card:hover .research-fig {
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  transform: translateY(-1px);
  transition: box-shadow .15s ease, transform .15s ease;
}

/* --- Top navigation (sticky, black, large) ---
.site-header {
  position: fixed;       /* keeps it visible while scrolling */
  /* top: 0;
  z-index: 1000;
  width: 100%;
  background: #000;       /* black bar */
  /* color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
} */
 

/* Fixed header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #000;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  height: 76px;          /* explicitly set height */
}

/* Push body down to avoid overlap */
body {
  padding-top: 76px;     /* match .site-header height */
}

/* Mobile adjustment if header wraps */
@media (max-width: 720px) {
  .site-header { height: 96px; }
  body { padding-top: 96px; }
}



.nav.container {
  display: flex;
  align-items: center;
  gap: 2rem;              /* spacing between links */
  height: 76px;           /* header height */
}

.nav .brand {
  margin-right: auto;     /* push links to the right */
  font-weight: 700;
  font-size: 1.35rem;     /* bigger brand */
  letter-spacing: .3px;
  color: #fff;
  text-decoration: none;
}

.nav a {
  color: #fff;
  text-decoration: none;
  opacity: .9;
  padding: .25rem 0;
  font-size: 1.05rem;     /* bigger link text */
}

.nav a:hover,
.nav a.active {
  opacity: 1;
  border-bottom: 2px solid #fff;  /* underline on hover/active */
}

/* Adjust anchor scroll offset so section titles aren't hidden under the header */
section.section-block { scroll-margin-top: 84px; }

/* Mobile tweaks */
@media (max-width: 720px) {
  .nav.container { gap: 1rem; height: 64px; }
  .nav a { font-size: 1rem; }
  section.section-block { scroll-margin-top: 72px; }
}
/* Full-width hero with centered logo */
.hero-logo {
  background: #000;              /* background color */
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;                   /* full width */
  height: auto;               
  margin: 0;
  padding: 0;
}

/* Logo as full-width banner */
.hero-logo img {
  width: 100%;          /* stretch across the entire container */
  height: auto;         /* keep aspect ratio */
  display: block;
}

/* On small screens, shrink more */
@media (max-width: 600px) {
  .hero-logo { max-height: 150px; } /* limit height on small screens
  .hero-logo img { object-fit: contain; } /* ensure logo fits well */
}

/* Introductory box below the hero */
.intro-box {
  background: #2d4748e4;        /* light background */
  border-radius: 5px;        /* rounded corners */
  padding: 2rem;              /* spacing inside */
  margin: 2rem auto;          /* space around */
  max-width: auto; /* 900px; */
  box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* subtle shadow */
  text-align: center;
}

.intro-box h2 {
  font-size: 2rem;            /* bigger heading */
  margin-bottom: 1rem;
}

.intro-box p {
  font-size: 1.25rem;         /* larger text */
  line-height: 1.6;
}

.intro-box a {
  color: #2c6b6d;             /* light blue links */
  font-weight: 600;
  text-decoration: none;
}

.intro-box a:hover {
  text-decoration: underline;
}
/* 
.hero-logo .container { max-width: var(--mx); margin: 0 auto; }
.hero-logo img { width: 100%; height: auto; display: block; } */

/* Global safety net */
html, body { width: 100%; overflow-x: hidden; }

/* Never let media overflow the screen */
img, video, svg, canvas { max-width: 100%; height: auto; }

/* Reduce spacing on very small screens */
@media (max-width: 400px) {
  :root { --gap: 0.75rem; }
  .cards { gap: 0.5rem; }
  .card { padding: 0.5rem; }
  .card-title { font-size: 0.9rem; }
  .card-desc { font-size: 0.8rem; }
  .footer p { padding: 0.75rem; font-size: .85rem; }
}



/* Header/nav mobile behavior */
.nav.container {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;                 /* allow wrapping */
}
@media (max-width: 720px) {
  .nav.container { gap: 0.75rem; justify-content: center; }
  .nav a { font-size: 0.95rem; }
}
/* Research grid */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
@media (max-width: 600px) {
  .research-grid { grid-template-columns: 1fr; }  /* single column on phones */
}

/* Card grid, if you still use it anywhere */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.75 rem; }
@media (max-width: 600px) {
  .cards { grid-template-columns: 1fr; }
}

/* Base font size (scales with screen width) */
html {
  font-size: 16px;   /* default for phones */
}

@media (min-width: 900px) {
  html { font-size: 18px; }  /* slightly larger on desktop */
}

@media (min-width: 1400px) {
  html { font-size: 19px; }  /* optional: bigger on very large screens */
}

/* Bigger section titles */
.section-block h2 {
  font-size: 2rem;          /* was ~1.5rem */
  font-weight: 700;
  margin-bottom: 1rem;
  /* text-align: center;       optional: center align */
}

/* Even larger on desktop */
@media (min-width: 900px) {
  .section-block h2 {
    font-size: 2.4rem;
  }
}

/* Compact publication list on home */
#publications .archive__item { margin-bottom: .6rem; }
#publications .archive__item-title { font-size: 1rem; margin: 0; }
#publications .page__meta, 
#publications .archive__item-excerpt { font-size: .95rem; }


/* --- Home page publications section fixes --- */
#publications .archive__item {
  border: none;
  margin-bottom: 0.75rem;
  padding: 0;
}

#publications .archive__item-title {
  font-size: 1rem;             /* smaller font */
  font-weight: 500;
  color: #111;
  margin: 0;
  line-height: 1.4;
}

#publications .archive__item-title a {
  color: #8ab1fe;              /* light blue link */
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

#publications .archive__item-title a:hover {
  border-bottom-color: #82aafa;
}

#publications .archive__item-excerpt {
  font-size: 0.9rem;
  color: #555;
  margin: 0.2rem 0 0.6rem;
}
/* Hide screen-reader-only helper text used by the theme */
.sr-only,
.screen-reader-text,
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
/* --- Software section styling --- */
.software-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1rem;
  background: #f8f9fa;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.software-img {
  flex: 0 0 160px;
  max-width: 160px;
  border-radius: 8px;
}

.software-text {
  flex: 1;
  font-size: 1.1rem;
  line-height: 1.6;
}

.software-text a {
  color: #0077b6;
  text-decoration: none;
  font-weight: 600;
}

.software-text a:hover {
  text-decoration: underline;
}

.software-screenshot {
  display: block;
  margin: 1.5rem auto;
  max-width: 90%;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Mobile layout */
@media (max-width: 700px) {
  .software-card {
    flex-direction: column;
    text-align: center;
  }
  .software-img {
    max-width: 120px;
  }
}

/* --- Awards: clean vertical list --- */
.awards-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem; /* space between items */
}

.award {
  display: block;
  padding-left: 1.8rem;
  position: relative;
  border-left: 3px solid var(--accent, #66ccff); /* subtle colored line */
}

.award::before {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.2rem;
}

.award-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.award-title a {
  color: #66ccff; /* accent color for links */
  text-decoration: none;
}

.award-title a:hover {
  text-decoration: underline;
}

.award-meta {
  color: var(--muted, #aaa);
  font-size: 0.95rem;
  margin-top: 0.15rem;
}

.award-summary {
  color: var(--fg, #ddd);
  font-size: 0.95rem;
  margin-top: 0.35rem;
}



/* --- People grid (home) --- */
.people-grid {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem 3rem; /* 2rem vertical, 3rem horizontal */
  align-items: start;
}

.person a { text-decoration: none; color: inherit; display: block; text-align: center; }

.avatar {
  width: 260px;                 /* desktop size */
  height: 260px;
  max-width: 70vw;              /* safe on very small screens */
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;            /* clean circle crop */
  display: block;
}

.person-name {
  font-weight: 700;
  font-size: 1.15rem;
  margin-top: .15rem;
}

.person-role {
  color: #666;
  font-size: 1rem;
  margin-top: .2rem;
}

.people-subtitle {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  color: var(--accent, #66ccff);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 0.4rem;
}

/* Hover/focus lift */
.person a:hover .avatar,
.person a:focus .avatar {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0,0,0,.18);
  transition: transform .12s ease, box-shadow .12s ease;
}

/* Mobile sizing */
@media (max-width: 700px) {
  .avatar { width: 180px; height: 180px; }
  .person-name { font-size: 1.05rem; }
  .person-role { font-size: 0.95rem; }
}

/* Alternate section shading */
.section-block:nth-of-type(even) {
  background: var(--alt-section-bg);
  border-radius: 14px;
  padding: 3rem 2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

/* Links */
a {
  color: var(--link);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

/* Cards / Boxes */
.card, .research-card, .software-card, .award {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

/* Text tones */
.research-desc, .card-desc, .award-summary, .person-role {
  color: var(--muted);
}

/* Smooth section transitions */
.section-block {
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* --- Publications section --- */
.pub-list {
  display: grid;
  gap: 1.5rem;
  margin-top: 1rem;
}

.pub-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

/* Publication title */
.pub-title {
  font-size: 1.2rem;
  margin: 0.3rem 0 0.4rem;
  line-height: 1.4;
}

.pub-title a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.pub-title a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

/* Authors and metadata */
.pub-authors {
  font-size: 0.98rem;
  color: var(--muted);
  margin: 0.25rem 0;
}

.pub-meta {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pub-meta span + span::before {
  content: " · ";
  color: var(--muted);
}

.pub-summary {
  font-size: 0.95rem;
  color: var(--fg);
  margin-top: 0.6rem;
}

/* Make first few stand out (optional) */
.pub-card:first-of-type {
  border-left: 4px solid var(--accent);
}
.nav.container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Logo + name block */
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.3px;
  opacity: 0.95;
}

.brand:hover {
  opacity: 1;
}

.nav-logo {
  height: 36px;       /* smaller logo height (was 34px) */
  width: auto;
  border-radius: 3px;
  vertical-align: middle;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;   /* reduce font size slightly */
  letter-spacing: 0.2px;
  opacity: 0.95;
}

.brand:hover {
  opacity: 1;
}


.nav-links {
  display: flex;
  gap: 1.75rem;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 1.05rem;
  opacity: 0.9;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
  border-bottom: 2px solid var(--accent, #fff);
}
.nav.container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 70px;   /* or slightly less (was 76px) */
}
body {
  padding-top: 70px;   /* match the header height */
}
.nav-links {
  display: flex;
  gap: 1.6rem;   /* reduce gap slightly for balance */
  align-items: center;
}

.person-links {
  margin-top: 0.6rem;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* circular “pills” like Academic-CV */
.link-pill {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.06);               /* works on dark */
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.link-pill:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.10);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

.link-pill img {
  width: 22px;    /* logo size inside the circle */
  height: 22px;
  display: block;
}

/* smaller on phones */
@media (max-width: 520px) {
  .link-pill { width: 40px; height: 40px; }
  .link-pill img { width: 20px; height: 20px; }
}


/* Avatar */
.avatar {
  width: 260px;
  height: 260px;
  margin: 0 auto .75rem;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(100% 100% at 50% 0%, #23282f 0%, #171b20 100%);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Social icons: larger, with white pill background */
.person-links {
  margin-top: 0.7rem;
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.link-pill {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fff;                          /* ← whiter background */
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  transition: transform .15s ease, box-shadow .15s ease;
}

.link-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,.24);
}
/* Sleek transparent icon buttons for dark mode */
.link-pill {
  width: 58px;
  height: 58px;
  /* border-radius: 50%; */
  display: grid;
  place-items: center;
  background: transparent;              /* no background */
  /* border: 1px solid rgba(255, 255, 255, 0.25); subtle border */
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.link-pill img {
  width: 45px;                          /* slightly larger */
  height: 45px;
  filter: invert(1);                    /* make black icons white */
  opacity: 0.9;
  transition: opacity .15s ease, transform .15s ease;
}

.link-pill:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.1); /* light translucent hover */
}

.link-pill:hover img {
  opacity: 1;
  transform: scale(1.08);
}

.person-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Mobile: slightly reduce size */
@media (max-width: 520px) {
  .link-pill { width: 52px; height: 52px; }
  .link-pill img { width: 28px; height: 28px; }
}

/* --- Image-first research cards --- */
#research-topics .topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 0.75rem;
}

.topic-card {
  background: #242a31;                       /* dark card */
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  overflow: hidden;                           /* clip image corners */
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.topic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(0,0,0,.30);
  border-color: rgba(255,255,255,.16);
}

/* Image header */
.topic-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;                         /* consistent header height */
  background: #1b1f24;
}

.topic-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;                           /* fill nicely */
  display: block;
}

/* Subtle gradient overlay for contrast (optional) */
.topic-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,.12));
  pointer-events: none;
}

.topic-media--placeholder {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    45deg,
    #2a3037,
    #2a3037 10px,
    #303841 10px,
    #303841 20px
  );
}

.topic-body {
  padding: 0.9rem 1rem 1.1rem;
}

.topic-title {
  font-size: 1.1rem;
  font-weight: 750;
  margin: 0 0 .35rem;
  color: #f3f6f9;
  line-height: 1.35;
}

.topic-title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.topic-title a:hover { border-bottom-color: currentColor; }

.topic-desc {
  margin: 0;
  color: #b8c4d4;
  line-height: 1.55;
  font-size: .98rem;
}

/* Larger on big screens, tighter on phones */
@media (min-width: 1100px) {
  .topic-title { font-size: 1.15rem; }
}

@media (max-width: 600px) {
  .topic-desc { font-size: .96rem; }
}


/* 2) Keep the research section constrained and centered */
#research-topics {
  max-width: var(--mx);
  margin: 0 auto;
}

/* 3) Force 3 parallel cards on desktop, shrink responsively */
#research-topics .topic-card {
  display: grid;
  grid-template-rows: auto 1fr; /* image + body */
}



#research-topics .topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 columns */
  gap: 1.25rem 1.5rem;
  align-items: stretch;
}
@media (max-width: 1000px) {
  #research-topics .topic-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* responsive */
  }
}
/* #research-topics .topic-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
} */

/* Optional: slightly smaller text in cards */
#research-topics .topic-title { font-size: 1.05rem; }
#research-topics .topic-desc  { font-size: .95rem; }

/* --- People grid adjustments --- */


.person {
  display: flex;
  flex-direction: column;
  align-items: center; /* Centers everything horizontally */
  justify-content: flex-start;
  text-align: center;  /* Ensures name and title are centered */
  margin: 0 auto;
}

.person-name,
.person-role {
  text-align: center;
  margin: 0.4em 0;
}
.people-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;  /* space between people, try 3rem if you want looser spacing */
  margin-top: 2rem;
}
.person {
  max-width: 220px;  /* consistent card width */
}
@media (max-width: 900px) {
  .people-grid {
    gap: 1.5rem;
  }
}
