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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Microsoft JhengHei', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Three.js 背景容器 */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* 頭部區塊 */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05) rotate(5deg);
}

.profile-info {
    flex: 1;
    min-width: 300px;
}

.name {
    font-size: 2.5em;
    color: #2d3748;
    margin-bottom: 10px;
    font-weight: 700;
}

.title {
    font-size: 1.3em;
    color: #667eea;
    margin-bottom: 10px;
    font-weight: 600;
}

.subtitle {
    font-size: 1.1em;
    color: #718096;
    margin-bottom: 20px;
}

.contact {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.contact a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
}

.contact a:hover {
    color: #764ba2;
    background: rgba(118, 75, 162, 0.1);
}

/* 區塊樣式 */
section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out;
}

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

section h3 {
    font-size: 2em;
    color: #2d3748;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
    font-weight: 700;
}

section h4 {
    font-size: 1.3em;
    color: #4a5568;
    margin-bottom: 15px;
    font-weight: 600;
}

/* 簡介區塊 */
.intro-content p {
    margin-bottom: 20px;
    font-size: 1.05em;
    color: #4a5568;
    text-align: justify;
}

.intro-content strong {
    color: #667eea;
    font-weight: 600;
}

/* 技能網格 */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.skill-category {
    background: linear-gradient(135deg, #f6f8fb 0%, #ffffff 100%);
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid #667eea;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.skill-category h4 {
    color: #667eea;
    margin-bottom: 12px;
}

.skill-category p {
    color: #718096;
    font-size: 0.95em;
    line-height: 1.8;
}

/* 教學經驗 */
.teaching-content ul {
    list-style: none;
    padding-left: 0;
}

.teaching-content li {
    padding: 12px 0 12px 30px;
    position: relative;
    color: #4a5568;
    font-size: 1.05em;
}

.teaching-content li:before {
    content: "📚";
    position: absolute;
    left: 0;
}

/* 專案網格 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.project-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.project-card h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.project-card p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}

/* 學術背景 */
.academic-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.education ul,
.publications ul {
    list-style: none;
    padding-left: 0;
}

.education li,
.publications li {
    padding: 12px 0 12px 30px;
    position: relative;
    color: #4a5568;
    margin-bottom: 10px;
}

.education li:before {
    content: "🎓";
    position: absolute;
    left: 0;
}

.publications li:before {
    content: "📄";
    position: absolute;
    left: 0;
}

/* 頁尾 */
.footer {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    color: #718096;
    backdrop-filter: blur(10px);
}

.footer p {
    margin: 8px 0;
}

.tech-note {
    font-size: 0.9em;
    color: #a0aec0;
    font-style: italic;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .profile-section {
        flex-direction: column;
        text-align: center;
    }

    .name {
        font-size: 2em;
    }

    .title {
        font-size: 1.1em;
    }

    section {
        padding: 25px;
    }

    section h3 {
        font-size: 1.6em;
    }

    .academic-content {
        grid-template-columns: 1fr;
    }

    .contact {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 25px;
    }

    .profile-img {
        width: 150px;
        height: 150px;
    }

    .name {
        font-size: 1.6em;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
}
