/* BeCoS Lab home page.
   Self-contained: index.html loads only this sheet, so it carries its own reset
   and tokens. Palette matches styles/publications.css (production values, not
   the handoff's screenshot-sampled approximations). */

:root {
  --brown: #7e6044;
  --brown-deep: #6d5139;
  --brown-band: #5f4530;
  --brown-dark: #3a2a1c;
  --sand: #e7cdb2;

  --page: #E9E6DF;
  --page-band: #e2ded4;
  --surface: #F4F3EE;
  --surface-hover: #faf9f6;
  --white: #ffffff;

  --border: #dcd6cb;
  --border-strong: #cfc8bc;
  --hairline: #d5cfc5;
  --accent-edge: #cfcac5;

  --chip-bg: #ece7dc;
  --chip-border: #ddd5c8;

  --navy: #003366;
  --text: #09090b;
  --text-body: #4b453d;
  --text-italic: #2f2a24;
  --muted: #5e574d;
  --muted-2: #6b6459;

  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, Menlo, monospace;

  --nav-h: 78px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 94px;
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--page);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--brown); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brown);
  outline-offset: 2px;
  border-radius: 3px;
}

.shell {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 32px;
}

.section { padding: 68px 0; }

.section--band {
  background: var(--page-band);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--brown);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.section-head h2 {
  margin-top: 10px;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -.024em;
}

.section-head__lede {
  max-width: 380px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  text-align: right;
}

/* Navy group heading + hairline rule, used by thrusts and team */
.group-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.group-head h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}

.group-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

.group-head__count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
}

.chip {
  display: inline-block;
  padding: 3px 7px;
  font-size: 10.5px;
  letter-spacing: .03em;
  color: var(--brown);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: 3px;
}

/* ---------- 4.1 Sticky nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--brown);
}

.nav.is-scrolled { box-shadow: 0 2px 12px rgba(58, 42, 28, .28); }

.nav__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 32px;
}

.nav__logo { display: block; line-height: 0; }
.nav__logo img { height: 46px; }

.nav__links { display: flex; align-items: center; gap: 2px; }

.nav__links a {
  padding: 8px 11px;
  font-size: 13px;
  color: #fff;
  border-radius: 5px;
}

.nav__links a:hover { background: rgba(255, 255, 255, .1); }

.nav__links a.is-page {
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, .45);
  border-radius: 5px 5px 0 0;
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.nav__toggle span {
  width: 20px;
  height: 1.5px;
  background: #fff;
}

.nav__drawer { display: none; }

/* ---------- 4.2 Hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 580px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(58, 42, 28, .9) 0%, rgba(74, 55, 37, .72) 44%, rgba(74, 55, 37, .18) 100%);
}

.hero__inner {
  position: relative;
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  padding: 76px 32px;
}

.hero__eyebrow {
  margin-bottom: 18px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--sand);
}

.hero__title {
  font-size: 52px;
  line-height: 1.06;
  letter-spacing: -.026em;
  color: #fff;
}

.hero__lede {
  max-width: 620px;
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .86);
  text-wrap: pretty;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.pill {
  display: inline-block;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
}

.pill--primary {
  color: #3f2e1e;
  background: #fff;
}

.pill--ghost {
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .45);
}

.pill--ghost:hover { background: rgba(255, 255, 255, .18); }

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 46px;
  max-width: 680px;
  margin-top: 48px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, .24);
}

.hero__stat-n {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #fff;
}

.hero__stat-l {
  font-size: 11px;
  color: rgba(255, 255, 255, .72);
}

/* ---------- 4.3 Research thrusts ---------- */

.thrust-group + .thrust-group { margin-top: 34px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.thrust {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-edge);
  border-radius: 8px;
}

.thrust:hover {
  background: var(--surface-hover);
  border-top-color: var(--brown);
}

.thrust__icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: .85;
}

.thrust h4 {
  font-size: 15.5px;
  line-height: 1.32;
  font-weight: 700;
}

