:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #1d2125;
  --muted: #5d6670;
  --line: #e4e1dc;
  --accent: #1f5f8b;
  --accent-soft: #e8f0f6;
  --radius: 10px;
  --wrap: 960px;
  color-scheme: light;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.6; font-size: 17px; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; min-height: 60px; }
.site-title { font-weight: 700; color: var(--text); text-decoration: none; font-size: 1.1rem; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current] { color: var(--accent); background: var(--accent-soft); }
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 24px 0; color: var(--muted); font-size: .9rem; }
.site-footer a { color: inherit; }

/* Content */
.content { padding-top: 32px; }
h1, h2, h3, h4 { line-height: 1.25; }
h1 { font-size: 2rem; margin: 0 0 .4em; }
h2 { font-size: 1.45rem; margin-top: 2em; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
h3 { font-size: 1.15rem; margin-top: 1.6em; }
.lede { color: var(--muted); font-size: 1.1rem; margin-top: 0; }
.breadcrumb { margin: 0 0 8px; font-size: .9rem; }
.banner { display: block; max-height: 320px; width: 100%; object-fit: cover; border-radius: var(--radius); margin: 16px 0 24px; }

/* Page header banner */
.page-header { display: flex; align-items: center; justify-content: center; min-height: 220px; margin-bottom: 24px; border-radius: var(--radius); background: #212121 center / cover no-repeat; color: #fff; text-align: center; padding: 24px 16px; }
.page-header h1 { margin: 0; font-size: clamp(1.8rem, 5vw, 2.6rem); text-shadow: 0 1px 8px rgba(0,0,0,.5); }

/* Home */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card-wide { grid-column: 1 / -1; }
.card-faces { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.card .card-faces img { width: 72px; height: 72px; border-radius: 50%; margin: 0; }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: inherit; text-decoration: none; transition: border-color .15s; }
.card:hover { border-color: var(--accent); }
.card img { width: 100%; height: 180px; object-fit: cover; border-radius: 6px; margin-bottom: 8px; }
.card h2 { border: 0; margin: 0 0 4px; padding: 0; color: var(--accent); }
.card p { margin: 0; color: var(--muted); }

/* Research */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 16px 0 8px; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stats strong { display: block; font-size: 1.6rem; color: var(--accent); }
.stats span { color: var(--muted); font-size: .9rem; }
.year { color: var(--muted); margin-top: 2.2em; }
/* on desktop the publication list breaks out of the 960px column so figures can be larger */
@media (min-width: 1000px) {
  .pubs { width: min(1240px, 100vw - 48px); margin-left: 50%; transform: translateX(-50%); }
  .pubs .pub { grid-template-columns: 1fr 340px; gap: 28px; }
  .pubs .pub-img { width: 340px; max-height: 240px; }
}
.pub { display: grid; grid-template-columns: 1fr 180px; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.pub:not(:has(.pub-img)) { grid-template-columns: 1fr; }
.pub-img { order: 2; width: 180px; max-height: 140px; object-fit: contain; background: #fff; border-radius: 6px; }
.pub-title { margin: 0 0 4px; font-size: 1.05rem; }
.pub-title a { color: var(--text); text-decoration: none; }
.pub-title a:hover { color: var(--accent); text-decoration: underline; }
.pub-authors, .pub-venue { margin: 0; font-size: .93rem; color: var(--muted); }
.pub-venue { font-style: italic; }
.pub-links { margin: 4px 0 0; font-size: .9rem; }
.pub-links a { display: inline-block; padding: 1px 10px; border: 1px solid var(--accent); border-radius: 999px; text-decoration: none; }
.pub-links a:hover { background: var(--accent-soft); }
.pub details { margin-top: 6px; font-size: .93rem; }
.pub summary { cursor: pointer; color: var(--accent); }
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .pub { grid-template-columns: 1fr; }
  .pub-img { order: 0; width: 100%; max-height: 200px; }
}

/* Group */
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.member { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; object-fit: cover; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 1.4rem; }
.member h3 { margin: 0; font-size: 1.02rem; }
.member p { margin: 2px 0 0; font-size: .9rem; }
.member-role { color: var(--accent); font-weight: 600; }
.member-topic { color: var(--text); }
.member-note, .member-meta { color: var(--muted); }
.alumni .avatar { width: 52px; height: 52px; font-size: 1.05rem; }

/* Courses */
.course-list { display: grid; gap: 12px; margin-top: 24px; }
.course { display: flex; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; color: inherit; text-decoration: none; }
.course:hover { border-color: var(--accent); }
.course img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.course h2, .course h3 { border: 0; margin: 0; padding: 0; font-size: 1.1rem; color: var(--accent); }
.course-group { margin-top: 32px; }
.course-thumb { width: 96px; height: 72px; border-radius: 6px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 1.6rem; }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; font-style: normal; }
.badge-live { background: #e6f4ea; color: #1e7b34; }
.coteaching { color: var(--muted); font-size: .93rem; margin-top: -8px; }
.materials { padding-left: 20px; }
.lessons-wrap { overflow-x: auto; }
.lessons { width: 100%; border-collapse: collapse; font-size: .95rem; }
.lessons th, .lessons td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.lessons th { color: var(--muted); font-weight: 600; }
.lesson-n { width: 3em; color: var(--muted); }
.lesson-files a { display: inline-block; margin: 0 6px 4px 0; padding: 1px 10px; border: 1px solid var(--accent); border-radius: 999px; text-decoration: none; white-space: nowrap; font-size: .88rem; }
.lesson-files a:hover { background: var(--accent-soft); }
.course p { margin: 2px 0 0; color: var(--muted); font-size: .93rem; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 24px; }
.toc summary { cursor: pointer; font-weight: 600; }
.toc ul { margin: 8px 0 0; padding-left: 20px; }

/* Embeds */
.embed { margin: 12px 0 20px; }
.embed iframe { display: block; width: 100%; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.embed-video iframe { aspect-ratio: 16 / 9; height: auto; }
.embed-doc iframe { height: 480px; }
.embed-folder iframe { height: 260px; background: #fff; }
.embed-link { display: inline-block; font-size: .85rem; margin-top: 4px; }
