/* =============================================================
   Chemla Lab — Stylesheet (refined academic edition)
   Deep forest-green identity · Spectral + IBM Plex
   Re-skin via the :root variables below.
   ============================================================= */

/* cyrillic-ext */

/* cyrillic */

/* vietnamese */

/* latin-ext */

/* latin */

/* cyrillic-ext */

/* cyrillic */

/* vietnamese */

/* latin-ext */

/* latin */

/* cyrillic-ext */

/* cyrillic */

/* vietnamese */

/* latin-ext */

/* latin */

/* cyrillic-ext */

/* cyrillic */

/* greek */

/* vietnamese */

/* latin-ext */

/* latin */

/* cyrillic-ext */

/* cyrillic */

/* greek */

/* vietnamese */

/* latin-ext */

/* latin */

/* cyrillic-ext */

/* cyrillic */

/* greek */

/* vietnamese */

/* latin-ext */

/* latin */

/* cyrillic-ext */

/* cyrillic */

/* greek */

/* vietnamese */

/* latin-ext */

/* latin */

/* cyrillic-ext */

/* cyrillic */

/* vietnamese */

/* latin-ext */

/* latin */

/* cyrillic-ext */

/* cyrillic */

/* vietnamese */

/* latin-ext */

/* latin */

/* cyrillic-ext */

/* cyrillic */

/* vietnamese */

/* latin-ext */

/* latin */

/* cyrillic-ext */

/* cyrillic */

/* vietnamese */

/* latin-ext */

/* latin */

/* cyrillic-ext */

/* cyrillic */

/* vietnamese */

/* latin-ext */

/* latin */

/* cyrillic-ext */

/* cyrillic */

/* vietnamese */

/* latin-ext */

/* latin */

:root {
  /* ---- Surfaces & ink ---- */
  --color-bg:        #ffffff;   /* cards / surfaces */
  --color-paper:     #f4f6f1;   /* page background — barely-green off-white */
  --color-surface:   #eef2ea;   /* soft panels */
  --color-bg-soft:   #eef2ea;   /* legacy alias */
  --color-text:      #15231b;   /* near-black green */
  --color-text-soft: #38473d;
  --color-muted:     #6b776e;
  --color-border:    #e2e7dd;
  --color-border-2:  #ccd5c6;

  /* ---- Brand greens ---- */
  --color-accent:     #1c5435;  /* primary forest green */
  --color-accent-2:   #3c7a52;  /* mid moss */
  --color-accent-deep:#0e2e1e;  /* darkest green */
  --color-bg-deep:    #0d2c1d;  /* dark sections */
  --color-link:       #1c5435;
  --color-link-hover: #0e2e1e;

  /* ---- Restrained warm accent (use sparingly) ---- */
  --color-accent-3:  #a9772a;   /* ochre */
  --color-gold-soft: #c8a45a;

  /* ---- Type ---- */
  --font-sans:  "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Spectral", Georgia, "Times New Roman", serif;
  --font-mono:  "IBM Plex Mono", "SF Mono", Menlo, Consolas, monospace;

  /* ---- Layout ---- */
  --max-width:  1140px;
  --radius:     8px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --shadow-sm:  0 1px 2px rgba(14,46,30,0.05);
  --shadow-md:  0 14px 34px -18px rgba(14,46,30,0.28);
  --shadow-lg:  0 28px 60px -24px rgba(14,46,30,0.34);
  --shadow-xl:  0 40px 80px -30px rgba(14,46,30,0.40);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- Reset / base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}
a {
  color: var(--color-link);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color var(--transition);
}
a:hover { color: var(--color-link-hover); text-decoration: underline; text-decoration-thickness: 1.5px; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--color-text);
  line-height: 1.16;
  margin-top: 0;
  letter-spacing: -0.018em;
  font-weight: 600;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); margin-bottom: 1rem; font-weight: 600; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); margin-top: 2.4rem; }
h3 { font-size: 1.28rem; margin-top: 1.5rem; font-weight: 600; }
p  { margin: 0 0 1rem; }
strong { font-weight: 600; color: var(--color-text); }

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

/* ---- Eyebrow / kicker — the recurring mono label ---- */
.eyebrow,
.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent-2);
  margin-bottom: 1rem;
}
.kicker--gold { color: var(--color-accent-3); }

/* ----- Layout ----- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
main { padding: 3rem 0 5.5rem; min-height: 60vh; }

/* ====================================================
   Header / Nav
   ==================================================== */
