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

:root {
    --text-color: #2c3e50;
    --bg-color: #ffffff;
    --border-color: #e1e8ed;
    --link-color: #0066cc;
    --link-hover: #0052a3;
    --secondary-text: #6c757d;
    --accent-color: #007bff;
    --profile-image-size: 220px;
    --max-width: 1100px;
    --spacing-unit: 1rem;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
    --font-family-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e9ecef;
        --bg-color: #1a1a1a;
        --border-color: #2d3748;
        --link-color: #66b3ff;
        --link-hover: #88ccff;
        --secondary-text: #adb5bd;
        --accent-color: #4a9eff;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.navbar {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    background: var(--bg-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.navbar-brand {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.125rem;
    font-weight: 600;
}

.navbar-brand:hover {
    color: var(--link-color);
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.navbar-nav li {
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9375rem;
    font-weight: 400;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--link-color);
}

/* Main Content */
main {
    margin-top: 6rem;
    margin-bottom: 5rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-color);
}

h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--text-color);
}

h2:first-child {
    margin-top: 0;
}

/* Profile Section */
.profile-section {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    margin-top: 2rem;
}

.profile-name {
    display: none;
}

.profile-image {
    flex-shrink: 0;
    width: 240px;
    height: 240px;
    order: 2;
}

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

.profile-info {
    flex: 1;
    order: 1;
}

.profile-info-name {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1.2;
}

.name-chinese {
    font-size: 1.125rem;
    color: var(--secondary-text);
    font-weight: 400;
    margin-left: 0.5rem;
}

/* Content Section */
.content-section {
    margin-top: -2rem;
}

