/* Small additions to the original jemdoc theme; no build step required. */
:root {
    color-scheme: light;
}

body {
    color: #222;
    font-family: Georgia, "Times New Roman", "Songti SC", SimSun, serif;
    font-size: 16px;
}

#layout-content {
    box-sizing: border-box;
    width: 100%;
    max-width: 1032px;
    padding: 0 16px 24px;
}

p, li {
    line-height: 1.45;
}

a {
    overflow-wrap: anywhere;
}

a:focus-visible {
    outline: 2px solid #224b8d;
    outline-offset: 4px;
}

.profile {
    display: grid;
    grid-template-columns: 134px minmax(0, 1fr) 179px;
    align-items: start;
    gap: 26px;
    padding: 0 8px;
    margin: 28px 0 18px;
}

.portrait {
    display: block;
    width: 134px;
    height: auto;
}

.portrait-link {
    justify-self: start;
}

.portrait-link:hover {
    border-bottom: none;
}

.profile-name {
    margin-bottom: 12px;
}

.name-cn {
    display: block;
    font-family: "Kaiti SC", STKaiti, KaiTi, serif;
    font-size: 32px;
    line-height: 1.25;
}

.name-en {
    display: block;
    font-size: 24px;
    line-height: 1.4;
}

.profile-details p {
    margin-bottom: 14px;
}

.affiliation-logos {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.affiliation-logos a {
    display: block;
}

.affiliation-logos img {
    display: block;
    object-fit: contain;
}

.pending {
    color: #686868;
    font-style: italic;
}

#layout-content section > h2:first-child {
    margin-top: 0.7em;
}

section li {
    margin-bottom: 7px;
}

address {
    font-style: normal;
    line-height: 1.45;
}

.page-footer {
    border-top: 1px solid #aaa;
    margin-top: 28px;
    padding-top: 9px;
    text-align: right;
    color: #686868;
    font-size: 13px;
}

@media (max-width: 760px) {
    #layout-content {
        padding: 0 20px 24px;
    }

    .profile {
        grid-template-columns: 120px minmax(0, 1fr);
        gap: 20px;
        padding: 0;
    }

    .portrait {
        width: 120px;
    }

    .affiliation-logos {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-end;
        gap: 24px;
    }

    .affiliation-logos .lamda-logo {
        width: 143px;
        height: 68px;
    }

    .affiliation-logos .nju-logo {
        width: 60px;
        height: 72px;
    }
}

@media (max-width: 480px) {
    .profile {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .affiliation-logos {
        justify-content: flex-start;
    }

    h1 {
        font-size: 150%;
        line-height: 1.25;
    }

    ul {
        padding-left: 22px;
    }
}

@media print {
    .profile {
        grid-template-columns: 134px minmax(0, 1fr) 150px;
    }

    .affiliation-logos {
        grid-column: auto;
        flex-direction: column;
    }

    .profile, h2, h3 {
        break-inside: avoid;
        break-after: avoid;
    }
}