.thrust__body {
  flex: 1;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-body);
}

.thrust__kw {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* ---------- 4.4 Intro video ---------- */

.intro {
  padding: 64px 0;
  background: var(--brown-band);
  color: #fff;
}

.intro__grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  align-items: center;
  gap: 46px;
}

.intro .eyebrow { color: var(--sand); }

.intro h2 {
  margin-top: 10px;
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: -.022em;
}

.intro__body {
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, .82);
}

.intro__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--brown-dark);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(30, 20, 12, .34);
}

.intro__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- 4.5 Featured papers ---------- */

.paper {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.paper:hover { border-color: #c9c0b0; }

.paper__fig {
  height: 280px;
  width: 100%;
  object-fit: cover;
  background: #e5e0d6;
  border-bottom: 1px solid #e7e1d7;
}

.paper__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  padding: 18px;
}

.paper__meta {
  display: flex;
  align-items: center;
  gap: 9px;
}

.paper__year {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--brown);
}

.paper__title {
  font-size: 14.5px;
  line-height: 1.4;
  font-weight: 700;
  text-wrap: pretty;
}

.paper__title a:hover { color: var(--brown); }

.paper__cite {
  flex: 1;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-body);
}

.paper__cite i { color: var(--text-italic); }

.paper__more {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1px solid #c2cbd8;
}

.paper__more:hover { color: var(--brown); border-bottom-color: var(--brown); }

.section-head .pill--brand {
  flex: none;
  padding: 10px 18px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  background: var(--brown);
  border-radius: 999px;
}

.section-head .pill--brand:hover { background: var(--brown-deep); }

/* ---------- 4.6 Lab news ---------- */

.news-item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.news-item:hover { background: var(--surface-hover); }

.news-item img {
  width: 104px;
  height: 78px;
  object-fit: cover;
  border-radius: 5px;
}

.news-item__kind {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .13em;
  color: var(--brown);
}

.news-item__text {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.48;
  font-weight: 600;
  text-wrap: pretty;
}

/* ---------- 4.7 Team bonding + lightbox ---------- */

.strip-nav { display: flex; gap: 8px; }

.strip-nav button {
  width: 38px;
  height: 38px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  cursor: pointer;
}

.strip-nav button:hover { color: var(--brown); border-color: var(--brown); }

.strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.strip::-webkit-scrollbar { height: 0; }

.strip button {
  flex: none;
  padding: 0;
  overflow: hidden;
  line-height: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: zoom-in;
}

.strip button:hover { border-color: var(--brown); }

.strip img {
  height: 212px;
  width: auto;
  object-fit: cover;
  border-radius: 8px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(35, 25, 16, .86);
}

.lightbox[hidden] { display: none; }

.lightbox__img {
  max-width: min(1100px, 92vw);
  max-height: 82vh;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(20, 13, 6, .6);
}

.lightbox button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 50%;
  cursor: pointer;
}

.lightbox__close {
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  font-size: 20px;
}

.lightbox__prev,
.lightbox__next {
  top: 50%;
  width: 44px;
  height: 44px;
  font-size: 18px;
  transform: translateY(-50%);
}

.lightbox__prev { left: 18px; }
.lightbox__next { right: 18px; }

.lightbox__count {
  position: absolute;
  bottom: 24px;
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(255, 255, 255, .8);
}

/* ---------- 4.8 Team ---------- */

.pi-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  margin-bottom: 20px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brown);
  border-radius: 10px;
}

.pi-card__photo {
  width: 220px;
  height: 220px;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 10px;
  background: #e5dfd3;
}

.pi-card__chip {
  display: inline-block;
  padding: 3px 8px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--brown);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: 3px;
}

.pi-card__name {
  margin-top: 10px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.pi-card__bio {
  max-width: 560px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-body);
}

.link-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-body);
  background: #fff;
  border: 1px solid #ddd6c9;
  border-radius: 999px;
}

.link-pill:hover { color: var(--brown); border-color: var(--brown); }
.link-pill img { width: 14px; height: 14px; opacity: .68; }

