:root {
    /* 配色靈感：古典油畫與清新自然的結合 */
    --primary-color: #556B2F; /* 橄欖綠/鼠尾草綠 - 清新 */
    --accent-color: #C19A6B; /* 古銅金 - 古典 */
    --bg-color: #F9F7F2; /* 米白紙張質感 */
    --text-color: #333333; /* 深灰 */
    --light-text: #666666;
    --white: #FFFFFF;
    --card-shadow: 0 4px 20px rgba(85, 107, 47, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Noto Serif TC', serif; /* 古典襯線字體 */
    color: var(--primary-color);
}

/* 導覽列 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(249, 247, 242, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(193, 154, 107, 0.3);
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-btn {
    background: none;
    border: none;
    font-family: 'Noto Serif TC', serif;
    font-size: 1.1rem;
    color: var(--light-text);
    cursor: pointer;
    padding: 0.5rem 0;
    position: relative;
}

.nav-btn:hover, .nav-btn.active {
    color: var(--primary-color);
}

.nav-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s;
}

.nav-btn:hover::after, .nav-btn.active::after {
    width: 100%;
}

/* 頁面容器 */
.container {
    margin-top: 80px;
    padding: 2rem 5%;
    min-height: 100vh;
}

/* 頁面切換邏輯 */
.page-section {
    display: none;
    animation: fadeIn 0.8s ease-out;
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 首頁 (Home) */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    gap: 4rem;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-text .subtitle {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--light-text);
    margin-bottom: 2rem;
}

.cta-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-family: 'Noto Serif TC', serif;
    transition: all 0.3s;
}

.cta-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(85, 107, 47, 0.2);
}

.hero-img-container {
    position: relative;
    width: 350px;
    height: 350px;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50% 50% 0 50%; /* 藝術感形狀 */
    border: 5px solid var(--white);
    box-shadow: var(--card-shadow);
    z-index: 2;
    position: relative;
}

.hero-bg-shape {
    position: absolute;
    top: 20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-color);
    border-radius: 50% 50% 0 50%;
    z-index: 1;
}

/* 技能頁 (Skills) */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
    box-shadow: var(--card-shadow);
}

.skill-card h3 {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
}

.skill-list li {
    list-style: none;
    margin-bottom: 0.8rem;
    padding-left: 1.2rem;
    position: relative;
    color: var(--light-text);
}

.skill-list li::before {
    content: '❧'; /* 古典裝飾符號 */
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* 經歷與學歷 (Experience) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--accent-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
    opacity: 0.3;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item.left { left: 0; text-align: right; }
.timeline-item.right { left: 50%; }

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--bg-color);
    border: 3px solid var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.right::after { left: -8px; }

.timeline-content {
    padding: 20px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.year-tag {
    display: inline-block;
    background: rgba(85, 107, 47, 0.1);
    color: var(--primary-color);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 10px;
    font-weight: bold;
}

/* 專案作品 (Projects) */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-content {
    padding: 2rem;
}

.project-tags {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #F0F2EB;
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* 論文 (Publications) */
.paper-item {
    background: var(--white);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--card-shadow);
}

.paper-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-family: 'Noto Serif TC', serif;
}

/* 頁尾 */
footer {
    text-align: center;
    padding: 3rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(193, 154, 107, 0.2);
    font-size: 0.9rem;
    color: var(--light-text);
}

.social-icons {
    margin-top: 1rem;
}

.social-icons a {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0 10px;
}

/* RWD 調整 */
@media screen and (max-width: 768px) {
    .hero { flex-direction: column-reverse; text-align: center; }
    .hero-text h1 { font-size: 2.5rem; }
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item.left { text-align: left; }
    .timeline-item.left::after, .timeline-item.right::after { left: 21px; }
    .timeline-item.right { left: 0%; }
    .nav-links { display: none; } /* 簡化版：手機隱藏選單，實際專案可加漢堡選單 */
}
