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

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

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

/* Header Section */
.header-section {
    background-color: #ffffff;
    padding: 40px 20px 10px 20px;
}

.header-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-info h1 {
    font-size: 2.5em;
    color: #222;
    margin-bottom: 10px;
    font-weight: 500;
}

.chinese-name {
    font-family: "楷体", "KaiTi", "Kaiti SC", "STKaiti", serif;
    font-size: 1.2em;
    color: #555;
}

.header-info p {
    font-size: 1.1em;
    line-height: 1.8;
    color: #555;
    margin: 10px 0;
}

.profile-img {
    width: 200px;
    height: 260px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* Navigation */
.topnav {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    padding: 0 20px;
    background-color: #0066cc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.topnav a {
    display: block;
    color: #ffffff;
    text-align: center;
    padding: 16px 20px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.topnav a:hover {
    background-color: #0052a3;
}

.topnav a.active {
    background-color: #004080;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px 40px 20px;
}

section {
    margin-bottom: 10px;
    background-color: #fff;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

h2 {
    font-size: 2em;
    color: #0066cc;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

h3 {
    font-size: 1.8em;
    color: #0066cc;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

h4 {
    font-size: 1.4em;
    color: #333;
    margin: 20px 0 10px 0;
}

p {
    font-size: 1.05em;
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 15px;
}

/* Links */
a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #004080;
    text-decoration: underline;
}

/* Lists */
ul {
    list-style: none;
    padding: 0;
}

ul li {
    padding: 2px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 1.05em;
    line-height: 1.6;
}

ul li:last-child {
    border-bottom: none;
}

/* Ordered lists (for publications) */
ol {
    counter-reset: item;
    list-style: none;
    padding-left: 0;
}

ol li {
    counter-increment: item;
    margin-bottom: 20px;
    padding-left: 35px;
    position: relative;
    line-height: 1.8;
}

ol li:before {
    content: "[" counter(item) "]";
    position: absolute;
    left: 0;
    font-weight: bold;
    color: #0066cc;
}

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

footer p {
    color: #555;
    font-size: 0.95em;
    text-align: center;
    font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", "微软雅黑", SimSun, "宋体", sans-serif
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table th {
    background-color: #0066cc;
    color: white;
    padding: 5px;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 5px;
    border-bottom: 1px solid #e9ecef;
}

table tr:hover {
    background-color: #f8f9fa;
}

/* Course Listings */
.course {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

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

.course-header {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    align-items: start;
}

.university-logo {
    width: 160px;
    height: auto;
    max-height: 200px;
    object-fit: contain;
}

.course-info h4 {
    margin-top: 0;
    margin-bottom: 15px;
}

.course-info p {
    margin-bottom: 10px;
    text-align: left;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .header-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-img {
        width: 180px;
        height: 235px;
        margin: 0 auto;
    }

    .header-info h1 {
        font-size: 2em;
    }

    .nav-container {
        flex-direction: column;
        padding: 0;
    }

    .topnav a {
        width: 100%;
        text-align: left;
    }

    section {
        padding: 20px;
    }

    h2 {
        font-size: 1.6em;
    }

    h3 {
        font-size: 1.4em;
    }

    .course-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .university-logo {
        margin: 0 auto 20px auto;
    }
}