.site-header {
  background: rgba(244,246,241,0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.7rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 600;
  color: var(--color-accent-deep);
  font-size: 1.18rem;
  text-decoration: none;
  font-family: var(--font-serif);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--color-accent); }
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--color-accent);
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-family: var(--font-mono);
}
.brand-logo {
  width: auto; height: 34px;
  object-fit: contain;
  transition: transform var(--transition);
}
.brand:hover .brand-logo { transform: scale(1.06); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--color-text);
}
nav > ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  align-items: center;
  gap: 1.6rem;
}
nav a {
  color: var(--color-text-soft);
  font-weight: 500;
  padding: 0.3rem 0;
  position: relative;
  transition: color var(--transition);
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
}
nav a::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
nav a:hover, nav a.active { color: var(--color-accent); text-decoration: none; }
nav a:hover::after, nav a.active::after { transform: scaleX(1); }

/* ===== Dropdown menus ===== */
nav .has-children { position: relative; }
nav .has-children > a { display: inline-flex; align-items: center; gap: 0.3rem; }
nav .has-children > a .caret {
  font-size: 0.6em;
  margin-top: 1px;
  transition: transform var(--transition);
  display: inline-block;
  opacity: 0.6;
}
nav .has-children:hover > a .caret,
nav .has-children:focus-within > a .caret { transform: rotate(180deg); }

nav .dropdown {
  display: block;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  min-width: 248px;
  max-width: min(300px, 90vw);
  padding: 0.4rem 0;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -6px);
  transition: opacity 160ms ease, transform 160ms ease;
  list-style: none;
  margin: 0;
  z-index: 200;
}
nav .dropdown::before {
  content: "";
  position: absolute;
  top: -8px; left: 0; right: 0;
  height: 8px;
}
nav .has-children:hover > .dropdown,
nav .has-children:focus-within > .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
nav .dropdown li { list-style: none; }
nav .dropdown a {
  display: block;
  padding: 0.55rem 1.2rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text-soft);
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), padding-left var(--transition);
}
nav .dropdown a::after { display: none; }
nav .dropdown a:hover {
  color: var(--color-accent);
  background: var(--color-surface);
  padding-left: 1.45rem;
}
nav .dropdown a.active {
  color: var(--color-accent);
  background: var(--color-surface);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--color-accent);
}

/* ====================================================
   Hero (home)
   ==================================================== */
.hero {
  position: relative;
  padding: 5rem 0 4.5rem;
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}
.hero::before {
  /* faint contour wash — calm, no animation */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 760px 460px at 78% 8%, rgba(60,122,82,0.10), transparent 62%),
    radial-gradient(ellipse 620px 520px at 6% 94%, rgba(28,84,53,0.06), transparent 60%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
.hero h1 {
  margin-bottom: 0.6rem;
  color: var(--color-accent-deep);
  font-weight: 600;
  letter-spacing: -0.025em;
}
.hero .tagline {
  color: var(--color-accent);
  font-size: clamp(1.2rem, 2.1vw, 1.5rem);
  font-weight: 500;
  font-family: var(--font-serif);
  font-style: italic;
  margin: 0 0 1.5rem;
}
.hero p {
  font-size: 1.08rem;
  color: var(--color-text-soft);
  max-width: 36em;
}
.hero-image { position: relative; }
.hero-image img {
  width: 100%;
  display: block;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  background: white;
  padding: 0.9rem;
  border: 1px solid var(--color-border);
}
@media (min-width: 820px) {
  /* Text block on top, full-width diagram banner below — so the figure is
     large and its labels are legible instead of a small side thumbnail. */
  .hero-inner { gap: 2.4rem; }
  .hero-inner > .fade-in:first-child { max-width: 820px; }
}

/* ====================================================
   Stats strip
   ==================================================== */
.stats-strip {
  background: var(--color-bg-deep);
  color: white;
  padding: 2.6rem 0;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--color-accent-deep);
}
.stats-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 600px 300px at 50% -20%, rgba(60,122,82,0.22), transparent 70%);
  pointer-events: none;
}
.stats-strip .container {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 1rem;
  text-align: center;
}
@media (min-width: 700px) {
  .stats-strip .container { grid-template-columns: repeat(4, 1fr); }
}
.stat-item .stat-number {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 600;
  line-height: 1;
  display: block;
  color: #fff;
}
.stat-item .stat-number .unit { color: var(--color-gold-soft); }
.stat-item .stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.66);
  margin-top: 0.6rem;
}

