:root {
  --auburn-blue: #03244d;
  --auburn-orange: #dd550c;
  --bodda-getta-blue: #0093D2;
  --ink: #0d1728;
  --muted: #647084;
  --line: #e4e9f1;
  --card: #ffffff;
  --bg: #f5f7fb;
  --soft-orange: #fff0e6;
  --hero-image: url('images/microfluidic-network-hero.svg');
  --shadow: 0 24px 70px rgba(3, 36, 77, 0.14);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}
a { color: #07589b; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--auburn-orange); }
.skip-link {
  position: absolute; left: 1rem; top: -10rem; z-index: 999;
  background: var(--auburn-blue); color: white; padding: .75rem 1rem; border-radius: .6rem;
}
.skip-link:focus { top: 1rem; }
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(2, 11, 24, .78), rgba(2, 11, 24, 0));
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.header-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 1.2rem clamp(1rem, 4vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .85rem; color: white; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: .95rem;
  background: rgba(3,36,77,.62); color: white; font-weight: 900; font-size: 1.25rem;
  border: 2px solid var(--bodda-getta-blue);
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
}
.brand small { display: block; color: rgba(255,255,255,.76); font-size: .78rem; margin-top: .1rem; }
.site-nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; justify-content: flex-end; }
.nav-link {
  padding: .6rem .85rem;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(255,255,255,.88);
  font-weight: 700;
  font-size: .93rem;
}
.nav-link:hover, .nav-link.active { background: rgba(221,85,12,.96); color: white; }
.menu-toggle {
  display: none;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.12);
  color: white;
  border-radius: .7rem;
  padding: .55rem .8rem;
  font-weight: 800;
}
.hero {
  min-height: clamp(560px, 78vh, 840px);
  display: grid;
  align-items: end;
  position: relative;
  overflow: hidden;
  color: white;
  background-image:
    linear-gradient(90deg, rgba(1, 9, 24, .98) 0%, rgba(2, 18, 40, .86) 34%, rgba(2, 18, 40, .36) 63%, rgba(2, 18, 40, .12) 100%),
    radial-gradient(circle at 74% 44%, rgba(221,85,12,.20), transparent 26rem),
    var(--hero-image);
  background-position: center;
  background-size: cover;
}
.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 12rem;
  background: linear-gradient(180deg, rgba(245,247,251,0), var(--bg) 82%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 9rem clamp(1rem, 4vw, 4rem) clamp(5rem, 9vw, 8rem);
}
.eyebrow { color: #ffbf92; font-weight: 900; letter-spacing: .095em; text-transform: uppercase; font-size: .84rem; }
.hero h1 {
  max-width: 820px;
  margin: .45rem 0 1.15rem;
  font-size: clamp(3.2rem, 7vw, 6.7rem);
  line-height: .9;
  letter-spacing: -.07em;
  text-wrap: balance;
}
.hero p { max-width: 620px; font-size: clamp(1.08rem, 1.7vw, 1.38rem); color: rgba(255,255,255,.88); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.9rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.9rem; padding: .78rem 1.15rem; border-radius: 999px; font-weight: 900; text-decoration: none; }
.button.primary { background: var(--auburn-orange); color: white; box-shadow: 0 18px 36px rgba(221,85,12,.32); }
.button.secondary { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35); color: white; backdrop-filter: blur(10px); }
.page-shell {
  width: min(1480px, 100%);
  margin: clamp(-4.5rem, -6vw, -3rem) auto 0;
  padding: 0 clamp(1rem, 4vw, 4rem) clamp(2rem, 4vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 330px);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
  position: relative;
  z-index: 5;
}
.contact-card {
  grid-column: 2;
  position: sticky;
  top: 1.25rem;
  padding: 1.35rem;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 1.35rem;
  box-shadow: var(--shadow);
}
.contact-card h2 { margin-top: 0; color: var(--auburn-blue); font-size: 1.15rem; line-height: 1.25; }
.contact-card p:last-child { margin-bottom: 0; }
.content { min-width: 0; grid-column: 1; grid-row: 1; }
.site-section {
  display: none;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(228,233,241,.92);
  border-radius: 1.35rem;
  padding: clamp(1.25rem, 3vw, 2.4rem);
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow);
  scroll-margin-top: 2rem;
  overflow: hidden;
}
.site-section.active-section { display: block; animation: sectionIn .22s ease-out; }
@keyframes sectionIn { from { opacity: .35; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
h2 { margin: 0 0 1rem; color: var(--auburn-blue); font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.05; letter-spacing: -.04em; }
h2::after { content: ''; display: block; width: 3.1rem; height: .22rem; background: var(--auburn-orange); border-radius: 999px; margin-top: .45rem; }
h3 { color: #21395f; margin-top: 1.75rem; line-height: 1.25; }
h4 { color: var(--auburn-blue); margin-bottom: .25rem; }
p { margin-top: 0; }
img { max-width: 100%; height: auto; border-radius: .8rem; }
.figure { float: right; margin: .25rem 0 1rem 1.1rem; box-shadow: 0 10px 25px rgba(3,36,77,.12); background: white; }
#home .figure[src*="cycle_TwoIslets"], #blend { display: none !important; }
#people .figure, #pics .figure { float: none; margin: .5rem 0 1rem; }
table { width: 100% !important; max-width: 100%; border-collapse: collapse; margin-top: 0 !important; }
td { display: block; padding: .5rem 0; }
#pubs p { padding-bottom: .9rem; border-bottom: 1px solid #edf1f6; }
#pubs p:first-of-type, #pubs p:last-child { border-bottom: 0; }
.site-footer { text-align: center; padding: 2rem 1rem 3rem; color: var(--muted); }
@media (max-width: 980px) {
  .menu-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 1rem; right: 1rem; top: 4.8rem; padding: .75rem; background: rgba(3,36,77,.96); border: 1px solid rgba(255,255,255,.18); border-radius: 1rem; box-shadow: var(--shadow); justify-content: flex-start; backdrop-filter: blur(16px); }
  .site-nav.open { display: flex; }
  .nav-link { width: calc(50% - .2rem); }
  .hero { min-height: 640px; background-image: linear-gradient(90deg, rgba(1, 9, 24, .96), rgba(2, 18, 40, .58)), var(--hero-image); }
  .page-shell { grid-template-columns: 1fr; margin-top: -3rem; }
  .contact-card { grid-column: 1; grid-row: auto; position: static; order: 2; }
  .content { grid-column: 1; grid-row: auto; }
  .figure { float: none; display: block; margin: .75rem auto 1rem; }
}
@media (max-width: 620px) {
  .header-inner { align-items: flex-start; padding-top: .9rem; }
  .brand-mark { width: 2.5rem; height: 2.5rem; }
  .brand small { display: none; }
  .nav-link { width: 100%; }
  .hero { min-height: 600px; }
  .hero h1 { font-size: clamp(2.55rem, 13vw, 4rem); }
  .hero-content { padding-top: 7rem; padding-bottom: 5.2rem; }
  .site-section { border-radius: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* User-requested refinements, July 2026 */
.site-section p {
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}

/* Keep compact lists/captions/readability blocks from stretching awkwardly. */
#people p,
#pics p,
.contact-card p,
.hero p {
  text-align: left;
}

/* Old imported HTML used <p align=right> for section headings; force these back left. */
.member-section-heading,
#people p[align="right"],
#people p[align="right"] *,
#people h3,
#people h4,
#people h4 p,
#people h4 .member-section-heading {
  text-align: left !important;
}

.member-section-heading {
  display: block;
  margin: 2rem 0 .75rem;
  color: var(--auburn-blue);
  font-weight: 800;
}

.member-section-heading font[size="4"] {
  font-size: 1.15rem;
  letter-spacing: .04em;
}

.member-section-heading font[size="1"] {
  font-size: .78rem;
  font-weight: 600;
}

/* Remove inherited spacing from the old Pictures table layout. */
#pics table,
#pics .picture-table {
  margin-top: 0 !important;
}

#pics > h2 {
  margin-bottom: 1rem;
}

#pics br:first-child,
#pics h2 + br {
  display: none;
}

