@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}
body { min-height: 100vh; margin: 0; display: flex; flex-direction: column; background: var(--background); color: var(--text); font: 400 1rem/1.58 var(--body); -webkit-font-smoothing: antialiased; }
main { flex: 1; }
[hidden] { display: none !important; }
a { color: var(--link); text-underline-offset: .23em; }
a:hover { text-decoration-thickness: .13em; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.skip-link { position: absolute; top: -12rem; z-index: 4; background: #fff; padding: 12px; }
.skip-link:focus { top: 0; }
.wrap, main > section { width: min(calc(100% - 2 * var(--gutter)), var(--width)); margin-inline: auto; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { font-family: var(--heading); color: var(--text); font-weight: 550; }
h1 { font-size: clamp(1.9rem, 3.2vw, 2.9rem); line-height: 1.1; letter-spacing: -.035em; text-wrap: balance; }
h2 { font-size: clamp(1.3rem, 1.8vw, 1.75rem); line-height: 1.22; letter-spacing: -.025em; }
h3 { font-size: clamp(1.1rem, 1.3vw, 1.3rem); line-height: 1.3; letter-spacing: -.015em; font-weight: 600; }
h4 { font-size: .9rem; line-height: 1.4; font-weight: 600; }
.action-icon { width: 1.05em; height: 1.05em; vertical-align: -.16em; }

/* ---------------------------------------------------------------- masthead */
.masthead { position: relative; isolation: isolate; border-bottom: 1px solid var(--line); background: var(--masthead-paper); }
.navigation { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 2.15vw, 38px); color: var(--masthead-ink); }
.navigation a { color: inherit; padding: 6px 2px; font-size: clamp(14px, 1.1vw, 21px); font-weight: 500; line-height: 1.4; letter-spacing: .045em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.navigation a:hover { text-decoration: underline; text-underline-offset: .37em; }
.navigation a[aria-current] { color: var(--masthead-current); box-shadow: inset 0 -1px currentColor; }
.navigation a[aria-current]:hover { text-decoration: none; }
.navigation a:focus-visible, #replay:focus-visible { outline: 2px solid var(--link); outline-offset: 5px; }

/* Masthead. From 1024 px it is one proportional picture (capped at 1920 px). Below that
   its height changes smoothly with the width, and the artwork is drawn at that height and
   cropped at the sides. The artwork fades out behind the logo and the navigation. */
.masthead-stage { position: relative; width: min(100%, 1920px); margin-inline: auto; }
.masthead .masthead-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: center / 100% 100% no-repeat; }
.masthead .navigation { position: absolute; left: 50%; top: 59.524%; transform: translate(-50%, -50%); }
.masthead--home .masthead-stage { aspect-ratio: 1440 / 420; }
.masthead--home .masthead-art { background-image: url("../images/banner/masthead-wide.svg"); }
.masthead--home .lab-identity { position: absolute; left: 50%; top: 20%; width: 30.5%; transform: translateX(-50%); }
.lab-identity svg { display: block; width: 100%; height: auto; overflow: visible; }
.lab-identity[data-reset] .eai-draw, .lab-identity[data-reset] .eai-name { animation: none; }
#replay { position: absolute; inset: -8px -4px; border: 0; padding: 0; background: transparent; border-radius: 5px; cursor: pointer; }
.masthead--compact .masthead-stage { aspect-ratio: 1440 / 200; }
.masthead--compact .masthead-art { background-image: url("../images/banner/masthead-compact.svg"); }
.masthead--compact .navigation { top: 70%; }
.compact-identity { position: absolute; display: block; left: 50%; top: 14%; width: 15.5%; aspect-ratio: 916 / 198; transform: translateX(-50%); }
.compact-identity img { position: absolute; height: auto; }
.compact-mark { left: .437%; top: 8.33%; width: 45.85%; }
.compact-name { left: 50%; top: 7.07%; width: 49.89%; }

@media (max-width: 1023px) {
  .masthead--home .masthead-stage { aspect-ratio: auto; height: clamp(272px, calc(230px + 6.8vw), 300px); }
  .masthead--home .masthead-art { background-image: url("../images/banner/masthead-medium.svg"); background-size: auto 100%; }
  .masthead--home .lab-identity { width: clamp(232px, 30.5vw, 312px); }
  .masthead--compact .masthead-stage { aspect-ratio: auto; height: calc(154.9px - 1.26vw); }
  .masthead--compact .masthead-art { background-size: auto 100%; }
  .compact-identity { width: max(160px, 15.5vw); }
}
@media (max-width: 639px) {
  .masthead--home .masthead-art { background-image: url("../images/banner/masthead-narrow.svg"); }
  /* phones: the recruitment note follows the heading */
  .page-home > section:first-of-type { display: flex; flex-direction: column; }
  .page-home > section:first-of-type > h1 { order: -3; }
  .page-home > section:first-of-type > .move-note { order: -2; margin: 20px 0 0; }
  .page-home > section:first-of-type > .lead { order: -1; }
}
.research-area:focus { outline: none; }
.research-area:focus-visible { outline: 2px solid rgba(112, 41, 239, .45); outline-offset: 8px; border-radius: 6px; }

/* ---------------------------------------------------------------- pages */
main > section { padding-block: clamp(44px, 5vw, 88px); }
main > section + section { border-top: 1px solid var(--line); }
main > section > h1, main > section > h2 { text-align: center; }
.page-home > section:first-child { padding-block: clamp(48px, 5vw, 92px) clamp(40px, 4vw, 72px); }
.lead { max-width: 66ch; margin: clamp(22px, 2.4vw, 40px) auto 0; font-size: clamp(1.04rem, 1.15vw, 1.24rem); line-height: 1.75; color: #2d2932; text-wrap: pretty; }
.move-note { max-width: 66ch; margin: clamp(22px, 2.2vw, 36px) auto 0; padding: 3px 0 3px clamp(14px, 1.4vw, 22px); border-left: 3px solid var(--accent-rule); }
.move-note p { line-height: 1.65; }
.move-note strong { color: #261b36; font-weight: 650; }
.move-link { display: inline-block; margin-top: 8px; font-weight: 600; }

/* Research areas: one type size for text and lists; rows line up across the two columns
   (subgrid), so a longer heading or description doesn't push one column out of step. */
.research-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 4.6vw, 84px); margin-top: clamp(26px, 3vw, 48px); }
.research-area { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; align-content: start; scroll-margin-top: 24px; }
.research-area > h3 { align-self: end; }
.research-area > p { margin-top: 10px; color: var(--muted); font-size: .97rem; line-height: 1.6; }
.research-area > h4 { align-self: end; margin-top: 20px; color: var(--muted); font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; }
.research-work { margin: 8px 0 clamp(34px, 3.8vw, 60px); padding-left: 1.05em; font-size: .97rem; line-height: 1.5; }
.research-area:nth-last-child(-n+2) .research-work { margin-bottom: 0; }
.research-work li + li { margin-top: 6px; }
.research-work span { color: var(--muted); }
.group-photo img { display: block; width: 100%; height: auto; border-radius: 7px; }
.group-photo figcaption { margin-top: 10px; color: var(--muted); text-align: center; }

.news-list { list-style: none; padding: 0; margin: clamp(22px, 2.4vw, 36px) 0 0; }
.news-item { display: grid; grid-template-columns: clamp(92px, 8vw, 128px) minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.news-item time { color: var(--muted); font-size: .9rem; padding-top: .1em; }
.news-item p { line-height: 1.6; }
.news-papers { margin: 6px 0 0; padding-left: 1.1em; }
.news-papers li + li { margin-top: 3px; }
.news-archive { margin-top: 18px; }
.news-archive summary, .extra-routes summary { cursor: pointer; color: var(--link); font-weight: 600; }
.news-archive summary span { color: var(--muted); font-weight: 400; }

.page-intro { margin: clamp(14px, 1.6vw, 22px) auto 0; text-align: center; }
.team-groups { display: grid; gap: 34px 22px; margin-top: clamp(32px, 3.6vw, 56px); }
.roster-group { border-top: 1px solid var(--line); padding-top: 22px; }
.roster-group h2 { font-size: clamp(1.12rem, 1.35vw, 1.35rem); }
.roster { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.portrait { display: flex; align-items: center; gap: 14px; min-height: 92px; padding: 14px 16px; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
a.portrait:hover { border-color: var(--accent-rule); }
.portrait-image, .initials { width: 64px; height: 64px; flex: none; border-radius: 50%; object-fit: cover; }
.initials { display: grid; place-items: center; background: var(--wash); color: var(--link); font-weight: 600; font-size: .95rem; }
.portrait-text { display: grid; gap: 2px; }
.portrait-text strong { font-size: 1.04rem; line-height: 1.3; font-weight: 600; }
.portrait-text span, .portrait-text small { font-size: .88rem; line-height: 1.4; color: var(--muted); }
.card-arrow { margin-left: auto; padding-left: 6px; color: var(--link); }
@media (min-width: 850px) {
  .team-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roster-group { grid-column: 1 / -1; }
  .roster-group:has(.portrait:only-child) { grid-column: span 1; }
  .roster-group:has(.portrait:only-child) .roster { grid-template-columns: 1fr; }
}

.profile { max-width: 760px; margin-inline: auto; }
.back-link { display: inline-block; margin-bottom: 26px; }
.profile-title { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 30px); }
.profile-image { width: clamp(88px, 8vw, 112px); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; flex: none; }
.affiliation { margin-bottom: 6px; color: var(--link); font-size: .9rem; font-weight: 600; }
.profile-bio { margin-top: 26px; font-size: 1.04rem; line-height: 1.75; }
.profile-bio p + p { margin-top: 1em; }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 24px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); }

.join-lead { max-width: 66ch; margin: clamp(16px, 1.8vw, 26px) auto 0; text-align: center; }
.join-intro { font-size: clamp(1.06rem, 1.2vw, 1.25rem); line-height: 1.6; }
.join-lead p + p { margin-top: 8px; color: var(--muted); }
.join-section, .join-category { max-width: 760px; margin: clamp(34px, 3.6vw, 52px) auto 0; }
.join-section h2, .join-category h2 { font-size: clamp(1.2rem, 1.5vw, 1.45rem); scroll-margin-top: 20px; }
.questions { list-style: none; display: grid; gap: 8px; margin: 14px 0 0; padding: 0; }
.questions li { position: relative; padding-left: 18px; }
.questions li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-rule); }
.questions a { color: var(--text); text-decoration-color: var(--accent-rule); }
.questions-note { margin-top: 12px; color: var(--muted); }
.who { margin-top: 10px; font-weight: 500; line-height: 1.6; }
.apply { margin-top: 16px; padding: clamp(18px, 2vw, 26px); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent-rule); border-radius: 7px; }
.apply dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 22px; margin: 0; }
.apply dt { font-weight: 600; }
.apply dd { margin: 0; overflow-wrap: anywhere; }
.apply code { font: 500 .95em/1.4 var(--body); background: var(--wash); padding: 2px 7px; border-radius: 4px; }
.apply-required { margin-top: 14px; font-weight: 600; color: #261b36; }
.apply-next, .apply-other { margin-top: 14px; line-height: 1.65; }
.apply-other { color: var(--muted); }
.join-jumps { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; max-width: 760px; margin: clamp(36px, 3.6vw, 52px) auto 0; padding-top: 24px; border-top: 1px solid var(--line); }
.route-list { margin-top: 12px; border-top: 1px solid var(--line); }
.route { border-bottom: 1px solid var(--line); }
.route summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 14px; gap: 4px 16px; align-items: baseline; padding: 12px 2px; cursor: pointer; list-style: none; }
.route summary::-webkit-details-marker { display: none; }
.route summary::after { content: "+"; color: var(--link); font-weight: 600; text-align: right; }
.route[open] summary::after { content: "–"; }
.route-name { font-weight: 600; }
.route-meta { color: var(--muted); font-size: .86rem; text-align: right; }
.route-status { display: block; color: var(--masthead-current); font-weight: 500; }
.route-body { max-width: 64ch; padding: 0 2px 14px; }
.route-body p + p { margin-top: 6px; }
.extra-routes { margin-top: 14px; }
.join-date { max-width: 760px; margin: clamp(28px, 3vw, 40px) auto 0; color: var(--muted); font-size: .88rem; }

.site-footer { border-top: 1px solid var(--line); padding: 26px 0 30px; font-size: .86rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-inner a { color: var(--muted); }

@media (max-width: 760px) {
  .research-grid { grid-template-columns: 1fr; }
  .research-area:nth-last-child(2) .research-work { margin-bottom: clamp(34px, 3.8vw, 60px); }
  .news-item { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 620px) {
  .route summary { grid-template-columns: minmax(0, 1fr) 14px; }
  .route-meta { grid-column: 1; grid-row: 2; text-align: left; }
  .route summary::after { grid-column: 2; grid-row: 1; }
  .profile-title { align-items: flex-start; }
}
@media (max-width: 480px) {
  .apply dl { grid-template-columns: 1fr; gap: 2px; }
  .apply dd { margin-bottom: 8px; }
}
