/* eCAL — Energy, Controls & Applications Lab · site stylesheet
   Generated pages use these tokens; see design/02-design-concept.md */

:root {
  /* UC Berkeley brand palette: brand.berkeley.edu/visual-identity/colors */
  --brand: #002676;          /* Berkeley Blue */
  --brand-2: #004AAE;        /* Blue Medium */
  --brand-ink: #ffffff;
  --gold: #fdb515;           /* California Gold */
  --gold-ink: #7a4f00;
  --heritage: #C09748;       /* California Heritage Gold */
  --ink: #010133;            /* Blue Dark */
  --ink-2: #2a3850;
  --muted: #526075;
  --bg: #ffffff;
  --surface: #F2F2F2;        /* Gray Light */
  --surface-2: #eef2f8;
  --line: #e2e7ef;
  --line-strong: #7d8a9e;
  --focus: #002676;
  --badge-bg: #002676;
  --member: #004AAE;
  --chip: #eef2f8;
  --award-bg: #FFE88D;       /* Gold Light */
  --award-ink: #6b4500;
  --hero-bg: #002676;
  --shadow: 0 1px 2px rgba(15,27,45,.06), 0 6px 20px rgba(15,27,45,.06);
  --radius: 14px;
  --radius-sm: 8px;
  --container: 1180px;
  --measure: 720px;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #9FD1FF; --brand-2: #cfe8ff; --brand-ink: #071330;
    --gold: #fdb515; --gold-ink: #ffd27a;
    --ink: #e8edf5; --ink-2: #cfd8e6; --muted: #a3afc2;
    --bg: #0b1220; --surface: #111a2b; --surface-2: #16223a; --line: #24324a; --line-strong: #7484a0; --focus: #fdb515; --badge-bg: #2d5bc0;
    --member: #9FD1FF; --chip: #1a2740; --award-bg: #3a2c08; --award-ink: #ffd98a;
    --hero-bg: #050d1f; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #9FD1FF; --brand-2: #cfe8ff; --brand-ink: #071330;
  --gold: #fdb515; --gold-ink: #ffd27a;
  --ink: #e8edf5; --ink-2: #cfd8e6; --muted: #a3afc2;
  --bg: #0b1220; --surface: #111a2b; --surface-2: #16223a; --line: #24324a; --line-strong: #7484a0; --focus: #fdb515; --badge-bg: #2d5bc0;
  --member: #9FD1FF; --chip: #1a2740; --award-bg: #3a2c08; --award-ink: #ffd98a;
  --hero-bg: #050d1f; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--sans); font-feature-settings: "cv11", "ss01"; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-2); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; box-shadow: 0 0 0 5px var(--bg); }
.hero :focus-visible, .cta-band :focus-visible { outline-color: var(--gold); box-shadow: none; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.measure { max-width: var(--measure); }
.muted { color: var(--muted); }
.eyebrow { font: 600 .78rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .9rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font: 700 1.1rem var(--serif); letter-spacing: -.01em; }
.brand-text small { font-size: .74rem; color: var(--muted); }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .94rem; padding: 8px 11px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--brand); background: var(--surface-2); }
.nav a.nav-cta { background: var(--brand); color: var(--brand-ink); }
.nav a.nav-cta:hover { background: var(--brand-2); color: var(--brand-ink); }
.icon-btn { border: 1px solid var(--line-strong); background: transparent; color: var(--ink-2); width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
@media (max-width: 1240px) { .brand-text small { display: none; } .nav a { padding: 8px 8px; } }
@media (max-width: 960px) {
  .menu-btn { display: inline-grid; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .brand-text small { display: none; }
}

/* ---------- buttons, chips, badges ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; line-height: 1.2; }
.btn-primary { background: var(--gold); color: #1a1300; }
.btn-primary:hover { background: #ffc94a; color: #1a1300; }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; background: rgba(0,18,60,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-outline { border-color: var(--line-strong); color: var(--ink); background: var(--bg); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn svg { width: 16px; height: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--chip); color: var(--ink-2); font-size: .78rem; font-weight: 500; line-height: 1.4; }
.chip-award { background: var(--award-bg); color: var(--award-ink); font-weight: 600; }
.badge { display: inline-block; font: 700 .68rem/1 var(--sans); letter-spacing: .04em; padding: 5px 7px; border-radius: 6px; color: #fff; background: var(--brand); text-transform: uppercase; vertical-align: 2px; background: var(--badge-bg); max-width: 100%; overflow-wrap: anywhere; line-height: 1.15; }
.badge.b-conference { background: #00553A; }   /* Green Dark */
.badge.b-thesis { background: #431170; }       /* Purple Dark */
.badge.b-magazine, .badge.b-report { background: #4d4d4d; }
.badge.b-preprint { background: #770747; }    /* Rose Dark */
.badge.b-patent { background: #6b5320; }
.linkrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lbtn { display: inline-flex; align-items: center; gap: 5px; font: 600 .76rem/1 var(--sans); padding: 7px 10px; border-radius: 7px; border: 1px solid var(--line-strong); color: var(--ink-2); background: var(--bg); text-decoration: none; cursor: pointer; }
.lbtn:hover { border-color: var(--brand); color: var(--brand); }
.lbtn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.lbtn.pubbtn { border-color: var(--brand); color: var(--brand); }
.lbtn.pubbtn:hover { background: var(--brand); color: var(--brand-ink); }
.lbtn.primary:hover { background: var(--brand-2); color: var(--brand-ink); }
.lbtn svg { width: 13px; height: 13px; }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--hero-bg); color: #fff; overflow: hidden; isolation: isolate; }
.hero-art { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.hero .container { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-top: 88px; padding-bottom: 88px; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5vw, 3.9rem); line-height: 1.05; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .eyebrow { color: #c9d6f2; }
.hero p.lede { font-size: clamp(1.06rem, 1.6vw, 1.25rem); color: #dfe7f7; max-width: 36em; margin-bottom: 28px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 150px 150px; gap: 12px; }
.mosaic figure { margin: 0; border-radius: 12px; overflow: hidden; position: relative; background: #0b2a6b; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.mosaic figure:first-child { grid-row: span 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; font-size: .72rem; line-height: 1.3; background: linear-gradient(rgba(0,10,30,0), rgba(0,10,30,.92) 45%); color: #fff; font-weight: 500; }
@media (max-width: 900px) { .hero .container { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 56px; } .mosaic { grid-template-rows: 120px 120px; } }

/* ---------- page header (inner pages) ---------- */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 56px 0 40px; }
.page-head h1 { margin-bottom: 12px; }
.page-head p { color: var(--muted); font-size: 1.1rem; max-width: 46em; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); max-width: 40em; }
.more { font-weight: 600; text-decoration: none; white-space: nowrap; }
.more::after { content: " →"; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.stat { padding: 26px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font: 600 2.2rem/1 var(--serif); color: var(--brand); font-variant-numeric: tabular-nums; }
.stat span { font-size: .88rem; color: var(--muted); }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* cards grid */
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1020px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card { text-decoration: none; color: inherit; }
a.card:hover, .card.hoverable:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: var(--shadow); transform: translateY(-2px); }
.card-img { aspect-ratio: 5 / 2.4; background: var(--surface-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.12rem; }
.card-body p { margin: 0; color: var(--muted); font-size: .94rem; }
.card-num { font: 600 .74rem var(--sans); color: var(--muted); letter-spacing: .1em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.card-meta { margin-top: auto; padding-top: 8px; font-size: .84rem; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.theme-card .card-body h3 { font-size: 1.18rem; }

/* featured result card */
.result-card .card-body h3 { font-size: 1.04rem; line-height: 1.3; }
.result-card .venue { font-size: .82rem; color: var(--muted); }

/* director block */
.director { display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: start; }
.director img { border-radius: var(--radius); width: 220px; aspect-ratio: 4/5; object-fit: cover; object-position: top; }
@media (max-width: 700px) { .director { grid-template-columns: 1fr; } .director img { width: 180px; } }
.iconlinks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* sponsors */
.sponsors { display: flex; flex-wrap: wrap; gap: 28px 40px; align-items: center; justify-content: center; }
.sponsors img { height: 46px; width: auto; max-width: 150px; object-fit: contain; filter: grayscale(1); opacity: .75; transition: .2s; }
.sponsors img:hover { filter: none; opacity: 1; }
:root[data-theme="dark"] .sponsors img { filter: grayscale(1) invert(1) brightness(1.4); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sponsors img { filter: grayscale(1) invert(1) brightness(1.4); } }

/* newsletter */
.cta-band { background: var(--brand); color: #fff; border-radius: var(--radius); padding: 36px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
:root[data-theme="dark"] .cta-band { background: #0d2357; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta-band { background: #0d2357; } }
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: #dbe5fb; margin: 0; }
.cta-band form { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-band input[type=email] { flex: 1; min-width: 200px; padding: 12px 14px; border-radius: 10px; border: 0; font: inherit; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; padding: 26px; } }

/* ---------- publications ---------- */
.pub-layout { display: grid; grid-template-columns: 250px 1fr; gap: 40px; align-items: start; }
@media (max-width: 960px) { .pub-layout { grid-template-columns: 1fr; } .pub-side { position: static !important; } }
.pub-side { position: sticky; top: 92px; font-size: .92rem; }
.pub-side h2 { font: 600 .78rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 22px 0 10px; }
.pub-side h2:first-child { margin-top: 0; }
.search { position: relative; }
.search input { width: 100%; padding: 11px 12px 11px 38px; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; background: var(--bg); color: var(--ink); }
.search input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.facet { display: flex; flex-direction: column; gap: 2px; }
.facet button { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; background: transparent; border: 0; padding: 7px 10px; border-radius: 8px; font: inherit; color: var(--ink-2); cursor: pointer; }
.facet button:hover { background: var(--surface-2); }
.facet button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }
.facet button .n { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.facet button[aria-pressed="true"] .n { color: inherit; opacity: .8; }
.toggle { display: flex; align-items: center; gap: 8px; padding: 6px 10px; cursor: pointer; }
.legend { font-size: .82rem; color: var(--muted); line-height: 1.5; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; }
.result-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; font-size: .92rem; color: var(--muted); flex-wrap: wrap; }
.result-bar button { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.year-group { margin-top: 26px; }
.year-head { display: flex; align-items: baseline; gap: 12px; position: sticky; top: 68px; background: var(--bg); padding: 10px 0 8px; z-index: 5; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.year-head h2 { font-size: 1.6rem; margin: 0; font-variant-numeric: tabular-nums; }
.year-head span { color: var(--muted); font-size: .88rem; }
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.pub:last-child { border-bottom: 0; }
.pub-tag { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding-top: 3px; }
.pub-id { font: 600 .74rem var(--mono); color: var(--muted); }
.pub-title { font: 600 1.08rem/1.35 var(--serif); margin: 0 0 4px; }
.pub-title a { color: var(--ink); text-decoration: none; background-image: linear-gradient(var(--brand), var(--brand)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .2s; }
.pub-title a:hover { color: var(--brand); background-size: 100% 1px; }
.pub-title a .ext { font-size: .8em; color: var(--muted); }
.pub-authors { font-size: .93rem; color: var(--ink-2); margin: 0 0 2px; }
.pub-authors .me { font-weight: 700; color: var(--ink); }
.pub-authors .lab { color: var(--member); text-decoration: underline; text-decoration-style: dotted; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.pub-authors a.lab:hover { text-decoration-style: solid; }
.pub-venue { font-size: .9rem; color: var(--muted); margin: 0; }
.pub-venue i { color: var(--ink-2); }
.pub .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bib { margin-top: 10px; position: relative; }
.bib pre { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 76px 14px 16px; font: .78rem/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.bib .copy { position: absolute; top: 8px; right: 8px; }
.abstract { margin-top: 10px; font-size: .92rem; color: var(--ink-2); background: var(--surface); border-left: 3px solid var(--brand); padding: 12px 14px; border-radius: 0 8px 8px 0; }
@media (max-width: 560px) { .pub { grid-template-columns: 1fr; gap: 6px; } .pub-tag { flex-direction: row; align-items: center; } }
.no-results { padding: 40px 0; text-align: center; color: var(--muted); }
.selected-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .selected-grid { grid-template-columns: 1fr; } }
.sel { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--bg); display: flex; flex-direction: column; gap: 6px; }
.sel h3 { font-size: 1rem; line-height: 1.35; margin: 0; }
.sel h3 a { color: var(--ink); text-decoration: none; }
.sel h3 a:hover { color: var(--brand); }
.sel p { margin: 0; font-size: .84rem; color: var(--muted); }
.talks { width: 100%; border-collapse: collapse; font-size: .92rem; }
.talks th, .talks td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.talks th { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
details.fold > summary { cursor: pointer; font: 600 1.4rem var(--serif); list-style: none; padding: 14px 0; border-top: 1px solid var(--line); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "＋ "; color: var(--brand); }
details.fold[open] > summary::before { content: "－ "; }

/* paper page */
.paper-cite { font-size: 1.05rem; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; font-size: .95rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ---------- people ---------- */
.pi-card { display: grid; grid-template-columns: 200px 1fr; gap: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; align-items: start; }
.pi-card img { width: 200px; aspect-ratio: 4/5; object-fit: cover; object-position: top; border-radius: 12px; }
@media (max-width: 700px) { .pi-card { grid-template-columns: 1fr; } }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 18px; }
.person { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.avatar { width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; object-position: center 25%; background: var(--surface-2); margin-bottom: 10px; }
.avatar.initials { display: grid; place-items: center; font: 600 2.4rem var(--serif); color: var(--brand); background: linear-gradient(135deg, var(--surface-2), color-mix(in srgb, var(--brand) 14%, var(--surface-2))); }
.person h3 { font-size: 1.05rem; margin: 0; }
.person .role { font-size: .85rem; color: var(--muted); }
.person .edu { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.person .chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.person .iconlinks { margin-top: auto; padding-top: 10px; gap: 6px; }
.ilink { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-strong); color: var(--ink-2); }
.ilink:hover { border-color: var(--brand); color: var(--brand); }
.ilink svg { width: 15px; height: 15px; }
.group-title { display: flex; align-items: baseline; gap: 10px; margin: 44px 0 16px; }
.group-title h3 { font-size: 1.4rem; margin: 0; }
.group-title span { color: var(--muted); font-size: .9rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.alumni { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 640px; }
table.alumni th, table.alumni td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.alumni th { background: var(--surface); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
table.alumni tr:last-child td { border-bottom: 0; }
table.alumni .who { display: flex; align-items: center; gap: 12px; font-weight: 600; }
table.alumni .who img, table.alumni .who .mini { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
table.alumni .who .mini { display: grid; place-items: center; background: var(--surface-2); color: var(--brand); font: 600 .9rem var(--serif); }
.cols { columns: 3 240px; column-gap: 32px; }
.cols section { break-inside: avoid; margin-bottom: 22px; }
.cols h4 { font: 600 .8rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; }
.cols ul { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.cols li { padding: 3px 0; }
.placements { display: flex; flex-wrap: wrap; gap: 8px; }
.placements .chip { font-size: .86rem; padding: 6px 12px; background: var(--bg); border: 1px solid var(--line); }

/* ---------- research page ---------- */
.theme { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; padding: 64px 0; border-bottom: 1px solid var(--line); align-items: start; }
.theme:nth-child(even) .theme-media { order: 2; }
.theme-media img { border-radius: var(--radius); width: 100%; aspect-ratio: 5/2.8; object-fit: cover; border: 1px solid var(--line); }
.theme .question { font: italic 400 1.2rem/1.45 var(--serif); color: var(--ink-2); border-left: 3px solid var(--gold); padding-left: 16px; margin: 0 0 18px; }
.theme ul.dirs { margin: 0 0 18px; padding-left: 20px; }
.theme ul.dirs li { margin: 3px 0; }
.meta-list { font-size: .9rem; color: var(--muted); }
.meta-list b { color: var(--ink-2); }
.rep { margin-top: 22px; }
.rep h4 { font: 600 .8rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.rep ol { padding-left: 18px; margin: 0; font-size: .92rem; }
.rep li { margin-bottom: 8px; }
@media (max-width: 900px) { .theme { grid-template-columns: 1fr; gap: 24px; } .theme:nth-child(even) .theme-media { order: 0; } }
.toc { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- prose / misc ---------- */
.prose { max-width: var(--measure); }
.prose p, .prose li { color: var(--ink-2); }
.award-list { list-style: none; padding: 0; margin: 0; }
.award-list li { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.award-list li b { font-variant-numeric: tabular-nums; color: var(--brand); }
.path { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--bg); }
.path h3 { font-size: 1.15rem; }
.legacy-main { max-width: 980px; margin: 0 auto; padding: 32px 24px 64px; }
.legacy-main table { max-width: 100%; }
.legacy-main img { display: inline-block; }

/* ---------- footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: .9rem; color: var(--muted); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h2 { font: 600 .78rem var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 3px 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 36px; padding-top: 20px; font-size: .82rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media print { .site-header, .site-footer, .pub-side, .linkrow, .hero-art { display: none !important; } .pub-layout { display: block; } body { color: #000; } }
.path .more, .card .more { white-space: normal; overflow-wrap: anywhere; }

/* ---------- legacy page re-skin (src/legacy/*.html) ---------- */
.legacy-main { line-height: 1.7; display: flow-root; }
.legacy-main #title-line { border-bottom: 1px solid var(--line); margin: 28px 0 14px; clear: both; }
.legacy-main #title { font: 600 clamp(1.5rem, 2.6vw, 2rem)/1.25 var(--serif); color: var(--ink); padding-bottom: 8px; }
.legacy-main #section { font: 600 1.25rem/1.3 var(--serif); color: var(--ink); padding-bottom: 6px; }
.legacy-main h3, .legacy-main h4 { margin-top: 1.4em; }
.legacy-main table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; font-size: .93rem; }
.legacy-main td, .legacy-main th { border-bottom: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.legacy-main img { max-width: 100%; height: auto; border-radius: 8px; }
.legacy-main iframe { max-width: 100%; border: 0; }
.legacy-main .button { font-weight: 600; }
.legacy-main ul { padding-left: 1.3em; }

/* ---------- revision 2 additions ---------- */
.icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: block; }
:root[data-theme="dark"] .icon-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .icon-btn .i-moon { display: none; }
}
.result-card .card-body > p:not(.venue) { color: var(--ink-2); font-size: .93rem; }
.people-band { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.faces { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.faces img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center 25%; border-radius: 12px; }
@media (max-width: 860px) { .people-band { grid-template-columns: 1fr; } }
ul.compact { list-style: none; padding: 0; margin: 0; columns: 2 260px; }
ul.compact li { padding: 6px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.filters > summary { display: none; }
@media (max-width: 960px) {
  .filters > summary { display: flex; justify-content: space-between; cursor: pointer; list-style: none; margin-top: 12px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 10px; font-weight: 600; }
  .filters > summary::-webkit-details-marker { display: none; }
  .filters > summary::after { content: "＋"; color: var(--brand); }
  .filters[open] > summary::after { content: "－"; }
  .selected-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 8px; }
  .selected-grid .sel { flex: 0 0 82%; scroll-snap-align: start; }
}

/* ---------- eCAL brand identity (logo from the lab's identity kit) ---------- */
.brand { gap: 14px; }
.brand-logo { height: 40px; width: auto; display: block; }
.logo-dark { display: none !important; }
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none !important; }
  :root:not([data-theme="light"]) .logo-dark { display: block !important; }
}
.brand-text { border-left: 1px solid var(--line-strong); padding-left: 14px; }
.brand-text strong { font: 600 .95rem/1.15 var(--sans); letter-spacing: 0; color: var(--brand); }
:root[data-theme="dark"] .brand-text strong { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-text strong { color: var(--ink); } }
.brand-text small { font-size: .74rem; }
@media (max-width: 1240px) { .brand-text { display: none; } }
.hero-logo { margin: 0 0 22px; line-height: 0; }
.hero-logo img { width: min(440px, 88%); height: auto; }
.footer-logo { width: 200px; height: auto; margin-bottom: 14px; }
/* Barlow Condensed: Berkeley's secondary (condensed) brand face, used for small labels */
.eyebrow, .card-num, .pub-side h2, .site-footer h2, .cols h4, .rep h4, table.alumni th, .talks th {
  font-family: "Barlow Condensed", var(--sans); font-weight: 600; letter-spacing: .08em; font-size: .86rem;
}
.badge { font-family: "Barlow Condensed", var(--sans); font-size: .78rem; letter-spacing: .05em; font-weight: 600; }