.team-group { margin-top: 28px; }

.person {
  display: flex;
  gap: 15px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: box-shadow .16s, border-color .16s;
}

.person:hover {
  background: var(--surface-hover);
  border-color: #c6b9a5;
  box-shadow: 0 6px 20px rgba(63, 58, 51, .09);
}

.person__pic {
  position: relative;
  flex: none;
  width: 88px;
  height: 88px;
  overflow: hidden;
  background: #e5dfd3;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(127, 96, 68, .16);
}

/* Initials show through when a portrait fails to load. */
.person__initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #bdae99;
}

.person__pic img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
}

.person__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.012em;
}

.person__role {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--brown);
}

.person__role::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--brown);
  border-radius: 50%;
}

.person__affil {
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted-2);
}

.person__links {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.person__links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #fff;
  border: 1px solid #ddd6c9;
  border-radius: 8px;
}

.person__links a:hover { background: #fffaf8; border-color: var(--brown); }
.person__links img { width: 14px; height: 14px; opacity: .68; }

.alumni-wrap { margin-top: 34px; }

.alumni-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.alumni-row {
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-edge);
  border-radius: 5px;
}

.alumni-row:hover { border-left-color: var(--brown); }

.alumni-row__name { font-size: 13.5px; font-weight: 700; }

.alumni-row__role {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-body);
}

/* ---------- 4.9 Footer ---------- */

.site-footer {
  padding: 48px 32px 54px;
  background: var(--brown);
  color: #fff;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  max-width: 1340px;
  margin: 0 auto;
}

.site-footer h3 {
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 700;
}

.site-footer p,
.site-footer li {
  font-size: 12px;
  line-height: 1.7;
  opacity: .9;
}

.site-footer__links li + li { margin-top: 4px; }
.site-footer__links a:hover { text-decoration: underline; }

.footer-pill {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 14px;
  font-size: 12px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
}

.footer-pill:hover { color: var(--brown); background: #fff; }

.site-footer__credits {
  font-size: 11px;
  line-height: 1.8;
  opacity: .66;
}

/* ---------- 1080px: grids to 2 columns, section heads stack ---------- */

@media (max-width: 1080px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .section-head__lede { text-align: left; }

  .intro__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }

  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- 780px: full mobile ---------- */

@media (max-width: 780px) {
  html { scroll-padding-top: 80px; }

  :root { --nav-h: 64px; }

  .shell { padding: 0 16px; }
  .section { padding: 44px 0; }

  .nav__bar { padding: 0 6px 0 16px; }
  .nav__logo img { height: 34px; }
  .nav__links { display: none; }
  .nav__toggle { display: flex; }

  .nav__drawer {
    display: block;
    position: sticky;
    top: var(--nav-h);
    background: var(--brown-deep);
  }

  .nav__drawer[hidden] { display: none; }

  .nav__drawer a {
    display: block;
    padding: 13px 6px;
    font-size: 14px;
    color: #fff;
  }

  .nav__drawer a + a { border-top: 1px solid rgba(255, 255, 255, .14); }

  .hero { min-height: 470px; }
  .hero__inner { padding: 52px 16px; }
  .hero__title { font-size: 32px; }
  .hero__lede { font-size: 14px; }
  .hero__stats { gap: 26px 32px; }

  .section-head h2 { font-size: 25px; }

  .intro { padding: 44px 0; }
  .intro h2 { font-size: 25px; }

  .card-grid { grid-template-columns: minmax(0, 1fr); }

  .strip img { height: 150px; }

  .pi-card {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 18px;
    text-align: center;
  }

  .pi-card__photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
  }

  .pi-card__bio { text-align: left; }
  .link-pills { justify-content: center; }

  .person__pic { width: 78px; height: 78px; }

  .alumni-grid { grid-template-columns: minmax(0, 1fr); }

  .site-footer {
    padding: 36px 16px 40px;
  }

  .site-footer__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
