/* Base styles */
:root {
    --primary-color: #000000;
    --secondary-color: #444444;
    --background-color: #ffffff;
    --accent-color: #0055FF;
    --gray-light: #f5f5f5;
    --gray-medium: #e0e0e0;
    --max-width: 1200px;
    --content-width: 800px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Georgia, serif;
    line-height: 1.6;
    color: var(--primary-color);
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    transition: background-color 0.3s ease;
    min-height: 100vh;
}

/* Layout */
.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-medium);
    background: var(--nav-background);
    backdrop-filter: blur(10px);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.1);
}

.hero h1 {
    font-size: 4rem;
    margin: 0 0 1rem 0;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.social-links a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-2px);
}

.profile-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    align-items: start;
}

.profile-img {
    width: 100%;
    border-radius: 4px;
    filter: grayscale(100%);
}

.profile-text h1 {
    font-size: 3rem;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.title {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.research-interests {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Latest Updates */
.latest-updates {
    max-width: var(--content-width);
    margin: 4rem auto;
}

.update-card {
    display: grid;
    grid-template-columns: 100px 1fr;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: var(--gray-light);
    border-radius: 4px;
}

.update-date {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Research Areas */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--gray-light);
    padding: 2rem;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
}

.card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
}

.card p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.card a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Featured Articles */
.featured-articles {
    margin: 4rem 0;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    text-decoration: none;
    color: var(--primary-color);
    background: var(--gray-light);
    padding: 2rem;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.article-card:hover {
    transform: translateY(-4px);
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.tag {
    color: var(--accent-color);
}

.date {
    color: var(--secondary-color);
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.3;
}

h2 {
    font-size: 2rem;
    margin: 2rem 0 1.5rem 0;
}

/* Footer */
footer {
    width: 100%;
    padding: 20px 0;
    border-top: 1px solid var(--gray-medium);
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    color: var(--secondary-color);
}

.footer-content .divider {
    color: var(--gray-medium);
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons a {
    color: var(--secondary-color);
    text-decoration: none;
}

.social-icons a:hover {
    color: var(--accent-color);
}

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

    .profile-img {
        max-width: 200px;
        margin: 0 auto;
    }

    .social-links {
        justify-content: center;
    }

    .update-card {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Documentation Cards */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    margin-bottom: 20px;
}

.doc-card {
    background: var(--background-color);
    border: 1px solid var(--gray-medium);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

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

.doc-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.doc-meta .tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--gray-light);
    border-radius: 16px;
    font-size: 0.85rem;
}

.doc-content h3 {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.4;
}

.doc-content p {
    color: var(--secondary-color);
    font-size: 0.95rem;
    margin: 0;
    flex-grow: 1;
}

.doc-links {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-light);
}

.doc-link {
    color: var(--accent-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.doc-status {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* Music Page Styles */
.music-hero {
    text-align: center;
    padding: 4rem 0;
    background: var(--gray-light);
    margin-bottom: 2rem;
}

.music-hero .subtitle {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-top: 1rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.category-card {
    background: var(--background-color);
    border: 1px solid var(--gray-medium);
    border-radius: 12px;
    padding: 2rem;
}

.category-card h2 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
}

.music-content h3 {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
}

.piece-list, .theory-list, .composition-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.piece-list li, .composition-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-light);
}

.composer, .year {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.piece, .title {
    font-weight: 500;
}

.theory-list li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.theory-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Background Animation */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(45deg, #f3f3f3, #ffffff);
}

#bgCanvas {
    width: 100%;
    height: 100%;
    opacity: 0.1;
}

/* Update intro section styles */
.intro {
    max-width: 650px;
    margin: 8rem auto;
    padding: 0 2rem;
}

.intro h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.intro p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--secondary-color);
}

/* Link cards */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.link-card {
    text-decoration: none;
    color: var(--primary-color);
    padding: 2rem;
    border: 1px solid var(--gray-medium);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.link-card:hover {
    border-color: var(--accent-color);
}

.link-card h2 {
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
}

.link-card p {
    color: var(--secondary-color);
    margin: 0;
    font-size: 1rem;
}

/* Contact section */
.contact {
    max-width: 650px;
    margin: 4rem auto;
    padding: 0 2rem;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.social-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.social-links a:hover {
    color: var(--accent-color);
}

/* Background Slideshow */
.background-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 0.15;
}

[data-theme="dark"] .slide.active {
    opacity: 0.1;
    filter: brightness(0.8);
}

/* Update intro section for better contrast with background */
.intro {
    max-width: 650px;
    margin: 6rem auto 4rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.intro h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.intro p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

/* Update social links for better visibility */
.social-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}

.social-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-medium);
    border-radius: 4px;
}

.social-links a:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Theme variables */
:root[data-theme="light"] {
    --primary-color: #000000;
    --secondary-color: #444444;
    --background-color: #ffffff;
    --accent-color: #0055FF;
    --gray-light: #f5f5f5;
    --gray-medium: #e0e0e0;
    --nav-background: rgba(255, 255, 255, 0.9);
    --card-background: rgba(255, 255, 255, 0.95);
}

:root[data-theme="dark"] {
    --primary-color: #ffffff;
    --secondary-color: #a0a0a0;
    --background-color: #121212;
    --accent-color: #4d8eff;
    --gray-light: #1e1e1e;
    --gray-medium: #2d2d2d;
    --nav-background: rgba(18, 18, 18, 0.9);
    --card-background: rgba(18, 18, 18, 0.95);
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.theme-toggle:hover {
    color: var(--accent-color);
}

/* Update existing styles for theme support */
body {
    background-color: var(--background-color);
    transition: background-color 0.3s ease;
}

.nav-container {
    background: var(--nav-background);
    backdrop-filter: blur(10px);
}

.slide.active {
    opacity: 0.15;
}

[data-theme="dark"] .slide.active {
    opacity: 0.1;
    filter: brightness(0.8);
}

/* Update intro section for dark theme */
.intro h1 {
    color: var(--primary-color);
}

.intro p {
    color: var(--secondary-color);
}

/* Update footer for dark theme */
.social-icons a {
    color: var(--secondary-color);
}

.copyright {
    color: var(--secondary-color);
}

/* Update other content backgrounds */
.content-container {
    background-color: var(--background-color);
    padding-bottom: 20px;
}

.article-card, .doc-card, .category-card {
    background-color: var(--card-background);
    color: var(--primary-color);
}

/* Update text colors */
body {
    color: var(--primary-color);
    background-color: var(--background-color);
}

a {
    color: var(--accent-color);
}

.nav-links a {
    color: var(--primary-color);
}

/* Clean style without borders and background */
.intro.clean {
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    border: none;
}

.intro.clean h1 {
    color: var(--primary-color);
}

.intro.clean p {
    color: var(--secondary-color);
}

.logo {
    text-decoration: none;
    color: var(--primary-color);
}

.logo-img {
    height: 32px;
    width: auto;
    vertical-align: middle;
}

/* 确保最后一个内容区块有足够的下边距 */
section:last-child {
    margin-bottom: 0;
}

/* 网格布局的下边距 */
.docs-grid {
    margin-bottom: 20px;
} 