/* 基本設置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 導航欄 */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    color: #007acc;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: #007acc;
}

/* Hero 區域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 120px 0 80px;
    color: white;
    margin-top: 70px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.highlight {
    color: #ffd700;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #007acc;
    color: white;
}

.btn-primary:hover {
    background: #005a99;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #007acc;
}

.hero-image {
    text-align: center;
}

.hero-image img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(255,255,255,0.2);
}

/* 關於我區域 */
.about {
    padding: 80px 0;
    background: #f8f9fa;
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #333;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
    color: #007acc;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-text ul {
    margin: 20px 0;
    padding-left: 0;
}

.about-text li {
    list-style: none;
    padding: 10px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.about-text li i {
    color: #007acc;
    width: 20px;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.skill-tag {
    background: #007acc;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 專案頁面 */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 60px;
    margin-top: 70px;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.projects {
    padding: 80px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.project-card.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.project-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-content {
    padding: 30px;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.project-content p {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}

.project-tech {
    margin-bottom: 25px;
}

.tech-tag {
    background: #e9ecef;
    color: #495057;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-right: 8px;
    margin-bottom: 8px;
    display: inline-block;
}

.project-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* 教學頁面 */
.tutorials {
    padding: 80px 0;
}

.tutorial-categories {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 20px;
    border: 2px solid #007acc;
    background: transparent;
    color: #007acc;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.category-btn.active,
.category-btn:hover {
    background: #007acc;
    color: white;
}

.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.tutorial-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    gap: 20px;
}

.tutorial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.tutorial-icon {
    font-size: 2.5rem;
    color: #007acc;
    flex-shrink: 0;
}

.tutorial-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.tutorial-content p {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}

.tutorial-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.difficulty {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.difficulty.beginner {
    background: #d4edda;
    color: #155724;
}

.difficulty.intermediate {
    background: #fff3cd;
    color: #856404;
}

.difficulty.advanced {
    background: #f8d7da;
    color: #721c24;
}

.read-time {
    color: #6c757d;
    font-size: 0.9rem;
}

.tutorial-link {
    color: #007acc;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.tutorial-link:hover {
    color: #005a99;
}

/* 聯絡區域 */
.contact {
    padding: 80px 0;
    background: #f8f9fa;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #333;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
}

.contact-item i {
    color: #007acc;
    font-size: 1.5rem;
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-image img {
        width: 250px;
        height: 250px;
    }
    
    .project-card.featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        display: none;
    }
    
    .tutorial-card {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
    }
}
