/* ==========================================================================
   Gennerich Lab — modern stylesheet
   Laboratory of Molecular and Cellular Biophysics
   ========================================================================== */

:root {
  /* Brand palette (derived from the lab hero image) */
  --navy-900: #0a101c;
  --navy-800: #0d1726;
  --navy-700: #122138;
  --navy-600: #1b2f4d;

  --accent:        #3a7afe;   /* optical-trap blue            */
  --accent-strong: #2f6fed;
  --accent-soft:   #7ca8f0;
  --green:         #25b84c;   /* microtubule                  */
  --orange:        #f5921e;   /* molecular motor              */

  --ink:        #16202e;
  --ink-soft:   #3a4658;
  --muted:      #64748b;
  --line:       #e5e9f0;
  --bg:         #ffffff;
  --bg-soft:    #f5f8fc;
  --bg-softer:  #eef3fa;

  --radius:    14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 30, 55, .06), 0 1px 3px rgba(15, 30, 55, .08);
  --shadow-md: 0 8px 24px rgba(15, 30, 55, .10);
  --shadow-lg: 0 20px 48px rgba(15, 30, 55, .16);

  --maxw: 1120px;
  --nav-h: 68px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent-strong); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent); }

h1, h2, h3 { color: var(--navy-700); line-height: 1.2; font-weight: 700; }

/* ----------------------------------------------------------------- layout */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; }
.section--soft { background: var(--bg-soft); }

.section__eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-strong);
  margin: 0 0 10px;
}
.section__title {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 18px;
  letter-spacing: -.01em;
}
.section__lead {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 760px;
  margin: 0 0 8px;
}

/* ------------------------------------------------------------------- nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(10, 16, 28, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -.01em;
  color: #fff;
}
.brand:hover { color: #fff; }
.brand__mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: url("images/main_image_logo.jpg") center/cover no-repeat, #0a101c;
  position: relative;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255,255,255,.16) inset, 0 0 14px rgba(58,122,254,.45);
}
.brand small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--accent-soft);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav__links a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  color: rgba(255, 255, 255, .78);
  font-size: 15px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav__links a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav__links a.is-active {
  color: #fff;
  background: rgba(58, 122, 254, .22);
  box-shadow: inset 0 0 0 1px rgba(124, 168, 240, .4);
}

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  width: 42px; height: 42px;
  cursor: pointer;
  padding: 9px;
}
.nav__toggle span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav__toggle span + span { margin-top: 5px; }

/* -------------------------------------------------------------- home hero */
.hero {
  position: relative;
  min-height: clamp(440px, 72vh, 640px);
  display: flex;
  align-items: center;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(6,10,20,.86) 0%, rgba(6,10,20,.55) 45%, rgba(6,10,20,.25) 100%),
    #06070d;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__media {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(6,10,20,.86) 0%, rgba(6,10,20,.55) 45%, rgba(6,10,20,.18) 100%),
    url("images/hero.jpg");
  background-size: cover;
  background-position: center;
  z-index: -1;
}
.hero__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; width: 100%; }
.hero__content { max-width: 640px; }
.hero__eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-soft);
  margin-bottom: 18px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0 0 20px;
}
.hero h1 .accent { color: var(--accent-soft); }
.hero__tagline {
  font-size: clamp(18px, 2.4vw, 23px);
  color: rgba(255, 255, 255, .9);
  margin: 0 0 32px;
  font-weight: 400;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15.5px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .12s ease, background .15s, box-shadow .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(47, 111, 237, .4);
}
.btn--primary:hover { background: var(--accent-strong); color: #fff; }
.btn--ghost {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .28);
  color: #fff;
}
.btn--ghost:hover { background: rgba(255, 255, 255, .16); color: #fff; }

/* ----------------------------------------------------------- page banner */
.pagehead {
  position: relative;
  color: #fff;
  padding: 64px 0 56px;
  background: var(--navy-800);
  overflow: hidden;
}
.pagehead__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .42;
  z-index: 0;
}
.pagehead::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,16,28,.55), rgba(10,16,28,.9));
  z-index: 0;
}
.pagehead .container { position: relative; z-index: 1; }
.pagehead__eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-soft);
  margin: 0 0 10px;
}
.pagehead h1 {
  color: #fff;
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: -.02em;
  margin: 0;
}
.pagehead p {
  color: rgba(255,255,255,.85);
  font-size: 18px;
  max-width: 720px;
  margin: 14px 0 0;
}

