/* =========================================================
   Eissa Lab — Design System
   Modern scientific · cool neuro palette · whitespace-led
   ========================================================= */

:root {
  /* Palette — cool neuro */
  --bg:        #F4F7FB;
  --bg-deep:   #0A1730;   /* deep navy for dark sections */
  --surface:   #FFFFFF;
  --surface-2: #EDF1F8;

  --ink:       #0B1B33;   /* primary text / near-black navy */
  --ink-2:     #36465F;   /* secondary text */
  --muted:     #6A7B96;   /* tertiary / captions */
  --line:      #E1E7F1;   /* hairline borders */
  --line-2:    #D2DAE8;

  --primary:      #1E40A8; /* deep blue */
  --primary-deep: #142a72;
  --indigo:       #4A40C9;
  --accent:       #11A9CC; /* cyan-teal data accent */
  --accent-soft:  #E2F4F8;
  --indigo-soft:  #ECEBFB;
  --blue-soft:    #E6ECFA;

  /* Type */
  --display: "Space Grotesk", "Helvetica Neue", sans-serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Spacing rhythm */
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(11,27,51,.05), 0 2px 8px rgba(11,27,51,.04);
  --shadow-md: 0 8px 30px rgba(11,27,51,.08), 0 2px 8px rgba(11,27,51,.05);
  --shadow-lg: 0 24px 60px rgba(10,23,48,.16);

  --ease: cubic-bezier(.22,.61,.36,1);

  /* theming */
  --btn-fg: #fff;
  --header-bg: rgba(244,247,251,.78);
  --header-bg-scrolled: rgba(244,247,251,.9);
  --canvas-edge: rgba(30,64,168,0.10);
}

/* ===================== Dark theme ===================== */
[data-theme="dark"] {
  --bg:        #0A1526;
  --bg-deep:   #060E1C;
  --surface:   #111E33;
  --surface-2: #16243D;

  --ink:       #EAF0FA;
  --ink-2:     #AFBED6;
  --muted:     #7E90AC;
  --line:      #21314A;
  --line-2:    #2E4160;

  --primary:      #6E8DF2;
  --primary-deep: #93AAFF;
  --indigo:       #9A92F4;
  --accent:       #34C9E8;
  --accent-soft:  rgba(52,201,232,.14);
  --indigo-soft:  rgba(154,146,244,.16);
  --blue-soft:    rgba(110,141,242,.15);

  --btn-fg: #0A1526;
  --header-bg: rgba(10,21,38,.72);
  --header-bg-scrolled: rgba(10,21,38,.9);
  --canvas-edge: rgba(120,150,255,0.13);

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.30);
  --shadow-md: 0 8px 30px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
}

html { color-scheme: dark; }
[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .35s var(--ease), color .35s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.wrap-wide { max-width: 1320px; margin: 0 auto; padding-inline: var(--gutter); }

section { position: relative; }

/* ---------- Type ---------- */
h1,h2,h3,h4 { font-family: var(--display); color: var(--ink); margin: 0; line-height: 1.05; letter-spacing: -.02em; font-weight: 600; }

.display {
  font-size: clamp(2.6rem, 6.2vw, 5.1rem);
  line-height: .98;
  letter-spacing: -.035em;
  font-weight: 600;
}
.h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); letter-spacing: -.03em; }
.h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); letter-spacing: -.02em; }

p { margin: 0 0 1.1em; }
.lead { font-size: clamp(1.12rem, 1.7vw, 1.4rem); line-height: 1.5; color: var(--ink-2); font-weight: 400; }

.kicker {
  font-family: var(--mono);
  font-size: .88rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.kicker::before {
  content: "";
  width: 26px; height: 1.5px;
  background: var(--accent);
  display: inline-block;
}
.kicker.no-rule::before { display: none; }

.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--sans);
  font-weight: 500;
  font-size: .98rem;
  padding: .8em 1.4em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s, color .25s, box-shadow .25s;
  line-height: 1;
}
.btn { white-space: nowrap; }
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

