:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --text-color: #333;
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Navigation */
nav {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links button {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    font-size: 1rem;
    margin-left: 1.5rem;
    padding: 0.5rem;
    transition: color 0.3s;
}

.nav-links button:hover, .nav-links button.active {
    color: white;
    border-bottom: 2px solid var(--accent-color);
}

.lang-switch {
    background-color: var(--accent-color) !important;
    color: white !important;
    border-radius: 4px;
    padding: 0.3rem 0.8rem !important;
    border-bottom: none !important;
}

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

/* Sections */
.page-section {
    display: none;
    animation: fadeIn 0.5s;
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h1, h2, h3 {
    color: var(--primary-color);
}

.card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

/* About Page Styles */
.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
    color: var(--accent-color);
}

.contact-info a {
    color: var(--accent-color);
    text-decoration: none;
}

.social-info {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
    color: var(--accent-color);
}

.social-info a {
    color: var(--accent-color);
    text-decoration: none;
}

.timeline-item {
    border-left: 3px solid var(--accent-color);
    padding-left: 20px;
    margin-bottom: 20px;
}

.timeline-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

/* Skills Page Styles */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.skill-category h3 {
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background-color: #e1ecf4;
    color: #2c3e50;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
}

/* Projects Page Styles */
.project-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}
.project-item:last-child {
    border-bottom: none;
}
.tech-stack {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Utility for Language Switching */
.en-text { display: none; }
.zh-text { display: none; }

body.lang-en .en-text { display: block; }
body.lang-en .en-inline { display: inline; }
body.lang-zh .zh-text { display: block; }
body.lang-zh .zh-inline { display: inline; }

/* Handling inline spans specifically */
body.lang-en .zh-inline { display: none; }
body.lang-zh .en-inline { display: none; }