/* ====================================================
   Section heading
   ==================================================== */
.section-heading {
  font-family: var(--font-serif);
  margin-bottom: 1.6rem;
  position: relative;
  display: block;
  font-weight: 600;
}
.section-heading::after {
  content: "";
  display: block;
  width: 44px;
  height: 2px;
  background: var(--color-accent);
  margin-top: 0.7rem;
}
.section-heading.center { text-align: center; }
.section-heading.center::after { margin-left: auto; margin-right: auto; }

/* ====================================================
   Cards / grids
   ==================================================== */
.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.7rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-2);
}
.card h3 { margin-top: 0; color: var(--color-accent-deep); }
.card p { margin-bottom: 0; color: var(--color-text-soft); }

.card-icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  color: var(--color-accent);
  transition: transform var(--transition), background var(--transition), color var(--transition);
}
.card-icon svg { width: 26px; height: 26px; }
.card:hover .card-icon {
  background: var(--color-accent);
  color: white;
}

/* role pill (home theme cards) */
.role-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-2);
  margin-bottom: 0.65rem;
}

/* ====================================================
   Featured paper card
   ==================================================== */
.featured-paper {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  height: 100%;
}
.featured-paper:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-2);
  text-decoration: none;
}
.featured-paper .venue-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent-2);
  margin-bottom: 0.9rem;
  align-self: flex-start;
}
.featured-paper .paper-title {
  font-family: var(--font-serif);
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.32;
  margin: 0 0 0.6rem;
}
.featured-paper .paper-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-top: auto;
  padding-top: 0.7rem;
}

/* ====================================================
   Person card
   ==================================================== */
.person { text-align: center; }
.person img {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.1rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}
.person:hover img { transform: scale(1.03); }
.person .role {
  font-family: var(--font-mono);
  color: var(--color-accent-2);
  font-size: 0.72rem;
  font-weight: 500;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.person .name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin: 0.4rem 0 0.5rem;
  font-weight: 600;
  color: var(--color-text);
}
.person p { font-size: 0.96rem; color: var(--color-text-soft); margin: 0.5rem 0; }
.person .links { margin-top: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.person .links a {
  display: inline-block;
  padding: 0.28rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-soft);
  transition: all var(--transition);
}
.person .links a:hover {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
  text-decoration: none;
}

/* ====================================================
   Research overview — motivation banner
   ==================================================== */
.motivation {
  position: relative;
  margin: 0 0 2.5rem;
  padding: 3.2rem 2.8rem;
  border-radius: var(--radius-xl);
  background: var(--color-bg-deep);
  color: white;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.motivation::before {
  content: "";
  position: absolute;
  top: -80px; right: -60px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(60,122,82,0.28), transparent 68%);
  border-radius: 50%;
  pointer-events: none;
}
.motivation .eyebrow { color: var(--color-gold-soft); }
.motivation h1 {
  color: white;
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  position: relative;
}
.motivation > p {
  color: rgba(255,255,255,0.84);
  font-size: 1.06rem;
  line-height: 1.75;
  max-width: 760px;
  margin: 0 0 1rem;
  position: relative;
}
.motivation .grand-challenge {
  display: block;
  margin-top: 1.4rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.16rem;
  color: var(--color-gold-soft);
  border-left: 2px solid var(--color-gold-soft);
  padding-left: 1rem;
  position: relative;
}
.motivation-figure {
  margin: 2.5rem 0 0;
  text-align: center;
  position: relative;
}
.motivation-figure img {
  max-width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  background: white;
  padding: 0.8rem;
  border: 1px solid var(--color-border);
  margin: 0 auto;
}
.motivation-figure figcaption {
  margin-top: 1rem;
  color: var(--color-muted);
  font-size: 0.92rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.areas-intro {
  text-align: center;
  margin: 3.5rem auto 1rem;
  max-width: 720px;
}
.areas-intro h2 { display: inline-block; margin-bottom: 0.5rem; }
.areas-intro p { color: var(--color-text-soft); font-size: 1.05rem; }

/* Research area pill */
.research-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-2);
  margin-bottom: 0.7rem;
}

/* ====================================================
   Research themes (alternating)
   ==================================================== */
