/* LEMR website – styles
   Tokens from the LEMR design system (09_Claude_Design/LEMR_Design_System_Artifact/project/tokens.json),
   scaled from 1920×1080 slides to web sizes. Same rules: white ground, ink text,
   the green → teal → blue gradient as the only ornament, no shadows, no icons. */

:root {
  --lemr-green: #5EA928;
  --lemr-teal: #2B8372;
  --lemr-blue: #0A6AA4;
  --lemr-red: #D71F2F;
  --lemr-amber: #B7791F;

  --surface: #FFFFFF;
  --surface-raised: #F4F7F6;
  --surface-strong: #082A40;
  --ink: #082A40;
  --ink-body: #082A40;
  --muted: #5A6B73;
  --kicker: #2B8372;
  --on-strong: #EAF1F3;
  --on-strong-label: #7FD1B0;
  --line: #E2E7E6;

  --dark-surface: #082A40;
  --dark-raised: #0D3B57;
  --dark-body: #CFE0E6;
  --dark-muted: #8FA3AC;
  --dark-kicker: #7FD1B0;
  --dark-line: #3A5A6E;
  --accent-green-dark: #37B48F;
  --accent-blue-dark: #3F9FD6;

  --gradient: linear-gradient(90deg, #5EA928 0%, #2B8372 52%, #0A6AA4 100%);
  --gradient-v: linear-gradient(180deg, #5EA928 0%, #2B8372 50%, #0A6AA4 100%);
  --gradient-text: linear-gradient(120deg, #5EA928 0%, #2B8372 52%, #0A6AA4 100%);

  --sans: Montserrat, Arial, sans-serif;
  --mono: "JetBrains Mono", "Courier New", monospace;

  --radius-card: 18px;
  --radius-panel: 14px;
  --radius-logo: 12px;

  --max: 1200px;
  --pad-x: clamp(16px, 5vw, 48px);
  --section-y: clamp(64px, 9vw, 120px);
}

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink-body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--lemr-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad-x); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
}
.site-header::before { content: ""; display: block; height: 4px; background: var(--gradient); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand img { height: 40px; width: auto; }

.nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.nav a {
  font-family: var(--mono); font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current] { border-bottom-color: var(--lemr-teal); }

.nav-toggle {
  display: none; font: 500 13px/1 var(--mono); letter-spacing: 2px; text-transform: uppercase;
  color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; left: 0; right: 0; top: 76px; background: #fff; border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px var(--pad-x) 16px; }
  .nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Type helpers ---------- */
.kicker {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-weight: 500; font-size: 13px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--kicker); margin: 0 0 14px;
}
.kicker::before { content: ""; width: 44px; height: 3px; border-radius: 2px; background: var(--gradient); flex: none; }

h1, h2, h3 { color: var(--ink); font-weight: 800; margin: 0; }
h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -1.2px; }
h3 { font-size: 20px; line-height: 1.25; letter-spacing: -0.3px; }
.lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--muted); font-weight: 500; max-width: 760px; margin: 18px 0 0; }
.grad-text { background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }

section { padding: var(--section-y) 0; }
.section-head { margin-bottom: clamp(32px, 5vw, 56px); }
.alt { background: var(--surface-raised); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(56px, 8vw, 110px) 0; overflow: hidden; }
.hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 18px; background: var(--gradient-v); }
.hero .wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(38px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -2.5px; }
.hero .sub { font-size: clamp(18px, 2vw, 22px); font-weight: 500; color: var(--muted); margin: 22px 0 0; line-height: 1.45; }
.hero .byline { font-weight: 600; color: var(--ink); margin: 14px 0 0; }
.hero-figure { position: relative; margin: 0; }
.hero-figure img { border-radius: var(--radius-card); width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.hero-figure figcaption { margin-top: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-block; font-weight: 700; font-size: 15px; text-decoration: none; padding: 13px 22px; border-radius: 12px;
  border: 1px solid var(--ink); color: var(--ink); background: transparent;
}
.btn.primary { background: var(--ink); color: #fff; }
.btn:hover { background: var(--lemr-blue); border-color: var(--lemr-blue); color: #fff; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero::before { width: 8px; }
}

/* ---------- Cards ---------- */
.cards { display: grid; gap: 22px; }
.cards.c3 { grid-template-columns: repeat(3, 1fr); }
.cards.c2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 22px 26px;
}
.alt .card { background: var(--surface); }
.card .label { display: block; margin-bottom: 6px; }
.card .value { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.card .note { color: var(--muted); font-size: 15px; margin-top: 2px; }
.card.strong { background: var(--surface-strong); border-color: var(--surface-strong); }
.card.strong .label { color: var(--on-strong-label); }
.card.strong .value { color: var(--on-strong); }
.card.strong .note { color: var(--dark-muted); }

@media (max-width: 860px) { .cards.c3, .cards.c2 { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; margin-bottom: 48px; }
.about-grid p { margin: 0 0 16px; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- Research lines ---------- */
.domains { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.domain { border: 1px solid var(--line); border-radius: var(--radius-card); padding: 28px 30px; background: var(--surface); }
.domain > .label { color: var(--kicker); }
.lines { list-style: none; margin: 16px 0 0; padding: 0; }
.lines li { display: grid; grid-template-columns: 56px 1fr; gap: 8px; padding: 18px 0; border-top: 1px solid var(--line); }
.lines li:first-child { border-top: 0; }
.num { font-weight: 800; font-size: 28px; line-height: 1; letter-spacing: -1px; color: var(--lemr-blue); }
.lines .t { font-weight: 700; color: var(--ink); }
.lines .d { color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .domains { grid-template-columns: 1fr; } }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.project { border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.project .logo { height: 140px; display: grid; place-items: center; padding: 18px; border-bottom: 1px solid var(--line); background: #fff; }
.project .logo img { max-height: 100%; width: auto; object-fit: contain; }
.project .body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.project .ref { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--muted); }
.project p { margin: 0; font-size: 15px; color: var(--ink-body); }
@media (max-width: 1000px) { .projects { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .projects { grid-template-columns: 1fr; } }

/* ---------- Spotlights ---------- */
.spotlight { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; padding: 48px 0; border-top: 1px solid var(--line); }
.spotlight:first-of-type { border-top: 0; padding-top: 0; }
.spotlight h3 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.15; letter-spacing: -0.6px; margin: 4px 0 14px; }
.question { background: var(--surface-strong); color: var(--on-strong); border-radius: var(--radius-panel); padding: 16px 20px; font-weight: 600; margin: 16px 0; }
.question .label { color: var(--on-strong-label); display: block; margin-bottom: 4px; }
.spotlight ul { margin: 8px 0 0; padding-left: 20px; }
.spotlight li { margin-bottom: 6px; }
.spotlight figure { margin: 0; }
.spotlight figure img { border-radius: var(--radius-panel); border: 1px solid var(--line); width: 100%; background: #fff; }
.spotlight figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.stat-row .card { padding: 14px 16px; }
.stat-row .value { font-size: 24px; }
@media (max-width: 860px) { .spotlight { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .stat-row { grid-template-columns: 1fr; } }

/* ---------- Publications ---------- */
.pubs { list-style: none; margin: 0; padding: 0; }
.pubs li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 22px 0; border-top: 1px solid var(--line); }
.pubs li:last-child { border-bottom: 1px solid var(--line); }
.pubs .title { font-weight: 700; color: var(--ink); }
.pubs .authors { font-size: 15px; margin-top: 2px; }
.pubs .venue { font-size: 15px; color: var(--muted); }
.pubs .doi { font-family: var(--mono); font-size: 13px; }

/* ---------- Team ---------- */
.coord { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 40px; }
.person-lg { display: grid; grid-template-columns: 120px 1fr; gap: 22px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px; background: var(--surface); }
.person-lg img { width: 120px; height: 120px; object-fit: cover; border-radius: var(--radius-panel); }
.person-lg .name { font-weight: 800; font-size: 20px; color: var(--ink); }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 26px 22px; }
.person img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 25%; border-radius: var(--radius-panel); background: var(--line); }
.person .name { font-weight: 700; color: var(--ink); margin-top: 10px; line-height: 1.3; }
.person .role { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.group-label { margin: 0 0 18px; }
@media (max-width: 860px) { .coord { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .team { grid-template-columns: 1fr 1fr; } .person-lg { grid-template-columns: 88px 1fr; } .person-lg img { width: 88px; height: 88px; } }

/* ---------- Spin-offs ---------- */
.logo-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; }
.logo-tile { border: 1px solid var(--line); border-radius: var(--radius-card); background: #fff; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.logo-tile .img { height: 90px; display: grid; place-items: center; }
.logo-tile img { max-height: 90px; max-width: 80%; width: auto; object-fit: contain; }
.logo-tile .name { font-weight: 700; color: var(--ink); }
.logo-tile .note { font-size: 15px; color: var(--muted); }

/* ---------- Contact (dark slide) ---------- */
.dark {
  position: relative; background: var(--dark-surface); color: var(--dark-body);
}
.dark::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: var(--gradient-v); }
.dark h2 { color: #fff; }
.dark .kicker { color: var(--dark-kicker); }
.dark a { color: var(--accent-blue-dark); }
.dark a:hover { color: #fff; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.contact-grid .step { font-weight: 800; font-size: 28px; letter-spacing: -1px; line-height: 1; margin-bottom: 12px; }
.contact-grid > div:nth-child(1) .step { color: var(--lemr-green); }
.contact-grid > div:nth-child(2) .step { color: var(--accent-green-dark); }
.contact-grid > div:nth-child(3) .step { color: var(--accent-blue-dark); }
.contact-grid .label { color: var(--dark-kicker); display: block; margin-bottom: 8px; }
.contact-grid p { margin: 0; }
.contact-grid strong { color: #fff; font-weight: 700; }
.logo-panel {
  margin-top: 56px; background: #fff; border-radius: var(--radius-logo); padding: 22px 28px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 28px 48px;
}
.logo-panel img { height: 44px; width: auto; }
.logo-panel .l-lemr { height: 56px; }
.logo-panel .l-systec { height: 30px; }
.logo-panel .l-arise { height: 62px; }
.logo-panel .sep { width: 1px; align-self: stretch; background: var(--line); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } .logo-panel .sep { display: none; } .logo-panel img { height: 38px; } }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0 48px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.site-footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: flex-start; }
.wordmark { font-weight: 800; font-size: 22px; letter-spacing: -0.5px; color: var(--ink); }
.funding { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 24px; }
.funding img { height: 36px; width: auto; }
.funding p { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.5px; }
.foot-mono { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; }

:focus-visible { outline: 3px solid var(--lemr-blue); outline-offset: 3px; }

/* ---------- Multi-page additions ---------- */
.page-head { position: relative; padding: clamp(48px, 7vw, 96px) 0 clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.page-head::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 18px; background: var(--gradient-v); }
.page-head h1 { font-size: clamp(36px, 5vw, 60px); line-height: 1.04; letter-spacing: -2px; }
@media (max-width: 860px) { .page-head::before { width: 8px; } }

.more {
  display: inline-block; margin-top: 28px; font-family: var(--mono); font-size: 13px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--lemr-teal); padding-bottom: 4px;
}
.more:hover { color: var(--lemr-blue); border-color: var(--lemr-blue); }

.line-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.line-card { border: 1px solid var(--line); border-radius: var(--radius-card); padding: 22px 24px; background: var(--surface); }
.line-card .num { display: block; margin-bottom: 12px; }
.line-card .t { font-weight: 700; color: var(--ink); line-height: 1.3; }
.line-card .d { color: var(--muted); font-size: 15px; margin-top: 4px; }
.line-card .label { display: block; margin-bottom: 6px; color: var(--kicker); }
@media (max-width: 860px) { .line-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .line-grid { grid-template-columns: 1fr; } }

.project .links { margin-top: auto; padding-top: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }

a.logo-tile { text-decoration: none; color: inherit; }
a.logo-tile:hover { border-color: var(--lemr-blue); }
.logo-tile .url { font-family: var(--mono); font-size: 12px; letter-spacing: 0.5px; color: var(--lemr-blue); }

.dark .btn { border-color: #fff; color: #fff; }
.dark .btn:hover { background: #fff; color: var(--ink); border-color: #fff; }
.band-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.band-row p { margin: 12px 0 0; }

.room-link { color: inherit; }

.plinks { margin-top: 4px; font-family: var(--mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.plinks a { text-decoration: none; border-bottom: 1px solid currentColor; }
.person-lg .plinks { margin-top: 6px; }
.plinks { display: flex; align-items: center; gap: 8px; }
.plinks a.orcid { border: 0; display: inline-flex; line-height: 0; }
.plinks a.orcid img { width: 18px; height: 18px; }

.lab-photo { padding: clamp(32px, 5vw, 56px) 0; }
.lab-photo figure { margin: 0; }
.lab-photo img { width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; border-radius: var(--radius-card); }
.lab-photo figcaption { margin-top: 10px; }
@media (max-width: 560px) { .lab-photo img { aspect-ratio: 4 / 3; } }
