html {
    /* 强行让所有页面都在右侧预留滚动条的宽度（即便内容很短也保留灰色轨道） */
    overflow-y: scroll;
}
:root {
    --polyu-red: #800000;
    --text-dark: #111111;
    --text-muted: #555555;
    --border-light: #e5e5e5;
    --bg-light: #f9f9f9;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-dark);
    line-height: 1.65;
    background-color: #ffffff;
    padding-bottom: 60px;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header & Navigation - Institutional & Clean */
header {
    border-bottom: 1px solid var(--border-light);
    background-color: #ffffff;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px;
}

.logo-text {
    font-family: 'Libre Baskerville', "Times New Roman", Times, serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    color: var(--text-dark);
    text-decoration: none;
}

.logo-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'Noto Sans', sans-serif;
    font-weight: 400;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

nav {
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    padding: 12px 0;
    background-color: #ffffff;
}

nav .container {
    display: flex;
    justify-content: flex-start;
    gap: 32px;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}

nav a:hover, nav a.active {
    color: var(--polyu-red);
}

/* Typography - Journal style */
h1, h2, h3, h4 {
    font-family: 'Libre Baskerville', "Times New Roman", Times, serif;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.25;
}

h2 {
    font-size: 1.75rem;
    margin-top: 48px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--text-dark);
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--polyu-red);
}

p {
    margin-bottom: 16px;
    font-size: 1.05rem;
}

/* Custom Grid Utility */
.grid-2 {
    display: table;
    width: 100%;
    table-layout: fixed;
    margin-bottom: 40px;
}

.col {
    display: table-cell;
    vertical-align: top;
}

.col-65 { width: 65%; padding-right: 40px; }
.col-35 { width: 35%; }
.col-30 { width: 30%; padding-right: 32px; }
.col-70 { width: 70%; }
.col-50 { width: 50%; }

.col-50:first-child { padding-right: 20px; }
.col-50:last-child { padding-left: 20px; }

/* Hero Image Banner styling */
.hero-banner {
    margin: 32px 0 20px 0;
    background-color: transparent; /* 去掉黑色背景 */
    overflow: hidden;
}

.hero-banner img {
    width: 100%;
    height: auto;       /* 自动适应高度，绝不裁剪 */
    display: block;
    opacity: 1;         /* 恢复 100% 清晰度，不虚化 */
    border-radius: 4px;
}

.hero-caption {
    background-color: var(--bg-light);
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-left: 3px solid var(--polyu-red);
    margin-top: 0px;
    margin-bottom: 40px;
}

/* Profile Card component */
.profile-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    padding: 24px;
    border-radius: 4px;
    border-top: 4px solid var(--polyu-red);
}

.profile-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.profile-card p {
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.btn-scholar {
    display: inline-block;
    background-color: var(--text-dark);
    color: #ffffff;
    text-decoration: none;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease;
}

.btn-scholar:hover {
    background-color: var(--polyu-red);
}

/* Three-column card matrix */
.matrix-container {
    display: table;
    width: 100%;
    table-layout: fixed;
    margin-top: 24px;
}

.matrix-col {
    display: table-cell;
    width: 33.333%;
    padding: 0 12px;
    vertical-align: top;
}

.matrix-col:first-child { padding-left: 0; }
.matrix-col:last-child { padding-right: 0; }

.matrix-card {
    border: 1px solid var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    height: 100%;
    background-color: #ffffff;
}

.matrix-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.matrix-body {
    padding: 20px;
}

.matrix-num {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.5rem;
    color: var(--polyu-red);
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

.matrix-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.matrix-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Publications page elements */
.gallery-container {
    display: table;
    width: 100%;
    table-layout: fixed;
    margin-bottom: 40px;
}

.gallery-col {
    display: table-cell;
    width: 33.333%;
    padding: 0 10px;
    vertical-align: top;
}

.gallery-col:first-child { padding-left: 0; }
.gallery-col:last-child { padding-right: 0; }

.gallery-card {
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: #ffffff;
}

.gallery-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.gallery-title {
    padding: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-dark);
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-light);
}

.pub-list {
    margin-top: 24px;
}

.pub-year-header {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.35rem;
    color: var(--polyu-red);
    margin: 32px 0 16px 0;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 6px;
}

.pub-item {
    padding-left: 32px;
    text-indent: -32px;
    font-size: 1.02rem;
    margin-bottom: 18px;
    line-height: 1.6;
}

.pub-item strong {
    color: var(--text-dark);
}

.author-self {
    font-weight: 700;
    text-decoration: underline;
}

.pub-highlight {
    background-color: #fff8f8;
    border-left: 4px solid var(--polyu-red);
    padding: 16px 16px 16px 48px;
    text-indent: -32px;
    border-radius: 0 4px 4px 0;
    margin-bottom: 18px;
}

/* People grid elements */
.people-grid {
    display: table;
    width: 100%;
    table-layout: fixed;
    margin-bottom: 32px;
}

.people-row {
    display: table-row;
}

.member-cell {
    display: table-cell;
    width: 33.333%;
    padding: 16px;
    vertical-align: top;
}

.people-grid .people-row:first-child .member-cell {
    padding-top: 0;
}

.member-card-box {
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 20px;
    background-color: var(--bg-light);
    text-align: center;
    height: 100%;
}

.member-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #e0e0e0;
    margin: 0 auto 16px auto;
    overflow: hidden;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.member-role {
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: var(--polyu-red);
    font-weight: 600;
    margin-bottom: 8px;
}