.research-theme {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin: 4rem 0;
  align-items: center;
  scroll-margin-top: 96px;
}
@media (min-width: 820px) {
  .research-theme { grid-template-columns: 1.05fr 1fr; }
  .research-theme.reverse .research-text  { order: 2; }
  .research-theme.reverse .research-figure { order: 1; }
}
.research-text h2 {
  margin-top: 0;
  position: relative;
  padding-bottom: 0.6rem;
  color: var(--color-accent-deep);
}
.research-text h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  background: var(--color-accent);
  margin-top: 0.8rem;
}
.research-text p { color: var(--color-text-soft); }
.research-text ul { padding-left: 1.1rem; }
.research-text li { margin-bottom: 0.35rem; color: var(--color-text-soft); }
.research-figure img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  background: white;
  padding: 0.7rem;
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.research-figure img:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* =============================================================
   Publications
   ============================================================= */
.pub-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  margin: 1rem 0 2.2rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.pub-stat {
  text-align: center;
  padding: 1.4rem 0.6rem;
  border-right: 1px solid var(--color-border);
}
.pub-stat:last-child { border-right: none; }
.pub-stat-num {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--color-accent-deep);
  line-height: 1.1;
}
.pub-stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 0.4rem;
}

.pub-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
}
.pub-toolbar .filter-bar { margin: 0; flex: 1 1 280px; }
.pub-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pub-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
  background: white;
  color: var(--color-text-soft);
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.pub-filter:hover { border-color: var(--color-accent-2); color: var(--color-accent-deep); }
.pub-filter.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}
.pub-filter-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(14,46,30,0.07);
  color: inherit;
  padding: 0.05rem 0.42rem;
  border-radius: 999px;
}
.pub-filter.active .pub-filter-count { background: rgba(255,255,255,0.22); }
.pub-scholar-link { margin-left: auto; }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.86rem; }

.pub-year-block { margin-bottom: 2.6rem; }
.year-heading {
  font-family: var(--font-serif);
  color: var(--color-accent-deep);
  margin: 2rem 0 1.3rem;
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--color-border-2);
}
.year-heading::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
}

