*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'Roboto Condensed', sans-serif; }

/* ─── Links ─────────────────────────────────────────────────────────────── */
/* Inline links inherit the text color with a subtle underline; hover shifts
   the color gently (brighter on dark sections, darker on light ones). */
a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    text-decoration-color: rgba(127,127,127,0.55);
    transition: color 0.15s, text-decoration-color 0.15s;
}
a:hover { text-decoration-color: currentColor; }
.section a:hover, .footer-section a:hover { color: #FFFFFF; }
.header-section a:hover, .title-section a:hover { color: #000000; }

.section { width: 100%; }
.section-black    { background-color: #000000; color: #BBBBBB; }
.section-dark-hi  { background-color: #202020; color: #BBBBBB; }
.section-dark-mid { background-color: #303030; color: #BBBBBB; }
.section-dark-lo  { background-color: #101010; color: #BBBBBB; }
.section-members  { background-color: #333444; color: #FFFFFF; }

.section-container {
    padding: 60px 5%;
    margin: 0 auto;
    max-width: 1200px;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    padding-bottom: 16px;
    border-bottom: 0.5px solid rgba(255,255,255,0.12);
}

.section-title {
    color: #FFFFFF;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.section-header-actions {
    display: flex;
    gap: 8px;
}

/* ─── Header ────────────────────────────────────────────────────────────── */
.header-section {
    background-color: #FFFFFF;
    font-family: Montserrat;
    border-bottom: 0.5px solid #DDDDDD;
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 5%;
}
.header-top-bar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.header-meta-link {
    color: #444444;
    font-size: 11px;
    text-decoration: none;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color 0.2s;
}
.header-meta-link:hover { color: #000000; }
.header-home-link { text-decoration: none; }

.header-body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.header-lab-name {
    color: #111111;
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.02em;
}
.header-university {
    color: #555555;
    font-size: 12px;
    margin-top: 4px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.header-tagline {
    color: #777777;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-align: right;
    line-height: 1.6;
}
@media (max-width: 680px) {
    .header-tagline { text-align: left; }
}

/* ─── Title ──────────────────────────────────────────────────────────────── */
.title-section {
    background-color: #F5F5F5;
    font-family: Lato;
}
.title-image-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    max-height: 420px;
}
.title-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.title-image-caption {
    position: absolute;
    bottom: 10px;
    right: 14px;
    color: rgba(255,255,255,0.45);
    font-size: 10px;
    letter-spacing: 0.04em;
}
.title-text-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 5% 52px;
}
.title-name {
    color: #111111;
    font-size: 36px;
    font-weight: 300;
    letter-spacing: 0.02em;
}
.title-title {
    color: #555555;
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 6px;
    margin-bottom: 24px;
}
.title-bio {
    color: #333333;
    font-size: 16px;
    line-height: 2;
    max-width: 680px;
    font-family: 'Lato', sans-serif;
    font-weight: 300;
}
.title-funding {
    color: #555555;
    font-size: 14px;
    line-height: 1.8;
    max-width: 680px;
    margin-top: 18px;
    font-family: 'Lato', sans-serif;
    font-weight: 300;
}

/* ─── Pill buttons ──────────────────────────────────────────────────────── */
.pill-button {
    background: transparent;
    border: 0.5px solid rgba(255,255,255,0.3);
    color: #CCCCCC;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 12px;
    letter-spacing: 0.06em;
    padding: 5px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.pill-button:hover {
    background: rgba(255,255,255,0.1);
    color: #FFFFFF;
}

/* ─── Publications ──────────────────────────────────────────────────────── */
/* Horizontally scrolling strip: 3 rows, newest papers in the leftmost
   columns, scroll right for older ones. Column width = viewport columns. */
.publication-list {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(3, auto);
    grid-auto-columns: calc(100% / 3);
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.publication-list::-webkit-scrollbar { height: 6px; }
.publication-list::-webkit-scrollbar-track { background: transparent; }
.publication-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
@media (max-width: 900px) {
    .publication-list { grid-auto-columns: 50%; }
}
@media (max-width: 560px) {
    .publication-list { grid-auto-columns: 100%; }
}
.publication-item {
    padding: 20px 24px 20px 16px;
    border-left: 0.5px solid rgba(255,255,255,0.1);
    border-bottom: 0.5px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    gap: 6px;
    scroll-snap-align: start;
}
.pub-journal-badge {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888888;
}
.publication-title {
    font-size: 14px;
    line-height: 1.45;
}
.publication-title a {
    color: #DDDDDD;
    text-decoration: none;
    transition: color 0.2s;
}
.publication-title a:hover { color: #FFFFFF; }
.publication-authors {
    font-size: 11px;
    color: #CCCCCC;
    line-height: 1.4;
}

/* ─── Group Members ─────────────────────────────────────────────────────── */
.bio-tabs-and-cards {
    display: flex;
    gap: 0;
}
.tabs {
    display: flex;
    flex-direction: column;
    min-width: 140px;
    border-right: 0.5px solid rgba(255,255,255,0.1);
    padding-right: 0;
    flex-shrink: 0;
}
.tab {
    background: none;
    border: none;
    padding: 14px 20px;
    font-size: 15px;
    font-family: 'Roboto Condensed', sans-serif;
    color: #AAAAAA;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    border-radius: 0;
    letter-spacing: 0.03em;
}
.tab:hover { background-color: #666777; color: #FFFFFF; }
.tab.active { background-color: #222333; color: #FFFFFF; border-right: 2px solid #EEEEEE; }

/* All lists occupy the same grid cell so the section keeps the height of
   the tallest category; inactive lists are hidden but still sized. */
.bio-container { flex: 1; overflow: hidden; display: grid; }
.bio-list {
    grid-area: 1 / 1;
    visibility: hidden;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    align-items: flex-start;
    gap: 24px;
    padding: 0 12px 16px 32px;
}
.bio-list.visible { visibility: visible; }
.bio-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 400px;
    max-width: 85vw;
    flex-shrink: 0;
    padding: 24px 16px;
    background: rgba(255,255,255,0.03);
    border: 0.5px solid rgba(255,255,255,0.08);
    border-radius: 6px;
}
.bio-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 14px;
    border: 0.5px solid rgba(255,255,255,0.15);
}
.bio-card h3 {
    font-size: 15px;
    font-weight: 400;
    margin: 0 0 10px;
    color: #FFFFFF;
    text-align: center;
    font-family: 'Roboto Condensed', sans-serif;
}
.member-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}
.member-icon { color: #FFFFFF; opacity: 0.7; display: flex; text-decoration: none; transition: opacity 0.2s; }
a.member-icon:hover { opacity: 1; }
.member-icon.dimmed { opacity: 0.18; cursor: default; }

.alumni-note {
    font-size: 11px;
    color: #CCCCCC;
    letter-spacing: 0.03em;
    text-align: center;
    margin-bottom: 12px;
}

.bio-card p {
    font-size: 12px;
    line-height: 1.65;
    color: #DDDDDD;
    text-align: center;
    margin: 0;
    width: auto;
    font-family: 'Lato', sans-serif;
    font-weight: 300;
}

@media (max-width: 680px) {
    .bio-tabs-and-cards { flex-direction: column; }
    .tabs { flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 0.5px solid rgba(255,255,255,0.1); padding-bottom: 8px; min-width: unset; }
    .tab.active { border-right: none; border-bottom: 2px solid #EEEEEE; }
    .bio-list { padding: 16px 0 0; }
}

/* ─── Press ─────────────────────────────────────────────────────────────── */
.press-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.press-item {
    display: grid;
    grid-template-columns: 48px 100px 1fr;
    align-items: baseline;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 0.5px solid rgba(255,255,255,0.07);
    text-decoration: none;
    transition: background 0.15s;
    border-radius: 3px;
}
.press-item:hover { background: rgba(255,255,255,0.03); }
.press-year {
    color: #555555;
    font-size: 12px;
    letter-spacing: 0.06em;
    font-weight: 400;
}
.press-source {
    color: #888888;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.press-item-title {
    color: #CCCCCC;
    font-size: 14px;
    line-height: 1.4;
    transition: color 0.2s;
}
.press-item:hover .press-item-title { color: #FFFFFF; }
@media (max-width: 560px) {
    .press-item { grid-template-columns: 48px 1fr; }
    .press-source { display: none; }
}

/* ─── Movies ────────────────────────────────────────────────────────────── */
.movie-carousel { width: 100%; }
.movie-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.movie-cell {
    width: 100%;
    max-width: 700px;
    aspect-ratio: 1 / 1;
    border-radius: 4px;
}
.movie-caption {
    max-width: 600px;
    text-align: center;
    font-size: 13px;
    line-height: 1.65;
    color: #777777;
    font-family: 'Lato', sans-serif;
    font-weight: 300;
}

.flickity-page-dots { bottom: -28px; }
.flickity-page-dots .dot {
    width: 8px; height: 8px; opacity: 1;
    background: transparent;
    border: 1px solid #444;
}
.flickity-page-dots .dot.is-selected { background: #666; border-color: #666; }

/* ─── Education ─────────────────────────────────────────────────────────── */
.education-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.education-item {
    background-color: #1a1a1a;
    border: 0.5px solid #2e2e2e;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.education-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}
.education-thumb img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.education-play-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.28);
}
.education-play-icon {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.82);
    display: flex; align-items: center; justify-content: center;
}
.education-play-icon::after {
    content: '';
    border-left: 13px solid #101010;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    margin-left: 3px;
}
.education-body {
    padding: 14px 16px 18px;
    flex: 1; display: flex; flex-direction: column; gap: 8px;
}
.education-title { font-size: 14px; line-height: 1.4; }
.education-title a { color: #EEEEEE; text-decoration: none; }
.education-title a:hover { color: #FFFFFF; }
.education-preview {
    color: #777777; font-size: 12px; line-height: 1.65;
    flex: 1; font-family: 'Lato', sans-serif; font-weight: 300;
}
.education-footer { margin-top: auto; padding-top: 10px; }
.education-link { color: #CCCCCC; font-size: 11px; text-decoration: none; letter-spacing: 0.03em; }
.education-link:hover { color: #FFFFFF; }

/* ─── Footer ────────────────────────────────────────────────────────────── */
.footer-section {
    background-color: grey;
    color: white;
    font-family: Lato;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 5%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-lab {
    color: #FFFFFF;
    font-size: 13px;
    letter-spacing: 0.04em;
}
.footer-meta {
    color: #DDDDDD;
    font-size: 11px;
    margin-top: 4px;
}
.footer-right { text-align: right; }
.footer-link {
    color: #FFFFFF;
    font-size: 12px;
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
}
.footer-link:hover { color: #DDDDDD; }
.footer-copy { color: #CCCCCC; font-size: 11px; }
.bio-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 14px;
    border: 0.5px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.55);
}

.education-credit { font-size: 11px; color: #999999; }

/* Compact alumni cards: small headshot, name and dates only, no bio */
.bio-card-compact {
    width: 200px;
    padding: 18px 14px;
}
.bio-card-compact img,
.bio-card-compact .bio-avatar-placeholder {
    width: 80px;
    height: 80px;
    font-size: 24px;
    margin-bottom: 10px;
}
.bio-card-compact h3 {
    font-size: 14px;
    margin-bottom: 6px;
}
.bio-card-compact .alumni-note {
    margin-bottom: 0;
}

/* Alumni fill two rows, scrolling horizontally column by column */
.bio-list-compact {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, auto);
    grid-auto-columns: max-content;
    gap: 16px 20px;
    justify-content: start;
}

/* ─── CV page ───────────────────────────────────────────────────────────── */
.cv-intro { margin-bottom: 36px; }
.cv-name { color: #FFFFFF; font-size: 24px; font-weight: 300; }
.cv-contact { color: #999999; font-size: 13px; margin-top: 6px; }
.cv-section { margin-bottom: 44px; }
.cv-section-title {
    color: #FFFFFF;
    font-size: 17px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: 0.5px solid rgba(255,255,255,0.15);
    padding-bottom: 8px;
    margin-bottom: 18px;
}
.cv-subsection-title { color: #CCCCCC; font-size: 14px; font-weight: bold; margin: 18px 0 10px; }
.cv-entry { margin-bottom: 18px; }
.cv-entry-title { color: #EEEEEE; font-size: 15px; margin-bottom: 4px; }
.cv-entry-line { color: #AAAAAA; font-size: 13px; line-height: 1.7; margin-bottom: 6px; max-width: 760px; }
.cv-key { color: #777777; }
.cv-note { color: #888888; font-size: 12px; margin-bottom: 12px; }
.cv-pub-list, .cv-plain-list { margin: 0; padding-left: 22px; max-width: 760px; }
.cv-plain-list li { color: #AAAAAA; font-size: 13px; line-height: 1.7; margin-bottom: 6px; }
.cv-pub { margin-bottom: 14px; }
.cv-pub-title { font-size: 14px; line-height: 1.45; }
.cv-pub-title a { color: #DDDDDD; text-decoration: none; }
.cv-pub-title a:hover { color: #FFFFFF; }
.cv-pub-authors { color: #999999; font-size: 12px; line-height: 1.5; margin-top: 2px; }
.cv-pub-authors strong { color: #CCCCCC; font-weight: bold; }
.cv-pub-ref { color: #777777; font-size: 12px; margin-top: 2px; }

.bio-name-link { color: inherit; text-decoration: none; }
.bio-name-link:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