.subtitle {
    font-size: 1rem;
    color: var(--secondary-text);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.affiliation {
    margin: 0.75rem 0 0.5rem 0;
    font-size: 1rem;
    color: var(--text-color);
}

.affiliation a {
    color: var(--link-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

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

.contact {
    color: var(--secondary-text);
    margin: 0.5rem 0 1rem 0;
    font-size: 0.9375rem;
}

.links {
    margin-top: 1rem;
    font-size: 0.9375rem;
}

.links a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.links a:hover,
.links a:focus {
    border-bottom-color: var(--link-color);
    text-decoration: none;
}

.intro {
    margin-top: 1.5rem;
    line-height: 1.7;
    color: var(--text-color);
}

.intro a {
    color: var(--link-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

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

.content-section p {
    margin: 1rem 0;
    line-height: 1.7;
    color: var(--text-color);
}

.content-section p:first-of-type {
    margin-top: -0.5rem;
}

.content-section a {
    color: var(--link-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.content-section a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.content-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
    list-style: none;
}

.content-section ul li {
    margin: 0.5rem 0;
    position: relative;
    padding-left: 1rem;
    line-height: 1.6;
}

.content-section ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--link-color);
    font-weight: bold;
}

.content-section ul li strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Social Icons */
.social-icons {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.social-icons a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.social-icons a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* News Section */
.news-section {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.news-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.news-table tr {
    border-bottom: none;
}

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

.news-item-hidden {
    display: none;
}

.news-section.expanded .news-item-hidden {
    display: table-row;
}

.news-expand-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--link-color);
    font-size: 0.9375rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.news-expand-btn:hover {
    background-color: rgba(0, 102, 204, 0.08);
    border-color: var(--link-color);
}

.news-expand-btn:active {
    transform: translateY(1px);
}

.news-expand-icon {
    transition: transform 0.2s ease;
    font-size: 0.75rem;
}

.news-section.expanded .news-expand-icon {
    transform: rotate(180deg);
}

.news-date {
    padding: 0.5rem 1.5rem 0.5rem 0;
    vertical-align: top;
    white-space: nowrap;
    color: var(--secondary-text);
    font-size: 0.875rem;
    font-weight: 400;
    width: 130px;
}

.news-content {
    padding: 0.5rem 0;
    line-height: 1.7;
    color: var(--text-color);
}

.news-content a {
    color: var(--link-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.news-content a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.news-content strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Featured Video Section */
.featured {
    margin: 1rem 0 2rem;
}

.fv-media {
    display: grid;
    grid-template-columns: minmax(300px, 1.5fr) 1fr;
    align-items: center;
    gap: 1.5rem;
}

.fv-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.fv-thumb iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.fv-content {
    min-width: 0;
}

.fv-eyebrow {
    font-size: 0.8125rem;
    color: var(--secondary-text);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.fv-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-color);
}

.fv-meta {
    margin: 0.25rem 0 0.75rem;
    font-size: 0.9375rem;
    color: var(--secondary-text);
    line-height: 1.5;
}

.fv-links {
    margin: 0;
    font-size: 0.9375rem;
}

.fv-links a {
    color: var(--link-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.fv-links a:hover {
    color: var(--link-hover);
}

@media (max-width: 900px) {
    .fv-media {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .fv-thumb {
        width: 100%;
    }
}

/* Publications */
.publications {
    margin-top: 1.5rem;
}

.publication-year {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.publication-year:first-child {
    margin-top: 0;
}

.publication-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding: 0;
    border: none;
    border-radius: 0;
    transition: none;
    background: transparent;
}

.publication-item:hover {
    border-color: transparent;
    box-shadow: none;
}

.publication-item:last-child {
    margin-bottom: 0;
}

.publication-preview {
    flex-shrink: 0;
}

.publication-preview img {
    width: 300px;
    height: 150px;
    min-height: 180px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: block;
    max-width: 100%;
}

.publication-content {
    flex: 1;
    min-width: 0;
}

.publication-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.publication-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.publication-title a:hover {
    color: var(--link-color);
    text-decoration: underline;
}

.publication-authors {
    font-size: 1rem;
    color: var(--secondary-text);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.publication-authors strong {
    font-weight: 700;
    color: var(--text-color);
}

.publication-venue {
    font-size: 0.875rem;
    color: var(--secondary-text);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.publication-note {
    font-size: 0.8125rem;
    color: var(--secondary-text);
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.publication-links {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    font-size: 1rem;
}

.publication-links a {
    font-size: 1rem;
    color: var(--link-color);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-weight: 500;
}

.publication-links a:hover {
    color: var(--link-hover);
    background-color: rgba(0, 102, 204, 0.08);
    text-decoration: none;
}

.publication-links a .link-icon {
    flex-shrink: 0;
    opacity: 0.8;
}

.publication-links a:hover .link-icon {
    opacity: 1;
}

.publication-links a:not(:last-child)::after {
    content: '';
    display: none;
}

@media (prefers-color-scheme: dark) {
    .publication-links a:hover {
        background-color: rgba(102, 179, 255, 0.15);
    }
}


/* Footer */
footer {
    padding: 2.5rem 0;
    margin-top: 5rem;
    text-align: center;
    color: var(--secondary-text);
    font-size: 0.875rem;
}

footer p {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .profile-section {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .profile-name {
        display: block;
        margin-bottom: 0;
        font-size: 1.75rem;
        font-weight: 600;
        line-height: 1.2;
        order: 1;
        text-align: center;
    }
    
    .profile-info {
        text-align: left;
        width: 100%;
    }

    .profile-info-name {
        display: none;
    }

    .profile-image {
        width: 160px;
        height: 160px;
        order: 2;
    }

    .profile-info {
        order: 3;
        width: 100%;
    }

    .navbar-brand {
        gap: 0.1rem;
    }

    .brand-name {
        font-size: 1rem;
    }

    .brand-subtitle {
        font-size: 0.7rem;
    }

    .publication-item {
        flex-direction: column;
        gap: 1rem;
    }


    .publication-preview {
        align-self: center;
    }

    .publication-preview img {
        width: 100%;
        max-width: 300px;
    }

    .news-table {
        display: block;
    }

    .news-table tr {
        display: block;
        margin-bottom: 1rem;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 0.75rem;
    }

    .news-table tr:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .news-item-hidden {
        display: none;
    }
    
    .news-section.expanded .news-item-hidden {
        display: block;
    }

    .news-date {
        display: block;
        width: 100%;
        padding: 0 0 0.5rem 0;
        margin-bottom: 0.25rem;
    }

    .news-content {
        display: block;
        padding: 0;
    }
    
    .news-expand-btn {
        width: 100%;
        justify-content: center;
    }

    .navbar .container {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .navbar-nav {
        gap: 1.5rem;
    }

    h1 {
        font-size: 1.875rem;
    }

    h2 {
        font-size: 1.375rem;
        margin-top: 2rem;
    }

    main {
        margin-top: 2rem;
    }

}

@media (max-width: 480px) {
    .navbar-nav {
        gap: 0.25rem;
    }

    .nav-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.875rem;
    }

    .profile-image {
        width: 140px;
        height: 140px;
    }

    .profile-info h1 {
        font-size: 1.5rem;
    }

    .publication-preview img {
        width: 100%;
    }
}