.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.1rem;
}
.pub-card {
  position: relative;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.4rem 1.15rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  border-left: 3px solid var(--color-accent);
}
.pub-card.pub-type-review    { border-left-color: var(--color-accent-deep); }
.pub-card.pub-type-preprint  { border-left-color: var(--color-accent-3); }
.pub-card.pub-type-patent    { border-left-color: #8a6a22; }
.pub-card.pub-type-policy    { border-left-color: #5d4280; }
.pub-card.pub-type-conference{ border-left-color: #2b6f86; }
.pub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-2);
}
.pub-card.pub-type-review:hover     { border-left-color: var(--color-accent-deep); }
.pub-card.pub-type-preprint:hover   { border-left-color: var(--color-accent-3); }
.pub-card.pub-type-patent:hover     { border-left-color: #8a6a22; }
.pub-card.pub-type-policy:hover     { border-left-color: #5d4280; }
.pub-card.pub-type-conference:hover { border-left-color: #2b6f86; }

.pub-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.pub-type-badge {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.22rem 0;
  color: var(--color-accent-2);
}
.pub-type-badge.pub-type-review     { color: var(--color-accent-deep); }
.pub-type-badge.pub-type-preprint   { color: #8a6a22; }
.pub-type-badge.pub-type-patent     { color: #8a6a22; }
.pub-type-badge.pub-type-policy     { color: #5d4280; }
.pub-type-badge.pub-type-conference { color: #2b6f86; }

.pub-cite-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-accent-deep);
  white-space: nowrap;
}

.pub-card .pub-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.34;
  color: var(--color-text);
  margin: 0 0 0.5rem;
}
.pub-card .pub-authors {
  color: var(--color-text-soft);
  font-size: 0.91rem;
  margin: 0 0 0.3rem;
  line-height: 1.55;
}
.pub-card .pub-authors .pub-pi {
  color: var(--color-accent-deep);
  font-weight: 600;
}
.pub-card .pub-venue {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}
.pub-card .pub-venue em { color: var(--color-text-soft); font-style: italic; font-weight: 500; }
.pub-card .pub-note {
  font-size: 0.82rem;
  color: var(--color-accent);
  margin: 0 0 0.5rem;
  font-style: italic;
}
.pub-card .pub-meta {
  font-size: 0.85rem;
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.pub-card .pub-pill {
  display: inline-flex;
  align-items: center;
  background: white;
  border: 1px solid var(--color-border);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--color-accent);
  transition: all var(--transition);
}
.pub-card .pub-pill:hover {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
  text-decoration: none;
}

@media (max-width: 540px) {
  .pub-grid { grid-template-columns: 1fr; }
  .pub-scholar-link { margin-left: 0; width: 100%; }
  .pub-scholar-link .btn { width: 100%; justify-content: center; }
}

/* ====================================================
   News
   ==================================================== */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--color-border);
  position: relative;
  padding-left: 1.6rem;
}
.news-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.85rem;
  width: 7px; height: 7px;
  background: var(--color-accent);
  border-radius: 50%;
}
.news-date {
  font-family: var(--font-mono);
  color: var(--color-accent-2);
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.news-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0.35rem 0;
  color: var(--color-text);
}

/* ====================================================
   Filter bar / inputs
   ==================================================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.6rem;
}
.filter-bar input, .filter-bar select {
  padding: 0.7rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.filter-bar input:focus, .filter-bar select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(28,84,53,0.12);
}
.filter-bar input { flex: 1; min-width: 220px; }

/* ====================================================
   Buttons
   ==================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-accent);
  color: white;
  padding: 0.82rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-accent);
  font-size: 0.98rem;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
.btn:hover {
  transform: translateY(-2px);
  background: var(--color-accent-deep);
  border-color: var(--color-accent-deep);
  color: white;
  text-decoration: none;
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-border-2);
  box-shadow: none;
}
.btn-secondary:hover {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
  box-shadow: none;
}

/* ====================================================
   Protocols index / password gate
   ==================================================== */
.gate {
  max-width: 460px;
  margin: 5rem auto;
  padding: 3rem 2.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
}
.gate::before {
  content: "";
  display: block;
  width: 46px; height: 46px;
  margin: 0 auto 0.9rem;
  border-radius: 50%;
  background: var(--color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c5435' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / 22px no-repeat;
  border: 1px solid var(--color-border);
}
.gate h2 { color: var(--color-accent-deep); margin-top: 0; }
.gate input[type="password"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  margin: 0.85rem 0;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.gate input[type="password"]:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(28,84,53,0.12);
}
.gate .err { color: #b23b2e; font-size: 0.9rem; min-height: 1.25rem; margin-top: 0.5rem; }

.protocol-section { margin-bottom: 3rem; }
.protocol-section h2 { color: var(--color-accent-deep); }
.protocol-section .subtitle { color: var(--color-muted); margin-top: -0.6rem; margin-bottom: 1.5rem; max-width: 760px; }
.protocol-category { margin-top: 1.6rem; }
.protocol-category h3 {
  margin-bottom: 0.5rem;
  color: var(--color-text);
  position: relative;
  padding-left: 0.85rem;
  font-family: var(--font-serif);
}
.protocol-category h3::before {
  content: "";
  position: absolute;
  left: 0; top: 0.35em; bottom: 0.35em;
  width: 3px;
  border-radius: 2px;
  background: var(--color-accent);
}
.protocol-list { list-style: none; padding: 0; margin: 0; }
.protocol-list li {
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: padding-left var(--transition), background var(--transition);
}
.protocol-list li:hover {
  padding-left: 1rem;
  background: var(--color-surface);
}
.protocol-list li:last-child { border-bottom: none; }
.protocol-list li a { font-weight: 500; color: var(--color-text); }
.protocol-list li a:hover { color: var(--color-accent); }
.protocol-list .source-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  padding: 0.18rem 0.55rem;
  margin-left: 0.6rem;
  border-radius: 999px;
  background: var(--color-accent-2);
  color: white;
  vertical-align: middle;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}
.protocol-list .source-badge.galloway { background: #5d4280; }
.protocol-list .source-badge.barrick  { background: #b06a2e; }
.protocol-list .source-badge.chemla   { background: var(--color-accent); }

/* ====================================================
   Individual protocol page
   ==================================================== */
.protocol-page { max-width: 820px; }
.protocol-page .breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 1rem;
  color: var(--color-muted);
  letter-spacing: 0.04em;
}
.protocol-page .breadcrumb a {
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.protocol-page h1 { margin-bottom: 0.5rem; font-size: clamp(1.9rem, 3.5vw, 2.5rem); }
.protocol-page .protocol-meta {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--color-border);
}
.protocol-page .tag {
  display: inline-block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-accent);
  padding: 0.22rem 0.8rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.protocol-page h2 {
  font-family: var(--font-serif);
  color: var(--color-accent-deep);
  font-size: 1.5rem;
  margin-top: 2.3rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  position: relative;
}
.protocol-page h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 46px; height: 2px;
  background: var(--color-accent);
}
.protocol-page h3 { font-size: 1.16rem; margin-top: 1.6rem; color: var(--color-text); font-family: var(--font-serif); }
.protocol-page ol, .protocol-page ul { padding-left: 1.5rem; }
.protocol-page li { margin-bottom: 0.45rem; }
.protocol-page ul.recipe {
  list-style: none;
  padding: 1.1rem 1.4rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  border-left: 3px solid var(--color-accent);
  margin: 1.2rem 0;
}
.protocol-page ul.recipe li {
  padding: 0.2rem 0;
  margin-bottom: 0;
  border: none;
  list-style: none;
  position: relative;
  padding-left: 1.2rem;
}
.protocol-page ul.recipe li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}
.protocol-page code {
  background: var(--color-surface);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--color-accent-deep);
  font-family: var(--font-mono);
}
.protocol-page .data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.3rem 0;
  font-size: 0.94rem;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
.protocol-page .data-table th,
.protocol-page .data-table td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.protocol-page .data-table th {
  background: var(--color-surface);
  color: var(--color-accent-deep);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.protocol-page .data-table tr:last-child td { border-bottom: none; }
.protocol-page .data-table tr:hover td { background: rgba(28,84,53,0.035); }
.protocol-page .data-table .cycles {
  font-weight: 600;
  color: var(--color-accent);
  vertical-align: middle;
  text-align: center;
}

/* ====================================================
   Footer
   ==================================================== */
.site-footer {
  background: var(--color-bg-deep);
  color: rgba(255,255,255,0.78);
  padding: 4rem 0 2rem;
  font-size: 0.92rem;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -40%; right: -8%;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(60,122,82,0.16), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  position: relative;
  margin-bottom: 2.5rem;
}
@media (min-width: 720px) {
  .site-footer .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.site-footer h4 {
  color: white;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin: 0 0 1rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 0.45rem; }
.site-footer a { color: rgba(255,255,255,0.7); transition: color var(--transition); }
.site-footer a:hover { color: var(--color-gold-soft); text-decoration: none; }
.site-footer .lab-mark { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1rem; }
.site-footer .lab-mark img {
  width: auto; height: 40px;
}
.site-footer .lab-mark .lab-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: white;
}
.site-footer .social-row { display: flex; gap: 0.5rem; margin-top: 1.1rem; }
.site-footer .social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.8);
  transition: all var(--transition);
}
.site-footer .social-row a:hover {
  background: var(--color-accent-2);
  color: white;
  transform: translateY(-2px);
  border-color: var(--color-accent-2);
}
.site-footer .social-row svg { width: 17px; height: 17px; }
.site-footer .colophon {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.5);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  position: relative;
}

