@charset "utf-8";
body {
    font-family: "Lato", sans-serif;
    font-weight: 400;
    padding-top: 5.0rem;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 700;
}

.card {
    border-radius: 0.8rem!important;
}

.card-img-overlay {
    border-radius: 0.8rem!important;
}

.rounded-xl {
    border-radius: 0.8rem!important;
}

.rounded-xl-bottom {
    border-bottom-right-radius: 0.8rem !important;
    border-bottom-left-radius: 0.8rem !important;
}

.rounded-xl-top {
    border-top-left-radius: 0.8rem !important;
    border-top-right-radius: 0.8rem !important;
}


.text-profile-position {
    font-weight: 400;
}

.text-profile-bio {
    /* font-family: "Raleway"; */
    font-weight: 400;
}

.navbar {
    background-color: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Bilingual content: English is visible unless the visitor explicitly selects Chinese. */
.lang-zh {
    display: none;
}

html.lang-zh-active .lang-en {
    display: none !important;
}

html.lang-zh-active .lang-zh {
    display: inline;
}

html.lang-zh-active div.lang-zh,
html.lang-zh-active p.lang-zh {
    display: block;
}

.language-toggle {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.65rem;
    color: rgba(0, 0, 0, 0.65);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 999px;
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.35;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.language-toggle:hover,
.language-toggle:focus {
    color: rgba(0, 0, 0, 0.9);
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.28);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.12);
    outline: none;
}

@media (max-width: 575.98px) {
    .language-toggle {
        margin-top: 0.4rem;
        margin-bottom: 0.55rem;
    }
}

.education-meta {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
}

.education-position {
    min-width: 0;
}

.education-date {
    flex-shrink: 0;
    margin-left: auto;
}

.teaching-card .teaching-logo {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    object-fit: contain;
    flex: 0 0 auto;
}

.teaching-course-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: baseline;
}

.teaching-course-name {
    font-weight: 600;
}

.teaching-course-terms {
    text-align: right;
}

@media (max-width: 767.98px) {
    .teaching-course-row {
        display: block;
    }

    .teaching-course-terms {
        display: block;
        margin-top: 0.1rem;
        text-align: left;
    }
}

/* A half-width education column needs a stacked date so long English names never collide. */
@media (min-width: 992px) {
    .education-card-column.col-lg-6 .education-meta {
        display: block;
    }

    .education-card-column.col-lg-6 .education-date {
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    .education-meta {
        display: block;
    }

    .education-date {
        margin-left: 0;
    }
}

.inline-badge {
    height: 16px;
    vertical-align: -10%;
    margin-right: 2px;
    line-break: unset;
}

.no-break {
    white-space: nowrap;
}

.cover-image {
    width: 180px;
    max-height: 120px;
}

.abstract-body {
    min-height: 100px;
}

img.lazy {
    background-image: url('images/loading.gif');
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: 50px 50px;
    min-height: 80px;
}

div.lazy {
    background-image: url('images/loading.gif');
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: 50px 50px;
    min-height: 80px;
}

.badge-publication {
    font-size: 100%;
}

#patents,
[id^="year-"] {
    scroll-margin-top: 5.5rem;
}

.email-text {
    font-family: Source Code Pro, monospace;
}