.member-email {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.pi-box {
    display: table;
    width: 100%;
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-left: 5px solid var(--polyu-red);
    padding: 24px;
    border-radius: 4px;
    margin-bottom: 40px;
}

.pi-img-cell {
    display: table-cell;
    width: 180px;
    vertical-align: top;
}

.pi-img-cell img {
    width: 160px;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.pi-info-cell {
    display: table-cell;
    vertical-align: top;
    padding-left: 24px;
}

/* Timeline/News page */
.timeline {
    position: relative;
    padding-left: 32px;
    margin-top: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background-color: var(--border-light);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 4px solid var(--polyu-red);
    z-index: 2;
}

.timeline-date {
    font-weight: 700;
    color: var(--polyu-red);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.timeline-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.timeline-content {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Join Us Openings Callouts */
.btn-apply {
    display: inline-block;
    background-color: var(--polyu-red);
    color: #ffffff;
    text-decoration: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 12px;
}

.btn-apply:hover {
    background-color: var(--text-dark);
}

.scheme-box {
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    padding: 24px;
    border-radius: 4px;
    margin-bottom: 24px;
}

.scheme-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.scheme-meta {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--polyu-red);
    margin-bottom: 12px;
}

.materials-box {
    border: 1px solid var(--border-light);
    background-color: #ffffff;
    border-radius: 4px;
    margin-top: 24px;
}

.materials-header {
    background-color: var(--text-dark);
    color: #ffffff;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 1rem;
}

.materials-list {
    padding: 20px;
    list-style-type: none;
}

.materials-list li {
    padding-left: 28px;
    position: relative;
    margin-bottom: 12px;
    font-size: 1rem;
}

.materials-list li:last-child {
    margin-bottom: 0;
}

.materials-list li::before {
    content: '✓';
    position: absolute;
    left: 4px;
    color: var(--polyu-red);
    font-weight: bold;
}

footer {
    margin-top: 80px;
    border-top: 1px solid var(--border-light);
    padding-top: 24px;
    text-align: left; /* 严格左对齐 */
    padding-bottom: 40px; /* 底部留白，防止视线贴边 */
}

.footer-contact {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    font-family: 'Noto Sans', sans-serif;
}

.footer-contact a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
}

.footer-contact a:hover {
    color: var(--polyu-red);
    text-decoration: underline;
}

.footer-contact .address-line {
    color: #666666;
    margin-top: 2px;
}

/* ==========================================================================
   FINAL MOBILE RESPONSIVE SYSTEM (全站手机端智能适配系统 - 终极完备版)
   ========================================================================== */
@media (max-width: 768px) {
    
    /* 1. 全局容器微调：缩减手机端两侧留白 */
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    /* 2. 顶栏 Logo 与副标题优化 */
    .header-top {
        padding: 16px 16px !important;
    }
    .logo-text {
        font-size: 1.4rem !important;
    }
    .logo-sub {
        font-size: 0.78rem !important;
        line-height: 1.3 !important;
        margin-top: 4px !important;
    }

    /* 3. 导航栏高度与折行修复 */
    nav {
        height: auto !important;
        overflow: visible !important;
        padding: 4px 0 !important;
    }
    nav .container {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 6px 12px !important;
        padding: 6px 0 !important;
        white-space: normal !important;
    }
    nav a {
        display: inline-block !important;
        padding: 6px 8px !important;
        margin: 0 !important;
        font-size: 0.85rem !important;
    }

    /* 4. 【新添：PI卡片手机端完美解耦】 */
    .pi-box {
        display: flex !important;
        flex-direction: column !important; /* 强制从“左右并排”变为“上下垂直平铺” */
        gap: 20px !important;
        width: 100% !important;
        padding: 16px !important;
        box-sizing: border-box !important;
    }
    .pi-img-cell {
        width: 100% !important;
        max-width: 180px !important;       /* 限制手机端您的证件照不要过大，保持精致 */
        margin: 0 auto !important;          /* 照片在手机屏幕正中央居中 */
    }
    .pi-img-cell img {
        width: 100% !important;
        height: auto !important;
        border-radius: 4px !important;
    }
    .pi-info-cell {
        width: 100% !important;
        padding-left: 0 !important;         /* 消除电脑端留给左侧照片的间距 */
        text-align: justify !important;     /* 简介文本在手机端也保持精致的两端对齐 */
    }
    /* 核心补丁：强行破解超长单位名称和邮箱把手机屏幕撑爆的问题 */
    .pi-info-cell h3, .pi-info-cell p {
        word-wrap: break-word !important;
        word-break: break-word !important;
        white-space: normal !important;
    }

    /* 5. 首页卡片转为垂直单列平铺 */
    .matrix-container {
        display: block !important;
        width: 100% !important;
        height: auto !important;
    }
    .matrix-col {
        display: block !important;
        width: 100% !important;
        padding: 0 0 24px 0 !important;
        height: auto !important;
    }
    .matrix-col:last-child {
        padding-bottom: 0 !important;
    }
    .matrix-card {
        height: auto !important;
    }

    /* 6. People 页面组员名牌转为垂直单列 */
    .people-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
    .member-cell {
        width: 100% !important;
        display: block !important;
    }
    .member-cell[style*="visibility:hidden"], 
    .member-cell[style*="visibility: hidden"] {
        display: none !important;
    }

    /* 7. News 页面优化：时间轴转为上图下文 */
    .news-media-box {
        flex-direction: column !important;
        gap: 12px !important;
    }
    .news-img-pane {
        width: 100% !important;
    }
    .news-img-pane img, .news-image-placeholder {
        height: 160px !important;
    }
}