/* ====================================================
   Back to top
   ==================================================== */
.back-to-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
  z-index: 50;
}
.back-to-top svg { width: 20px; height: 20px; }
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); background: var(--color-accent-deep); }

/* ====================================================
   Scroll fade-in — subtle, and SAFE
   Content is visible by default; the .visible class only
   plays an entrance animation. If JS/observer never runs,
   nothing stays hidden.
   ==================================================== */
.fade-in.visible {
  animation: fade-rise 620ms cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes fade-rise {
  from { transform: translateY(14px); }
  to   { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .fade-in.visible { animation: none; }
  html { scroll-behavior: auto; }
}

/* ====================================================
   Mobile nav
   ==================================================== */
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  nav { display: none; width: 100%; }
  nav.open { display: block; }
  .nav-wrap { flex-wrap: wrap; }
  nav > ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
    margin-top: 0.75rem;
    border-top: 1px solid var(--color-border);
  }
  nav > ul > li { border-bottom: 1px solid var(--color-border); }
  nav a { display: block; padding: 0.85rem 0; }
  nav a::after { display: none; }
  nav a:hover, nav a.active { background: var(--color-surface); padding-left: 0.5rem; }
  nav .has-children > a .caret { display: none; }
  nav .dropdown {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0 0 0.5rem 0.5rem;
    margin: 0 0 0.4rem 0.85rem;
    border-left: 2px solid var(--color-border);
    min-width: 0;
  }
  nav .dropdown::before { display: none; }
  nav .dropdown li { border-bottom: none; }
  nav .dropdown a { padding: 0.55rem 0 0.55rem 0.85rem; font-size: 0.92rem; white-space: normal; }
  nav .dropdown a:hover, nav .dropdown a.active { padding-left: 0.85rem; box-shadow: none; border-radius: 4px; }
}

