/* === 基础全局 === */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #333;
    background-color: #ffffff;
    line-height: 1.6;
    margin: 0;
    padding: 0 20px 80px 20px;
    /* 隐藏 body 滚动条 */
    scrollbar-width: none; 
    -ms-overflow-style: none;
}
body::-webkit-scrollbar { display: none; }

a { color: #0066cc; text-decoration: none; transition: color 0.2s; }
a:hover { color: #004499; text-decoration: underline; }

#layout-content { max-width: 950px; margin: 0 auto; padding-top: 20px; }

/* === Profile Header === */
.profile-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 40px; padding-bottom: 30px; border-bottom: 1px solid #f0f0f0;
}
.profile-text { flex: 1; }
.my-name { font-size: 32px; font-weight: 700; color: #111; margin: 0 0 10px 0; }
.my-title { font-size: 18px; color: #555; margin: 0 0 5px 0; }
.my-institution { font-size: 16px; color: #666; margin-bottom: 20px; }
.profile-links { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { padding: 8px 16px; background-color: #f5f7fa; color: #333; border-radius: 6px; font-size: 14px; font-weight: 500; }
.btn:hover { background-color: #e4e7eb; text-decoration: none; }
.btn-outline { background: transparent; border: 1px solid #e1e4e8; }
.profile-img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; box-shadow: 0 8px 20px rgba(0,0,0,0.08); margin-left: 30px; }

/* === 通用标题 === */
h2 {
    font-size: 22px; font-weight: 600; color: #111;
    margin-top: 50px; margin-bottom: 20px; padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* === 教育背景 (带 Logo) === */
.edu-card {
    display: flex;
    align-items: flex-start; /* 顶部对齐 */
    gap: 20px;
}
.edu-logo img {
    width: 80px; /* Logo 宽度 */
    height: auto;
    object-fit: contain;
}
.edu-content { flex: 1; }
.edu-header {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 8px;
}
.edu-header h3 { margin: 0; font-size: 18px; font-weight: 600; color: #222; }
.edu-header .date { font-size: 14px; color: #888; }
.edu-content ul { padding-left: 18px; margin: 5px 0; }
.edu-content li { margin-bottom: 6px; font-size: 15px; color: #555; }

/* === 技能展示 (横向滑动) === */
.skills-scroller {
    display: flex;
    gap: 16px;
    overflow-x: auto; /* 允许横向滚动 */
    padding-bottom: 10px; /* 给滚动条留点位置(虽然我们隐藏了) */
    
    /* 顺滑滚动效果 */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    
    /* 隐藏横向滚动条 */
    scrollbar-width: none; 
    -ms-overflow-style: none;
}
.skills-scroller::-webkit-scrollbar { display: none; }

.skill-card {
    flex: 0 0 200px; /* 卡片固定宽度，不压缩 */
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eee;
    transition: transform 0.2s;
}
.skill-card:hover { transform: translateY(-3px); border-color: #ddd; }
.skill-card b { display: block; margin-bottom: 10px; font-size: 16px; color: #222; }
.skill-card p { margin: 4px 0; font-size: 14px; color: #666; }

/* === 科研经历 (左文右图) === */
.research-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* 顶部对齐 */
    gap: 30px;
    margin-bottom: 35px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    transition: box-shadow 0.2s;
}
.research-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.research-text { flex: 1; }
.research-text h3 { margin: 0 0 8px 0; font-size: 18px; color: #111; }
.research-text .meta { font-size: 13px; color: #888; margin-bottom: 12px; font-weight: 500; }
.research-text .desc { font-size: 15px; color: #555; line-height: 1.7; margin-bottom: 15px; text-align: justify; }

.tags span {
    display: inline-block; background: #eef6fc; color: #2b6cb0;
    padding: 3px 10px; border-radius: 20px; font-size: 12px; margin-right: 6px; font-weight: 500;
}

.research-img {
    flex: 0 0 160px; /* 图片区域固定宽度 */
    height: 110px;
}
.research-img img {
    width: 100%; height: 100%;
    object-fit: cover; /* 保证图片填满且不变形 */
    border-radius: 8px;
    border: 1px solid #eee;
}

/* === LLM 按钮 === */
.llm-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #0066cc, #0055aa);
    color: white; border: none; border-radius: 30px;
    font-size: 16px; font-weight: 600; cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
    transition: all 0.2s;
}
.llm-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 102, 204, 0.3); }

#footer { margin-top: 60px; font-size: 13px; color: #aaa; text-align: center; }

/* === 移动端适配 === */
@media (max-width: 768px) {
    .profile-header { flex-direction: column-reverse; text-align: center; }
    .profile-img { margin-left: 0; margin-bottom: 20px; width: 120px; height: 120px; }
    .profile-links { justify-content: center; }
    
    .research-card { flex-direction: column-reverse; gap: 15px; } /* 手机上图片在上面或去掉 */
    .research-img { width: 100%; height: 150px; flex: none; }
    
    .edu-card { flex-direction: column; align-items: center; text-align: center; }
    .edu-content ul { padding-left: 0; list-style: none; }
}

::-webkit-scrollbar {
    display: none; /* 隐藏滚动条 */
    width: 0 !important;
    height: 0 !important;
}

/* 针对 Firefox */
html, body, iframe, .main-content {
    scrollbar-width: none; /* Firefox 隐藏滚动条 */
    -ms-overflow-style: none; /* IE/Edge 隐藏 */
}





/* 26.3.6 */
/* ---------- Live Demo 链接样式（方案三） ---------- */
.live-demo-link a {
    background: #e8f0fe;
    color: #1a73e8;
    padding: 4px 14px;
    border-radius: 30px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #d2e3fc;
    transition: background 0.2s, transform 0.1s;
    display: inline-block;
    font-size: 0.95rem;
}
.live-demo-link a:hover {
    background: #d2e3fc;
    transform: scale(1.02);
}

/* ---------- Demo 展示卡片（方案一） ---------- */
.demo-showcase {
    margin: 40px 0 30px 0;          /* 与上下内容拉开距离 */
    padding: 20px;
    background: #f9fbfd;             /* 浅色背景，与主体略有区分但不刺眼 */
    border-radius: 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.02);
}

.demo-card {
    max-width: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.demo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.15);
}

.demo-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;            /* 控制截图区域宽高比，适应大多数笔记本屏幕截图 */
    overflow: hidden;
    background: #eef2f6;
}
.demo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;   /* 从 cover 改为 contain */
    background-color: #f0f2f5;  /* 可选的填充色，与页面背景协调 */
}
.demo-card:hover .demo-preview img {
    transform: scale(1.02);
}

.demo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(3px);       /* 毛玻璃效果，提升高级感 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    color: white;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}
.demo-card:hover .demo-overlay {
    opacity: 1;
}

.demo-overlay span {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.demo-btn {
    background: white;
    color: #1a73e8;
    border: none;
    padding: 12px 28px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: background 0.2s, transform 0.1s;
    display: inline-block;
}
.demo-btn:hover {
    background: #f0f4fe;
    transform: scale(1.05);
    color: #0d47a1;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .demo-showcase {
        padding: 15px;
    }
    .demo-overlay span {
        font-size: 1rem;
    }
    .demo-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    .live-demo-link a {
        padding: 2px 10px;
        font-size: 0.85rem;
    }
}