/* ================= 全局设置 ================= */
body {
    font-family: 'Lato', Verdana, Helvetica, sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #fff;
    /* 防止手机端横向滚动 */
    overflow-x: hidden; 
}

a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    /* 手机端加一点内边距，防止贴边 */
    width: 100%; 
    box-sizing: border-box; 
}

/* ================= 语言切换按钮 ================= */
.lang-switch-container {
    text-align: right;
    margin-bottom: 20px;
    font-size: 14px;
}
.lang-btn {
    background: none; border: none; cursor: pointer;
    font-size: 13px;
    color: #999; padding: 0 5px;
    font-family: inherit;
}
.lang-btn:hover { color: #333; }
.lang-btn.active { color: #000; font-weight: bold; border-bottom: 2px solid #333; }

.lang-ja { display: none; }


/* ================= 顶部区域 (核心布局) ================= */
.header-section {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
    align-items: flex-start;
}

.profile-col { flex: 66; }
.news-col { flex: 34; }


/* ================= 个人信息 (Photo + Text) ================= */
.profile-header {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
}

.avatar {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.profile-text h1 {
    font-size: 32px;
    margin: 0 0 10px 0;
    font-weight: 700;
    line-height: 1.2;
}

.role { 
    margin: 4px 0; 
    font-weight: bold; 
    color: #555; 
    font-size: 16px;
}
.email { 
    font-family: "Courier New", monospace; 
    color: #666; 
    margin-top: 10px; 
    font-size: 15px;
    word-break: break-all; /* 防止长邮箱在手机撑破屏幕 */
}
.social-links { 
    margin-top: 12px; 
    font-size: 16px;
}


/* ================= Bio 文本 ================= */
.bio-text h3 {
    font-size: 22px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}
.bio-text p {
    font-size: 16px;
    margin-bottom: 12px;
    text-align: justify;
    line-height: 1.6;
}


/* ================= News 滚动栏 ================= */
.news-col h3 {
    margin-top: 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    font-size: 22px;
}
.news-box {
    height: 380px;
    overflow-y: scroll;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    padding: 15px;
    font-size: 15px;
    line-height: 1.5;
}
.news-box ul { padding-left: 20px; margin: 0; }
.news-box li { margin-bottom: 12px; }
.bio-experience {
    margin-top: 22px;
}
.linkedin-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 18px 20px 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.linkedin-card-head { margin-bottom: 14px; }
.linkedin-card-head h3 {
    margin: 0;
    border: none;
    padding: 0;
    color: #111;
    font-size: 22px;
    line-height: 1.2;
}
.linkedin-exp-scroll {
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}
.linkedin-exp-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    padding: 16px 0 18px;
    border-top: 1px solid #e6e6e6;
}
.linkedin-exp-item:first-child {
    border-top: none;
    padding-top: 0;
}
.linkedin-exp-item:last-child {
    padding-bottom: 0;
}
.linkedin-logo {
    width: 44px;
    height: 44px;
    max-width: 44px;
    max-height: 44px;
    border-radius: 5px;
    object-fit: cover;
    border: 1px solid #e3e3e3;
    background: #f5f5f5;
    display: block;
    flex: 0 0 44px;
}
.linkedin-exp-main {
    min-width: 0;
}
.linkedin-exp-main h4,
.linkedin-subrole h5 {
    margin: 0;
    color: #111;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
}
.linkedin-subrole h5 {
    font-size: 15px;
}
.linkedin-company,
.linkedin-meta,
.linkedin-desc,
.linkedin-skill {
    margin: 2px 0;
}
.linkedin-company {
    color: #222;
    font-size: 14px;
    line-height: 1.35;
}
.linkedin-meta {
    color: #666;
    font-size: 13px;
    line-height: 1.35;
}
.linkedin-desc {
    color: #333;
    font-size: 13px;
    line-height: 1.45;
    margin-top: 10px;
}
.linkedin-skill {
    position: relative;
    color: #222;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 10px;
    padding-left: 18px;
}
.linkedin-skill::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 9px;
    height: 9px;
    border: 2px solid #555;
    border-radius: 2px;
    transform: rotate(45deg);
    box-sizing: border-box;
}
.linkedin-subroles {
    position: relative;
    margin-top: 16px;
    padding-left: 22px;
}
.linkedin-subroles::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 22px;
    width: 3px;
    background: #e4e4e4;
    border-radius: 999px;
}
.linkedin-subrole {
    position: relative;
    padding-bottom: 18px;
}
.linkedin-subrole:last-child {
    padding-bottom: 0;
}
.linkedin-subrole::before {
    content: "";
    position: absolute;
    left: -21px;
    top: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #b8b8b8;
}
.tag-small {
    background: #eef; border: 1px solid #ccd;
    padding: 1px 4px; font-size: 12px; color: #555; border-radius: 3px;
}


