:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --light-text: #6b7280;
    --background: #ffffff;
    --section-bg: #f3f4f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

/* 首頁背景圖 */
#home {
    background-image: url('https://images.unsplash.com/photo-1498050108023-c5249f4df085?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

#home .hero {
    position: relative;
    z-index: 2;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#home .hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

#home .subtitle {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 2.5rem;
    color: #e5e7eb;
}

#home .highlight {
    color: #60a5fa;
    font-weight: 700;
}

#home .btn {
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-shadow: none;
}

#home .btn.primary {
    background-color: #3b82f6;
    border: 2px solid #3b82f6;
}

#home .btn.secondary {
    background-color: transparent;
    border: 2px solid #e5e7eb;
    color: #e5e7eb;
}

#home .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* 技能部分背景圖 */
#skills {
    background-image: url('https://images.unsplash.com/photo-1555066931-4365d14bab8c?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

#skills::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1;
}

#skills h2,
#skills .skills-grid {
    position: relative;
    z-index: 2;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-item {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

.section {
    min-height: 100vh;
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.section:nth-child(even) {
    background-color: var(--section-bg);
}

.hero {
    text-align: center;
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.highlight {
    color: var(--primary-color);
}

.subtitle {
    font-size: 1.5rem;
    color: var(--light-text);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    width: 100%;
}

.skill-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
}

.skill-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
    padding: 0 1rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-description {
    color: white;
    text-align: center;
    padding: 1rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.project-description p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:hover .project-description {
    transform: translateY(0);
}

.project-content {
    padding: 1.5rem;
    background: white;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.project-content p {
    color: var(--light-text);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-content .btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.project-content .btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.contact-form {
    max-width: 600px;
    width: 100%;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

footer {
    text-align: center;
    padding: 2rem;
    background: var(--section-bg);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.social-link {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transition: left 0.3s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        width: 80%;
        text-align: center;
        padding: 1rem;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-image {
        height: 200px;
    }
    
    .project-description p {
        font-size: 1rem;
    }
}

.about-content {
    max-width: 900px;
    width: 100%;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
}

.about-text {
    display: grid;
    gap: 2rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-radius: 6px;
}

#about {
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    position: relative;
}

@media (max-width: 768px) {
    .about-content {
        padding: 1.5rem;
    }
    
    .about-text p {
        font-size: 1rem;
        padding: 1.2rem;
    }
}

.timeline {
    max-width: 900px;
    width: 100%;
    margin-top: 3rem;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: var(--primary-color);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding: 1.5rem 0;
    width: 100%;
    position: relative;
}

.timeline-item:nth-child(odd) {
    justify-content: flex-start;
}

.timeline-content {
    width: 45%;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 2px;
    background-color: var(--primary-color);
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -20px;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -20px;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.timeline-desc {
    font-size: 0.95rem;
    color: var(--light-text);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        justify-content: flex-start;
        padding-left: 60px;
    }

    .timeline-item:nth-child(odd) {
        justify-content: flex-start;
    }

    .timeline-content {
        width: 100%;
    }

    .timeline-content::before {
        display: none;
    }

    .timeline-dot {
        left: 30px;
    }
} 