body.research-projects-page {
    background: #ffffff;
}

.research-projects-page .page-shell {
    padding-bottom: 4.5rem;
}

.research-projects-layout {
    width: min(1180px, calc(100% - 4rem));
    margin-inline: auto;
}

.research-projects-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: start;
    margin-top: 3.75rem;
}

.research-projects-section {
    padding: 0 0 4.5rem;
}

.research-projects-section > h1 {
    margin: 0 0 1.75rem;
    color: var(--site-text);
    font-family: 'Figtree', sans-serif;
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.research-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.5rem;
}

.research-project-card {
    min-width: 0;
    padding: 1.25rem 0;
}

.research-project-card > a {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
    color: var(--site-text);
}

.research-project-card--unlinked {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.research-project-card img {
    display: block;
    width: 200px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #edf1f2;
}

.research-project-card h3 {
    margin: 0;
    padding-top: 0.1rem;
    font-family: 'Figtree', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.research-project-card > a:hover h3,
.research-project-card > a:focus-visible h3 {
    color: var(--site-link);
}

.research-project-card > a:focus-visible {
    outline: 2px solid var(--site-link);
    outline-offset: 4px;
}

.research-project-team {
    margin: 0.6rem 0 0 225px;
    color: var(--site-text-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.research-project-card--unlinked .research-project-team {
    grid-column: 2;
    margin-left: 0;
}

.research-project-team span {
    font-weight: 700;
}

.research-project-team span::after {
    content: ':';
}

.research-approach {
    position: sticky;
    top: calc(var(--site-notice-height, 44px) + 82px + 1.5rem);
    margin-top: 0;
    padding: 0;
}

.research-approach h2 {
    margin: 0 0 1.25rem;
    color: var(--site-text);
    font-family: 'Figtree', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.research-approach-copy {
    max-width: 47rem;
}

.research-approach-copy p {
    margin: 0;
    color: var(--site-text-muted);
    font-size: 0.98rem;
    line-height: 1.62;
}

.research-approach-copy p + p {
    margin-top: 1rem;
}

.research-approach-copy strong {
    color: var(--site-text);
    font-weight: 700;
}

.research-github-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--site-link);
    font-weight: 700;
    text-decoration: none;
}

.research-github-link:hover,
.research-github-link:focus-visible {
    color: var(--site-text);
}

.research-project-detail {
    width: min(920px, calc(100% - 4rem));
    min-height: calc(100vh - 220px);
    margin-inline: auto;
    padding: 2.5rem 0 5rem;
}

.research-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 2.25rem;
    color: var(--site-text-muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

.research-breadcrumb a {
    color: var(--site-link);
    text-decoration: none;
}

.research-breadcrumb a:hover,
.research-breadcrumb a:focus-visible {
    color: var(--site-text);
}

.research-project-detail-header {
    padding-bottom: 0;
}

.research-project-detail-header h1 {
    margin: 0;
    color: var(--site-text);
    font-family: 'Figtree', sans-serif;
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    letter-spacing: -0.025em;
    line-height: 1.08;
}

.research-project-hero {
    margin: 2rem 0 0;
}

.research-project-hero img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
}

.research-project-detail-content {
    max-width: 720px;
}

.research-project-detail--with-sidebar {
    width: min(1100px, calc(100% - 4rem));
}

.research-project-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: start;
}

.research-project-detail-layout--publications {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.research-project-tools {
    position: sticky;
    top: calc(var(--site-notice-height, 44px) + 82px + 1.5rem);
    z-index: 1;
    margin-top: 2rem;
    padding-left: 0;
}

.research-project-tools h2 {
    margin: 0 0 0.85rem;
    color: var(--site-text);
    font-family: 'Figtree', sans-serif;
    font-size: 1.05rem;
    line-height: 1.3;
}

.research-project-tools a {
    color: var(--site-link);
    font-weight: 700;
    text-decoration: none;
}

.research-project-tools a:hover,
.research-project-tools a:focus-visible {
    color: var(--site-text);
}

.research-publications-sidebar {
    max-height: calc(100vh - var(--site-notice-height, 44px) - 82px - 3rem);
    overflow-y: auto;
    padding-right: 0.75rem;
}

.research-publications-sidebar .research-related-publications {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--site-text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.research-project-resources {
    margin-top: 2.5rem;
    padding-top: 0;
}

.research-project-resources ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.research-project-resources li + li {
    margin-top: 1.25rem;
}

.research-project-resources span {
    display: block;
    margin-top: 0.3rem;
    color: var(--site-text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.behavioral-project-page .research-project-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1000px) minmax(310px, 340px);
    gap: clamp(2.5rem, 3.5vw, 3rem);
}

.behavioral-project-page .research-project-detail--with-sidebar {
    width: min(1380px, calc(100% - 4rem));
}

.behavioral-project-page .research-project-detail-content {
    max-width: none;
}

.behavioral-project-page .research-project-detail-content > section {
    max-width: 760px;
}

.behavioral-project-supplement {
    margin-top: 2rem;
    padding-top: 0;
}

.behavioral-project-supplement h2 {
    margin: 0 0 1rem;
    color: var(--site-text);
    font-family: 'Figtree', sans-serif;
    font-size: 1.4rem;
    line-height: 1.25;
}

.behavioral-project-supplement .research-related-publications {
    display: grid;
    grid-template-columns: 1fr;
    margin: 0;
    color: var(--site-text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.behavioral-project-supplement .research-related-publications article {
    padding: 1.15rem 0;
}

.behavioral-project-supplement .research-related-publications p {
    margin: 0;
}

.behavioral-project-supplement .research-related-publications strong {
    color: var(--site-text);
}

.behavioral-project-supplement a {
    color: var(--site-link);
    font-weight: 700;
    text-decoration: none;
}

.behavioral-project-supplement a:hover,
.behavioral-project-supplement a:focus-visible {
    color: var(--site-text);
}

.behavioral-project-supplement .research-project-resources ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.4rem;
}

.behavioral-project-supplement .research-project-resources li + li {
    margin-top: 0;
}

.behavioral-project-supplement .research-project-resources span {
    font-size: 0.96rem;
    line-height: 1.55;
}

.research-publications-sidebar .research-related-publications li + li {
    margin-top: 1.25rem;
}

.research-sidebar-copy {
    color: var(--site-text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.research-sidebar-copy p {
    margin: 0;
}

.research-sidebar-copy p + p {
    margin-top: 1.25rem;
}

.research-project-detail-content section {
    padding: 1.75rem 0;
}

.research-project-detail-content h2 {
    margin: 0 0 0.75rem;
    color: var(--site-text);
    font-family: 'Figtree', sans-serif;
    font-size: 1.2rem;
    line-height: 1.25;
}

.research-project-detail-content p {
    margin: 0;
    color: var(--site-text-muted);
    font-size: 1.02rem;
    line-height: 1.68;
}

.research-project-detail-content p + p {
    margin-top: 1rem;
}

.research-project-inline-figure {
    margin: 2rem 0 0;
}

.research-project-inline-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.research-project-inline-figure figcaption {
    margin-top: 0.85rem;
    color: var(--site-text-muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

.research-project-inline-figure figcaption strong {
    color: var(--site-text);
}

.research-project-detail-content p + ol,
.research-project-detail-content p + ul {
    margin-top: 1rem;
}

.research-project-detail-content ol,
.research-project-detail-content ul {
    margin-bottom: 0;
    padding-left: 1.4rem;
    color: var(--site-text-muted);
    font-size: 1.02rem;
    line-height: 1.65;
}

.research-project-detail-content li + li {
    margin-top: 0.65rem;
}

.research-related-publications li + li {
    margin-top: 1.25rem;
}

.research-project-detail-content a {
    color: var(--site-link);
    font-weight: 700;
    text-decoration: none;
}

.research-project-detail-content a:hover,
.research-project-detail-content a:focus-visible {
    color: var(--site-text);
}

.research-projects-section > h1,
.research-projects-grid,
.research-project-card,
.research-approach,
.research-project-detail-header,
.research-project-detail-content section,
.research-project-tools,
.behavioral-project-supplement .research-related-publications article {
    border: 0 !important;
    box-shadow: none !important;
}

.research-project-card > a:hover h3,
.research-project-card > a:focus-visible h3,
.research-github-link,
.research-breadcrumb a,
.research-project-tools a,
.behavioral-project-supplement a,
.research-project-detail-content a {
    text-decoration: none !important;
}

@media (max-width: 1100px) {
    .research-projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .research-projects-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .research-approach {
        position: static;
        margin: 0 0 3rem;
        padding: 2rem 0 0;
        border-left: 0;
    }

    .research-project-detail-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .behavioral-project-page .research-project-detail-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .behavioral-project-page .research-project-detail-content,
    .behavioral-project-supplement {
        min-width: 0;
        max-width: 100%;
    }

    .behavioral-project-page .research-project-detail-content > section {
        max-width: none;
    }

    .behavioral-project-supplement {
        margin-top: 1rem;
        padding-top: 2rem;
        border-top: 1px solid var(--site-border);
    }

    .research-project-tools {
        position: static;
        margin: 2rem 0 0;
        padding: 1.5rem 0 0;
        border-left: 0;
    }

    .research-publications-sidebar {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .behavioral-project-supplement .research-related-publications,
    .behavioral-project-supplement .research-project-resources ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .research-projects-layout {
        width: min(calc(100% - var(--site-page-inset)), 1180px);
    }

    .research-projects-section > h1 {
        margin-bottom: 1rem;
    }

    .research-project-card > a {
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 1rem;
    }

    .research-project-card--unlinked {
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 1rem;
    }

    .research-project-card img {
        width: 112px;
    }

    .research-project-team {
        margin-left: 128px;
    }

    .research-project-detail {
        width: min(calc(100% - var(--site-page-inset)), 920px);
        padding-top: 2.75rem;
    }

    .research-breadcrumb {
        margin-bottom: 1.25rem;
    }

    .research-project-hero {
        margin-top: 1.25rem;
    }

    .research-project-hero img,
    .research-project-inline-figure img {
        width: auto;
        max-width: 100%;
        max-height: min(62vh, 28rem);
        margin-inline: auto;
        object-fit: contain;
    }

    .research-project-detail-content h2,
    .behavioral-project-supplement h2,
    .research-project-tools h2 {
        margin-bottom: 0.6rem;
    }

    .behavioral-project-page .research-project-detail--with-sidebar {
        width: min(calc(100% - var(--site-page-inset)), 920px);
    }

    .behavioral-project-page .research-breadcrumb {
        margin-bottom: 1.25rem;
    }

    .behavioral-project-page .research-project-detail-header h1 {
        font-size: clamp(2rem, 10vw, 2.65rem);
    }

    .behavioral-project-page .research-project-hero {
        margin-top: 1.25rem;
    }

    .behavioral-project-page .research-project-hero img {
        width: 100%;
    }

    .behavioral-project-page .research-project-detail-content section {
        padding: 1.4rem 0;
    }

    .behavioral-project-supplement .research-related-publications article {
        padding: 1rem 0;
        overflow-wrap: anywhere;
        border-bottom: 1px solid var(--site-border) !important;
    }

    .behavioral-project-supplement .research-related-publications article:last-child {
        border-bottom: 0 !important;
    }
}

/* Project accordion: match the design width while allowing rows to grow. */
.research-projects-page .research-projects-layout {
    width: min(1113px, calc(100% - 3rem));
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.research-projects-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.research-project-accordion {
    border-bottom: 2px solid rgba(93, 128, 149, 0.4);
}

.research-project-accordion > summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 64px;
    padding: 1rem 1.25rem 1rem 0;
    cursor: pointer;
    list-style: none;
}

.research-project-accordion > summary::-webkit-details-marker { display: none; }

.research-project-accordion > summary h2 {
    margin: 0;
    color: #07273d;
    font-family: 'Figtree', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.research-project-accordion > summary::after {
    content: '';
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    margin: 7px 4px 0 0;
    border-top: 4px solid rgba(93, 128, 149, 0.4);
    border-right: 4px solid rgba(93, 128, 149, 0.4);
    transform: rotate(45deg);
}

.research-project-accordion[open] > summary::after { transform: rotate(135deg); }
.research-project-accordion > summary:hover h2 { color: var(--site-link); }
.research-project-accordion > summary:focus-visible {
    outline: 3px solid var(--site-link);
    outline-offset: 4px;
}

.research-project-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: clamp(1.5rem, 4vw, 3rem);
    padding: 0.75rem 0 2rem;
}

.research-project-panel--with-team {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
}

.research-project-panel-copy { min-width: 0; display: grid; gap: 1.5rem; }
.research-project-info {
    padding: 0 1rem;
    border-left: 5px solid #8dcd4b;
}
.research-project-panel h3 {
    margin: 0 0 0.75rem;
    color: #07273d;
    font-family: 'Figtree', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.35;
}
.research-project-panel p {
    margin: 0;
    color: #5d8095;
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1rem;
    line-height: 1.65;
}
.research-project-team-card {
    padding: 1.25rem;
    background: #ecf0f5;
    border-top: 5px solid #5d8095;
}
.research-project-team-card h3 { display: flex; align-items: center; gap: 0.625rem; margin-bottom: 1rem; }
.research-project-team-card p { color: #282828; }
.research-project-team-icon { position: relative; width: 24px; height: 24px; flex: 0 0 24px; }
.research-project-team-icon::before {
    content: ''; position: absolute; width: 12px; height: 12px;
    left: 6px; top: 0; border-radius: 50%; background: #374957;
}
.research-project-team-icon::after {
    content: ''; position: absolute; width: 18px; height: 10px;
    left: 3px; bottom: 0; border-radius: 8px 8px 0 0; background: #374957;
}
@media (max-width: 800px) {
    .research-project-panel--with-team { grid-template-columns: minmax(0, 1fr); }
    .research-project-panel { padding-left: 0; padding-bottom: 2rem; }
    .research-project-team-card { width: 100%; }
}
.research-project-link { color: var(--site-link); font-weight: 700; }
.research-projects-page .research-approach {
    position: static;
    max-width: 760px;
    margin: 0 0 3rem;
    padding: 0;
}

@media (max-width: 600px) {
    .research-projects-accordion { gap: 16px; }
    .research-project-accordion > summary { padding-right: 12px; gap: 16px; }
    .research-project-accordion > summary h2 { font-size: 1.25rem; line-height: 1.4; }
    .research-project-panel { grid-template-columns: minmax(0, 1fr); padding-right: 0; gap: 1.5rem; }
    .research-project-panel h3 { font-size: 1.2rem; line-height: 1.35; }
}

.research-project-panel--with-team > .research-project-team-card:only-child {
    grid-column: 1 / -1;
    max-width: 36rem;
}
