/* Base Styles */
:root {
    --text-color: #000;
    --background-color: #fff;
    --border-color: #ddd;
    --accent-color: #333;
    --spacing-unit: 1rem;
}

/* Font settings */
@font-face {
    font-family: 'Songti SC';
    src: local('Songti SC');
}

body {
    font-family: 'Georgia', serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

:lang(zh) {
    font-family: 'Songti SC', serif;
}

/* Layout */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-unit) var(--spacing-unit);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(var(--spacing-unit) * 0.5) calc(var(--spacing-unit) * 2);
    border-bottom: 1px solid var(--border-color);
}

main {
    min-height: calc(100vh - 200px);
    padding: calc(var(--spacing-unit) * 2) 0;
}

footer {
    text-align: center;
    padding: var(--spacing-unit);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

/* Typography */
h1, h2, h3 {
    font-weight: normal;
    margin-top: calc(var(--spacing-unit) * 2);
    margin-bottom: var(--spacing-unit);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.2rem;
}

p {
    margin-bottom: var(--spacing-unit);
}

.subtitle {
    margin-top: calc(var(--spacing-unit) * 1.5);
}

/* Navigation */
.home-link a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
}

.home-link a:hover {
    text-decoration: underline;
}

.main-nav {
    text-align: left;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.main-nav li {
    margin-right: calc(var(--spacing-unit) * 1.5);
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    padding: calc(var(--spacing-unit) * 0.3) 0;
    transition: all 0.2s ease;
}

.main-nav a:hover {
    border-bottom: 2px solid var(--accent-color);
}

.main-nav a.active {
    border-bottom: 2px solid var(--accent-color);
    font-weight: bold;
}

/* Language Switcher */
.language-switcher {
    font-size: 0.9rem;
}

.language-switcher a {
    text-decoration: none;
    color: var(--text-color);
    padding: 0 calc(var(--spacing-unit) * 0.5);
}

.language-switcher a:hover {
    opacity: 0.8;
}

.language-switcher a.active {
    font-weight: bold;
}

.language-switcher .separator {
    color: var(--border-color);
}

.flag-icon {
    font-size: 1.2rem;
    display: inline-block;
}

/* Sections */
section {
    margin-bottom: calc(var(--spacing-unit) * 3);
}

/* Profile Section */
.profile {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.avatar-container {
    margin: calc(var(--spacing-unit) * 2) auto;
    width: 180px;
    height: 180px;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: block;
    position: static;
}

.pronunciation {
    margin-top: calc(var(--spacing-unit) * 0.5);
    margin-bottom: 0;
    font-size: 0.9rem;
}

.pronunciation a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--accent-color);
}

.pronunciation a:hover {
    color: #555;
}

.pronunciation-text {
    font-size: 0.9rem;
    max-width: 500px;
    margin: 0.3rem auto 0.7rem auto;
    color: #555;
    line-height: 1.4;
}

.profile h1 {
    margin-bottom: 0;
}

.profile h2 {
    margin-top: 0;
}

/* Projects */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: calc(var(--spacing-unit) * 2);
}

.project-card {
    border: 1px solid var(--border-color);
    padding: var(--spacing-unit);
}

.project-card h3 {
    margin-top: 0;
}

/* Research */
.research-item {
    border: 1px solid var(--border-color);
    padding: var(--spacing-unit);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.research-item h3 {
    margin-top: 0;
}

.research-item a.pdf-link {
    display: inline-block;
    margin-top: calc(var(--spacing-unit) * 0.5);
    text-decoration: none;
    color: var(--accent-color);
    border: 1px solid var(--border-color);
    padding: calc(var(--spacing-unit) * 0.3) calc(var(--spacing-unit) * 0.5);
    margin-right: calc(var(--spacing-unit) * 0.5);
}

.research-item a.pdf-link:hover {
    background-color: var(--border-color);
}

/* Thoughts */
.thought-item {
    border: 1px solid var(--border-color);
    padding: var(--spacing-unit);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.thought-item h3 {
    margin-top: 0;
}

.thought-content {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-unit);
}

.thought-date {
    color: #666;
    font-style: italic;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.thought-body {
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.back-link {
    margin-top: calc(var(--spacing-unit) * 2);
    padding-top: calc(var(--spacing-unit));
    border-top: 1px solid var(--border-color);
}

.back-link a {
    text-decoration: none;
    color: var(--accent-color);
}

.back-link a:hover {
    text-decoration: underline;
}

/* Contact */
.contact ul {
    list-style: none;
    padding-left: 0;
}

.contact li {
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}

/* Social Links */
.social-links {
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}

.social-links a {
    display: inline-block;
    margin: 0 calc(var(--spacing-unit) * 0.5);
    color: var(--text-color);
    font-size: 1.5rem;
    text-decoration: none;
}

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

/* Artwork */
.artwork-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: calc(var(--spacing-unit) * 2);
    margin-top: calc(var(--spacing-unit) * 2);
}

.artwork-item {
    border: 1px solid var(--border-color);
    padding: var(--spacing-unit);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.artwork-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.artwork-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 4/3;
    margin-bottom: var(--spacing-unit);
    background-color: #f9f9f9;
}

.artwork-item h3 {
    margin-top: 0;
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}

.artwork-item p {
    margin: 0;
    font-size: 0.9rem;
}

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in forwards;
}

/* Additional Responsive Improvements */
@media (max-width: 600px) {
    header {
        padding: var(--spacing-unit);
        flex-direction: column;
        align-items: center;
    }
    
    .home-link {
        margin-bottom: calc(var(--spacing-unit) * 0.5);
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .main-nav li {
        margin: calc(var(--spacing-unit) * 0.3) 0;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .lightbox-image {
        max-width: 95%;
        max-height: 95%;
    }
}

a, a:visited {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}
a:hover, a.active {
    color: #111;
    text-decoration: underline;
} 