/* paper-box 布局：强制图片在左、文字在右，兼容 GitHub Pages */
.paper-box {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start;
    align-items: center;
    gap: 1.2em;
}

.paper-box .paper-box-image {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    width: 160px !important;
    min-width: 160px !important;
}

.paper-box .paper-box-text {
    flex: 1;
    min-width: 0;
}

@media screen and (max-width: 600px) {
    .paper-box {
        flex-direction: column !important;
        align-items: center;
    }
    .paper-box .paper-box-image {
        width: auto !important;
        min-width: unset !important;
    }
}

/* Education: logo + text 同一行 */
.education-item {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 1em;
    margin-bottom: 0.8em;
    padding: 0.5em 0;
}

.education-item .education-logo {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.education-item .education-logo img {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.education-item .education-text {
    flex: 1 !important;
    min-width: 0;
    font-size: 1em;
    line-height: 1.5;
}

/* Internship logos: 所有 logo 在同一行 */
.internship-logos {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 2em;
    margin: 1em 0 0.5em;  /* top, side, bottom — bottom 控制 logo 行与下方文字列表的距离 */
}

.internship-logos img {
    /* Default height — overridden per-logo by inline style="height: XXpx !important;"
       in _pages/about.md (see the internship-logos <div> there). */
    height: 40px !important;
    width: auto !important;
    max-width: 200px !important;
    max-height: 40px !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    margin: 0 !important;
}
