/* LM3 lab site. UC Merced Boomer Blue #002856 and Bobcat Gold #DAA900, secondary teal #0091B3 and gold #FFBF3C. */
:root {
  --blue: #002856; --blue-2: #005487; --teal: #0091B3; --teal-soft: #E3F3F6;
  --gold: #DAA900; --gold-2: #FFBF3C; --gold-soft: #F6E9D7; --gold-text: #8A6A00;
  --bg: #FAFBFD; --surface: #FFFFFF; --surface-2: #F1F4F9; --text: #18212F; --muted: #4E5B6E;
  --line: #DDE3EC; --shadow: 0 1px 2px rgba(0, 40, 86, .06), 0 6px 20px rgba(0, 40, 86, .07);
  --radius: 14px; --max: 1120px;
  --font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --head: "Montserrat", "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1422; --surface: #111D30; --surface-2: #16253C; --text: #E6ECF5; --muted: #A5B3C7; --line: #24354F;
    --teal-soft: #0E2A36; --gold-soft: #2B2410; --gold-text: #F2C94C; --blue-2: #7FB8E6;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--font); }
img { max-width: 100%; height: auto; }
a { color: var(--blue-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal); }
h1, h2, h3 { font-family: var(--head); line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0 0 .4em; letter-spacing: -.01em; }
h2 { font-size: 1.55rem; margin: 2.2rem 0 .8rem; }
h3 { font-size: 1.12rem; margin: 1.2rem 0 .4rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px; z-index: 9; }

/* header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { width: 74px; height: auto; display: block; }
.brand .name { font-family: var(--head); font-weight: 800; font-size: 1.35rem; color: var(--blue); line-height: 1; }
.brand .name b { color: var(--gold); }
.brand .full { font-size: .78rem; color: var(--muted); line-height: 1.25; max-width: 220px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand .name { color: #fff; } }
nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; }
nav a { display: block; padding: 8px 11px; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem; }
nav a:hover { background: var(--surface-2); color: var(--text); }
nav a[aria-current="page"] { color: var(--blue); box-shadow: inset 0 -3px 0 var(--gold); border-radius: 8px 8px 0 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) nav a[aria-current="page"] { color: #fff; } }
.menu { display: none; }
@media (max-width: 900px) {
  .brand .full { display: none; }
  .menu { display: block; position: relative; }
  .menu summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-weight: 700; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu ul { position: absolute; right: 0; top: 44px; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px; min-width: 200px; box-shadow: var(--shadow); }
  nav.desktop { display: none; }
}

/* hero */
.hero { background: linear-gradient(135deg, var(--blue) 0%, #003a73 60%, #00507e 100%); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto -10% -60px auto; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 191, 60, .22), rgba(255, 191, 60, 0) 65%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; padding-top: 56px; padding-bottom: 56px; display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 span { color: var(--gold-2); }
.hero p.lead { font-size: 1.2rem; color: #DCE6F2; max-width: 40em; }
.hero .mark { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); border-radius: 22px; padding: 18px; }
.hero .mark img { width: 100%; display: block; }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: 1fr; } .hero .mark { max-width: 360px; } }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn { display: inline-block; padding: 11px 18px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.btn.gold { background: var(--gold); color: #10213A; } .btn.gold:hover { background: var(--gold-2); color: #10213A; }
.btn.ghost { border: 1.5px solid rgba(255, 255, 255, .6); color: #fff; } .btn.ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.btn.blue { background: var(--blue); color: #fff; } .btn.blue:hover { background: var(--blue-2); color: #fff; }

/* page title band */
.band { background: var(--surface); border-bottom: 1px solid var(--line); }
.band .wrap { padding-top: 34px; padding-bottom: 26px; }
.band p { color: var(--muted); max-width: 46em; margin: 0; font-size: 1.08rem; }
.eyebrow { font-family: var(--head); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 6px; }

main { padding-bottom: 60px; }
section { scroll-margin-top: 90px; }

/* cards and grids */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card.theme { border-top: 4px solid var(--teal); }
.card.theme:nth-child(3n+2) { border-top-color: var(--gold); }
.card.theme:nth-child(3n) { border-top-color: var(--blue); }
.card .more { font-weight: 700; text-decoration: none; }
.chip { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--teal-soft); color: var(--blue-2); margin: 0 6px 6px 0; }
.chip.gold { background: var(--gold-soft); color: var(--gold-text); }
.callout { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; background: var(--gold-soft); border: 1px solid #EAD9B8; border-radius: var(--radius); padding: 22px 24px; margin-top: 28px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .callout { border-color: #4A3D17; } }
@media (max-width: 700px) { .callout { grid-template-columns: 1fr; } }
.callout h3 { margin: 0 0 4px; }
.callout p { margin: 0; color: var(--muted); }

/* research */
.theme-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: start; padding: 26px 0; border-bottom: 1px solid var(--line); }
.theme-row:last-child { border-bottom: 0; }
.theme-row h2 { margin-top: 0; }
@media (max-width: 820px) { .theme-row { grid-template-columns: 1fr; } }
figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
figure img { display: block; border-radius: 8px; background: #fff; }
figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; }

/* lists */
.news { list-style: none; padding: 0; margin: 0; }
.news li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.news .d { font-weight: 700; color: var(--gold-text); font-size: .92rem; }
.pubs { list-style: none; padding: 0; margin: 0; counter-reset: p; }
.pubs li { padding: 12px 0 12px 0; border-bottom: 1px solid var(--line); }
.pubs .t { font-weight: 700; }
.pubs .a { color: var(--muted); }
.pubs .a b { color: var(--text); }
.pubs .v { font-style: italic; }
.pubs .links a { font-size: .85rem; font-weight: 700; margin-right: 10px; }
.year { font-family: var(--head); color: var(--blue-2); border-bottom: 2px solid var(--gold); display: inline-block; padding-bottom: 2px; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 8px; }
.tools input[type=search] { flex: 1 1 260px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--surface); color: var(--text); }
.tools button { padding: 9px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.tools button[aria-pressed="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.count { color: var(--muted); font-size: .92rem; }

/* people */
.pi { display: grid; grid-template-columns: 180px 1fr; gap: 26px; align-items: start; }
.avatar { width: 180px; aspect-ratio: 1; border-radius: 18px; background: linear-gradient(135deg, var(--blue), var(--teal)); color: #fff; display: grid; place-items: center; font: 800 2.6rem var(--head); }
.avatar.sm { width: 64px; border-radius: 14px; font-size: 1.2rem; }
@media (max-width: 640px) { .pi { grid-template-columns: 1fr; } }
.person { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; }
.person h3 { margin: 0; }
.role { color: var(--gold-text); font-weight: 700; font-size: .92rem; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-family: var(--head); font-size: .85rem; }
.tablewrap { overflow-x: auto; }
.todo { background: #FFF3C4; color: #5A4500; border-radius: 6px; padding: 0 6px; font-size: .85rem; font-weight: 700; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .todo { background: #4A3D10; color: #FFE38A; } }
.cols { columns: 2 260px; column-gap: 28px; }
.cols li { break-inside: avoid; }

/* sponsors */
.sponsors { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.sponsor { background: #fff; border: 1px solid var(--line); border-radius: 12px; min-height: 96px; display: grid; place-items: center; text-align: center; padding: 14px; font-weight: 700; color: #005487; }
.sponsor.logo { grid-template-rows: 1fr auto; }
.sponsor img { max-height: 64px; max-width: 100%; width: auto; object-fit: contain; }
.sponsor .cap { font-size: .72rem; font-weight: 700; color: #4E5B6E; margin-top: 4px; }
.sponsors.big { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.sponsors.big .sponsor { min-height: 130px; }
.sponsors.big .sponsor img { max-height: 84px; }

/* footer */
.site-footer { background: var(--blue); color: #C9D6E8; }
.site-footer .wrap { padding-top: 30px; padding-bottom: 30px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.site-footer a { color: #fff; }
.site-footer .gold { color: var(--gold-2); font-weight: 700; }
