/* 全局变量 */
:root {
    /* 页面主色和文字色 */
    --primary-color: #333;
    --secondary-color: #666;
    --link-color: #0066cc;
    --bg-color: #ffffff;
    
    /* 桌面端版心和左右栏布局 */
    --container-width: 1100px;
    --profile-width: 220px;
    --gap: 50px;
    --page-left-shift: 112px;

    /* 全站动画节奏 */
    --motion-fast: 0.18s;
    --motion-medium: 0.28s;
    --motion-slow: 0.42s;
    --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
    --ease-emphasis: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 基础样式 */
html {
    scroll-behavior: smooth;
}

body {
    font-family: "Arial Rounded MT Bold", Calibri, "Segoe UI", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.3;
    color: var(--primary-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    animation: fadeIn 0.65s var(--ease-standard) both;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color var(--motion-fast) var(--ease-standard);
}
a:hover {
    text-decoration: underline;
    color: #004494;
}

.container {
    /* 主体内容版心 */
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

@media (min-width: 1100px) {
    .container {
        /* 桌面端整体左移，更接近 academicpages 风格 */
        margin-left: max(32px, calc((100vw - var(--container-width)) / 2 - var(--page-left-shift)));
        margin-right: auto;
    }
}

/* 顶部导航 */
.navbar-wrapper {
    /* 顶部导航吸顶，并在滚动后加轻微阴影 */
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(252, 252, 252, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    width: 100%;
    transition:
        background-color var(--motion-medium) var(--ease-standard),
        border-color var(--motion-medium) var(--ease-standard),
        box-shadow var(--motion-medium) var(--ease-standard);
}
.navbar-wrapper.scrolled {
    background-color: rgba(252, 252, 252, 0.98);
    border-bottom-color: rgba(0,0,0,0.09);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 60px;
    height: 70px;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 1100px) {
    .navbar {
        /* 导航栏与主体内容保持同样的左移量 */
        margin-left: max(32px, calc((100vw - var(--container-width)) / 2 - var(--page-left-shift)));
        margin-right: auto;
    }
}

.nav-logo {
    font-weight: 700;
    font-size: 1.2em;
    color: #666;
    font-family: "Helvetica Neue", Arial, sans-serif;
    letter-spacing: -0.5px;
    white-space: nowrap; 
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 1.05em;
    text-decoration: none;
    position: relative;
    padding: 6px 2px;
    transition: color var(--motion-fast) var(--ease-standard);
}
.nav-links a::after {
    /* 导航 hover / active 时的蓝色下划线动画 */
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 3px;
    background-color: var(--link-color);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--motion-slow) var(--ease-emphasis);
}

.nav-links a:hover { 
    color: var(--link-color); 
    text-decoration: none !important; 
}
.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}
.nav-links a.active {
    color: var(--link-color);
}

/* 页面布局 */
.page-content {
    /* 桌面端左侧个人信息 + 右侧正文 */
    display: grid;
    grid-template-columns: var(--profile-width) 1fr;
    gap: var(--gap);
    margin-top: 32px;
    margin-bottom: 64px;
}

/* 个人信息栏 */
.profile-section {
    position: sticky;
    top: 100px;
    height: fit-content; 
}

.profile-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 4px solid #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition:
        transform var(--motion-slow) var(--ease-emphasis),
        box-shadow var(--motion-slow) var(--ease-standard);
}

.profile-avatar:hover {
    transform: scale(1.04) translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.profile-name {
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.2;
}

.profile-bio {
    color: var(--secondary-color);
    font-size: 0.9em;
    line-height: 1.6;
    margin-bottom: 20px;
}
.quote-line {
    margin-top: 10px;
    font-size: 0.9em;
    color: #888;
}

.social-links {
    list-style: none;
    padding: 0;
    font-size: 0.85em;
    margin-top: 20px;
}
.social-links li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}
.social-links i {
    width: 24px;
    color: #555;
    margin-right: 8px;
}

/* 社交链接 */
.social-links a {
    text-decoration: none;
    transition:
        color var(--motion-fast) var(--ease-standard),
        transform var(--motion-fast) var(--ease-standard);
    display: inline-block;
}
.social-links a:hover {
    text-decoration: none;
    color:#004494;
    transform: translateX(3px);
}

/* 品牌图标颜色 */
.social-links .fa-envelope { 
    color: #ea4335; 
}

.social-links .fa-graduation-cap { 
    color: #4285f4; 
}

.social-links .fa-github { 
    color: #333; 
}

.social-links .fa-twitter { 
    color: #1da1f2; 
}

/* 主体内容 */
.main-section {
    min-width: 0;
    padding-bottom: 120px; /* 预留底部空间，保证最后一个锚点可以滚到合适位置。 */
}

section {
    margin-bottom: 48px;
    scroll-margin-top: 100px; /* 为锚点跳转预留吸顶导航的高度。 */
}

h2 {
    font-size: 1.3em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-weight: 600;
    color: #333;
}

/* 列表 */
ul.simple-list {
    list-style: none;
    padding-left: 0;
}
ul.simple-list li {
    margin-bottom: 14px;
    position: relative;
    padding-left: 20px;
}
ul.simple-list li::before {
    content: '•';
    color: var(--link-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* 论文列表 */
.paper-item {
    /* 单篇论文卡片：灰底、红色边框、浮起阴影 */
    display: flex;
    gap: 20px;
    margin-bottom: 18px;
    padding: 22px;
    background: #f9f9f9;
    border: 2px solid #ca6f70;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
    transition:
        box-shadow var(--motion-medium) var(--ease-standard),
        transform var(--motion-medium) var(--ease-standard);
}

.paper-item:hover {
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.09);
    transform: translateY(-3px);
}

.paper-item:active {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.paper-img {
    width: 200px;
    height: 120px;
    background-color: #fafafa;
    object-fit: contain;
    object-position: center;
    border-radius: 10px;
    border: 1px solid #eee;
    flex-shrink: 0;
}

.paper-content { width: 100%; }

.paper-title {
    font-weight: 600;
    font-size: 1.0em;
    color: #111;
    line-height: 1.3;
    margin-bottom: 5px;
}
.paper-title a {
    color: var(--link-color);
    text-decoration: none;
    transition: color var(--motion-fast) var(--ease-standard);
}
.paper-title a:hover {
    color: #004494;
    text-decoration: none !important;
}

.paper-authors { font-size: 0.85em; color: #444; margin-bottom: 5px; }
.paper-venue { font-size: 0.9em; font-weight: 700; color: #c9302c; margin-bottom: 8px; }

.paper-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-btn {
    font-size: 0.8em;
    padding: 3px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #555;
    background: #fff;
    transition:
        background-color var(--motion-fast) var(--ease-standard),
        border-color var(--motion-fast) var(--ease-standard),
        color var(--motion-fast) var(--ease-standard),
        transform var(--motion-fast) var(--ease-standard);
}
.tag-btn:hover {
    background-color: #ca6f70;
    color: #fff;
    border-color: #ca6f70;
    text-decoration: none;
    transform: translateY(-1px);
}

/* 经历模块 */
.experience-item {
    /* 经历卡片：无边框，通过灰底和阴影形成浮起效果 */
    display: flex;
    gap: 25px;
    margin-bottom: 16px;
    padding: 22px;
    background: #f9f9f9;
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
    transition:
        box-shadow var(--motion-medium) var(--ease-standard),
        transform var(--motion-medium) var(--ease-standard);
}

.experience-item:hover {
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.09);
    transform: translateY(-3px);
}
.experience-item:active {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.experience-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;  
    flex-shrink: 0;
    border: none;
    background-color: transparent;
    padding: 0;
    border-radius: 4px;
}

.experience-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.about-greeting {
    font-size: 1.4em;
    font-style: italic;
    font-weight: bold;
    margin-bottom: 20px;
    color: #ca6f70;
}
.about-text {
    line-height: 1.65;
}
.interest-highlight {
    color: #ca6f70;
}
.news-link-emphasis {
    color: var(--link-color);
}
.experience-headline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}
.experience-org {
    font-size: 1.05em;
    color: #0066cc;
}
.experience-time {
    color: #666;
    font-size: 0.9em;
    white-space: nowrap;
    margin-left: 10px;
}
.experience-role {
    font-size: 0.95em;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}
.experience-meta {
    font-size: 0.9em;
    color: #666;
}
.experience-advisor-link {
    color: #666;
    text-decoration: underline;
}
.paper-author-me {
    color: #000;
}
.site-footer {
    margin-top: 56px;
    color: #999;
    font-size: 0.8em;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.footer-link {
    color: #999;
    text-decoration: underline;
}
.footer-meta {
    margin-top: 8px;
}
.footer-updated {
    text-decoration: underline;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 移动端布局 */
@media (max-width: 850px) {
    /* 手机端改为单列布局 */
    :root { 
        --container-width: 100%; 
        --gap: 26px;
    }
    
    .container {
        margin-left: auto;
        margin-right: auto;
        padding: 0 18px;
    }

    .page-content {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 16px;
        margin-bottom: 48px;
    }

    .main-section {
        padding-bottom: 80px;
    }

    section {
        margin-bottom: 36px;
        scroll-margin-top: 112px;
    }

    h2 {
        font-size: 1.18em;
        margin-bottom: 18px;
        padding-bottom: 10px;
    }

    .profile-section {
        /* 手机端个人信息居中显示 */
        position: static;
        text-align: center;
        border-bottom: 1px solid #eee;
        padding-bottom: 24px;
        margin-bottom: 0;
    }
    .profile-avatar {
        width: 124px;
        height: 124px;
        margin: 0 auto 14px auto;
    }
    .profile-name {
        font-size: 1.15em;
    }
    .profile-bio {
        margin-bottom: 14px;
    }
    .profile-bio p {
        margin: 6px 0;
    }
    .quote-line {
        margin-top: 6px;
    }
    .social-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 16px;
        margin-top: 14px;
    }
    .social-links, .social-links li { 
        justify-content: center; 
    }
    .social-links li {
        margin-bottom: 0;
    }
    
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 10px 0 8px;
        gap: 8px;
    }
    .nav-logo { 
        width: 100%;
        margin-bottom: 0;
        font-size: 1.05em;
        text-align: center;
    }
    .nav-links {
        /* 手机端导航横向滚动，避免挤成多行 */
        gap: 8px;
        font-size: 0.92em;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0 18px 2px;
        scrollbar-width: none;
        width: 100%;
        box-sizing: border-box;
    }
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    .nav-links a {
        flex: 0 0 auto;
        padding: 6px 4px;
        line-height: 1.2;
    }
    .nav-links a::after {
        bottom: -4px;
    }
    
    .experience-item {
        /* 手机端经历卡片收紧内边距 */
        padding: 14px;
        gap: 12px;
        border-radius: 8px;
    }
    .experience-logo {
        width: 46px;
        height: 46px;
    }
    /* 小屏幕下将机构名称和时间分行，避免互相挤压。 */
    .experience-content div:first-child {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 4px;
    }
    .experience-org {
        font-size: 1em;
        line-height: 1.25;
    }
    .experience-time {
        margin-left: 0;
        white-space: normal;
    }
    .experience-role,
    .experience-meta {
        line-height: 1.4;
    }

    .paper-item { 
        /* 手机端论文卡片上下排列 */
        flex-direction: column; 
        gap: 14px;
        padding: 16px;
        margin-bottom: 22px;
    }
    .paper-img { 
        /* 手机端论文图片占满卡片宽度 */
        width: 100%; 
        height: 148px;
        object-fit: contain;
        object-position: center;
    }
    .paper-title {
        font-size: 1.05em;
        line-height: 1.35;
    }
    .paper-authors {
        line-height: 1.55;
    }
    .tag-btn {
        padding: 5px 11px;
        line-height: 1.2;
    }
    .site-footer {
        margin-top: 40px;
    }
}
