/* Layout overrides for the avicenna theme */

:root {
    --meta-font: 'IBM Plex Sans', sans-serif;
    --meta-weight: 300;
}

body {
    color: #2b2b2b;
}

/* metadata text: email, venues, author lists, links, dates */
.pub-venue,
.pub-authors,
.pub-links,
.sidebar .news-date {
    font-family: var(--meta-font);
    font-weight: var(--meta-weight);
}

/* ---------- Header ---------- */

.intro-grid {
    margin-top: 2rem;
}

.intro-side #profile_picture {
    width: 100%;
    max-width: 210px;
    height: auto;
    border-radius: 50%;
    margin: 0 0 .75rem;
    display: block;
}

.intro-side #full_name {
    font-size: x-large;
}

/* Chinese name: self-hosted 3-glyph subsets (see static/fonts/). Swap the family below. */
@font-face {
    font-family: 'Long Cang';
    src: url('../fonts/longcang-name.woff2') format('woff2');
    font-display: swap;
}

.intro-side .cjk-name {
    font-family: 'Long Cang', 'Kaiti SC', serif;
    font-weight: 400;
    font-size: 1.15em;
    white-space: nowrap;
}

.intro-side .cjk-sep {
    margin: 0 .35em;
    font-weight: 300;
    opacity: .55;
}

.intro-side .affiliations {
    font-size: .95rem;
    font-weight: 300;
    color: #333;
}

.intro-side #email {
    font-family: 'Inter', sans-serif;
    font-size: .95rem;
    font-weight: 300;
    color: #333;
    margin-top: .1rem;
}

.intro-side .socials {
    margin-top: .6rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: .8rem;
}

.intro-side .socials a,
.intro-side .socials a:hover,
.intro-side .socials a:focus {
    text-decoration: none;
}

.intro-side .socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    line-height: 1;
}

.intro-side .socials svg {
    width: 22px;
    height: 22px;
}

.intro-side .socials .ai {
    font-size: 24px;
    line-height: 1;
}

.intro-side .interests-block {
    margin-top: .8rem;
    margin-bottom: 0;
    font-size: .95rem;
    font-weight: 300;
    line-height: 1.5;
    color: #333;
}

.intro-main .announcement {
    border-left: 4px solid #8C1515;
    background: #faf5f5;
    padding: .75rem 1rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.intro-main .announcement p:last-child {
    margin-bottom: 0;
}

.intro-main .introduction {
    font-weight: 300;
    font-size: .97rem;
    line-height: 1.6;
    color: #333;
}

/* ---------- Body grid ---------- */

.body-grid {
    margin-top: 1rem;
}

.body-grid .section-title {
    margin-top: 1.5rem;
    margin-bottom: .75rem;
}

.sidebar .news_list {
    padding: 0;
    list-style: none;
}

.sidebar .news_list li {
    margin-bottom: .6rem;
    font-size: .85rem;
    font-weight: 300;
    line-height: 1.45;
}

.sidebar .news-date {
    display: block;
    font-size: .78rem;
}

.sidebar .award_list {
    padding: 0;
    list-style: none;
}

.sidebar .award_list li {
    margin-bottom: .6rem;
    font-size: .85rem;
    font-weight: 300;
    line-height: 1.45;
}

/* ---------- Publication cards ---------- */

.pub-group-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #2b2b2b;
    margin-top: 1.4rem;
    margin-bottom: 1.2rem;
    padding-bottom: .3rem;
    border-bottom: 1px solid #e6e0e0;
}

.pub-note {
    font-size: .78rem;
    margin-left: .25rem;
}

.pub-authors sup {
    font-size: .75em;
    top: -.35em;
    line-height: 0;
}

.pub-award {
    font-style: normal;
}

.pub-group-title:first-child {
    margin-top: 0;
}

.pub-card {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: .5rem 0;
    margin-bottom: 1rem;
}

.pub-thumb {
    flex: 0 0 240px;
}

.pub-thumb img {
    width: 240px;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto;
}

.pub-thumb-empty {
    width: 240px;
    height: 90px;
    border-radius: 4px;
    border: 1px solid #eee;
    background: repeating-linear-gradient(135deg, #f3efef 0 10px, #faf7f7 10px 20px);
}

.pub-body {
    flex: 1 1 auto;
    min-width: 0;
}

.pub-title {
    font-weight: 400;
    line-height: 1.35;
}

.pub-venue {
    font-style: italic;
    font-size: .85rem;
    margin-top: .15rem;
}

.pub-authors {
    font-size: .85rem;
    margin-top: .15rem;
}

.pub-authors .author-me {
    color: #8c1515a3;
}

.pub-links {
    font-size: .85rem;
    margin-top: .3rem;
}

/* ---------- Mobile ---------- */

@media (max-width: 767.98px) {
    body.container {
        overflow-x: hidden;
    }
    .row.w-100 {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .intro-side {
        margin-bottom: 1rem;
    }
    .intro-main .introduction,
    .text-justify {
        text-align: left !important;
    }
    .pub-card {
        flex-direction: column;
    }
    .pub-thumb,
    .pub-thumb img,
    .pub-thumb-empty {
        width: 100%;
        flex-basis: auto;
    }
    .pub-thumb img {
        max-height: 200px;
    }
    .pub-thumb-empty {
        height: 90px;
    }
}
