:root {
    --research-ink: var(--institute-ink, #12263f);
    --research-ink-soft: var(--institute-ink-soft, #5d6e80);
    --research-paper: var(--institute-paper, #f7f9fc);
    --research-surface: var(--institute-surface, #ffffff);
    --research-line: var(--institute-line, rgba(18, 38, 63, 0.15));
    --research-accent: var(--institute-accent, #c0272c);
    --research-accent-dark: var(--institute-accent-dark, #9e1f24);
    --research-green: var(--institute-green, #0e7b04);
    --research-muted: #8994a1;
}

body.investigation-page {
    background: var(--research-paper);
    color: var(--research-ink);
    overflow-x: visible;
}

#projectos,
#linhas-investigacao {
    scroll-margin-top: 6rem;
}

body.institute-page.investigation-page {
    overflow: visible;
}

.research-shell {
    width: min(100% - 3rem, 1380px);
    margin-inline: auto;
}

.research-skip-link {
    position: fixed;
    top: 0.75rem;
    left: 1rem;
    z-index: 1100;
    padding: 0.7rem 1rem;
    background: var(--research-surface);
    color: var(--research-ink);
    transform: translateY(-180%);
    transition: transform 180ms ease;
}

.research-skip-link:focus {
    transform: translateY(0);
}

.research-hero {
    position: relative;
    overflow: visible;
    min-height: min(720px, calc(100dvh - 70px));
    padding: 7.2rem max(1.5rem, calc((100vw - 1320px) / 2)) 2.5rem;
    isolation: isolate;
    background: var(--institute-night, #123b82) url("../img/img-ip/laboratorio.png") center / cover no-repeat;
    color: #fff;
}

.research-hero::before,
.research-hero::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

.research-hero::before {
    z-index: 0;
    inset: 0;
    background: rgba(23, 69, 161, 0.74);
}

.research-hero::after {
    display: none;
}

.research-hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-items: center;
    max-width: 1320px;
    min-height: 565px;
    margin: 0 auto;
}

.research-hero__copy {
    max-width: 900px;
}

.research-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: clamp(3rem, 8vw, 6.5rem);
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.research-breadcrumb a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 180ms ease;
}

.research-breadcrumb a:hover {
    color: #fff;
}

.research-kicker,
.research-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.25rem;
    color: var(--research-accent);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    line-height: 1.4;
    text-transform: uppercase;
}

.research-hero .research-kicker > span {
    display: none;
}

.research-eyebrow::before {
    content: none;
}

.research-hero h1 {
    max-width: 760px;
    margin: 0;
    color: #fff;
    font-size: clamp(3.2rem, 6.8vw, 6.4rem);
    font-weight: 800;
    letter-spacing: -0.075em;
    line-height: 0.92;
    text-wrap: balance;
}

.research-hero__lead {
    max-width: 58ch;
    margin: 2rem 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.8;
}

.research-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.research-button {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.95rem 1.2rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.research-button:hover {
    transform: translateY(-2px);
}

.research-button--accent {
    background: var(--research-accent);
    color: #fff;
}

.research-button--accent:hover {
    background: #d06d53;
    color: #fff;
}

.research-button--dark {
    border-color: var(--research-ink);
    background: var(--research-ink);
    color: #fff;
}

.research-button--dark:hover {
    background: var(--research-accent);
    border-color: var(--research-accent);
    color: #fff;
}

.research-text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 180ms ease, gap 180ms ease;
}

.research-text-link:hover {
    gap: 0.8rem;
    color: #fff;
}

.research-hero__signal {
    position: relative;
    min-height: 430px;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.17);
    background: rgba(255, 255, 255, 0.04);
}

.research-hero__signal::before {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--research-accent);
    box-shadow: 0 0 0 0.3rem rgba(187, 91, 67, 0.12);
    content: "";
}

.research-hero__signal-top,
.research-hero__signal-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.research-orbit {
    position: relative;
    display: grid;
    place-items: center;
    width: min(100%, 360px);
    aspect-ratio: 1;
    margin: 2.5rem auto 2rem;
}

.research-orbit__ring,
.research-orbit__core {
    position: absolute;
    border-radius: 50%;
}

.research-orbit__ring {
    border: 1px solid rgba(255, 255, 255, 0.23);
}

.research-orbit__ring--outer {
    inset: 3%;
}

.research-orbit__ring--inner {
    inset: 24%;
    border-color: rgba(187, 91, 67, 0.72);
}

.research-orbit__core {
    width: 22%;
    aspect-ratio: 1;
    background: var(--research-accent);
    box-shadow: 0 0 0 1.2rem rgba(187, 91, 67, 0.08), 0 0 0 3rem rgba(187, 91, 67, 0.04);
}

.research-orbit__label {
    position: absolute;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.research-orbit__label::before {
    display: inline-block;
    width: 0.4rem;
    height: 0.4rem;
    margin-right: 0.5rem;
    border-radius: 50%;
    background: currentColor;
    content: "";
    vertical-align: 0.08em;
}

.research-orbit__label--one { top: 12%; left: 7%; }
.research-orbit__label--two { top: 46%; right: 0; }
.research-orbit__label--three { bottom: 13%; left: 22%; }

.research-hero__signal-line,
.research-hero__foot-line {
    display: block;
    height: 1px;
    flex: 1 1 auto;
    background: rgba(255, 255, 255, 0.22);
}

.research-hero__signal-bottom {
    gap: 0.9rem;
}

.research-hero__foot {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0;
    color: rgba(255, 255, 255, 0.46);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.research-hero__foot-line {
    max-width: 8rem;
}

.research-hero__visual {
    margin: 0;
}

.research-overview,
.research-projects,
.research-cta {
    padding: clamp(5rem, 9vw, 9rem) 0;
}

.research-overview {
    background: var(--research-paper);
}

.research-section-grid {
    display: grid;
    grid-template-columns: minmax(9rem, 0.25fr) minmax(0, 1fr);
    gap: clamp(2rem, 8vw, 8rem);
}

.research-section-index {
    color: var(--research-accent);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.research-section-index span {
    display: block;
    margin-top: 0.7rem;
    color: var(--research-muted);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
}

.research-section-heading {
    max-width: 900px;
}

.research-section-heading.institute-section__heading {
    max-width: none;
}

.research-section-heading.institute-section__heading > p:last-child {
    grid-column: 2;
    max-width: 62ch;
}

.research-section-heading h2,
.research-projects__header h2,
.research-cta h2 {
    max-width: 850px;
    margin: 0;
    color: var(--research-ink);
    font-size: clamp(2.5rem, 5vw, 5.2rem);
    font-weight: 800;
    letter-spacing: -0.07em;
    line-height: 0.98;
    text-wrap: balance;
}

.research-section-heading > p:last-child {
    max-width: 62ch;
    margin: 2rem 0 0;
    color: var(--research-ink-soft);
    font-size: 1rem;
    line-height: 1.85;
}

.research-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: clamp(3rem, 7vw, 6rem);
    border-top: 1px solid var(--research-line);
}

.research-metric {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.5rem 1rem 0 0;
    border-right: 1px solid var(--research-line);
}

.research-metric:last-child {
    border-right: 0;
}

.research-metric strong {
    color: var(--research-accent);
    font-size: clamp(2.6rem, 5vw, 4.3rem);
    font-weight: 800;
    letter-spacing: -0.08em;
    line-height: 0.9;
}

.research-metric span {
    color: var(--research-ink-soft);
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.5;
    text-transform: uppercase;
}

.research-data-note {
    max-width: 70ch;
    margin: 1.4rem 0 0;
    color: var(--research-muted);
    font-size: 0.72rem;
    line-height: 1.65;
}

.research-projects {
    border-top: 1px solid var(--research-line);
    background: var(--research-surface);
}

.research-projects__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 0.45fr);
    gap: 3rem;
    align-items: end;
}

.research-projects__header h2 {
    max-width: 760px;
    font-size: clamp(2.2rem, 4.3vw, 4.5rem);
}

.research-projects__intro {
    max-width: 30ch;
    margin: 0 0 0.25rem;
    color: var(--research-ink-soft);
    font-size: 0.95rem;
    line-height: 1.8;
}

.research-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: clamp(3rem, 5vw, 5rem) 0 1rem;
}

.research-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.95rem;
    border: 1px solid var(--research-line);
    background: transparent;
    color: var(--research-ink-soft);
    cursor: pointer;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.research-filter span {
    color: var(--research-accent);
}

.research-filter:hover,
.research-filter.is-active {
    border-color: var(--research-ink);
    background: var(--research-ink);
    color: #fff;
}

.research-project-list {
    border-top: 1px solid var(--research-ink);
}

.research-funder {
    display: grid;
    grid-template-columns: minmax(9rem, 0.25fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    padding: 2rem 0;
    border-bottom: 1px solid var(--research-line);
}

.research-funder__identity {
    align-self: start;
    padding-top: 0.25rem;
}

.research-funder__count {
    display: block;
    margin-bottom: 1rem;
    color: var(--research-accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.research-funder__identity h3 {
    margin: 0;
    color: var(--research-ink);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.research-funder__identity > span:last-child {
    display: block;
    margin-top: 0.55rem;
    color: var(--research-muted);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.research-funder__projects {
    border-top: 1px solid var(--research-line);
}

.research-project-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(11rem, 0.36fr) 1rem;
    gap: 1rem;
    align-items: center;
    min-height: 7.2rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--research-line);
    transition: opacity 180ms ease, background-color 180ms ease;
}

.research-project-row:last-child {
    border-bottom: 0;
}

.research-project-row:hover {
    background: rgba(247, 245, 240, 0.72);
}

.research-project-row__number {
    color: var(--research-muted);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.research-project-row__main h4 {
    margin: 0;
    color: var(--research-ink);
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.3;
}

.research-project-row__main p {
    margin: 0.55rem 0 0;
    color: var(--research-ink-soft);
    font-size: 0.78rem;
    line-height: 1.5;
}

.research-project-row__main .research-project-row__summary {
    max-width: 58ch;
    margin-top: 0.35rem;
    color: var(--research-muted);
    font-size: 0.74rem;
    line-height: 1.6;
}

.research-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--research-ink-soft);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.45;
}

.research-status::before {
    display: block;
    width: 0.5rem;
    height: 0.5rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--research-muted);
    content: "";
}

.research-status--ongoing::before { background: var(--research-green); }
.research-status--finished::before { background: var(--research-accent); }
.research-status--implementation::before { background: #c09b56; }

.research-project-row__arrow {
    align-self: start;
    padding-top: 0.35rem;
    color: var(--research-accent);
    font-size: 0.95rem;
}

.research-filter-empty {
    margin: 1.5rem 0 0;
    padding: 1.5rem;
    border: 1px dashed var(--research-line);
    color: var(--research-ink-soft);
    text-align: center;
}

.research-impacts {
    padding: clamp(5rem, 9vw, 9rem) 0;
    background: var(--research-ink);
    color: #fff;
}

.research-section-grid--dark {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-items: start;
}

.research-section-grid--dark > .research-section-index {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.research-section-grid--dark > .research-section-index span {
    display: inline;
    margin: 0;
}

.research-section-index--light,
.research-eyebrow--light {
    color: #e09a83;
}

.research-section-heading--light h2 {
    color: #fff;
}

.research-impacts .research-section-heading {
    background: transparent !important;
}

.research-impacts .research-section-heading .research-eyebrow {
    color: #e8b1a2 !important;
}

.research-impacts .research-impact-card p,
.research-impacts .research-impact-card__details dd {
    color: rgba(255, 255, 255, 0.72) !important;
}

.research-impacts .research-impact-card__context {
    color: #e8b1a2 !important;
}

.research-impact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(15rem, 0.75fr);
    gap: 1px;
    margin-top: clamp(3rem, 6vw, 6rem);
    background: rgba(255, 255, 255, 0.16);
}

.research-impact-card {
    min-height: 100%;
    padding: clamp(1.6rem, 3vw, 2.5rem);
    background: var(--research-ink);
}

.research-impact-card--featured {
    grid-row: span 2;
    min-height: 100%;
    padding: clamp(2rem, 4vw, 4rem);
    background: #1c3855;
}

.research-impact-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #e09a83;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.research-impact-card h3 {
    max-width: 17ch;
    margin: 2rem 0 0;
    color: #fff;
    font-size: clamp(1.7rem, 3.1vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1;
}

.research-impact-card:not(.research-impact-card--featured) h3 {
    margin-top: 1.3rem;
    font-size: clamp(1.5rem, 2.3vw, 2.2rem);
}

.research-impact-card p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    line-height: 1.8;
}

.research-impact-card__context {
    margin: 0.9rem 0 1.5rem;
    color: #e09a83 !important;
    font-size: 0.7rem !important;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.research-impact-card > p:not(.research-impact-card__context) {
    margin: 1.5rem 0 0;
}

.research-impact-card__details {
    display: grid;
    gap: 1.25rem;
    margin: 2.3rem 0 0;
}

.research-impact-card__details div {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.research-impact-card__details dt {
    color: rgba(255, 255, 255, 0.44);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.research-impact-card__details dd {
    margin: 0.5rem 0 0;
    color: rgba(255, 255, 255, 0.77);
    font-size: 0.85rem;
    line-height: 1.7;
}

.research-cta {
    background: var(--research-paper);
}

.research-cta__inner {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 3rem;
    padding-bottom: 0;
}

.research-cta h2 {
    max-width: 700px;
    font-size: clamp(2.4rem, 4.8vw, 5rem);
}

@media (max-width: 1100px) {
    .research-hero__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .research-hero h1 {
        font-size: clamp(3.1rem, 6.3vw, 5.5rem);
    }

    .research-project-row {
        grid-template-columns: minmax(0, 1fr) minmax(9rem, 0.42fr) 1rem;
    }
}

@media (max-width: 820px) {
    .research-shell {
        width: min(100% - 2rem, 680px);
    }

    .research-hero {
        min-height: 680px;
        padding: 4.3rem 1.3rem 1.8rem;
    }

    .research-hero__grid,
    .research-section-grid,
    .research-projects__header,
    .research-funder,
    .research-impact-grid {
        grid-template-columns: 1fr;
    }

    .research-hero__grid {
        min-height: 560px;
    }

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

    .research-hero__signal {
        min-height: 350px;
        margin-top: 1rem;
    }

    .research-section-grid {
        gap: 1.5rem;
    }

    .research-section-heading.institute-section__heading > p:last-child {
        margin-top: 1.4rem;
    }

    .research-section-index {
        display: flex;
        align-items: center;
        gap: 0.8rem;
    }

    .research-section-index span {
        display: inline;
        margin: 0;
    }

    .research-projects__intro {
        margin-top: -1.5rem;
    }

    .research-funder {
        gap: 1.5rem;
    }

    .research-funder__identity {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 1rem;
        align-items: baseline;
    }

    .research-funder__count {
        grid-row: span 2;
        margin: 0;
    }

    .research-funder__identity > span:last-child {
        grid-column: 2;
        margin-top: 0.2rem;
    }

    .research-project-row {
        grid-template-columns: minmax(0, 1fr) 1rem;
        gap: 0.75rem;
    }

    .research-status {
        grid-column: 1;
        grid-row: 2;
        margin-top: -0.2rem;
    }

    .research-project-row__arrow {
        grid-column: 2;
        grid-row: 1;
    }

    .research-impact-card--featured {
        grid-row: auto;
    }

    .research-cta__inner {
        align-items: start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .research-hero h1 {
        font-size: clamp(2.7rem, 14vw, 4.4rem);
    }

    .research-hero__lead {
        font-size: 0.95rem;
    }

    .research-hero__foot {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.65rem;
    }

    .research-hero__foot-line {
        width: 3rem;
        flex: 0 0 auto;
    }

    .research-metrics {
        grid-template-columns: 1fr;
    }

    .research-metric {
        border-right: 0;
        border-bottom: 1px solid var(--research-line);
        padding-bottom: 1.25rem;
    }

    .research-metric:last-child {
        border-bottom: 0;
    }

    .research-filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .research-filter {
        justify-content: space-between;
    }
}

@media (prefers-reduced-motion: reduce) {
    .research-button,
    .research-text-link,
    .research-filter,
    .research-project-row,
    .research-breadcrumb a {
        transition: none;
    }
}
