/* Layout: the original andermannlab.com — white page, red wordmark centered over the nav,
   square black & white headshots, thin grey rules between rows of people. One light look by design. */
:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #111111;          /* old site: headings / strong */
  --body: #2b2b2b;         /* old site: running text */
  --grey: #4a4a4a;          /* old site: nav + subtitles */
  --hair: #d4d4d4;          /* old site: hr */
  --lab-red: #1e1a8e;       /* old site: title color (indigo) */
  --blank: #f0f0f0;
  --title-face: "Jost", "Brandon Grotesque", "Futura", "Century Gothic", sans-serif;  /* stands in for the old site's Brandon Grotesque */
  --face: "Mulish", "Europa", "Avenir Next",  /* stands in for Europa */
  "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { background: var(--paper); color: var(--body); font-family: var(--face); font-weight: 400; letter-spacing: .01em; font-size: 16px; line-height: 1.75; padding-inline: 20px; }
a { color: var(--ink); font-weight: 400; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--lab-red); outline-offset: 3px; }

header.site { text-align: center; padding-block: 44px 8px; }
.wordmark { font-family: var(--title-face); color: var(--lab-red); font-size: clamp(1.7rem, 5vw, 2.25rem); font-weight: 800; letter-spacing: .08em; text-decoration: none; line-height: 1.1; }
.affil { color: #4a4a4a; font-weight: 600; font-size: .8rem; letter-spacing: .04em; margin-top: 6px; }
nav ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 30px; margin: 22px 0 0; padding: 0; }
nav a { font-family: var(--title-face); text-transform: uppercase; letter-spacing: .12em; text-decoration: none; font-size: .9rem; font-weight: 600; color: var(--ink); }
nav a:hover, nav a[aria-current] { color: var(--ink); }
nav a[aria-current] { color: var(--lab-red); border-bottom: 2px solid var(--lab-red); }

main { max-width: 1000px; margin: 0 auto; padding-block: 20px 56px; }
.tier { padding-block: 44px; }
.tier + .tier::before { content: ""; display: block; width: min(160px, 40%); height: 1px; background: var(--hair); margin: -44px auto 44px; }
.tier.alum { margin-top: 24px; border-top: 1px solid var(--hair); }
.tier.alum::before { display: none; }
.tier h2 { font-family: var(--title-face); text-transform: uppercase; letter-spacing: .14em; text-align: center; font-weight: 800; color: var(--ink); font-size: 1.3rem; margin: 0 0 32px; }

.grid { margin-inline: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 44px 34px; }
.person { width: 216px; max-width: 100%; text-align: center; }
.tier.pi .person { width: 300px; }
.tier.postdocs .person, .tier.grads .person { width: 260px; }
.photo { position: relative; aspect-ratio: 1; max-width: 100%; background: var(--blank); overflow: hidden; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; display: block; }
.photo img.hover { opacity: 0; transition: opacity .18s steps(3, end); }
.person:hover img.hover, .person.flip img.hover { opacity: 1; }
/* channel-change flicker on hover: a nod to the mouse watching TV on the cover */
.photo::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
.person:hover .photo.swap::after, .person.flip .photo.swap::after { animation: tune .32s ease-out; }
@keyframes tune { 0% { opacity: .9; transform: translateY(-4px); } 60% { opacity: .5; } 100% { opacity: 0; transform: none; } }
.photo .initials { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.2rem; font-weight: 500; color: var(--grey); }

.name { color: var(--ink); font-weight: 800; font-size: 1.05rem; margin: 20px 0 2px; line-height: 1.35; }
.title { font-family: var(--title-face); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--lab-red); margin: 2px 0 6px; line-height: 1.35; }
.email { color: var(--grey); font-size: .9rem; overflow-wrap: anywhere; }
.scholar { display: inline-block; margin-top: 10px; font-style: italic; font-size: .92rem; }
.awards { list-style: none; margin: 12px auto 0; padding: 0; text-align: left; font-style: italic; color: var(--grey); font-size: .88rem; line-height: 1.55; max-width: 100%; }
.awards li { position: relative; padding-left: 16px; }
.awards li + li { margin-top: 6px; }
.awards li::before { content: "•"; position: absolute; left: 0; font-style: normal; }
.tbd .name { color: var(--lab-red); font-weight: 600; }

.alumni { columns: 3 230px; column-gap: 44px; margin: 0; padding: 0; list-style: none; font-size: .93rem; }
.alumni li { break-inside: avoid; padding-block: 6px; line-height: 1.45; }
.alum-group { font-family: var(--title-face); font-weight: 500; font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; color: var(--grey); margin: 30px 0 10px; }
.alum-group:first-of-type { margin-top: 0; }
.alumni b { font-weight: 600; }
.alumni .role { color: var(--grey); }
.alumni .note { display: block; color: var(--grey); font-style: italic; font-size: .85rem; }

