/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-actions {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.language-switcher {
	display: flex;
	gap: 0.5rem;
}

.lang-btn {
	padding: 6px 10px;
	border: 1px solid #3498db;
	background: transparent;
	color: #3498db;
	border-radius: 14px;
	font-weight: 600;
	cursor: pointer;
	font-size: 0.85rem;
}

.lang-btn.active,
.lang-btn:hover {
	background: #3498db;
	color: white;
}

.nav-logo h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #3498db;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3498db;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #2c3e50;
    margin: 3px 0;
    transition: 0.3s;
}

/* About Me Section */
.about-me {
    padding: 5rem 0;
    background: #f8f9fa;
    margin-top: 80px;
}

.subsection-title {
    text-align: center;
    font-size: 2rem;
    margin-top: 4rem;
    margin-bottom: 3rem;
    color: #2c3e50;
    position: relative;
}

.subsection-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: #3498db;
    border-radius: 2px;
}

/* CSDN Blog Section */
.csdn-blog-content {
    padding-top: 2rem;
    text-align: center;
}

.csdn-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.csdn-stats .stat-item {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.csdn-stats .stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.csdn-stats .stat-item i {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 1rem;
}

.csdn-stats .stat-item h3 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.csdn-stats .stat-item p {
    color: #666;
    font-weight: 500;
}

.csdn-link .btn {
    display: inline-block;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.csdn-link .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.6);
}

.csdn-link .btn i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.csdn-link .btn:hover i {
    transform: translateX(5px);
}

/* Skills Section */
.skills {
    padding: 5rem 0;
    background: white;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-category {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.8rem;
}

.skill-category ul {
    list-style: none;
    padding: 0;
}

.skill-category li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: #555;
    font-size: 1rem;
}

.skill-category li i {
    color: #3498db;
    margin-right: 1rem;
    width: 20px;
    font-size: 1.1rem;
}

/* Awards Section */
.awards {
    padding: 5rem 0;
    background: #f8f9fa;
}

.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.award-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.award-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.award-item i {
    color: #f39c12;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.award-item span {
    color: #333;
    font-weight: 500;
}

/* Project Video Preview */
.project-video-preview {
    position: relative;
    cursor: pointer;
    margin-top: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.project-video-preview:hover {
    transform: scale(1.03);
}

.project-video-preview img {
    width: 100%;
    display: block;
    transition: filter 0.3s ease;
}

.project-video-preview:hover img {
    filter: brightness(0.8);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.project-video-preview:hover .play-icon {
    background: rgba(255, 255, 255, 1);
}

.play-icon i {
    font-size: 1.8rem;
    color: #3498db;
    margin-left: 5px; /* Adjust for visual centering */
}

/* Video Modal Styles */
.video-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: 5% auto;
    padding: 20px;
    width: 80%;
    max-width: 900px;
    background: white;
    border-radius: 10px;
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
}

#project-video {
    width: 100%;
    border-radius: 8px;
}

/* New: video wrapper and status */
.video-wrapper {
    position: relative;
}

.video-status {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    z-index: 2;
}

.video-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
}

.video-loading .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(52,152,219,0.3);
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.video-error {
    color: #e74c3c;
    font-weight: 600;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.background-content {
    max-width: 1200px;
    margin: 0 auto;
}

.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    margin-bottom: 0;
}

.profile-image {
    display: flex;
    justify-content: center;
}

.profile-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 3px solid #3498db;
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5%;
}

.profile-info {
    text-align: center;
}

.profile-name {
    font-size: 3rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 500;
    white-space: nowrap;
}

.profile-title {
    font-size: 1.5rem;
    color: #3498db;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.profile-affiliation {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 0;
}

.intro-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.intro-text h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    margin-top: 2rem;
    font-size: 1.3rem;
    border-left: 4px solid #3498db;
    padding-left: 1rem;
}

.intro-text h3:first-child {
    margin-top: 0;
}

.intro-text p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.research-interests {
    list-style: none;
    padding: 0;
}

.research-interests li {
    margin-bottom: 0.8rem;
    color: #555;
    display: flex;
    align-items: center;
}

.research-interests li i {
    color: #3498db;
    margin-right: 0.8rem;
    width: 20px;
}

.education {
    margin-top: 1rem;
}

.education-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.edu-year {
    font-weight: 600;
    color: #3498db;
    font-size: 0.9rem;
}

.edu-details h4 {
    color: #2c3e50;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.edu-details p {
    color: #666;
    margin: 0;
    font-size: 0.95rem;
}

/* Work Experience Section */
.work-experience {
    margin-top: 1rem;
}

.work-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.work-period {
    font-weight: 600;
    color: #3498db;
    font-size: 0.9rem;
}

.work-details h4 {
    color: #2c3e50;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.work-details p {
    color: #666;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.work-desc {
    padding-left: 1.2rem;
    color: #555;
    font-size: 0.9rem;
}

