/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    font-size: 17px;
}

body:lang(zh), body:lang(zh-CN) {
    font-family: SimSun, '宋体', STSong, serif;
}

body:lang(en) {
    font-family: Georgia, 'Times New Roman', serif;
}

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

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
}

.lang-btn {
    background-color: #0066cc;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
    margin-left: 10px;
}

.lang-btn:hover {
    background-color: #0052a3;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: #0066cc;
}

/* Sections */
.section {
    padding: 60px 0;
    border-bottom: 1px solid #e0e0e0;
}

.section:last-child {
    border-bottom: none;
}

.section h2 {
    font-size: 32px;
    margin-bottom: 30px;
    font-weight: 600;
}

/* Profile Section */
.profile {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 40px;
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info h1 {
    font-size: 40px;
    margin-bottom: 10px;
}

.profile-info .title {
    font-size: 20px;
    color: #666;
    margin-bottom: 5px;
}

.profile-info .affiliation {
    font-size: 18px;
    color: #888;
    margin-bottom: 15px;
}

.links {
    display: flex;
    gap: 15px;
}

.links a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.links a:hover {
    text-decoration: underline;
}

.bio p {
    font-size: 18px;
    line-height: 1.8;
}

.bio p a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #0066cc;
    padding-bottom: 1px;
    transition: all 0.3s;
}

.bio p a:hover {
    color: #0052a3;
    border-bottom-color: #0052a3;
    background-color: rgba(0, 102, 204, 0.05);
}

/* Publications */
.publication-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.publication-item {
    display: flex;
    gap: 20px;
}

.pub-image {
    flex-shrink: 0;
    width: 200px;
    height: 120px;
}

.pub-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.pub-content h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.pub-content .authors {
    font-size: 16px;
    color: #666;
    margin-bottom: 5px;
}

.pub-content .venue {
    font-size: 16px;
    color: #888;
    font-style: italic;
    margin-bottom: 10px;
}

.pub-links {
    display: flex;
    gap: 12px;
}

.pub-links a {
    color: #0066cc;
    text-decoration: none;
    font-size: 16px;
    padding: 4px 12px;
    border: 1px solid #0066cc;
    border-radius: 4px;
    transition: all 0.3s;
}

.pub-links a:hover {
    background-color: #0066cc;
    color: #fff;
}

/* Projects */
.project-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.project-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.project-card img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    background-color: #f9f9f9;
}

/* RoboCup specific styles */
.robocup-card {
    background-color: #fafbfc;
}

.robocup-info {
    padding: 25px;
}

.robocup-overview {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
}

.robocup-overview video {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.robocup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.module-box {
    background: #fff;
    border-radius: 8px;
    padding: 18px;
    border: 1px solid #e8e8e8;
    transition: box-shadow 0.3s;
}

.module-box:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.module-box h4 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #2c3e50;
    font-weight: 600;
}

.module-media {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 6px;
    margin: 12px 0;
    background-color: #f5f5f5;
}

.module-media img,
.module-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.module-features {
    font-size: 15px;
    line-height: 1.7;
    padding-left: 20px;
    margin: 12px 0 0 0;
    color: #555;
}

.module-features li {
    margin-bottom: 8px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    width: 100%;
}

.gallery-grid img,
.gallery-grid video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.project-videos {
    display: flex;
    gap: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    border-radius: 6px;
}

.project-videos[hidden] {
    display: none;
}

.project-videos video {
    flex: 1;
    max-width: 48%;
    max-height: 300px;
    width: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.robocup-videos {
    padding: 25px;
}

.video-toggle {
    color: #0066cc;
    background-color: transparent;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 24px;
    border: 2px solid #0066cc;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}

.video-toggle:hover {
    background-color: #0066cc;
    color: #fff;
}

.pdf-icon {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #0066cc;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 10px 24px;
    border: 2px solid #0066cc;
    border-radius: 6px;
    transition: all 0.3s;
    background-color: transparent;
}

.pdf-icon:before {
    content: "📄";
    font-size: 18px;
}

.pdf-icon:hover {
    background-color: #0066cc;
    color: #fff;
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.project-info p {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.project-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.project-links a {
    color: #0066cc;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 24px;
    border: 2px solid #0066cc;
    border-radius: 6px;
    transition: all 0.3s;
    background-color: transparent;
    font-weight: 500;
}

.project-links a:hover {
    background-color: #0066cc;
    color: #fff;
}

/* Blog */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.blog-item h3 {
    font-size: 22px;
    margin-bottom: 8px;
}

.blog-item h3 a {
    color: #333;
    text-decoration: none;
}

.blog-item h3 a:hover {
    color: #0066cc;
}

.blog-item .date {
    font-size: 16px;
    color: #888;
    margin-bottom: 10px;
}

.blog-item p {
    font-size: 17px;
    color: #666;
}

/* Experience & Honors */
.experience-section {
    margin-bottom: 40px;
}

.experience-section h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.experience-item {
    margin-bottom: 25px;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.exp-header strong {
    font-size: 18px;
    color: #333;
}

.exp-date {
    font-size: 16px;
    color: #888;
}

.experience-item p {
    font-size: 17px;
    line-height: 1.7;
    color: #666;
}

.teaching-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.teaching-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.honors-list {
    list-style: none;
    padding: 0;
}

.honors-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 17px;
}

.honors-list li:last-child {
    border-bottom: none;
}

.honors-list strong {
    color: #333;
    margin-right: 8px;
}

.honors-list span {
    color: #888;
    font-size: 16px;
}

/* News Section */
.news-list {
    list-style: none;
    padding: 0;
}

.news-item {
    display: flex;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 17px;
    align-items: baseline;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    color: #888;
    font-size: 15px;
    white-space: nowrap;
    min-width: 100px;
}

.news-item p {
    margin: 0;
    line-height: 1.6;
    color: #444;
}

.news-item a {
    color: #0066cc;
    text-decoration: none;
}

.news-item a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #f5f5f5;
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
}

footer p {
    color: #666;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile {
        flex-direction: column;
        text-align: center;
    }

    .publication-item {
        flex-direction: column;
    }

    .pub-image {
        width: 100%;
        height: 200px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .robocup-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .project-videos video {
        max-width: 100%;
    }

    .robocup-overview {
        margin: 15px 0;
    }

    .teaching-gallery {
        grid-template-columns: 1fr;
    }
}
