/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Updated palette — derived from the BIA Lab logo */
  --navy:       #1e2d4f;   /* logo letterform dark navy           */
  --navy-mid:   #263a6a;   /* slightly lighter navy               */
  --navy-light: #3a5698;   /* medium blue                         */
  --teal:       #4878be;   /* primary accent — network cube blue  */
  --teal-dark:  #3464a8;   /* darker blue for links / hover       */
  --purple:     #7b65b2;   /* secondary accent — cube purple node */
  --green-acc:  #3fa86a;   /* tertiary accent — cube green node   */
  --white:      #ffffff;
  --off-white:  #f0f4fa;   /* light blue-tinted page sections     */
  --text:       #1e2d4f;
  --muted:      #627394;
  --border:     #c9d6e8;

  --font:       'Inter', system-ui, sans-serif;
  --mono:       'JetBrains Mono', 'Fira Code', monospace;

  --radius:     8px;
  --radius-lg:  16px;
  --shadow:     0 2px 16px rgba(30,45,79,.10);
  --shadow-lg:  0 8px 40px rgba(30,45,79,.16);

  --nav-h:      72px;
  --max-w:      1200px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
}

a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img { display: block; max-width: 100%; }

/* ─── Typography ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

p { max-width: 68ch; }

.section-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: .5rem;
}

/* ─── Layout Helpers ────────────────────────────────────────────────────────── */
.container { width: min(var(--max-w), 100%); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }
.section    { padding-block: 5rem; }
.section--alt { background: var(--off-white); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 1.5rem; }

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius);
  font-size: .9rem; font-weight: 600;
  cursor: pointer; border: 2px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary   { background: var(--teal); color: var(--white); border-color: var(--teal); }
.btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn-outline   { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.btn-outline:hover { background: rgba(255,255,255,.12); border-color: var(--white); }
.btn-outline-dark { background: transparent; color: var(--navy); border-color: var(--navy-light); }
.btn-outline-dark:hover { background: var(--navy); color: var(--white); }
.btn-sm { padding: .45rem 1rem; font-size: .82rem; }

/* ─── Navigation ────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  box-shadow: 0 1px 8px rgba(30,45,79,.06);
}

.nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  width: min(var(--max-w), 100%); margin-inline: auto; padding-inline: clamp(1rem,4vw,2.5rem);
}

.nav__logo {
  display: flex; align-items: center;
  text-decoration: none; flex-shrink: 0;
}
.nav__logo:hover { text-decoration: none; }
.nav__logo-img { height: 48px; width: auto; display: block; }

.nav__links {
  display: flex; align-items: center; gap: .25rem;
  list-style: none;
}
.nav__links a {
  color: var(--muted);
  font-size: .85rem; font-weight: 500;
  padding: .4rem .6rem;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
  text-decoration: none;
  white-space: nowrap;
}
.nav__links a:hover, .nav__links a.active {
  color: var(--navy);
  background: rgba(30,45,79,.07);
}

.nav__cta { margin-left: .5rem; white-space: nowrap; }

.nav__burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: .4rem;
}
.nav__burger span { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: .25s; }

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #eef3fb 0%, #e4ecf7 60%, #dde8f5 100%);
  min-height: calc(100vh - var(--nav-h));
  display: flex; align-items: center;
}

.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  opacity: .18;
}

.hero__content {
  position: relative; z-index: 1;
  padding-block: 5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
}
.hero__logo {
  padding-top: 3.25rem;
}
.hero__logo img {
  width: 360px;
  height: 360px;
  object-fit: cover;
  object-position: center 35%;
  border-radius: 50%;
  display: block;
}
@media (max-width: 768px) {
  .hero__content { grid-template-columns: 1fr; }
  .hero__logo { display: none; }
}

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(72,120,190,.12); color: var(--teal-dark);
  border: 1px solid rgba(72,120,190,.3);
  border-radius: 100px; padding: .3rem 1rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero__eyebrow::before { content: ''; display: block; width: 6px; height: 6px; background: var(--teal); border-radius: 50%; }

.hero h1 { color: var(--navy); margin-bottom: 1.25rem; }
.hero h1 em { color: var(--teal); font-style: normal; }

.hero__slogan-group {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
}

.hero__lead {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--navy);
  font-weight: 500;
  width: 0;
  min-width: 100%;
  text-align: center;
  margin-bottom: 2.25rem;
  border: 2px solid var(--teal);
  border-radius: 6px;
  padding: .45rem 1rem;
  line-height: 1.4;
}

.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero__stats {
  display: flex; gap: 2.5rem; flex-wrap: wrap;
  margin-top: 4rem; padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.hero__stat-value { font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1; }
.hero__stat-label { font-size: .8rem; color: var(--muted); margin-top: .2rem; text-transform: uppercase; letter-spacing: .08em; }

/* ─── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.card__icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, rgba(72,120,190,.14), rgba(72,120,190,.05));
  border: 1px solid rgba(72,120,190,.22);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 1.1rem;
}
.card h3 { margin-bottom: .5rem; }
.card p  { color: var(--muted); font-size: .92rem; }
.card__link {
  display: inline-flex; align-items: center; gap: .3rem;
  color: var(--teal-dark); font-weight: 600; font-size: .88rem;
  margin-top: 1rem; text-decoration: none;
}
.card__link:hover { text-decoration: underline; }
.card__link::after { content: '→'; }

/* ─── Publication Cards ─────────────────────────────────────────────────────── */
.pub-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.pub-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.pub-card__journal {
  display: inline-block;
  background: rgba(72,120,190,.10); color: var(--teal-dark);
  border-radius: 100px; padding: .2rem .75rem;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: .75rem;
}
.pub-card h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.pub-card__authors { font-size: .85rem; color: var(--muted); margin-bottom: .6rem; }
.pub-card__abstract { font-size: .88rem; color: var(--muted); margin-bottom: 1rem; }
.pub-card__links { display: flex; gap: .75rem; flex-wrap: wrap; }
.pub-card__links a {
  font-size: .8rem; font-weight: 600; color: var(--teal-dark);
  border: 1px solid var(--teal); border-radius: 100px;
  padding: .2rem .75rem; text-decoration: none;
  transition: background .15s, color .15s;
}
.pub-card__links a:hover { background: var(--teal); color: var(--white); }

/* ─── Team Cards ────────────────────────────────────────────────────────────── */
.team-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  text-align: center;
}
.team-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.team-card__photo {
  width: 100%; aspect-ratio: 1;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: rgba(255,255,255,.25);
}
.team-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card__body { padding: 1.25rem; }
.team-card__name { font-size: 1rem; font-weight: 700; margin-bottom: .15rem; }
.team-card__role { font-size: .82rem; color: var(--teal-dark); font-weight: 600; margin-bottom: .5rem; }
.team-card__bio  { font-size: .82rem; color: var(--muted); }
.team-card__links { display: flex; justify-content: center; gap: .75rem; margin-top: .75rem; }
.team-card__links a { color: var(--muted); font-size: .85rem; transition: color .15s; }
.team-card__links a:hover { color: var(--teal-dark); text-decoration: none; }

/* ─── Section Headers ───────────────────────────────────────────────────────── */
.section-header { margin-bottom: 3rem; }
.section-header h2 { margin-bottom: .6rem; }
.section-header p  { color: var(--muted); font-size: 1.05rem; }

/* ─── Stats Bar ─────────────────────────────────────────────────────────────── */
.stats-bar {
  background: var(--navy);
  padding-block: 3rem;
}
.stats-bar__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.5rem; text-align: center; }
.stats-bar__value { font-size: 2.5rem; font-weight: 800; color: var(--white); line-height: 1; }
.stats-bar__label { font-size: .8rem; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .1em; margin-top: .35rem; }