.work-desc li {
    margin-bottom: 0.5rem;
}

.contact-info {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.contact-info h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    border-left: 4px solid #3498db;
    padding-left: 1rem;
}

.contact-methods {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.2rem;
}

.contact-item i {
    font-size: 1.2rem;
    color: #3498db;
    margin-right: 1rem;
    width: 25px;
}

.contact-details {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.85rem;
    color: #999;
    font-weight: 500;
}

.contact-value {
    font-size: 0.95rem;
    color: #2c3e50;
    font-weight: 500;
}

/* 通用部分标题 */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #3498db;
    border-radius: 2px;
}

/* 论文发表 */
.publications {
    padding: 5rem 0;
    background: white;
}

.publications-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid #3498db;
    background: transparent;
    color: #3498db;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: #3498db;
    color: white;
}

.publications-list {
    max-width: 1000px;
    margin: 0 auto;
}

.publication-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.publication-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.publication-year {
    font-size: 1.1rem;
    font-weight: 700;
    color: #3498db;
    text-align: center;
    line-height: 1.2;
}

.publication-title {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.publication-authors {
    color: #666;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.publication-authors strong {
    color: #2c3e50;
}

.publication-venue {
    color: #555;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.publication-venue i {
    margin-right: 0.5rem;
    color: #3498db;
}

.publication-metrics {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.metric {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: center;
}

.metric i {
    margin-right: 0.3rem;
    color: #3498db;
}

.impact-factor,
.conference-rank,
.status-badge {
    background: #3498db;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.conference-rank {
    background: #e74c3c;
}

.status-badge {
    background: #f39c12;
}

.publication-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.pub-link {
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    border: 1px solid #3498db;
    border-radius: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.pub-link:hover {
    background: #3498db;
    color: white;
}

.pub-link i {
    margin-right: 0.5rem;
}

.publication-abstract {
    margin-top: 1rem;
}

.abstract-toggle {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}

.abstract-content {
    display: none;
    margin-top: 0.8rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
}

.abstract-content.show {
    display: block;
}

.publication-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid #e9ecef;
}

.stat-item {
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: #666;
    font-weight: 500;
}

/* 项目介绍 */
.projects {
    padding: 5rem 0;
    background: #f8f9fa;
}

.projects-categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.category-tab {
    padding: 0.8rem 1.5rem;
    border: 2px solid #3498db;
    background: transparent;
    color: #3498db;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-tab.active,
.category-tab:hover {
    background: #3498db;
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #3498db;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.project-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-icon i {
    font-size: 1.8rem;
    color: white;
}

.project-meta {
    text-align: right;
}

.project-type {
    display: block;
    font-size: 0.85rem;
    color: #3498db;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.project-period {
    font-size: 0.8rem;
    color: #666;
}

.project-content h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    line-height: 1.3;
}

.project-description {
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.project-highlights {
    margin-bottom: 1.5rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    color: #555;
}

.highlight-item i {
    color: #3498db;
    margin-right: 0.8rem;
    width: 16px;
    font-size: 0.9rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: #e8f4f8;
    color: #2980b9;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #d5e8f0;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Elegant Code Button */
.project-links .btn-code {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    box-shadow: 0 8px 18px rgba(52, 152, 219, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.project-links .btn-code i {
    font-size: 0.95rem;
}

.project-links .btn-code:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(52, 152, 219, 0.45);
}

.project-links .btn-code:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

@media (prefers-color-scheme: dark) {
    .project-links .btn-code {
        background: linear-gradient(135deg, #3ea2e1, #2c6fb0);
        box-shadow: 0 8px 18px rgba(46, 134, 193, 0.35);
    }
}

/* 项目类别筛选 */
.project-card.research[data-category="research"] {
    border-left-color: #3498db;
}

.project-card.software[data-category="software"] {
    border-left-color: #2ecc71;
}

.project-card.collaboration[data-category="collaboration"] {
    border-left-color: #e74c3c;
}

.project-card.personal[data-category="personal"] {
    border-left-color: #9b59b6;
}

.project-card.software .project-icon {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.project-card.collaboration .project-icon {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.project-card.personal .project-icon {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

/* 社交链接样式 */
.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #f8f9fa;
    color: #2c3e50;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.social-link:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-3px);
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .profile-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .profile-name {
        font-size: 2.5rem;
    }
    
    .intro-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .publications-filter {
        flex-wrap: wrap;
    }
    
    .publication-item {
        grid-template-columns: 60px 1fr;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .project-meta {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .profile-name {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .education-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .edu-year {
        font-size: 0.8rem;
    }
    
    .projects-categories {
        flex-direction: column;
        align-items: center;
    }
    
    .publications-filter {
        flex-direction: column;
        align-items: center;
    }
}

/* 滚动动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 选择文本颜色 */
::selection {
    background: #3498db;
    color: white;
}