/* MMint Lab — site styles.
   Colors and type are set once here; change a variable to restyle the whole site. */
:root {
  --blue: #00274c;      /* Michigan Blue: headings, header, footer */
  --maize: #ffcb05;     /* Maize: link underlines, active nav, highlights */
  --paper: #ffffff;
  --steel: #eef1f4;     /* bands behind media */
  --text: #1e2833;
  --muted: #5a6573;
  --line: #d6dce3;

  --sans: "Archivo", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;

  --measure: 68ch;      /* body text column */
  --wide: 1040px;       /* media grids inside pages */
  --page: 1240px;       /* overall page width */
  --gap: clamp(16px, 2.4vw, 28px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 400 1.0625rem/1.65 var(--serif);
  font-optical-sizing: auto;
}
img, video, iframe { max-width: 100%; display: block; }
img, video { height: auto; }
a { color: var(--blue); text-decoration-color: var(--maize); text-decoration-thickness: 3px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--blue); }
:focus-visible { outline: 3px solid var(--maize); outline-offset: 2px; }

.wrap { width: min(100% - 2 * var(--gap), var(--page)); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--maize); color: var(--blue); padding: 8px 12px; z-index: 10; }

/* ---------- headings */
h1, h2, h3, h4, h5 {
  font-family: var(--sans); color: var(--blue); line-height: 1.12; text-wrap: balance;
  font-variation-settings: "wdth" 112;
}
h1 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 800; letter-spacing: -0.015em; margin: 0 0 .4em; }
h2 { font-size: clamp(1.45rem, 2.2vw, 1.9rem); font-weight: 750; margin: 2em 0 .6em; }
h3 { font-size: 1.25rem; font-weight: 700; margin: 1.8em 0 .5em; }
h4, h5 { font-size: 1.05rem; font-weight: 650; margin: 1.6em 0 .4em; font-variation-settings: "wdth" 100; }

/* ---------- header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 18px; flex-wrap: wrap; }
.brand img { height: 44px; width: auto; }
.site-header ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-header nav a {
  font: 600 .98rem/1 var(--sans); font-variation-settings: "wdth" 100;
  color: var(--blue); text-decoration: none; padding: 8px 0; border-bottom: 3px solid transparent; display: inline-block;
}
.site-header nav a:hover { border-color: var(--line); }
.site-header nav a[aria-current="page"] { border-color: var(--maize); }

/* ---------- page heading + body text */
.page-head { padding: clamp(14px, 2.4vw, 29px) 0 12px; max-width: 30em; }
.page-head h1 { max-width: 22em; }
.is-project .page-head { max-width: none; padding-top: 12px; }
.is-project .page-head h1 { max-width: 24em; font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.crumb { margin: clamp(11px, 2vw, 22px) 0 0; font: 600 .95rem var(--sans); }
/* list pages (research, people): heading sits close to the content */
.page-head--wide { max-width: none; padding-bottom: 4px; }
.page-head--wide h1 { margin-bottom: .25em; }
.page-head--wide .lede { max-width: none; margin: 0 0 28px; }
.page-head + .people-group > .section-title, .page-head + .section-title { margin-top: 8px; }
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--muted); max-width: var(--measure); }
.section-title { border-top: 3px solid var(--blue); padding-top: .6em; }

.prose { max-width: var(--measure); padding-bottom: 72px; }
.prose > * { max-width: var(--measure); }
.prose > h2:first-child { margin-top: .8em; }
.prose blockquote { margin: 1.4em 0; padding-left: 1em; border-left: 3px solid var(--maize); color: var(--muted); }
.prose pre { background: var(--steel); padding: 16px 18px; overflow-x: auto; font-size: .85rem; line-height: 1.5; border-radius: 4px; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.prose img, .prose video { border-radius: 4px; margin-block: 1em; }
.prose figure { margin: 1.4em 0; }
figcaption { font: .9rem/1.45 var(--sans); color: var(--muted); margin-top: .5em; font-variation-settings: "wdth" 100; }

/* media grids break out of the text column */
.prose > .cols, .prose > figure.video, .prose > figure.embed, .prose > figure.gallery {
  max-width: none; width: min(var(--wide), calc(100vw - 2 * var(--gap)));
}
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--gap); align-items: start; margin: 1.6em 0; }
.cols > div > :first-child { margin-top: 0; }
.cols img, .cols video { margin-block: 0 .6em; width: 100%; }
.cols p { margin: .2em 0; font-size: .95rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.embed { aspect-ratio: 16 / 9; position: relative; margin: 1.6em 0; }
.embed:has(figcaption) { aspect-ratio: auto; }
.embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 4px; }

