:root {
    --research-primary: #6366f1;
    --research-primary-dark: #4f46cf;
    --research-primary-light: #eef0ff;
    --research-text: #17203f;
    --research-muted: #687087;
    --research-bg: #fafbff;
    --research-card: #ffffff;
    --research-border: #e5e7eb;
    --research-shadow: 0 10px 28px rgba(23, 32, 63, .07);
    --research-radius: 14px;
    --research-max-width: 1180px;
}

* {
    box-sizing: border-box;
}

body {
    color: var(--research-text);
    background: radial-gradient(circle at 90% 12%, rgba(99,102,241,.055), transparent 26%),
                var(--research-bg);
}

.research-banner {
    position: relative;
    overflow: hidden;
    min-height: 145px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(90deg, rgba(238,240,255,.98) 0%, rgba(238,240,255,.91) 42%, rgba(214,218,255,.80) 100%),
        url("./assets/thin-banner.png");
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid #dfe2f4;
}

.research-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: 
        linear-gradient(90deg, rgba(99,102,241,.10), transparent 45%),
        radial-gradient(circle at 80% 50%, rgba(99,102,241,.12), transparent 34%);
}

.subpage-banner-content {
    position: relative;
    z-index: 1;
    width: min(var(--research-max-width), calc(100% - 44px));
    margin: 0 auto;
    padding: 24px 0;
}

.banner-kicker, .section-kicker {
    display: block;
    color: var(--research-primary-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.subpage-banner h1 {
    max-width: 820px;
    margin: 4px 0;
    font: 700 clamp(30px, 4vw, 48px) / 1.05 Georgia, serif;
    letter-spacing: -.8px;
}

.subpage-banner p {
    margin: 0;
    color: #4b5573;
    font-size: 14px;
}

.research-page {
    width: min(var(--research-max-width), calc(100% - 40px));
    margin: 28px auto 65px;
}

.research-intro {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 20px;
    align-items: center;
    padding: 26px 30px;
    margin-bottom: 30px;
    background: white;
    border: 1px solid var(--research-border);
    border-radius: var(--research-radius);
    box-shadow: var(--research-shadow);
}

.intro-icon {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--research-primary-light);
    color: var(--research-primary);
    font-size: 27px;
    box-shadow: inset 0 0 0 7px rgba(99,102,241,.06);
}

.research-intro h2 {
    margin: 4px 0 7px;
    font: 700 28px / 1.15 Georgia, serif;
}

.research-intro p {
    max-width: 900px;
    margin: 0;
    color: var(--research-muted);
    font-size: 14px;
}

.project-list {
    display: grid;
    gap: 22px;
}

.research-project {
    display: block;
    padding: 22px;
    background: var(--research-card);
    border: 1px solid var(--research-border);
    border-radius: var(--research-radius);
    box-shadow: var(--research-shadow);
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

.research-project:hover {
    transform: translateY(-2px);
    border-color: #d7d9f4;
    box-shadow: 0 14px 34px rgba(23, 32, 63, .10);
}

.research-project.featured {
    border-color: #cfd3f5;
    background: linear-gradient(135deg, rgba(238,240,255,.72), #fff 38%);
}


.project-content {
    width: 100%;
}

.project-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 7px;
}

.project-type, .project-student {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.project-type {
    color: var(--research-primary-dark);
    background: var(--research-primary-light);
}

.project-student {
    color: #58617a;
    background: #f1f3f8;
}

.research-project h2 {
    margin: 0 0 10px;
    font: 700 25px / 1.18 Georgia, serif;
}

.research-project p {
    margin: 0 0 11px;
    color: var(--research-muted);
    font-size: 14px;
    line-height: 1.65;
}

.research-project p:last-child {
    margin-bottom: 0;
}


.project-image {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-top: 24px;
    padding: 12px;
    overflow: hidden;
    background: linear-gradient(145deg, #eef0ff, #f9faff);
    border: 1px solid #e1e4f5;
    border-radius: 11px;
}

.project-image > img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 7px;
}

.project-image.tall-image > img {
    max-height: 85vh;
}

.multi-image {
    display: block;
    padding: 12px;
}

.multi-image > img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    margin: 0 auto 12px;
    border-radius: 7px;
}

.mini-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.mini-images img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
    padding: 4px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}


.secondary-project-image {
    margin: 24px 0 0;
    padding: 12px;
    background: #f8f9ff;
    border: 1px solid var(--research-border);
    border-radius: 9px;
}

.secondary-project-image img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    margin: auto;
}


.research-note {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 15px;
    align-items: center;
    max-width: 900px;
    margin: 35px auto 0;
    padding: 22px 25px;
    background: linear-gradient(145deg,#fff, #f4f5ff);
    border: 1px solid #e0e3f4;
    border-radius: var(--research-radius);
    box-shadow: var(--research-shadow);
}

.note-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: var(--research-primary);
    font-size: 20px;
}

.research-note h2 {
    margin: 0 0 4px;
    font: 700 20px Georgia, serif;
}

.research-note p {
    margin: 0;
    color: var(--research-muted);
    font-size: 13px;
}

.back-link {
    text-align: center;
    margin: 38px 0 0;
}

.button {
    display: inline-block;
    padding: 11px 20px;
    border: 1px solid var(--research-primary);
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
}

.button.primary {
    color: white;
    background: var(--research-primary);
}

.button.primary:hover {
    color: white;
    background: var(--research-primary-dark);
    text-decoration: none;
}


@media (max-width: 850px) {
    .research-project {
        padding: 20px;
    }
    .project-image {
        margin-top: 22px;
    }
    .project-image > img {
        max-width: 100%;
        max-height: 75vh;
    }
    .multi-image > img {
        max-height: 75vh;
    }
    .mini-images {
        grid-template-columns:
            repeat(3, 1fr);
    }
}

@media (max-width: 650px) {
    .research-page {
        width: min(calc(100% - 24px), var(--research-max-width));
    }

    .research-banner {
        min-height: 130px;
    }

    .subpage-banner-content {
        width: min(calc(100% - 28px), var(--research-max-width));
    }

    .subpage-banner h1 {
        font-size: 31px;
    }

    .research-intro {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .research-project {
        padding: 15px;
    }

    .research-project h2 {
        font-size: 22px;
    }

    .research-project p {
        font-size: 13.5px;
    }

    .project-image {
        margin-top: 20px;
        padding: 8px;
    }

    .project-image > img {
        max-width: 100%;
        max-height: 70vh;
    }

    .multi-image > img {
        max-width: 100%;
        max-height: 70vh;
    }

    .mini-images {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mini-images img {
        max-height: 250px;
    }

    .secondary-project-image img {
        max-height: 60vh;
    }

    .research-note {
        grid-template-columns: 1fr;
        padding: 20px;
    }
}