footer { max-width: 1000px; margin: 0 auto; padding-block: 26px 48px; border-top: 1px solid var(--hair); color: var(--grey); font-size: .8rem; text-align: center; }
@media (prefers-reduced-motion: reduce) { .photo img.hover { transition: none; } .person:hover .photo.swap::after, .person.flip .photo.swap::after { animation: none; } }
@media (max-width: 520px) { .person, .tier.pi .person, .tier.postdocs .person, .tier.grads .person { width: 100%; max-width: 320px; } }

/* ---------- shared page pieces ---------- */
.page-title { font-family: var(--title-face); font-weight: 800; color: var(--ink); font-size: 1.45rem; text-transform: uppercase; letter-spacing: .16em; text-align: center; margin: 12px 0 6px; }
.subtitle { text-align: center; color: var(--grey); margin: 0 auto 40px; max-width: 60ch; text-wrap: balance; }
.prose { max-width: 66ch; margin: 0 auto; line-height: 1.8; }
.prose p + p { margin-top: 1.2em; }
figure { margin: 0; }
figure img { display: block; width: 100%; height: auto; }
figcaption { color: var(--grey); font-size: .86rem; line-height: 1.5; margin-top: 10px; }
figcaption b { color: var(--ink); font-weight: 600; }
.pending { display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--blank); color: var(--grey); font-family: var(--title-face); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; }
.pending.tall { aspect-ratio: 4 / 3; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li + li { margin-top: 6px; }
.doi { font-style: italic; font-size: .9rem; }

/* ---------- home ---------- */
.home { text-align: center; }
.cover { display: block; max-width: 760px; margin: 8px auto 0; }
.cover img { width: 100%; height: auto; display: block; }
.thesis { margin: 26px 0 0; font-family: var(--title-face); font-size: 1.15rem; text-transform: uppercase; letter-spacing: .16em; }
.thesis a { text-decoration: none; border-bottom: 1px solid var(--lab-red); padding-bottom: 3px; }
.thesis a:hover { color: var(--lab-red); }
.lede { max-width: 56ch; margin: 22px auto 0; color: var(--grey); text-wrap: balance; }
.latest { max-width: 560px; margin: 56px auto 0; padding-top: 30px; border-top: 1px solid var(--hair); text-align: left; }
.latest h2, .contact h2, .pub-year h2 { font-family: var(--title-face); font-weight: 500; font-size: .78rem; text-transform: uppercase; letter-spacing: .16em; color: var(--grey); margin: 0 0 14px; }
.latest ul { list-style: none; margin: 0; padding: 0; }
.latest li { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding-block: 7px; }
.latest time { color: var(--grey); font-size: .88rem; font-variant-numeric: tabular-nums; }

/* ---------- research ---------- */
.research figure.wide { max-width: 860px; margin: 0 auto 40px; }
.movies { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; max-width: 860px; margin: 0 auto 48px; }
.movies .pending { aspect-ratio: 1; }

/* ---------- publications ---------- */
.pubs { max-width: 820px; }
.pub-year { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0 24px; padding-block: 22px; border-top: 1px solid var(--hair); }
.pub-year h2 { color: var(--lab-red); font-size: 1rem; letter-spacing: .1em; margin-top: 2px; }
.pub-year ol { list-style: none; margin: 0; padding: 0; min-width: 0; }
.pub-year li { font-size: .93rem; line-height: 1.6; overflow-wrap: anywhere; }
.pub-year li + li { margin-top: 14px; }
.pub-year strong { font-weight: 700; }

/* ---------- news ---------- */
.news { max-width: 820px; }
.post { padding-block: 30px; border-top: 1px solid var(--hair); }
.post:first-of-type { border-top: 0; }
.post time { font-family: var(--title-face); font-size: .76rem; text-transform: uppercase; letter-spacing: .14em; color: var(--grey); }
.post h2 { font-size: 1.2rem; font-weight: 700; margin: 4px 0 14px; }
.gallery { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.gallery.n1 { grid-template-columns: minmax(0, 560px); }
.gallery.n3 { grid-template-columns: repeat(3, 1fr); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.gallery.n1 img { aspect-ratio: auto; }
.gallery .pending { aspect-ratio: 3 / 1; }
.post .doi { display: inline-block; margin-top: 12px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 36px; max-width: 900px; margin: 30px auto 0; }
.contact-grid p { margin: 0 0 6px; }
.contact-grid .title { margin-bottom: 10px; }

@media (max-width: 560px) {
  .pub-year { grid-template-columns: 1fr; }
  .latest li { grid-template-columns: 1fr; gap: 0; }
  .gallery.n3 { grid-template-columns: repeat(2, 1fr); }
}
figure video { display: block; width: 100%; height: auto; background: #000; }

/* stronger type pass */
.alumni b { font-weight: 800; color: var(--ink); }
.alum-group, .contact h2, .pub-year h2 { color: var(--ink) !important; font-weight: 800 !important; }
.awards { color: #333 !important; }
.pub-year strong { color: var(--ink); font-weight: 800; }
footer { color: #555; }
.thesis { font-weight: 800; }
.edit-link { display: inline-block; margin-top: 10px; font-size: .78rem; color: #555; }