/* paper / code buttons */
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.6em 0; }
.btn {
  font: 650 .95rem/1 var(--sans); font-variation-settings: "wdth" 100;
  padding: 12px 18px; border-radius: 4px; background: var(--blue); color: var(--paper); text-decoration: none;
}
.btn:hover { background: var(--maize); color: var(--blue); }

/* ---------- home */
.hero { background: var(--steel); }
.hero-inner { padding-block: clamp(13px, 2vw, 26px) clamp(36px, 5vw, 64px); display: flex; flex-direction: column; align-items: center; }
.hero h1 {
  font-size: clamp(1.33rem, 2.5vw, 2.1rem); font-variation-settings: "wdth" 118; line-height: 1.1; letter-spacing: -0.015em;
  text-align: center; max-width: 24em; margin: clamp(28px, 4vw, 48px) 0 0;
}

/* video carousel */
.carousel { width: 100%; max-width: 1040px; }
.carousel-stage { position: relative; aspect-ratio: 16 / 9; background: var(--blue); border-radius: 6px; overflow: hidden; }
.slide { position: absolute; inset: 0; display: block; }
.slide[hidden] { display: none; }
.slide video, .slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.carousel-caption { margin: 0; font: 600 1rem/1.4 var(--sans); font-variation-settings: "wdth" 100; }
.carousel-caption a[hidden] { display: none; }
.carousel-controls { display: flex; align-items: center; gap: 6px; }
.carousel-controls button {
  font: 700 1.1rem/1 var(--sans); color: var(--blue); background: transparent; border: 0; cursor: pointer;
  min-width: 32px; height: 32px; border-radius: 4px; display: grid; place-items: center;
}
.carousel-controls button:hover { background: var(--paper); }
.carousel-controls .dot { min-width: 14px; width: 14px; height: 14px; padding: 0; border-radius: 50%; background: var(--line); }
.carousel-controls .dot[aria-current] { background: var(--maize); }
.carousel-controls [data-pause] { font-size: .7rem; letter-spacing: -1px; }
.announce { margin: 24px 0 0; width: 100%; max-width: 1040px; padding: 12px 16px; background: var(--paper); border-left: 6px solid var(--maize); font-size: 1rem; max-width: var(--measure); }

.band { padding-block: clamp(40px, 6vw, 72px) 0; }
.band:last-child { padding-bottom: 80px; }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 3px solid var(--blue); padding-top: 12px; margin-bottom: 24px; }
.band-head h2 { margin: 0; }
.band-head a { font: 600 .95rem var(--sans); }
.band-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); }