/* ================= Publications ================= */
.pub-section { margin-bottom: 40px; }
.pub-section-title {
    font-size: 22px;
    margin: 0 0 8px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
}

.pub {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 24px;
    padding: 26px 0;
    border-bottom: 1px solid #f0f0f0;
}
.pub:last-child { border-bottom: none; }

/* 左侧：会议徽章 + 年份 */
.pub-badge-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-top: 3px;
}
.pub-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    white-space: nowrap;
}
.badge-conf { background: #0066cc; }
.badge-ws   { background: #2e8b57; }
.pub-year { font-size: 13px; color: #888; padding-left: 2px; }

/* 右侧：论文信息 */
.pub-title {
    display: block;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    color: #111;
    margin-bottom: 6px;
}
.pub-title:hover { color: #0066cc; text-decoration: none; }
.pub-authors { font-size: 14.5px; color: #444; margin-bottom: 2px; }
.pub-me { font-weight: 700; color: #111; border-bottom: 1px solid #111; }
.pub-venue { font-size: 14px; font-style: italic; color: #666; }
.pub-tldr { font-size: 14px; color: #555; margin: 8px 0 0 0; line-height: 1.6; }

.pub-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pub-btn {
    display: inline-block;
    padding: 2px 12px;
    font-size: 12.5px;
    font-family: inherit;
    line-height: 1.7;
    color: #333;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.pub-btn:hover, .pub-btn.active {
    color: #fff;
    background: #0066cc;
    border-color: #0066cc;
    text-decoration: none;
}

.pub-bib {
    position: relative;
    margin-top: 12px;
    background: #f7f7f9;
    border: 1px solid #e3e3e8;
    border-radius: 4px;
}
.pub-bib[hidden] { display: none; }
.pub-bib pre {
    margin: 0;
    padding: 12px 14px;
    font-size: 12px;
    line-height: 1.5;
    overflow-x: auto;
    color: #333;
}
.pub-bib-copy {
    position: absolute;
    top: 6px; right: 6px;
    font-size: 11px;
    font-family: inherit;
    padding: 1px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
}

.pub-fig { display: block; margin-top: 16px; cursor: zoom-in; }
.pub-fig img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #eee;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s ease;
}
.pub-fig:hover img { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }

/* =========================================================
   📱 手机端自适应 (Media Queries) - 核心修改部分
   当屏幕宽度小于 768px (手机/平板竖屏) 时生效
   ========================================================= */
@media screen and (max-width: 768px) {
    
    /* 1. 顶部布局变为垂直堆叠 (Bio在上, News在下) */
    .header-section {
        flex-direction: column;
        gap: 30px;
    }
    .profile-col, .news-col {
        flex: 100%;
        width: 100%;
    }

    /* 2. 个人信息区域改为居中垂直排列 */
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    /* 手机上头像稍微缩小一点，不然太占地 */
    .avatar {
        width: 160px;
        height: 160px;
    }

    .profile-text h1 {
        font-size: 26px; /* 名字稍微小一点 */
        margin-top: 10px;
    }
    
    .social-links {
        justify-content: center;
    }

    /* 3. 论文列表：徽章移到标题上方，单列排列 */
    .pub {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 20px 0;
    }
    .pub-badge-col {
        flex-direction: row;
        align-items: center;
    }
}