.btn-primary { background: var(--ink); color: var(--btn-fg); }
.btn-primary:hover { background: var(--primary); color: var(--btn-fg); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.btn-light { background:#fff; color: var(--ink); }
.btn-light:hover { background: var(--accent); color:#fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* Dark collaborate / join CTA band (see _includes/join-cta.html) */
.join-cta { background: var(--bg-deep); }
.join-inner { padding: clamp(56px,8vw,90px) 0; display:flex; align-items:center; justify-content:space-between; gap:40px; flex-wrap:wrap; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-weight: 500; color: var(--primary);
  font-family: var(--sans);
}
.link-arrow .arr { transition: transform .3s var(--ease); }
.link-arrow:hover .arr { transform: translateX(4px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); background: var(--header-bg-scrolled); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 74px;
}
.brand { display: flex; align-items: center; gap: .65rem; font-family: var(--display); font-weight: 600; font-size: 1.12rem; letter-spacing: -.02em; color: var(--ink); }
.brand .mark {
  width: 30px; height: 30px; flex: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--indigo));
  position: relative;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.brand .mark::after {
  content:""; position:absolute; inset:0;
  background: center / 74% no-repeat url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'><path d='M8.5 12 3.4 6.8M8.5 12 2.8 12.4M8.5 12 4.4 16.8'/><path d='M11.6 12 18 12M18 12 21 9.4M18 12 21 14.6'/><circle cx='8.5' cy='12' r='3.1' fill='%23fff' stroke='none'/><circle cx='3.4' cy='6.8' r='0.9' fill='%23fff' stroke='none'/><circle cx='2.8' cy='12.4' r='0.9' fill='%23fff' stroke='none'/><circle cx='4.4' cy='16.8' r='0.9' fill='%23fff' stroke='none'/><circle cx='21' cy='9.4' r='1' fill='%23fff' stroke='none'/><circle cx='21' cy='14.6' r='1' fill='%23fff' stroke='none'/></svg>");
}
.brand small { display:block; font-family: var(--mono); font-size: .58rem; letter-spacing:.18em; text-transform:uppercase; color: var(--muted); font-weight:400; margin-top: 2px; }
.site-header .brand small { font-size: .72rem; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: .96rem; font-weight: 450;
  color: var(--ink-2);
  padding: .5em .85em; border-radius: 8px;
  transition: color .2s, background .2s;
  position: relative;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-links a.active { color: var(--primary); font-weight: 500; }
.nav-cta { margin-left: 10px; }
/* CTA button must keep its own colors inside the nav (beat .nav-links a) */
.nav-links a.btn-primary { color: var(--btn-fg); background: var(--ink); }
.nav-links a.btn-primary:hover { color: var(--btn-fg); background: var(--primary); }

/* Theme toggle */
.theme-toggle {
  width: 40px; height: 40px; flex: none;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: transparent; color: var(--ink-2);
  display: grid; place-items: center; cursor: pointer;
  transition: color .2s, border-color .2s, background .2s, transform .2s var(--ease);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); transform: translateY(-1px); }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
.nav-theme { display: flex; align-items: center; }

.nav-toggle { display:none; background:none; border:0; cursor:pointer; padding:8px; }
.nav-toggle span { display:block; width:22px; height:2px; background: var(--ink); margin:4px 0; transition: .3s; border-radius: 2px; }

@media (max-width: 860px) {
  .nav-toggle { display:block; }
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 22px;
    box-shadow: var(--shadow-md);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: .28s var(--ease);
  }
  .nav.open .nav-links { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: .8em .6em; font-size: 1.05rem; }
  .nav-cta { margin: 8px 0 0; }
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-deep);
  color: #C7D2E4;
  margin-top: 120px;
  padding: 72px 0 36px;
}
.site-footer a { color: #C7D2E4; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.footer-brand .brand { color: #fff; }
.footer-brand .brand small { color: #7E91B0; font-size: .58rem; }
.footer-brand p { color: #91A2BE; max-width: 30ch; margin-top: 18px; font-size: .95rem; }
.footer-col h4 { color:#fff; font-size: .8rem; font-family: var(--mono); letter-spacing:.16em; text-transform:uppercase; font-weight:500; margin-bottom: 18px; }
.footer-col ul { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap: 11px; }
.footer-col a { color:#A9B8D2; font-size:.96rem; transition: color .2s; }
.footer-col a:hover { color:#fff; }
.footer-bottom {
  grid-column: 1 / -1;
  margin-top: 56px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.1);
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px;
  color:#7E91B0; font-size:.86rem; font-family: var(--mono); letter-spacing:.04em;
}
.social-row { display:flex; gap:10px; }
.social-row a {
  width:38px; height:38px; border:1px solid rgba(255,255,255,.16); border-radius:10px;
  display:grid; place-items:center; transition: .25s var(--ease); color:#A9B8D2;
}
.social-row a:hover { background: var(--primary); border-color: var(--primary); color:#fff; transform: translateY(-2px); }
@media (max-width: 760px){ .footer-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Generic section header ---------- */
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head .h2 { margin-top: 16px; }
.section-head p { margin-top: 18px; }

.section-pad { padding: clamp(72px, 11vw, 130px) 0; }
.section-pad-sm { padding: clamp(56px, 8vw, 92px) 0; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-2); }

/* keep the head in view when a head-shot is cropped to fill its frame
   (the width/height/object-fit sizing lives with each `… img` rule in the People section). */
.pi-photo img, .m-photo img { object-position: center top; }

/* page hero spacing on inner pages */
.page-hero { padding: clamp(60px, 9vw, 110px) 0 clamp(30px,5vw,52px); }
.page-hero .display {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
}

/* tag / pill */
.pill {
  display:inline-flex; align-items:center; gap:.5em;
  font-family: var(--mono); font-size:.72rem; letter-spacing:.1em; text-transform:uppercase;
  padding:.42em .8em; border-radius:999px;
  background: var(--blue-soft); color: var(--primary); font-weight:500;
}

/* eyebrow index number */
.idx { font-family: var(--mono); font-size:1rem; color: var(--accent); letter-spacing:.1em; font-weight:500; }

/* divider dot */
.dotrule { display:flex; align-items:center; gap:10px; color:var(--muted); font-family:var(--mono); font-size:.78rem; letter-spacing:.12em; }
.dotrule::before, .dotrule::after { content:""; height:1px; background:var(--line-2); flex:1; }

::selection { background: var(--primary); color:#fff; }


/* =====================================================================
   PAGE SECTIONS
   Styles previously inlined in each page's <style> block, consolidated
   here so the HTML files stay as clean structure + Liquid.
   ===================================================================== */

/* ---- Home (index.html) ---- */
.hero { padding: clamp(64px, 12vw, 132px) 0 0; overflow: hidden; }
.hero #net {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 38%, #000 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 38%, #000 100%);
  opacity: .9;
}
.hero-inner { position: relative; z-index: 1; }
.hero-copy { max-width: 660px; }
.hero .display { margin: 22px 0 0; }
.hero-labname { display:block; color:#52D7FF; font-size: clamp(2.8rem, 7vw, 78px); line-height:1; }
.hero-headline { display:block; margin-top:.12em; font-size: clamp(2rem, 6vw, 60px); }
.grad { background: linear-gradient(100deg, var(--primary), var(--indigo) 55%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin-top: 26px; max-width: 52ch; font-size: clamp(1.05rem, 2.4vw, 24px); }
.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }

.research-preview { background: var(--surface); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.research-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.research-card { padding: 34px 30px 30px; display:flex; flex-direction:column; align-items:flex-start; gap: 14px; }
.research-card h3 { margin-top: 4px; }
.research-card p { color: var(--ink-2); flex: 1; }
.research-card .link-arrow { margin-top: 6px; }

.method-row { margin-top: 56px; display:flex; flex-direction:column; gap:22px; }
.methods { display:flex; flex-wrap:wrap; gap:10px; }

.news-head { display:flex; align-items:baseline; gap: 20px; margin-bottom: 36px; flex-direction:column; }
.news-head .h2 { margin-top: 14px; }
.news-list { list-style:none; margin:0; padding:0; }
.news-item {
  display:grid; grid-template-columns: 120px 1fr auto; gap: 28px; align-items:start;
  padding: 30px 0; border-top: 1px solid var(--line);
}
.news-item:last-child { border-bottom: 1px solid var(--line); }
.news-date { font-family: var(--mono); font-size:.82rem; letter-spacing:.1em; color: var(--accent); padding-top: 6px; }
.news-body h3 { margin-bottom: 8px; }
.news-body p { color: var(--ink-2); margin: 0; max-width: 60ch; }
.news-tag {
  font-family: var(--mono); font-size:.72rem; letter-spacing:.1em; text-transform:uppercase;
  padding:.45em .8em; border:1px solid var(--line-2); border-radius:999px; color: var(--ink-2);
  white-space:nowrap; transition:.2s;
}
.news-tag:hover { border-color: var(--primary); color: var(--primary); }

@media (max-width: 860px){
  .research-grid { grid-template-columns: 1fr; }
  .hero #net { opacity:.4; -webkit-mask-image:none; mask-image:none; }
  .news-item { grid-template-columns: 1fr; gap: 10px; }
  .news-date { padding-top:0; }
  .news-tag { justify-self:start; }
}

/* ---- Research (research.html) ---- */
.approach { padding-bottom: 8px; }
.approach-grid { display:grid; grid-template-columns: repeat(3,1fr); gap: 0; border:1px solid var(--line); border-radius: var(--r-lg); overflow:hidden; background: var(--surface); }
.approach-item { padding: 32px 30px; border-right:1px solid var(--line); }
.approach-item:last-child { border-right:0; }
.approach-item .idx { display:inline-grid; place-items:center; width:34px; height:34px; border-radius:9px; background: var(--blue-soft); color: var(--primary); font-weight:600; margin-bottom:14px; }
.approach-item h3 { margin-bottom: 8px; }
.approach-item p { color: var(--ink-2); margin:0; font-size:.98rem; }

.theme.alt { background: var(--surface); border-block:1px solid var(--line); }
.theme-inner { display:grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px,6vw,80px); align-items:center; }
.theme-inner.reverse .theme-aside { order: 2; }
.theme-num { font-family: var(--display); font-size: clamp(2rem,6vw,4rem); font-weight:600; color: var(--line-2); line-height:1; letter-spacing:-.04em; display:block; margin-bottom: 18px; }
.theme-viz {
  margin: 0; aspect-ratio: 4/3; border-radius: var(--r-lg); position: relative; overflow:hidden;
  border:1px solid var(--line); box-shadow: var(--shadow-sm);
  display:flex; align-items:flex-end; padding: 18px;
}
.viz-label { font-family: var(--mono); font-size:.7rem; letter-spacing:.18em; color: rgba(255,255,255,.92); position:relative; z-index:2; }
.viz-adaptive { background:
   radial-gradient(120% 90% at 15% 10%, #2c52c4 0%, #1b347f 45%, #0c1c50 100%); }
.viz-adaptive::after { content:""; position:absolute; inset:0; z-index:1; background:
   repeating-linear-gradient(115deg, transparent 0 22px, rgba(255,255,255,.05) 22px 23px),
   radial-gradient(circle at 70% 30%, rgba(17,169,204,.55), transparent 42%); }
.viz-memory { background: radial-gradient(120% 90% at 85% 15%, #4a40c9 0%, #2c2792 50%, #14114d 100%); }
.viz-memory::after { content:""; position:absolute; inset:0; z-index:1; background:
   repeating-linear-gradient(0deg, transparent 0 18px, rgba(255,255,255,.06) 18px 19px),
   radial-gradient(circle at 25% 70%, rgba(17,169,204,.5), transparent 45%); }
.viz-clinical { background: radial-gradient(120% 90% at 30% 85%, #117f9c 0%, #145e95 45%, #0c1c50 100%); }
.viz-clinical::after { content:""; position:absolute; inset:0; z-index:1; background:
   radial-gradient(circle at 50% 40%, rgba(255,255,255,.12), transparent 38%),
   repeating-radial-gradient(circle at 50% 40%, transparent 0 26px, rgba(255,255,255,.07) 26px 27px); }

.theme-body .lead { margin: 18px 0 18px; }
.theme-body p { color: var(--ink-2); max-width: 56ch; }
.tag-row { display:flex; flex-wrap:wrap; gap:10px; margin-top: 24px; }
.theme-cta { margin-top: 24px; }

/* Theme visual carrying a figure/illustration instead of the gradient placeholder.
   Figures are scientific diagrams of varying aspect ratios — show them whole at
   their natural proportions (no crop, no letterbox) inside the framed card. */
.theme-viz.has-img { background: #fff; padding: 0; display: block; aspect-ratio: auto; align-items: initial; }
.theme-viz.has-img img { width: 100%; height: auto; display: block; }

.method-row { margin-top: 56px; display:flex; flex-direction:column; gap:22px; align-items:center; text-align:center; }
.methods { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; }

@media (max-width: 820px){
  .approach-grid { grid-template-columns: 1fr; }
  .approach-item { border-right:0; border-bottom:1px solid var(--line); }
  .approach-item:last-child { border-bottom:0; }
  .theme-inner { grid-template-columns: 1fr; gap: 28px; }
  .theme-inner.reverse .theme-aside { order: 0; }
  .theme-viz { aspect-ratio: 16/9; }
}

/* ---- Publications (publications.html) ---- */
.note {
  display:flex; gap:14px; align-items:flex-start;
  background: var(--accent-soft); border:1px solid #BFE6EE; border-radius: var(--r-md);
  padding: 16px 20px; margin-top: 8px;
}
.note-dot { width:9px; height:9px; border-radius:50%; background: var(--accent); margin-top:8px; flex:none; box-shadow:0 0 0 4px rgba(17,169,204,.18); }
.note p { margin:0; color: var(--ink-2); font-size:.95rem; }
.note strong { color: var(--ink); }

.pubs-wrap { padding-top: 40px; }
.pub-filters { display:flex; gap:8px; flex-wrap:wrap; margin-bottom: 38px; border-bottom:1px solid var(--line); padding-bottom: 18px; }
.filter { font-family: var(--sans); font-size:.92rem; font-weight:500; color: var(--ink-2); background:none; border:1px solid var(--line-2); padding:.5em 1.05em; border-radius:999px; cursor:pointer; transition:.2s var(--ease); }
.filter:hover { border-color: var(--ink-2); color: var(--ink); }
.filter.active { background: var(--primary); color:#fff; border-color: var(--primary); }

.pub-year { display:grid; grid-template-columns: 96px 1fr; gap: 28px; margin-bottom: 14px; align-items:start; }
.year-label { font-family: var(--display); font-weight:600; font-size:1.5rem; color: var(--line-2); position:sticky; top: 96px; letter-spacing:-.02em; }
.pub-list { list-style:none; margin:0 0 30px; padding:0; }
.pub {
  display:grid; grid-template-columns: 96px 1fr auto; gap: 20px; align-items:start;
  padding: 22px 0; border-top:1px solid var(--line);
}
.pub:first-child { border-top:0; }
.pub-type { font-family: var(--mono); font-size:.68rem; letter-spacing:.1em; text-transform:uppercase; padding:.4em .65em; border-radius:6px; white-space:nowrap; height:fit-content; font-weight:500; }
.t-publications { background: var(--blue-soft); color: var(--primary); }
.t-preprint { background: var(--indigo-soft); color: var(--indigo); }
.pub-title { font-family: var(--display); font-size:1.12rem; font-weight:500; letter-spacing:-.01em; line-height:1.3; margin:0 0 7px; color: var(--ink); }
.pub-authors { color: var(--muted); font-size:.92rem; margin:0; }
.pub-authors strong { color: var(--ink-2); }
.pub-links { display:flex; gap:8px; }
.pub-lnk { font-family: var(--mono); font-size:.74rem; letter-spacing:.06em; padding:.42em .7em; border:1px solid var(--line-2); border-radius:7px; color: var(--ink-2); transition:.2s; white-space:nowrap; }
.pub-lnk:hover { border-color: var(--primary); color: var(--primary); }
.pub-empty { color: var(--muted); padding: 30px 0; font-family: var(--mono); font-size:.9rem; }

@media (max-width: 760px){
  .pub-year { grid-template-columns: 1fr; gap: 10px; }
  .year-label { position:static; font-size:1.2rem; }
  .pub { grid-template-columns: 1fr; gap: 10px; }
  .pub-links { margin-top: 2px; }
}

/* ---- Contact (contact.html) ---- */
.contact-wrap { padding-top: 12px; }
.contact-info { max-width: 560px; }
.info-block { padding: 22px 0; border-top:1px solid var(--line); }
.info-block:first-child { border-top:0; padding-top:0; }
.info-lbl { display:block; font-family: var(--mono); font-size:.72rem; letter-spacing:.18em; text-transform:uppercase; color: var(--muted); margin-bottom:10px; }
.info-val { font-size:1.05rem; color: var(--ink); margin:0; line-height:1.6; }
a.info-val { font-weight:500; color: var(--primary); }
.info-chips { display:flex; gap:9px; flex-wrap:wrap; }

.join-section { background: var(--surface); border-top:1px solid var(--line); margin-top: clamp(56px,8vw,90px); }
.roles-grid { display:grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.role-card { padding: 30px 28px; display:flex; flex-direction:column; gap:10px; align-items:flex-start; }
.role-card .idx { font-size:.9rem; }
.role-card h3 { margin-top:4px; }
.role-card p { color: var(--ink-2); margin:0; }
.join-foot { margin-top: 40px; display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap; padding-top: 28px; border-top:1px solid var(--line); }
.join-foot p { margin:0; color: var(--ink-2); font-size:1.05rem; }

@media (max-width: 820px){
  .roles-grid { grid-template-columns: 1fr; }
}

/* ---- People (members.html) ---- */
.pi-wrap { margin-top: 8px; }
.pi-card {
  display:grid; grid-template-columns: 300px 1fr; gap: clamp(28px,4vw,52px);
  background: var(--surface); border:1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(24px,3vw,38px); align-items:center; box-shadow: var(--shadow-sm);
}
.pi-photo {
  aspect-ratio: 4/5; border-radius: var(--r-md); position:relative; overflow:hidden;
  background: linear-gradient(155deg,#1b347f,#4a40c9 60%, #117f9c);
  display:grid; place-items:center;
}
.pi-photo img { width:100%; height:100%; object-fit:cover; }
.ph-initials { font-family: var(--display); font-weight:600; color: rgba(255,255,255,.92); font-size: clamp(2.4rem,5vw,3.4rem); letter-spacing:.02em; }
.ph-tag { position:absolute; bottom:10px; right:12px; font-family: var(--mono); font-size:.62rem; letter-spacing:.16em; text-transform:uppercase; color: rgba(255,255,255,.6); border:1px solid rgba(255,255,255,.3); padding:.25em .55em; border-radius:6px; }
.pi-info .pill { margin-bottom: 14px; }
.pi-info .h2 { margin-bottom: 4px; }
.pi-role { font-size:1.15rem; color: var(--primary); font-weight:500; margin:0 0 18px; }
.pi-affil { list-style:none; margin:0 0 22px; padding:0; display:flex; flex-direction:column; gap:5px; color: var(--ink-2); }
.pi-affil li { padding-left: 18px; position:relative; }
.pi-affil li::before { content:""; position:absolute; left:0; top:.7em; width:7px; height:7px; border-radius:2px; background: var(--accent); }
.pi-links { display:flex; flex-wrap:wrap; gap:9px; }
.chip { font-family: var(--mono); font-size:.8rem; padding:.5em .85em; border:1px solid var(--line-2); border-radius:999px; color: var(--ink-2); transition:.2s var(--ease); }
.chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

.team-section { background: var(--surface); border-top:1px solid var(--line); margin-top: clamp(56px,8vw,90px); }
.team-grid { display:grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.member-card { overflow:hidden; display:flex; flex-direction:column; }
/* square frame suits the (square-to-portrait) head shots without cropping faces */
.m-photo { aspect-ratio: 1/1; position:relative; display:grid; place-items:center; }
.m-photo img { width:100%; height:100%; object-fit:cover; }
.grad-a { background: linear-gradient(150deg,#1b347f,#2c52c4); }
.grad-b { background: linear-gradient(150deg,#3a2c92,#4a40c9); }
.grad-c { background: linear-gradient(150deg,#0f5e7a,#117f9c); }
.m-body { padding: 24px 26px 28px; }
.m-body h3 { margin-bottom: 3px; }
.m-role { color: var(--primary); font-weight:500; margin:0 0 10px; font-size:.98rem; }
.m-dept { color: var(--muted); font-size:.9rem; margin:0 0 16px; line-height:1.5; }
.m-blurb { color: var(--ink-2); font-size:.96rem; margin:0; }

.join-card {
  display:flex; flex-direction:column; align-items:flex-start; gap:10px;
  padding: 30px 28px; justify-content:center;
  background: var(--blue-soft); border:1px dashed var(--line-2);
}
.join-card:hover { border-color: var(--primary); }
.join-plus { font-family: var(--display); font-size:2.4rem; line-height:1; color: var(--primary); font-weight:500; }
.join-card p { color: var(--ink-2); margin:0; }
.join-card .link-arrow { margin-top:6px; }

@media (max-width: 900px){ .team-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 720px){
  .pi-card { grid-template-columns: 1fr; }
  /* keep the PI head-shot portrait (not a wide banner that crops the head) */
  .pi-photo { aspect-ratio: 4/5; max-width: 280px; margin: 0 auto; }
  .team-grid { grid-template-columns: 1fr; }
}

/* ---- Member detail (_layouts/member.html) ---- */
.member-detail-grid { display: grid; grid-template-columns: 280px 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.member-detail-section { padding-top: 48px; padding-bottom: 80px; }
.member-detail-photo { border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4/5; max-width: 280px; }
.member-detail-photo img { width:100%; height:100%; object-fit:cover; object-position: center top; }
.member-bio { color: var(--ink-2); line-height: 1.7; }
.member-bio p { margin: 0 0 1em; max-width: 66ch; }
.member-blurb { color: var(--ink-2); max-width: 60ch; }
@media (max-width: 720px) {
  .member-detail-grid { grid-template-columns: 1fr; }
  .member-detail-photo { max-width: 200px; }
}
