/* --- Global Styles --- */
:root {
    --primary-color: #111;
    --text-color: #333;
    --bg-color: #fff;
    --light-gray: #f4f4f4;
    --border-color: #e0e0e0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
}

/* --- 语言切换逻辑 --- */
body.lang-en .cn { display: none !important; }
body.lang-cn .en { display: none !important; }

/* Language Switcher Styles */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lang-btn {
    cursor: pointer;
    color: #000;
    transition: all 0.3s ease;
}

.lang-btn:hover { opacity: 0.6; }

.lang-btn.active-lang {
    color: #ccc; 
    cursor: default;
    pointer-events: none;
}

.lang-separator { color: #e0e0e0; font-weight: 300; }

h1, h2, h3, h4 {
    font-family: "Georgia", "Times New Roman", "Songti SC", serif;
    font-weight: normal;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

a:hover { opacity: 0.6; }

/* --- Navigation --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 50px;
    background: rgba(255, 255, 255, 0.98);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 20px;
    font-weight: 700;
    font-family: "Georgia", serif;
    letter-spacing: 3px;
    color: #000;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 35px;
    align-items: center;
}

nav ul li a {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    color: #444;
}

/* --- Hero Section --- */
.hero {
    height: 95vh;
    background-color: #1a1a1a;
    background-image: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.4)), url('images/homepage.jpg');
    background-size: cover;
    background-position: center 15%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
    align-items: center;
    text-align: center;
    color: #fff;
    padding-bottom: 120px;
}

.hero h1 {
    font-size: 80px; 
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: 6px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    font-weight: 400;
}

.hero p {
    font-size: 20px;
    margin-bottom: 50px;
    font-weight: 400;
    letter-spacing: 5px;
    text-transform: uppercase;
    opacity: 0.95;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: #fff;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px); 
}

.btn:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.btn-dark { border-color: #000; color: #000; }
.btn-dark:hover { background: #000; color: #fff; }

/* --- Sections General --- */
section {
    padding: 100px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 30px;
    letter-spacing: 2px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: #000;
    margin: 20px auto 0;
}

.subsection-title {
    font-size: 20px;
    color: #666;
    margin-bottom: 30px;
    border-left: 4px solid #000;
    padding-left: 15px;
    text-align: left;
}

/* --- Biography --- */
.bio-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: justify;
    text-justify: inter-ideograph;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

.bio-text {
    font-size: 16px;
    color: #555;
    margin-bottom: 25px;
}

.quote-box {
    margin-top: 40px;
    padding: 30px;
    background: #f8f8f8;
    text-align: center;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.quote-text {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 22px;
    color: #333;
    margin-bottom: 10px;
}

.quote-author {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #777;
}

/* --- Audio Player --- */
.playlist {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.track {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--border-color);
    background: #fff;
    transition: box-shadow 0.3s;
}

.track:hover { box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

.track-info { flex: 1; padding-right: 20px; }

.track-title {
    font-size: 15px;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.track-desc {
    font-size: 12px;
    color: #888;
    font-family: "Georgia", serif;
    font-style: italic;
}

audio {
    width: 375px;
    height: 54px; 
    filter: grayscale(100%) contrast(1.2);
}

/* --- Featured Projects (Grid Layout) --- */
#projects {
    background-color: var(--light-gray);
    max-width: 100%; 
    width: 100%;
}

.projects-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.project-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-img {
    width: 100%;
    aspect-ratio: 5 / 4;
    background-color: #ccc;
    background-size: cover;
    background-position: center;
}

.project-content { padding: 30px; }

.project-cat {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: block;
}

.project-title {
    font-size: 20px;
    margin-bottom: 10px;
    font-family: "Georgia", serif;
    line-height: 1.3;
}

.project-title a {
    color: inherit;
    text-decoration: none;
}

.project-title a:hover { text-decoration: underline; }

.project-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* --- Contact --- */
.contact-section {
    text-align: center;
    background: #111;
    color: #fff;
    padding: 120px 20px;
    max-width: 100%;
}

.contact-section h2 { color: #fff; }
.contact-section h2::after { background: #555; }

.contact-email {
    font-size: 28px;
    font-family: "Georgia", serif;
    color: #aaa;
    border-bottom: 1px solid transparent;
}

.contact-email:hover {
    color: #fff;
    border-bottom: 1px solid #fff;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    margin-top: 40px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-label {
    font-size: 11px;
    color: #666;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.contact-link, .contact-text {
    font-size: 24px;
    font-family: "Georgia", serif;
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #fff;
    border-bottom: 1px solid #fff;
}

.contact-text { color: #ccc; cursor: default; }

/* --- Footer --- */
footer {
    background-color: #000;
    color: #555;
    padding: 40px 20px;
    text-align: center;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Project Detail Page Styles --- */
.project-hero {
    height: 60vh;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding-bottom: 60px;
}

.project-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    text-align: left;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.project-header-content h1 {
    color: #fff;
    font-size: 48px;
    margin-bottom: 10px;
}

.project-header-meta {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
}

.project-detail-content {
    max-width: 800px;
    margin: 80px auto;
    padding: 0 20px;
    line-height: 1.8;
    font-size: 16px;
    color: #444;
}

.project-detail-content p {
    text-align: justify;
    text-justify: inter-ideograph;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

.project-detail-content h3 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 24px;
}

/* --- Platform Links & Credits --- */
.platform-links-section {
    margin: 40px 0;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.platform-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.platform-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.platform-btn:hover {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.credits-section {
    margin-top: 60px;
    border-top: 1px solid #eee;
    padding-top: 40px;
}

.credits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.credit-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.credit-item.full-width {
    grid-column: 1 / -1;
}

.credit-item .role {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.credit-item .name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

/* --- Animation & Modal Styles --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hidden-element { opacity: 0; will-change: opacity, transform; }
.visible { animation: fadeInUp 1.0s ease-out forwards; }

.project-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #fff;
    z-index: 9999;
    overflow-y: auto;
}

.project-modal.active { display: block; }
.modal-content-wrapper { width: 100%; height: 100%; }
#modal-iframe { width: 100%; height: 100%; border: none; }

/* [MODIFIED] Close Modal Button Position */
.close-modal {
    position: fixed;
    bottom: 40px; /* Moved to bottom */
    right: 40px;  /* Moved to right */
    background: #000; 
    color: #fff;
    border: none; 
    width: 50px; 
    height: 50px;
    border-radius: 50%; 
    font-size: 28px;
    cursor: pointer; 
    z-index: 10000;
    display: flex; 
    justify-content: center; 
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}
.close-modal:hover { transform: scale(1.1); }

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    header { flex-direction: column; padding: 15px 20px; }
    nav ul { 
        margin-top: 20px; 
        flex-wrap: wrap; 
        justify-content: center; 
        gap: 15px; 
    }
    nav ul li a { font-size: 11px; }
    .lang-switcher { margin-top: 5px; }

    .hero h1 { font-size: 36px; }
    .hero p { font-size: 14px; }
    .track { flex-direction: column; align-items: flex-start; gap: 15px; }
    audio { width: 100%; } 
    .project-grid { grid-template-columns: 1fr; }
    .project-hero { height: 50vh; }
    .project-header-content h1 { font-size: 32px; }
    .score-viewer-wrapper { min-height: 400px; }
    
    /* Mobile Close Button Adjustment */
    .close-modal { bottom: 20px; right: 20px; width: 40px; height: 40px; font-size: 24px; }
}