/* ---------- research contact sheet */
.sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 36px var(--gap); }
.sheet-dense { padding-bottom: 80px; }
.frame { display: flex; flex-direction: column; }
.frame-link { text-decoration: none; color: inherit; }
.frame-media { aspect-ratio: 16 / 10; background: var(--steel); overflow: hidden; border-radius: 4px; }
.frame-media img, .frame-media video { width: 100%; height: 100%; object-fit: cover; }
/* cards without a picture: the title set large on a blue tile */
.frame-tile { display: flex; align-items: flex-end; padding: 18px 20px; background: var(--blue); }
.frame-tile span { color: var(--paper); font: 800 1.45rem/1.12 var(--sans); font-variation-settings: "wdth" 112; text-wrap: balance; }
.frame-link:hover .frame-tile { background: #0a3a6b; }
/* stills are often diagrams: show them whole; clips fill the frame */
.frame-media img { object-fit: contain; padding: 6px; }
.frame h3 { font-size: 1.08rem; line-height: 1.25; margin: 14px 0 6px; font-variation-settings: "wdth" 104; }
.frame-link:hover h3 { text-decoration: underline; text-decoration-color: var(--maize); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.frame p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- news */
.news { list-style: none; margin: 0; padding: 0; }
.news li { display: grid; grid-template-columns: 8.5em 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.news .when { font: 600 .9rem/1.6 var(--sans); color: var(--muted); font-variation-settings: "wdth" 100; }
.news-full { max-width: 52em; padding-bottom: 80px; }

/* ---------- publications */
.year-group { display: grid; grid-template-columns: 6em 1fr; gap: var(--gap); border-top: 1px solid var(--line); padding-top: 18px; margin-bottom: 18px; }
.year { margin: 0; font-size: 1.4rem; font-variation-settings: "wdth" 118; position: sticky; top: 16px; align-self: start; }
.pubs { list-style: none; margin: 0; padding: 0; max-width: 52em; }
.pubs li { margin-bottom: 20px; }
.pubs p { margin: 0; }
.pub-title { font: 650 1.05rem/1.35 var(--sans); color: var(--blue); font-variation-settings: "wdth" 100; }
.pub-authors { color: var(--text); }
.pub-authors b { font-weight: 600; }
.pub-venue { font-style: italic; color: var(--muted); }
.pub-links a { margin-right: 14px; font: 600 .9rem var(--sans); }
.pubs-compact li { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.wrap > .year-group:last-child { margin-bottom: 80px; }

/* ---------- people */
.people { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 32px var(--gap); }
.people img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; background: var(--steel); margin-bottom: 10px; }
.people p { margin: 0; }
.initials {
  width: 100%; aspect-ratio: 1; border-radius: 4px; margin-bottom: 10px;
  display: grid; place-items: center; background: var(--steel); color: var(--blue);
  font: 800 2.6rem/1 var(--sans); font-variation-settings: "wdth" 118; letter-spacing: .02em;
}
.person-name { font: 650 1.02rem/1.3 var(--sans); color: var(--blue); font-variation-settings: "wdth" 100; }
.person-role { color: var(--muted); font-size: .95rem; }
.person-note { color: var(--muted); font-size: .88rem; }
.people-list { list-style: none; padding: 0; margin: 0 0 24px; columns: 3 14em; column-gap: var(--gap); }
.people-list li { break-inside: avoid; padding: 6px 0; }
.people-group:last-child { padding-bottom: 80px; }

/* ---------- videos */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 32px var(--gap); padding-bottom: 80px; }
.video-grid .embed { margin: 0; }

/* ---------- footer */
.site-footer { background: var(--blue); color: #d9e1ea; font: .95rem/1.6 var(--sans); font-variation-settings: "wdth" 100; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-block: 40px; }
.site-footer p { margin: 0; }
.footer-name { color: var(--paper); font-weight: 700; margin-bottom: 6px !important; }
.site-footer a { color: var(--paper); }
.footer-links { list-style: none; padding: 0; margin: 10px 0 0; display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- small screens */
@media (max-width: 820px) {
  .hero-inner, .band-split { grid-template-columns: 1fr; }
  .year-group { grid-template-columns: 1fr; gap: 6px; }
  .year { position: static; }
  .news li { grid-template-columns: 1fr; gap: 0; }
  .video-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  video[autoplay] { animation: none; }
}

/* home: research preview is always a tidy 3-up grid */
.is-home .sheet { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .is-home .sheet { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .is-home .sheet { grid-template-columns: 1fr; } }

/* ---------- personal profile page: photo + details beside the text */
.profile { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding-bottom: 64px; }
.profile-side { position: sticky; top: 20px; font: .95rem/1.5 var(--sans); font-variation-settings: "wdth" 100; color: var(--text); }
.profile-side img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; margin-bottom: 14px; }
.profile-side p { margin: 0; }
.profile-side p:first-of-type { font-weight: 700; color: var(--blue); }
.profile-links { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 4px; }
.profile-links a { font-weight: 600; }
.profile-text { max-width: 84ch; padding-bottom: 0; font-size: .97rem; line-height: 1.6; }
.profile-text > * { max-width: none; }
.profile-text > h3:first-child { margin-top: 0; }
.profile-text h3 { font-size: 1.12rem; margin: 1.4em 0 .4em; }
.profile-text ul { padding-left: 1.1em; }
@media (max-width: 720px) {
  .profile { grid-template-columns: 1fr; }
  .profile-side { position: static; max-width: 240px; }
}