/* ====================================================
   Utilities
   ==================================================== */
.muted { color: var(--color-muted); }
.center { text-align: center; }
.lead {
  font-size: 1.2rem;
  color: var(--color-text-soft);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  max-width: 44em;
}
.divider {
  height: 1px;
  background: var(--color-border);
  margin: 3.5rem 0;
  border: none;
}
.bg-soft {
  background: var(--color-surface);
  padding: 4rem 0;
  margin: 3.5rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* ====================================================
   Page intro header (shared light hero for inner pages)
   ==================================================== */
.page-head {
  position: relative;
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-border);
  padding: 3.6rem 0 3rem;
  overflow: hidden;
}
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 620px 400px at 88% 0%, rgba(60,122,82,0.08), transparent 62%);
  pointer-events: none;
}
.page-head .container { position: relative; }
.page-head h1 { color: var(--color-accent-deep); margin: 0 0 0.6rem; }
.page-head .lead { margin-bottom: 0; }

/* ====================================================
   CV page
   ==================================================== */
.cv-page { max-width: 880px; }
.cv-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}
@media (min-width: 720px) { .cv-header { grid-template-columns: auto 1fr; } }
.cv-portrait {
  width: 172px; height: 172px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}
.cv-header h1 { margin-bottom: 0.4rem; font-size: clamp(1.9rem, 3.8vw, 2.5rem); color: var(--color-accent-deep); }
.cv-header .cv-title {
  color: var(--color-accent);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  margin: 0 0 0.85rem;
}
.cv-header .cv-keywords { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.85rem 0 1rem; }
.cv-header .cv-keywords span {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-accent-deep);
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
}
.cv-header .cv-contact-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.8rem; }
.cv-header .cv-contact-row a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--color-text-soft);
  transition: all var(--transition);
}
.cv-header .cv-contact-row a:hover {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
  text-decoration: none;
}
.cv-header .cv-contact-row svg { width: 16px; height: 16px; }

.cv-section { margin: 2.6rem 0; }
.cv-section h2 {
  font-family: var(--font-serif);
  color: var(--color-accent-deep);
  margin: 0 0 1.25rem;
  font-size: 1.5rem;
  position: relative;
  padding-left: 0.9rem;
}
.cv-section h2::before {
  content: "";
  position: absolute;
  left: 0; top: 0.3em; bottom: 0.3em;
  width: 3px;
  border-radius: 2px;
  background: var(--color-accent);
}
.cv-entries { display: grid; gap: 1.4rem; }
.cv-entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--color-border);
}
.cv-entry:last-child { border-bottom: none; padding-bottom: 0; }
@media (min-width: 720px) { .cv-entry { grid-template-columns: 140px 1fr; gap: 1.3rem; } }
.cv-when {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.cv-what .cv-role {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--color-text);
  margin: 0 0 0.15rem;
}
.cv-what .cv-where { color: var(--color-accent-deep); font-weight: 500; font-size: 0.95rem; margin: 0 0 0.3rem; }
.cv-what p { font-size: 0.93rem; color: var(--color-text-soft); margin: 0.3rem 0 0; }
.cv-what .cv-detail { font-style: italic; color: var(--color-muted); font-size: 0.9rem; }

.cv-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.cv-list li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
  padding: 0.65rem 0.9rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  border-left: 3px solid var(--color-accent-2);
  transition: transform var(--transition), border-left-color var(--transition);
}
.cv-list li:hover { transform: translateX(3px); border-left-color: var(--color-accent); }
@media (min-width: 720px) { .cv-list li { grid-template-columns: 110px 1fr; gap: 1rem; align-items: baseline; } }
.cv-list .cv-when { font-size: 0.78rem; }
.cv-list .cv-text { font-size: 0.93rem; }

.cv-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  border-left: 3px solid var(--color-accent);
}
.cv-toc strong { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent-deep); margin-right: 0.3rem; align-self: center; }
.cv-toc a {
  font-size: 0.84rem;
  color: var(--color-text-soft);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}
.cv-toc a:hover { background: var(--color-accent); color: white; border-color: var(--color-accent); text-decoration: none; }

/* ====================================================
   Print (protocols)
   ==================================================== */
