/* ================================ */
/* == Research (/research/)      == */
/* ================================ */
/* Loaded after style.css on the research page only, which is also served on its own at
   research.jagritvats.com. It reuses the tokens, the section heads and the hero type, and
   adds the paper list: meta line, title, the certified result in a mat, summary and links. */

/* == Page head == */
.research-head {
    max-width: var(--page);
    margin: 0 auto;
    padding: clamp(3rem, 8vw, 5.5rem) var(--gutter) 0;
}

.research-head__title {
    font-size: clamp(2.75rem, 1.8rem + 4vw, 4.5rem);
    font-weight: 800;
    font-stretch: 125%;
    line-height: 0.97;
    letter-spacing: -0.035em;
}

.research-head .hero__summary {
    max-width: var(--measure);
}

.research-head__ids {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
}

.research-toc {
    margin-top: clamp(2rem, 5vw, 2.75rem);
}

.research-toc ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.research-toc li {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    background-color: var(--mat-bg);
    border: 1px solid var(--mat-border);
    border-radius: 999px;
    box-shadow: var(--mat-highlight);
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
}

.research-toc a {
    text-decoration: none;
}

.research-toc a:hover {
    text-decoration: underline;
    text-decoration-color: var(--link-line);
}

.research-toc span {
    font-weight: 500;
    color: var(--ink-faint);
    font-variant-numeric: tabular-nums;
}

.research-group__intro {
    max-width: var(--measure);
    margin-top: 0.6rem;
    font-size: 1.0625rem;
    color: var(--ink-soft);
}

/* == One paper == */
.papers {
    margin: 0;
    padding: 0;
    list-style: none;
}

.paper {
    padding: clamp(1.75rem, 4vw, 2.5rem) 0;
    border-top: 1px solid var(--rule);
}

.paper:first-child {
    padding-top: 0;
    border-top: 0;
}

.paper article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 21rem);
    grid-template-areas:
        "meta    ."
        "title   result"
        "summary result"
        "links   result";
    column-gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.paper__meta {
    grid-area: meta;
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.9rem;
    font-family: var(--font-display);
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--ink-faint);
}

.paper__kind {
    font-weight: 700;
    color: var(--signal-ink);
}

.paper__title {
    grid-area: title;
    max-width: 44rem;
    margin-top: 0.35rem;
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
    font-weight: 700;
    font-stretch: 104%;
    line-height: 1.2;
    letter-spacing: -0.012em;
    text-wrap: balance;
}

.paper__summary {
    grid-area: summary;
    max-width: var(--measure);
    margin-top: 0.75rem;
    font-size: 1.0625rem;
}

.paper__result {
    grid-area: result;
    margin-top: 0.35rem;
    padding: 0.9rem 1.1rem 1rem;
    background-color: var(--mat-bg);
    border: 1px solid var(--mat-border);
    box-shadow: var(--mat-highlight), var(--mat-shadow);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 0.9375rem;
    line-height: 1.45;
    color: var(--ink-soft);
}

.paper__figure {
    display: block;
    margin-bottom: 0.3rem;
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
    font-weight: 700;
    font-stretch: 106%;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.paper__links {
    grid-area: links;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.5rem;
    margin-top: 1rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
}

.paper__doi {
    font-weight: 400;
    color: var(--ink-faint);
}

/* == Closing note == */
.research-note p {
    max-width: var(--measure);
    font-size: 1.0625rem;
}

.research-note .research-note__updated {
    margin-top: 0.75rem;
    font-family: var(--font-display);
    font-size: 0.875rem;
    color: var(--ink-faint);
}

@media (max-width: 900px) {
    .paper article {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "meta"
            "title"
            "result"
            "summary"
            "links";
    }

    .paper__result {
        max-width: var(--measure);
        margin-top: 1rem;
    }
}

.paper__result sub,
.paper__result sup {
    font-size: 0.68em;
    line-height: 0;
}
