/* ==========================================================================
   Srivastava Lab – site stylesheet
   Palette and type match the original template: blue #3368c6, navy #031b4e,
   Poppins headings, Roboto body text.
   ========================================================================== */

:root {
  --primary: #3368c6;
  --primary-dark: #2552a6;
  --navy: #031b4e;
  --text: #5b6478;
  --muted: #8a91ac;
  --tint: #f6faff;
  --border: #eaeff5;
  --white: #fff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(3, 27, 78, .08);
  --shadow-hover: 0 14px 34px rgba(3, 27, 78, .14);
  --container: 1170px;
  --header-h: 107px;
  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Roboto", system-ui, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 10px); }
body {
  margin: 0;
  font: 400 15px/1.7 var(--font-body);
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4, h5 { font-family: var(--font-head); color: var(--navy); font-weight: 700; line-height: 1.3; margin: 0 0 .6em; }
h2 { font-size: clamp(26px, 3vw, 33px); }
h3 { font-size: 19px; font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
::selection { background: var(--primary); color: #fff; }
:focus-visible { outline: 3px solid rgba(51, 104, 198, .45); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; color: #fff; }
.container { width: 100%; max-width: calc(var(--container) + 30px); margin: 0 auto; padding: 0 15px; }
.center { text-align: center; }
.icon { flex: none; vertical-align: -.15em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 14px/1 var(--font-body);
  padding: 13px 28px; border-radius: var(--radius-sm);
  border: 2px solid transparent; cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, transform .25s, box-shadow .25s;
}
.btn .icon { width: 16px; height: 16px; }
.btn-lg { font-size: 15px; padding: 15px 34px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(51, 104, 198, .28); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-light { background: var(--tint); color: var(--navy); border-color: var(--border); }
.btn-light:hover, .btn-light[aria-expanded="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Top bar ---------- */
.topbar { background: var(--primary); color: #fff; font-size: 14px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 50px; gap: 16px; }
.topbar-contact { display: flex; flex-wrap: wrap; gap: 6px 34px; }
.topbar a { color: #fff; display: inline-flex; align-items: center; gap: 8px; }
.topbar a:hover { color: rgba(255, 255, 255, .8); }
.topbar-social { display: flex; gap: 6px; }
.topbar-social a { width: 32px; height: 32px; justify-content: center; border-radius: 50%; }
.topbar-social a:hover { background: rgba(255, 255, 255, .15); color: #fff; }

/* ---------- Header & navigation ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; transition: box-shadow .3s; }
.site-header.scrolled { box-shadow: 0 6px 20px rgba(3, 27, 78, .08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 20px; }
.brand img { width: 125px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.menu { display: flex; list-style: none; }
.menu > li { position: relative; }
.menu > li > a,
.menu .sub-toggle {
  display: flex; align-items: center; gap: 4px;
  font: 500 15px/1 var(--font-body); color: var(--navy);
  padding: 46px 17px; background: none; border: 0; cursor: pointer;
}
.menu > li > a:hover, .menu .sub-toggle:hover,
.menu > li.active > a, .menu > li.active > .sub-toggle { color: var(--primary); }
.menu > li > a::after, .menu .sub-toggle::after {
  content: ""; position: absolute; left: 17px; right: 17px; bottom: 32px; height: 2px;
  background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.menu > li.active > a::after, .menu > li > a:hover::after,
.menu > li.active > .sub-toggle::after { transform: scaleX(1); }
.sub-toggle .icon { width: 14px; height: 14px; transition: transform .2s; }
.submenu {
  position: absolute; top: 100%; left: 0; min-width: 280px; list-style: none;
  background: #fff; border-top: 3px solid var(--primary); border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-hover); padding: 8px 0;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .2s;
}
.has-sub:hover .submenu, .has-sub:focus-within .submenu, .has-sub.open .submenu { opacity: 1; visibility: visible; transform: none; }
.has-sub:hover .sub-toggle .icon, .has-sub.open .sub-toggle .icon { transform: rotate(180deg); }
.submenu a { display: block; padding: 10px 22px; color: var(--navy); font-size: 14.5px; }
.submenu a:hover, .submenu a[aria-current] { color: var(--primary); background: var(--tint); }
.nav-toggle { display: none; background: none; border: 0; color: var(--navy); padding: 8px; cursor: pointer; }
.nav-toggle .icon { width: 28px; height: 28px; }

/* Appointment drop-down */
.appointment { position: relative; }
.appointment-toggle .icon { width: 15px; height: 15px; }
.appointment-panel {
  position: absolute; right: 0; top: calc(100% + 18px); width: min(560px, 92vw);
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-hover);
  padding: 26px; border-top: 3px solid var(--primary);
}
.appointment-panel h3 { margin-bottom: 16px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--navy); }
input, textarea {
  width: 100%; font: 400 15px/1.5 var(--font-body); color: var(--navy);
  background: var(--tint); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s, background .2s;
}
input:focus, textarea:focus { outline: none; background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(51, 104, 198, .15); }
textarea { resize: vertical; }
.form-grid .btn { justify-self: start; }

/* ---------- Sections ---------- */
.section { padding: 90px 0 85px; }
.section-sm { padding: 60px 0; }
.section-tint { background: var(--tint); }
.section-head { max-width: 640px; margin: 0 auto 50px; text-align: center; }
.section-head p:last-child { margin-bottom: 0; }
.eyebrow {
  font: 500 14px/1.4 var(--font-body); letter-spacing: 2px; text-transform: uppercase;
  color: var(--primary); margin-bottom: 10px;
}
.lead { font-size: 17px; color: var(--navy); }

/* ---------- Hero (matches the original slider: full-width video, text on the left) ---------- */
.hero { position: relative; overflow: hidden; background: #f9fbfd; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-inner { position: relative; z-index: 1; display: flex; align-items: center; min-height: 631px; }
.hero h1 { font-size: 65px; line-height: 70px; font-weight: 700; margin: 0 0 22px; }
.hero .accent { color: var(--primary); }
.hero p { font: 400 22px/28px var(--font-body); color: var(--muted); margin: 0 0 48px; }
.hero-btn {
  display: inline-flex; align-items: center; gap: 14px; background: var(--primary); color: #fff;
  font: 800 15px/20px var(--font-body); padding: 14px 35px 13px; border-radius: 3px; transition: background .25s;
}
.hero-btn:hover { background: var(--navy); color: #fff; }

/* ---------- Split (image + text) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.steps { list-style: none; counter-reset: step; margin-top: 26px; display: grid; gap: 22px; }
.steps li { counter-increment: step; position: relative; padding-left: 64px; min-height: 46px; }
.steps li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--tint); border: 1px solid var(--border);
  font: 600 14px/1 var(--font-head); color: var(--navy);
}
.steps h3 { font-size: 18px; margin: 10px 0 6px; }
.steps p { margin: 0; }
.checks { list-style: none; display: grid; gap: 10px; margin: 0 0 28px; }
.checks li { position: relative; padding-left: 30px; color: var(--navy); font-weight: 500; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: stretch; }
.about-media img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.about-text h2 { font-size: clamp(26px, 2.8vw, 33px); line-height: 1.3; }
.about-intro { font-size: 16px; margin-bottom: 26px; }
.about-points { list-style: none; display: grid; gap: 14px; }
.about-points li {
  display: grid; grid-template-columns: 46px 1fr; gap: 18px; align-items: start;
  background: var(--tint); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.about-points li:hover { background: #fff; border-color: rgba(51, 104, 198, .35); box-shadow: var(--shadow); }
.step-num {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary); color: #fff; font: 600 15px/1 var(--font-head);
}
.about-points h3 { font-size: 17px; line-height: 1.35; margin: 2px 0 6px; }
.about-points p { margin: 0; font-size: 14.5px; line-height: 1.7; }
@media (max-width: 991px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-media img { min-height: 0; aspect-ratio: 4 / 3; height: auto; }
}

/* ---------- Location band ---------- */
.location { background: var(--tint) var(--bg) left bottom / cover no-repeat; }
.location-text { max-width: 470px; margin-left: auto; }
.location .btn { margin-top: 10px; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 30px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card img { transition: transform .5s; }
.card:hover img { transform: scale(1.04); }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 18px; line-height: 1.4; margin-bottom: 10px; }
.card-body h3 a { color: var(--navy); }
.card-body h3 a:hover { color: var(--primary); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.chip { background: rgba(51, 104, 198, .1); color: var(--primary); font-weight: 500; border-radius: 20px; padding: 3px 11px; }

/* Research feed cards */
.research-feed { background: var(--tint) var(--bg) center / cover no-repeat; }
.project-card { color: var(--navy); }
.project-card > img { width: 100%; }
.project-title {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font: 600 17px/1.4 var(--font-head); padding: 18px 22px;
}
.project-title .icon { color: var(--primary); transition: transform .25s; }
.project-card:hover .project-title .icon { transform: translateX(4px); }

/* News carousel */
.carousel-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 60px) / 3); gap: 30px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 6px 4px 30px; margin: -6px -4px 0;
}
.carousel-track::-webkit-scrollbar { display: none; }
.news-card { scroll-snap-align: start; }
.news-card > img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.news-card p:last-child { margin: 0; }
.carousel-nav { display: flex; justify-content: center; gap: 12px; }
.carousel-nav button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: #fff;
  color: var(--navy); display: grid; place-items: center; cursor: pointer; transition: all .2s;
}
.carousel-nav button:hover:not(:disabled) { background: var(--primary); color: #fff; border-color: var(--primary); }
.carousel-nav button:disabled { opacity: .4; cursor: default; }
.carousel-nav .icon { width: 20px; height: 20px; }

/* Funding agencies */
.funders {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 30px 70px;
  background: var(--navy); border-radius: var(--radius); padding: 34px 40px; margin-top: 30px;
}
.funders img { height: 64px; width: auto; }

/* ---------- Featured announcement ---------- */
.featured-news { display: grid; grid-template-columns: 1.1fr 1fr; margin-bottom: 70px; }
.featured-news:hover { transform: none; }
.featured-news > img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.featured-news .card-body { padding: 40px; justify-content: center; }
.featured-news .btn { align-self: flex-start; margin-top: 8px; }
.news-card > img[hidden], .featured-news > img[hidden] { display: none !important; }
.featured-news h2 { font-size: clamp(22px, 2.6vw, 30px); }
@media (max-width: 991px) { .featured-news { grid-template-columns: 1fr; } .featured-news .card-body { padding: 26px; } }

/* ---------- Page title banner ---------- */
.page-title { background: rgba(3, 27, 78, .03); position: relative; }
.page-title .container { min-height: 240px; display: flex; flex-direction: column; justify-content: center; }
.page-title.has-image {
  background: linear-gradient(90deg, #f6faff 0%, rgba(246, 250, 255, .96) 38%, rgba(246, 250, 255, .1) 75%), var(--banner) center / cover no-repeat;
}
.page-title h1 { font-size: clamp(28px, 3.4vw, 36px); position: relative; padding-left: 20px; margin-bottom: 10px; }
.page-title h1::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 6px; border-radius: 3px; background: var(--primary); }
.breadcrumb { display: flex; flex-wrap: wrap; font-size: 15px; color: var(--muted); }
.breadcrumb a { color: var(--navy); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb > * + *::before { content: "›"; margin: 0 10px; color: var(--muted); }

/* ---------- Team ---------- */
.pi .split-media img { box-shadow: none; }
.member-card { text-align: center; }
.member-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--border); }
.member-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.member-linkedin {
  position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--primary); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(6px); transition: all .25s;
}
.member-card:hover .member-linkedin, .member-linkedin:focus { opacity: 1; transform: none; }
.member-linkedin:hover { background: var(--primary); color: #fff; }
.member-card .card-body { padding: 16px 12px 18px; }
.member-card h3 { font-size: 16.5px; margin-bottom: 4px; }
.member-card p { font-size: 13.5px; color: var(--muted); margin: 0; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery a { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s; }
.gallery a:hover img { transform: scale(1.05); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 92vw; max-height: 90vh; overflow: visible; }
.lightbox::backdrop { background: rgba(3, 27, 78, .85); }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: var(--radius-sm); }
.lightbox-close { position: absolute; top: -48px; right: 0; background: none; border: 0; color: #fff; cursor: pointer; padding: 6px; }
.lightbox-close .icon { width: 30px; height: 30px; }

/* ---------- Profile ---------- */
.profile { display: grid; grid-template-columns: 360px 1fr; gap: 50px 60px; align-items: start; }
.profile-card { position: sticky; top: calc(var(--header-h) + 20px); }
.profile-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: var(--radius); box-shadow: var(--shadow); }
.profile-links { display: grid; gap: 8px; margin-top: 18px; }
.profile-links a {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--tint); border: 1px solid var(--border); color: var(--navy); font-size: 14px; word-break: break-all;
}
.profile-links a:hover { border-color: var(--primary); color: var(--primary); }
.profile-links .icon { color: var(--primary); }
.profile-main .eyebrow { font-size: 13px; }
.underline { position: relative; padding-bottom: 10px; margin: 0 0 18px; font-size: 24px; }
.underline::after { content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 3px; border-radius: 3px; background: var(--primary); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 14px 28px; margin: 0 0 40px; background: var(--tint); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; }
.facts dt { font-weight: 600; color: var(--navy); }
.facts dd { margin: 0; }
.profile-body { margin-top: 8px; }

/* Long-form text (biographies, research pages) */
.prose h2 { position: relative; padding-bottom: 10px; margin: 36px 0 18px; font-size: 24px; }
.prose h2:first-child { margin-top: 0; }
.prose h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 3px; border-radius: 3px; background: var(--primary); }
.prose ul { list-style: none; display: grid; gap: 10px; margin: 0 0 1.2em; }
.prose li { position: relative; padding-left: 26px; }
.prose li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 10px; height: 10px; border-radius: 2px; background: var(--primary); }
.prose strong { color: var(--navy); }
.prose-video, .research-video { width: 100%; border-radius: var(--radius); margin: 10px 0 24px; box-shadow: var(--shadow); background: var(--tint); }

/* ---------- Research pages ---------- */
.research-hero {
  position: relative; overflow: hidden; color: #fff; padding: 110px 0 100px;
  background: linear-gradient(120deg, rgba(3, 27, 78, .95) 0%, rgba(37, 82, 166, .9) 60%, rgba(51, 104, 198, .82) 100%);
}
.research-hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 70%);
}
.research-hero .container { position: relative; z-index: 1; }
.research-hero h1 { color: #fff; font-size: clamp(30px, 4.5vw, 48px); line-height: 1.15; max-width: 860px; }
.research-hero p { color: rgba(255, 255, 255, .88); font-size: clamp(16px, 1.6vw, 19px); max-width: 720px; margin: 0; }
.pill {
  display: inline-block; margin-bottom: 18px; padding: 5px 14px; border-radius: 20px;
  background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .25);
  font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
}
.research { display: grid; grid-template-columns: 1fr 320px; gap: 60px; align-items: start; }
.research-facts { position: sticky; top: calc(var(--header-h) + 20px); background: var(--tint); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.research-facts dl { margin: 0 0 24px; display: grid; gap: 18px; }
.research-facts dt { display: flex; align-items: center; gap: 8px; font: 600 15px/1.3 var(--font-head); color: var(--navy); }
.research-facts dt .icon { color: var(--primary); }
.research-facts dd { margin: 4px 0 0 24px; }

/* ---------- Publications ---------- */
.pub-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.search { position: relative; flex: 1 1 420px; max-width: 560px; }
.search .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; }
.search input { padding: 15px 16px 15px 46px; background: #fff; box-shadow: var(--shadow); border-color: transparent; }
.pub-count { margin: 0; color: var(--muted); }
.pub-year + .pub-year { margin-top: 56px; }
.year-heading { display: flex; align-items: center; gap: 18px; font-size: 26px; margin-bottom: 26px; }
.year-heading::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.pub-figure { display: block; background: #fff; border-bottom: 1px solid var(--border); aspect-ratio: 4 / 3; overflow: hidden; }
.pub-figure img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.pub-card .authors { font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pub-card .summary { font-size: 14px; }
.read-more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.read-more .icon { width: 14px; height: 14px; }
.empty { text-align: center; padding: 40px 0; font-size: 17px; }

/* ---------- Contact ---------- */
.contact-page { background: var(--tint); padding-top: 70px; }
.contact-head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 44px; }
.contact-head h1 { font-size: clamp(34px, 5vw, 52px); text-transform: uppercase; letter-spacing: -.5px; margin: 0; }
.contact-head p { margin: 0; max-width: 520px; font-size: 16px; }
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
.contact-side { display: grid; gap: 24px; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 32px 34px; box-shadow: var(--shadow); }
.panel-title { font: 600 17px/1.3 var(--font-head); text-transform: uppercase; letter-spacing: .5px; padding-bottom: 16px; margin-bottom: 22px; border-bottom: 1px solid var(--border); }
.panel .form-grid label { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.panel .form-grid input, .panel .form-grid textarea { background: #fff; text-transform: none; }
.info-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 20px; }
.info-list li { display: grid; grid-template-columns: 24px 1fr; gap: 14px; }
.info-list .span-2 { grid-column: 1 / -1; }
.info-list .icon { width: 22px; height: 22px; color: var(--primary); margin-top: 2px; }
.info-list h3 { font: 600 12.5px/1.3 var(--font-body); text-transform: uppercase; letter-spacing: .5px; color: var(--navy); margin-bottom: 4px; }
.info-list p { margin: 0; }
.info-list a { color: var(--text); overflow-wrap: anywhere; }
.info-list a:hover { color: var(--primary); }
.panel-cta p { margin-bottom: 20px; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.map-card { margin-top: 24px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: #fff; }
.map-card iframe { width: 100%; height: 420px; border: 0; }
@media (max-width: 991px) {
  .contact-head, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-head { gap: 14px; }
}
@media (max-width: 767px) {
  .panel { padding: 24px 20px 28px; }
  .info-list { grid-template-columns: 1fr; }
  .map-card iframe { height: 320px; }
}

/* ---------- Notice pages (coming soon, 404) ---------- */
.notice { text-align: center; padding: 140px 0 130px; background: var(--tint); }
.notice h1 { font-size: clamp(30px, 4vw, 44px); }
.notice .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }

/* ---------- Footer ---------- */
.site-footer { background: #eef3fb; margin-top: 120px; padding: 0 0 40px; position: relative; }
.footer-cta {
  position: relative; z-index: 2; top: -90px; margin-bottom: -90px;
  background: var(--primary); border-radius: 18px; color: #fff;
  display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; gap: 30px;
  padding: 40px 56px; box-shadow: 0 24px 50px rgba(51, 104, 198, .28);
}
.footer-cta-art { align-self: end; margin: -110px 0 -28px; transform: translateY(-34px); }
.footer-cta-art img { width: 100%; max-width: 480px; margin: 0 auto; filter: drop-shadow(0 18px 28px rgba(3, 27, 78, .28)); }
.footer-cta h2 { color: #fff; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.3; margin-bottom: 10px; }
.footer-cta p { color: rgba(255, 255, 255, .88); font-size: 16px; }
.footer-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 16px; }
.btn-pill { border-radius: 999px; padding: 13px 26px; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: var(--navy); color: #fff; }
.btn-ghost { border: 1.5px solid rgba(255, 255, 255, .7); color: #fff; background: transparent; }
.btn-ghost:hover { background: #fff; color: var(--primary); }
.footer-cta .footer-cta-note { font-size: 13px; color: rgba(255, 255, 255, .78); margin: 0; }
.footer-cta .footer-cta-note a { color: #fff; text-decoration: underline; }
.footer-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 56px 56px 0; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 40px; padding-bottom: 44px; }
.footer-brand img { width: 88px; margin-bottom: 16px; }
.footer-brand p { font-size: 14.5px; max-width: 320px; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--primary); transition: background .2s, color .2s; }
.footer-social a:hover { background: var(--primary); color: #fff; }
.footer-col h4 { font: 600 18px/1.3 var(--font-head); color: var(--navy); margin-bottom: 20px; }
.footer-col ul { list-style: none; display: grid; gap: 12px; }
.footer-col a { color: var(--text); }
.footer-col a:hover { color: var(--primary); }
.footer-contact-col li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; font-size: 14.5px; }
.footer-contact-col li .icon { width: 18px; height: 18px; color: var(--primary); margin-top: 3px; }
.footer-directions { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-weight: 600; font-size: 14px; color: var(--primary) !important; }
.footer-directions .icon { width: 14px; height: 14px; }
.footer-bottom { border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; padding: 22px 0; font-size: 14px; }
.footer-bottom p { margin: 0; }
.footer-bottom-links { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.footer-bottom-links a { color: var(--navy); }
.footer-bottom-links a:hover { color: var(--primary); }
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 40; width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center; background: var(--primary); color: #fff; box-shadow: 0 8px 18px rgba(51, 104, 198, .3);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--primary-dark); color: #fff; }
.to-top .icon { width: 22px; height: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .menu > li > a, .menu .sub-toggle { padding-left: 12px; padding-right: 12px; }
  .menu > li > a::after, .menu .sub-toggle::after { left: 12px; right: 12px; }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 991px) {
  :root { --header-h: 80px; }
  .brand img { width: 100px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; display: none;
    flex-direction: column; align-items: stretch; gap: 0; background: #fff;
    box-shadow: 0 14px 24px rgba(3, 27, 78, .1); padding: 8px 15px 20px; max-height: calc(100vh - 80px); overflow-y: auto;
  }
  .site-nav.open { display: flex; }
  .menu { flex-direction: column; }
  .menu > li > a, .menu .sub-toggle { padding: 14px 4px; width: 100%; justify-content: space-between; border-bottom: 1px solid var(--border); }
  .menu > li > a::after, .menu .sub-toggle::after { display: none; }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 6px 12px; display: none; min-width: 0; }
  .has-sub.open .submenu { display: block; }
  .has-sub:hover .submenu { display: none; }
  .has-sub.open:hover .submenu { display: block; }
  .appointment { margin-top: 16px; }
  .appointment-toggle { width: 100%; justify-content: center; }
  .appointment-panel { position: static; width: 100%; margin-top: 12px; box-shadow: none; border: 1px solid var(--border); padding: 18px; }

  .hero-inner { min-height: 520px; }
  .hero h1 { font-size: 46px; line-height: 52px; }
  .hero p { font-size: 19px; }
  .split, .profile, .research, .contact { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .contact-card a { overflow-wrap: anywhere; }
  .profile-card { position: static; max-width: 360px; }
  .research-facts { position: static; }
  .grid-3, .gallery { grid-template-columns: repeat(2, 1fr); }
  .carousel-track { grid-auto-columns: calc((100% - 30px) / 2); }
  .footer-cta { grid-template-columns: 1fr; padding: 34px 28px; text-align: center; }
  .footer-cta-art { margin: -100px 0 0; transform: none; }
  .footer-cta-art img { max-width: 280px; }
  .footer-cta-actions { justify-content: center; }
  .footer-card { padding: 44px 28px 0; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .location { background-image: none; }
  .location-text { max-width: none; background: none; }
}

@media (max-width: 767px) {
  .hero-video { object-position: 70% center; opacity: .35; }
  .hero-inner { min-height: 440px; }
  .hero h1 { font-size: 36px; line-height: 42px; }
  .section { padding: 64px 0 60px; }
  .topbar-inner { justify-content: center; }
  .topbar-social { display: none; }
  .topbar-contact { justify-content: center; gap: 4px 20px; font-size: 13px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .grid-3, .gallery { grid-template-columns: 1fr; }
  .carousel-track { grid-auto-columns: 85%; gap: 18px; }
  .site-footer { margin-top: 170px; }
  .footer-cta { padding: 28px 22px; }
  .footer-cta-actions .btn { width: 100%; justify-content: center; }
  .footer-cols { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom-links { justify-content: center; }
  .form-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 12px; }
  .research-hero { padding: 70px 0 60px; }
  .funders { gap: 24px 40px; padding: 26px; }
  .funders img { height: 50px; }
  .card:hover { transform: none; }
}

@media (max-width: 420px) {
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .member-card h3 { font-size: 14.5px; }
  .member-card p { font-size: 12.5px; }
}

/* ==========================================================================
   Motion – subtle, GPU-friendly, and fully disabled for reduced-motion users
   ========================================================================== */

/* Smooth cross-fade between pages (Chrome/Edge/Safari; ignored elsewhere) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: .22s ease both vt-out; }
::view-transition-new(root) { animation: .32s ease both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* Scroll-reveal: elements fade/slide up once as they enter the viewport */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); will-change: opacity, transform; }
.js .reveal.reveal-left { transform: translateX(-34px); }
.js .reveal.reveal-right { transform: translateX(34px); }
.js .reveal.reveal-zoom { transform: scale(.94); }
.js .reveal.in { opacity: 1; transform: none; will-change: auto; }
/* once revealed, hover transforms/shadows on cards stay snappy */
.js .card.reveal.in { transition: transform .3s, box-shadow .3s, opacity .7s; transition-delay: 0s; }

/* Hero: headline, tagline and button rise in on load; video fades in */
.hero-video { animation: hero-fade 1.4s ease both; }
.hero h1, .hero p, .hero-btn { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero h1 { animation-delay: .15s; }
.hero p { animation-delay: .35s; }
.hero-btn { animation-delay: .55s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes hero-fade { from { opacity: 0; } }

/* Page-title banners and research hero */
.page-title h1, .page-title .breadcrumb, .research-hero > .container > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.page-title .breadcrumb { animation-delay: .12s; }
.research-hero .pill { animation-delay: .05s; }
.research-hero h1 { animation-delay: .15s; }
.research-hero p { animation-delay: .3s; }

/* Logo eases on hover */
.brand img { transition: transform .3s ease; }
.brand:hover img { transform: scale(1.04); }

/* Buttons: arrow nudges, soft press */
.btn .icon, .hero-btn svg { transition: transform .25s ease; }
.btn:hover .icon-arrow, .hero-btn:hover svg { transform: translateX(4px); }
.btn:active, .hero-btn:active { transform: translateY(1px) scale(.985); }

/* Text links: underline draws from the left */
.prose a, .footer-col a, .footer-bottom-links a, .info-list a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .3s ease, color .2s;
}
.prose a:hover, .footer-col a:hover, .footer-bottom-links a:hover, .info-list a:hover { background-size: 100% 1px; }

/* Cards: soft blue glow on hover for key cards */
.project-card:hover, .pub-card:hover, .news-card:hover { box-shadow: 0 18px 40px rgba(51, 104, 198, .18); }
.about-points li { transition: transform .3s, background .25s, border-color .25s, box-shadow .25s; }
.about-points li:hover { transform: translateX(6px); }
.step-num { transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.about-points li:hover .step-num { transform: scale(1.12) rotate(-6deg); }
.member-linkedin { transition: opacity .25s, transform .25s cubic-bezier(.3, 1.6, .5, 1), background .2s; }

/* Funding logos */
.funders img { transition: transform .3s ease, opacity .3s; opacity: .9; }
.funders img:hover { transform: translateY(-4px) scale(1.05); opacity: 1; }

/* Footer illustration floats gently */
.footer-cta-art img { animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* Scroll progress bar along the top (CSS-only, where supported) */
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
    background: linear-gradient(90deg, var(--primary), #7b9be0);
    transform-origin: 0 50%; transform: scaleX(0);
    animation: grow linear both; animation-timeline: scroll(root block);
  }
  @keyframes grow { to { transform: scaleX(1); } }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
