.cv-page {
    --cv-ink: #1d2928;
    --cv-muted: #475653;
    --cv-teal: #00675c;
    --cv-line: #d5dfdc;
    --cv-surface: #fafafa;
    max-width: 1080px;
    color: var(--cv-ink);
}

.cv-page > nav {
    border-color: var(--cv-line);
    margin-bottom: 2rem;
}

.cv-page > nav ul {
    flex-wrap: wrap;
    gap: .5rem 2rem;
}

.cv-article h2 {
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
    color: var(--cv-ink);
    font-weight: 600;
    letter-spacing: -.025em;
    line-height: 1.15;
}

.cv-layout {
    display: grid;
    grid-template-columns: minmax(0, 12rem) minmax(0, 69ch);
    align-items: start;
    justify-content: space-between;
    gap: clamp(2rem, 5vw, 4rem);
}

.cv-contents {
    position: sticky;
    top: 1.5rem;
    max-height: calc(100dvh - 3rem);
    overflow: auto;
    padding: .15rem .6rem .4rem .2rem;
    overscroll-behavior: contain;
    font-size: .87rem;
}

.cv-contents-title {
    color: var(--cv-ink);
    font-weight: 650;
    margin-bottom: .65rem;
}

.cv-contents ul,
.cv-contents-mobile ul {
    list-style: none;
    border-left: 1px solid var(--cv-line);
    padding-left: .8rem;
}

.cv-contents a,
.cv-contents-mobile a {
    display: block;
    color: var(--cv-muted);
    padding: .28rem 0;
    line-height: 1.4;
    text-decoration: none;
}

.cv-contents a:hover,
.cv-contents-mobile a:hover {
    color: var(--cv-teal);
    text-decoration: underline;
}

.cv-contents-mobile {
    display: none;
}

.cv-article {
    min-width: 0;
    font-size: 1.025rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
    text-wrap: pretty;
}

.cv-article h2 {
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    margin: clamp(2.6rem, 6vw, 4rem) 0 1.15rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--cv-line);
    scroll-margin-top: 1.5rem;
}

.cv-article #research-interests {
    margin-top: 0;
    padding-top: 0;
    border: 0;
}

.cv-article a {
    color: var(--cv-teal);
    text-decoration-thickness: .06em;
    text-underline-offset: .16em;
}

.cv-page a:focus-visible,
.cv-page summary:focus-visible {
    outline: 2px solid var(--cv-teal);
    outline-offset: 3px;
}

.cv-article ul,
.cv-article ol {
    margin: 0 0 1.15rem 1.35rem;
}

.cv-article li {
    padding-left: .2rem;
}

.cv-article li > p {
    margin-bottom: .35rem;
}

.cv-article .research-item {
    margin-bottom: 1.25rem;
}

.cv-article .publication-citation {
    margin-bottom: .65rem;
    line-height: 1.55;
}

.cv-article .publication-citation > a:first-of-type {
    font-weight: 650;
}

.cv-article p > small {
    display: block;
    color: var(--cv-muted);
    font-size: .875rem;
    line-height: 1.55;
}

.cv-article p:has(> small) {
    margin-bottom: .55rem;
}

.cv-article small strong {
    color: var(--cv-ink);
}

.cv-article .citation-key {
    color: var(--cv-muted);
    font-size: .88rem;
    margin-bottom: 1.2rem;
}

.cv-article hr {
    border: 0;
    border-top: 1px solid var(--cv-line);
    margin: 1.5rem 0;
}

@media (max-width: 800px) {
    .cv-page {
        max-width: 76ch;
        padding: 1.5rem clamp(1rem, 5vw, 2rem);
    }

    .cv-layout {
        display: block;
    }

    .cv-contents {
        display: none;
    }

    .cv-contents-mobile {
        display: block;
        position: sticky;
        top: 0;
        z-index: 1;
        padding: .25rem 0;
        background: var(--cv-surface);
        border-bottom: 1px solid var(--cv-line);
        margin-bottom: 1.6rem;
    }

    .cv-contents-mobile summary {
        cursor: pointer;
        padding: .55rem 0;
        font-weight: 650;
    }

    .cv-contents-mobile ul {
        max-height: min(55dvh, 23rem);
        overflow: auto;
        overscroll-behavior: contain;
        margin: .25rem 0 .55rem;
    }

    .cv-contents-mobile a {
        padding-block: .55rem;
    }

    .cv-article h2 {
        scroll-margin-top: 4.25rem;
    }
}

@media print {
    .cv-page > nav,
    .cv-contents,
    .cv-contents-mobile {
        display: none;
    }

    .cv-layout {
        display: block;
    }

    .cv-page {
        padding: 0;
        border: 0;
        background: white;
    }

    .cv-article h2 {
        break-after: avoid;
    }
}

.cv-article .cv-aims > li {
    margin-bottom: 1rem;
}

.cv-article .cv-aims > li > p + p {
    margin-top: .5rem;
}

.cv-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.cv-page > nav [aria-current="page"] {
    color: var(--cv-teal);
    font-weight: 650;
}

.cv-article #honors-awards + ul > li {
    padding-block: .4rem;
}

.cv-article #honors-awards + ul > li::marker {
    color: var(--cv-teal);
}

.cv-article #honors-awards + ul strong {
    color: var(--cv-ink);
}

.cv-article .publication-abstract {
    color: var(--cv-muted);
    font-size: .96rem;
}

.cv-contents a[aria-current="location"],
.cv-contents-mobile a[aria-current="location"] {
    color: var(--cv-teal);
    font-weight: 650;
}

.cv-contents::before {
    content: "";
    position: absolute;
    top: 0;
    left: .14rem;
    width: 2px;
    height: var(--marker-height, 0);
    transform: translateY(var(--marker-top, 0));
    background: var(--cv-teal);
    pointer-events: none;
}

.cv-page::before {
    content: "";
    position: fixed;
    z-index: 3;
    inset: 0 0 auto;
    height: 2px;
    background: var(--cv-teal);
    transform: scaleX(var(--reading-progress, 0));
    transform-origin: left;
    pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
    html:has(.cv-page) {
        scroll-behavior: smooth;
    }

    .cv-contents::before {
        transition: transform 340ms cubic-bezier(.2,.65,.25,1), height 240ms ease;
    }

    .cv-page::before {
        transition: transform 140ms ease-out;
    }

    .cv-contents a,
    .cv-contents-mobile a,
    .cv-article a {
        transition: color 160ms ease, text-decoration-color 160ms ease;
    }
}

@media print {
    .cv-page::before {
        display: none;
    }
}
