:root {
    --main-color: #5daae0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding-top: 1rem;
    padding-bottom: 4rem;
    color: #333;
    font-family: "Open Sans", sans-serif;
}

.container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
}

.profile-width {
    display: grid;
    grid-template-columns: minmax(0, max-content);
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
}

.profile-header {
    --profile-height: clamp(170px, 12vw, 220px);

    display: flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    gap: clamp(2rem, 4vw, 4rem);
    margin: 1rem 0;
}

.profile-photo {
    flex: 0 0 var(--profile-height);
    width: var(--profile-height);
    height: var(--profile-height);
}

.profile-photo img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 10%;
}

.profile-info {
    display: flex;
    flex: 0 1 auto;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    height: var(--profile-height);
}

.profile-info h1 {
    margin: 0 0 1.2rem;
    font-size: clamp(2.5rem, 4vw, 4.5rem);
    line-height: 1.05;
}

.chinese-name {
    display: inline-block;
    margin-left: 0.3em;
    color: #888;
    font-size: 0.55em;
    font-weight: 300;
    letter-spacing: 0.15em;
    vertical-align: middle;
    white-space: nowrap;
}

.profile-contact {
    margin: 0 0 1.2rem;
    font-style: normal;
    font-size: clamp(1rem, 1.5vw, 1.35rem);
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.contact-item {
    display: inline-block;
    color: #333;
    white-space: nowrap;
}

.separator {
    margin: 0 0.2rem;
    color: #333;
    font-size: 1.4rem;
    line-height: 1;
}

.scholar-link,
.scholar-link:hover {
    color: #039be5;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 18px;
    background: #e0e0e0;
    font-size: 1rem;
    white-space: nowrap;
}

.profile-content {
    width: 0;
    min-width: 100%;
}

.section-header {
    margin: 1.5rem 0 1rem;
    font-size: 2.2rem;
    font-weight: 400;
    line-height: 1.2;
}

.biography-section p {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.5;
    text-align: justify;
    hyphens: auto;
    overflow-wrap: anywhere;
    word-break: normal;
}

.biography-section p a {
    hyphens: auto;
    overflow-wrap: anywhere;
    word-break: normal;
}

.publications-section {
    margin-top: 2rem;
}

.publication-item {
    width: 100%;
}

.publication-item h3 {
    margin: 1.5rem 0 0.3rem;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: break-word;
}

.pub-details {
    font-size: 1.2rem;
    line-height: 1.5;
    overflow-wrap: break-word;
}

.ultrabold {
    font-weight: 800;
    text-decoration: underline;
    -webkit-text-stroke: 0.2px currentColor;
}

.pub-venue {
    font-style: italic;
    font-weight: 800;
    -webkit-text-stroke: 0.2px currentColor;
}

.link {
    color: #039be5;
    background: linear-gradient(
        to bottom,
        var(--main-color) 0%,
        var(--main-color) 100%
    );
    background-position: 0 100%;
    background-repeat: repeat-x;
    background-size: 4px 0;
    text-decoration: none;
    transition: background-size 0.08s;
}

.link:hover {
    background-size: 4px 3px;
}

@media screen and (max-width: 600px) {
    .profile-header {
        --profile-height: clamp(170px, 52vw, 220px);

        flex-direction: column;
        width: 100%;
        gap: 1.5rem;
    }

    .profile-info {
        align-items: center;
        width: 100%;
        height: auto;
        text-align: center;
    }

    .profile-tags {
        justify-content: center;
    }

    .biography-section p {
        text-align: left;
    }
}