@media print {
  .site-header, .site-footer, .breadcrumb, .back-to-top { display: none; }
  body { background: white; }
  .protocol-page { max-width: 100%; }
  a { color: black; }
  .protocol-page ul.recipe { background: #f5f5f5; }
}

/* ====================================================
   Launch / "opening 2027" treatment (UCSB)
   ==================================================== */
.launch-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-accent-deep);
  background: rgba(28,84,53,0.08);
  border: 1px solid var(--color-border-2);
  padding: 0.36rem 0.85rem;
  border-radius: 999px;
  margin: 0 0 1.25rem;
}
.launch-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-accent-3);
  box-shadow: 0 0 0 0 rgba(169,119,42,0.5);
  animation: launchpulse 2.2s infinite;
}
@keyframes launchpulse {
  0%   { box-shadow: 0 0 0 0 rgba(169,119,42,0.45); }
  70%  { box-shadow: 0 0 0 9px rgba(169,119,42,0); }
  100% { box-shadow: 0 0 0 0 rgba(169,119,42,0); }
}

.launch-banner {
  background: var(--color-bg);
  border-top: 3px solid var(--color-accent);
  border-bottom: 1px solid var(--color-border);
  padding: 2.6rem 0;
}
.launch-banner-inner {
  display: grid;
  gap: 1.4rem 2rem;
  align-items: center;
}
@media (min-width: 860px) {
  .launch-banner-inner { grid-template-columns: 1.7fr 1fr; }
  .launch-banner-actions { justify-content: flex-end; }
}
.launch-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-3);
  margin-bottom: 0.6rem;
}
.launch-banner h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  color: var(--color-accent-deep);
}
.launch-banner p { margin: 0; color: var(--color-text-soft); }
.launch-banner-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* Opening callout card (About / UCSB pages) */
.callout-opening {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin: 0 0 2.4rem;
}
.callout-opening p { margin: 0; color: var(--color-text-soft); }
.callout-opening .launch-kicker { margin-bottom: 0.35rem; }

/* UCSB page media gallery + image credits */
.media-grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 680px) { .media-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
figure.framed { margin: 0; }
figure.framed img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
figure.framed figcaption { margin-top: 0.5rem; font-size: 0.88rem; color: var(--color-muted); }
.img-credits { font-size: 0.82rem; color: var(--color-muted); }
.img-credits a { color: var(--color-muted); text-decoration: underline; }
.building-note {
  background: rgba(169,119,42,0.07);
  border: 1px dashed var(--color-gold-soft);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  color: var(--color-text-soft);
}

/* ====================================================
   Last-updated strip (injected under header on every page)
   ==================================================== */
.last-updated {
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--color-muted);
}
.last-updated .container {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  text-align: right;
}
.last-updated time { color: var(--color-text-soft); font-weight: 500; }

/* ====================================================
   Publication career-stage badge
   ==================================================== */
.pub-stage-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--color-border-2);
  color: var(--color-accent-2);
  background: var(--color-surface);
}
.pub-stage-badge.pub-stage-undergrad {
  color: var(--color-accent-3);
  border-color: rgba(169,119,42,0.35);
  background: rgba(169,119,42,0.08);
}
.pub-stage-badge.pub-stage-phd { color: var(--color-accent); }
.pub-stage-badge.pub-stage-postdoc { color: var(--color-accent-2); }

/* ====================================================
   Photo / video gallery + lightbox
   ==================================================== */
.gallery-grid {
  columns: 3 280px;
  column-gap: 1rem;
}
.gallery-item {
  break-inside: avoid;
  margin: 0 0 1rem;
}
.gallery-item img,
.gallery-item video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: #0d2c1d;
}
.gallery-media {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition);
}
.gallery-media:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.gallery-item figcaption {
  font-size: 0.85rem;
  color: var(--color-text-soft);
  margin-top: 0.45rem;
  line-height: 1.5;
}
.gallery-credit { color: var(--color-muted); font-style: italic; }
.gallery-allcredit {
  margin-top: 1.6rem;
  color: var(--color-muted);
  font-size: 0.9rem;
  font-style: italic;
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
}

/* Lightbox overlay */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(13, 44, 29, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  backdrop-filter: blur(4px);
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 1100px; max-height: 90vh; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: var(--radius); box-shadow: var(--shadow-xl); }
.lightbox figcaption { color: #fff; text-align: center; margin-top: 0.9rem; font-size: 0.95rem; max-width: 46rem; }
.lightbox-close {
  position: absolute;
  top: 0.8rem; right: 1.3rem;
  background: none; border: none;
  color: #fff; font-size: 2.6rem; line-height: 1;
  cursor: pointer; opacity: 0.85;
}
.lightbox-close:hover { opacity: 1; }