/* ─── News / Timeline ───────────────────────────────────────────────────────── */
.news-item {
  display: flex; gap: 1.25rem; align-items: flex-start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.news-item:last-child { border-bottom: none; }
.news-item__date {
  flex-shrink: 0; width: 60px; text-align: center;
  background: rgba(72,120,190,.08); border-radius: var(--radius);
  padding: .4rem .3rem;
}
.news-item__date-month { font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; color: var(--teal-dark); font-weight: 700; }
.news-item__date-day   { font-size: 1.4rem; font-weight: 800; color: var(--navy); line-height: 1; }
.news-item__date-year  { font-size: .65rem; color: var(--muted); }
.news-item__body h4    { margin-bottom: .2rem; }
.news-item__body p     { font-size: .88rem; color: var(--muted); }

/* ─── Research Theme Cards ──────────────────────────────────────────────────── */
.theme-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--navy-mid), var(--navy));
  border: 1px solid rgba(255,255,255,.07);
  padding: 2rem 1.75rem;
  color: var(--white);
  position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.theme-card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(30,45,79,.35); }
.theme-card__num {
  position: absolute; top: -12px; right: 1rem;
  font-size: 5rem; font-weight: 900; opacity: .05; line-height: 1;
  user-select: none;
}
.theme-card__icon { font-size: 2rem; margin-bottom: 1rem; }
.theme-card h3   { color: var(--white); margin-bottom: .6rem; }
.theme-card p    { color: rgba(255,255,255,.6); font-size: .9rem; max-width: 100%; }
.theme-card__tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.theme-card__tag {
  font-size: .72rem; font-weight: 600; letter-spacing: .05em;
  background: rgba(72,120,190,.2); color: #a8c4f0;
  border-radius: 100px; padding: .2rem .65rem;
}

/* ─── Footer ────────────────────────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,.6);
  padding-block: 3.5rem 2rem;
  font-size: .88rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer__brand p { margin-top: .75rem; color: rgba(255,255,255,.5); font-size: .85rem; max-width: 30ch; }
.footer h4 { color: var(--white); font-size: .85rem; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: .1em; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer ul a { color: rgba(255,255,255,.55); font-size: .88rem; transition: color .15s; text-decoration: none; }
.footer ul a:hover { color: var(--teal); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer__bottom a { color: rgba(255,255,255,.45); transition: color .15s; }
.footer__bottom a:hover { color: var(--teal); }

/* Footer logo — white pill so the logo reads on the dark background */
.footer__logo-img {
  height: 52px; width: auto; display: block;
  background: var(--white);
  border-radius: 8px;
  padding: 5px 10px;
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .nav--open .nav__links {
    display: flex; flex-direction: column;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    height: calc(100vh - var(--nav-h));
    background: var(--white); padding: 2rem;
    gap: .5rem; z-index: 99;
    border-top: 1px solid var(--border);
    overflow-y: auto;
  }
  .nav--open .nav__links a { font-size: 1.1rem; padding: .75rem 1rem; color: var(--navy); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .nav--open .nav__mobile-cta {
    display: inline-flex;
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
  }
}

.nav__mobile-cta { display: none; }

@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; }
  .hero__stats { gap: 1.5rem; }
}

/* ─── Scroll-hint ───────────────────────────────────────────────────────────── */
.scroll-hint {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(30,45,79,.55);
  border: 2px solid rgba(72,120,190,.7);
  text-decoration: none;
  animation: scrollBounce 2s ease-in-out infinite;
  transition: background .15s, opacity .3s;
}
.scroll-hint:hover { background: rgba(30,45,79,.8); }
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}
@media (prefers-reduced-motion: reduce) { .scroll-hint { animation: none; } }
.scroll-hint--hidden { opacity: 0; pointer-events: none; }

/* page-hero must be position:relative for the scroll-hint to be contained */
.page-hero { position: relative; }