/* Modern two-column media rows for People and Pictures */
.content p,
.site-section p {
  text-align: justify;
}

.hero p,
.contact-card p,
.site-footer p,
.media-text h4,
.member-section-heading,
#pubs p:first-of-type {
  text-align: left;
}

.member-section-heading {
  display: block;
  margin: 2rem 0 1rem;
  padding: .75rem 1rem;
  color: var(--auburn-blue);
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: linear-gradient(90deg, rgba(0,147,210,.12), rgba(255,255,255,0));
  border-left: .35rem solid var(--bodda-getta-blue);
  border-radius: .75rem;
}

.media-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.media-row {
  display: grid;
  grid-template-columns: minmax(150px, 34%) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 12px 30px rgba(3,36,77,.08);
}

.media-row + .media-row {
  margin-top: 1rem;
}

.media-thumb img,
#people .media-thumb img,
#pics .media-thumb img {
  float: none !important;
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 !important;
  border-radius: .85rem;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(3,36,77,.14);
}

.person-row {
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: start;
}

.person-row:first-of-type {
  grid-template-columns: minmax(240px, 48%) minmax(0, 1fr);
  align-items: center;
}

.person-photo img {
  aspect-ratio: 1 / 1;
}

.person-row:first-of-type .person-photo img {
  aspect-ratio: auto;
}

.media-text h4 {
  margin: 0 0 .35rem;
  color: var(--auburn-blue);
  font-size: 1.08rem;
}

.media-text p {
  margin: 0;
}

#people .media-row span,
#pics .media-row span {
  font-size: .92rem !important;
}

#pics .picture-list {
  margin-top: 0;
}

#pics table,
#pics .picture-table {
  margin-top: 0 !important;
}

.funding-logos {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.funding-logo {
  float: none !important;
  width: auto;
  max-height: 120px;
  margin: 0 !important;
  border-radius: .75rem;
  box-shadow: none;
  background: transparent;
}

@media (max-width: 760px) {
  .media-row,
  .person-row,
  .person-row:first-of-type {
    grid-template-columns: 1fr;
  }
  .person-row .media-thumb img {
    width: min(220px, 100%);
  }
  .person-row:first-of-type .media-thumb img,
  .picture-row .media-thumb img {
    width: 100%;
  }
}