/* ----------------------------------------------------------- affiliations */
.affil {
  background: var(--navy-900);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 18px 0;
}
.affil__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  font-size: 14.5px;
  color: rgba(255,255,255,.55);
}
.affil__inner a { color: rgba(255,255,255,.8); font-weight: 500; }
.affil__inner a:hover { color: #fff; }
.affil__dot { color: var(--accent); }

/* --------------------------------------------------------------- prose */
.prose p { margin: 0 0 18px; color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }
.prose a { font-weight: 500; }

/* ----------------------------------------------------------- feature cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card__icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 22px;
  margin-bottom: 16px;
  background: var(--bg-softer);
}
.card h3 { margin: 0 0 8px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ------------------------------------------------------------- people grid */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 26px;
  margin-top: 36px;
}
.person {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}
.person:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.person__photo {
  aspect-ratio: 5 / 6;
  background: var(--navy-600);
  background-size: cover;
  background-position: center top;
}
.person__body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.person__name { font-size: 18px; font-weight: 700; color: var(--navy-700); margin: 0; }
.person__role { font-size: 14px; color: var(--accent-strong); font-weight: 600; margin: 3px 0 10px; }
.person__meta { font-size: 14px; color: var(--muted); margin: 0 0 12px; word-break: break-word; }
.person__meta a { color: var(--muted); }
.person__meta a:hover { color: var(--accent); }
.person__links { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.tag-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bg-softer);
  color: var(--accent-strong);
}
.tag-link:hover { background: var(--accent); color: #fff; }

.subhead {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin: 56px 0 0;
}
.subhead:first-of-type { margin-top: 8px; }

/* ------------------------------------------------------------ publications */
.pub-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 44px;
}
.pub-toc a {
  font-size: 14px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--bg-softer);
  color: var(--ink-soft);
}
.pub-toc a:hover { background: var(--accent); color: #fff; }

.pub-year {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 46px 0 22px;
  scroll-margin-top: 90px;
}
.pub-year:first-of-type { margin-top: 0; }
.pub-year h2 {
  font-size: 26px;
  margin: 0;
  color: var(--navy-700);
}
.pub-year::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.pub {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.pub:last-child { border-bottom: 0; }
.pub__marker {
  flex: 0 0 4px;
  width: 4px;
  border-radius: 3px;
  background: linear-gradient(var(--accent), var(--accent-soft));
  opacity: .55;
}
.pub__body { font-size: 16px; color: var(--ink-soft); }
.pub__body .authors { color: var(--ink); }
.pub__body .title { color: var(--navy-700); font-weight: 600; }
.pub__body .venue { font-style: italic; }
.pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--bg-softer);
  color: var(--accent-strong);
  white-space: nowrap;
}
.pdf-link:hover { background: var(--accent); color: #fff; }

/* ---------------------------------------------------------------- contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
}
.contact-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
.contact-card h2 { margin-top: 0; }
.contact-row { display: flex; gap: 12px; margin: 0 0 14px; }
.contact-row .ico { color: var(--accent); flex: 0 0 22px; font-size: 18px; line-height: 1.5; }
.contact-card .map {
  border: 0;
  width: 100%;
  height: 360px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ------------------------------------------------------------------ links */
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.link-list li:last-child { border-bottom: 0; }
.link-list a { font-weight: 600; font-size: 17px; }
.link-list .org { color: var(--muted); font-size: 15px; }

/* ----------------------------------------------------------------- footer */
.footer {
  background: var(--navy-900);
  color: rgba(255,255,255,.6);
  padding: 48px 0 36px;
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer__brand { color: #fff; font-weight: 800; font-size: 18px; }
.footer__brand small { display: block; font-weight: 400; font-size: 13px; color: var(--accent-soft); margin-top: 2px; }
.footer__col h4 {
  color: #fff;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.footer__col a { display: block; color: rgba(255,255,255,.6); font-size: 14.5px; padding: 3px 0; }
.footer__col a:hover { color: #fff; }
.footer__bottom {
  max-width: var(--maxw);
  margin: 34px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 13.5px;
  color: rgba(255,255,255,.45);
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10, 16, 28, .98);
    backdrop-filter: blur(14px);
    padding: 8px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height .28s ease;
  }
  .nav__links.is-open { max-height: 520px; }
  .nav__links a { padding: 13px 14px; border-radius: 8px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { padding: 52px 0; }
  .hero { background-position: center; }
  .hero__content { max-width: 100%; }
}
