@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

@supports (-webkit-touch-callout: none) {
    /* iOS 和 Safari 特定的樣式 */
    .intro-text strong {
        font-weight: 700; /* 在 iOS 上可能需要更粗的字重 */
        -webkit-text-fill-color: #4169E1; /* Safari 特定的文字顏色屬性 */
    }
     /* 修復 article-link 在 Safari 上的顯示問題 */
     .article-link {
        display: flex;
        width: 100%;
        max-width: 400px;
        align-items: center;
        padding: 15px;
    }
    
    .article-content {
        display: flex;
        flex: 1;
        align-items: center;
    }
    
    .article-info {
        flex: 1;
        min-width: 0; /* 防止內容溢出 */
    }
    
    .article-source {
        display: block;
        margin-bottom: 5px;
    }
    
    .article-title {
        font-size: 14px;
        margin: 0;
        word-break: break-word; /* 確保長文字換行 */
    }
    
    .article-image {
        width: 70px;
        height: 70px;
        flex-shrink: 0;
        margin-right: 15px;
    }
    
    .article-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    @media (min-width: 481px) {
        .photo-grid{
            display: none;
        }
        .grid-photo{
            display: none;
        }
    }
    
    /* 手機版修復 */
    @media (max-width: 480px) {
        .article-link {
            width: 100%;
            padding: 15px;
        }
        
        .article-image {
            width: 60px;
            height: 60px;
        }
        
        .article-title {
            font-size: 13px;
        }
        .more-of-me{
            display: none;
        }
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: #ffffff;
    background-image: 
        radial-gradient(at 80% 20%, rgba(235, 225, 255, 0.35) 0, transparent 50%),
        radial-gradient(at 20% 80%, rgba(255, 220, 240, 0.35) 0, transparent 50%),
        radial-gradient(at 50% 50%, rgba(250, 235, 255, 0.28) 0, transparent 60%),
        radial-gradient(at 10% 30%, rgba(255, 225, 245, 0.32) 0, transparent 40%),
        radial-gradient(at 90% 85%, rgba(255, 220, 235, 0.38) 0, transparent 45%);
    color: #333;
    background-attachment: fixed;
}

#loader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 5px solid #ddd;
    border-top: 5px solid #4169e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.header {
    display: flex;
    flex-direction: row;
    min-height: 90vh; /* 原來是 100vh，稍微減少一點 */
    padding: 20px 80px;
}

.text-container {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 70px;
    max-width: 600px;
}

.photo-container {
    flex: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 70px;
    perspective: 1000px;
}

.intro-text {
    font-size: 28px;
    line-height: 1.4;
    margin-bottom: 30px;
    font-weight: 300;
    letter-spacing: -0.5px;
    color: #333;
    max-width: 500px;
}
.intro-text strong{
    color: #4169E1;
    font-weight: 600;
    display: inline-block; /* 幫助在某些平台上更好地渲染 */
    position: relative; /* 為可能的下劃線或其他效果做準備 */
}

.title-text {
    font-size: 46px;
    font-weight: 400;
    letter-spacing: -1px;
    margin-bottom: 15px;
    color: #111;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    line-height: 1.2;
}

.typing-text {
    font-size: 46px;
    font-weight: 600;
    display: inline-block;
    position: relative;
    color: #4169e1;
    letter-spacing: -1px;
    white-space: nowrap;
    overflow: hidden;
    margin-left: 15px;
}

.typing-text::after {
    content: "|";
    position: absolute;
    right: -5px;
    animation: blink 1s infinite;
    font-weight: 900;
    font-size: 46px;
    color: #000;
    line-height: 1;
}

.img-placeholder {
    width: 90%;
    max-width: 350px;
    height: auto;
    border-radius: 12px;
    position: relative;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(65, 105, 225, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.img-placeholder::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #4169e1, #6495ED);
    z-index: 2;
}

.portfolio-btn {
    margin-top: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background-color: #FF7843; /* 高級感的橘色，不使用漸變 */
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1); /* 更緩慢的動畫過渡 */
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-decoration: none;
    text-align: center;
    max-width: 180px;
}

.portfolio-btn .text {
    display: block;
    transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1); /* 更緩慢的動畫過渡 */
}

.portfolio-btn .icon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(-50px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    width: 100%; /* 確保寬度佔滿整個按鈕 */
    height: 100%; /* 確保高度佔滿整個按鈕 */
    left: 0; /* 從左邊開始 */
    top: 0; /* 從頂部開始 */
}


.portfolio-btn:hover {
    background-color: #FF6B34; /* 略深的橘色 */
}

.portfolio-btn:hover .text {
    transform: translateX(50px);
    opacity: 0;
}

.portfolio-btn:hover .icon {
    transform: translateX(0);
    opacity: 1;
}

.portfolio-btn:active {
    transform: translateY(1px);
}

/* Google Fonts 箭頭圖標 */
.material-symbols-outlined {
    font-size: 26px; /* 調整箭頭大小 */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto; /* 水平居中 */
    line-height: 1;
}

/* 3D 傾斜效果 */
.tilt-effect {
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform 0.1s ease;
}
.gradient-transition {
    height: 150px;
    background-image: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.7) 40%, 
        rgba(255, 255, 255, 1) 100%);
    margin-top: 50px;
    position: relative;
    z-index: 0;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.about-me {
    padding: 100px 0;
    background-color: #ffffff; /* 純白色背景 */
    /* 移除原本的漸變背景 */
    background-image: none;
    position: relative; /* 為了確保它覆蓋在漸變背景上 */
    z-index: 1; /* 確保它在漸變過渡層之上 */
}

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

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 40px;
    font-weight: 600;
    color: #111;
    letter-spacing: -1px;
    margin-bottom: 15px;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #4169e1, #6495ED);
    margin: 0 auto;
    border-radius: 2px;
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 18px;
    line-height: 1.6;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

.about-content {
    display: flex;
    gap: 80px;
    align-items: center;
    justify-content: center;
}

.about-text, .about-stats {
    flex: 1;
    max-width: 500px;
}

.experience-item, .education-item {
    margin-bottom: 40px;
}

.about-text h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.about-text p {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

.about-text strong {
    color: #4169e1;
    font-weight: 600;
}

.stats-title {
    margin-bottom: 20px;
}

.stats-title h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.stat-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

.stat-label {
    width: 100px;
    font-size: 16px;
    color: #555;
}

.stat-bar {
    flex: 1;
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, #4169e1, #6495ED);
    border-radius: 5px;
    transition: width 1s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.stat-value {
    width: 80px;
    text-align: left;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* 動畫效果 */
.about-me .section-title, 
.about-text, 
.about-stats {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.about-me.active .section-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.about-me.active .about-text {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.about-me.active .about-stats {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}
/* Projects 區塊樣式 */
.projects {
    padding: 100px 0;
    background-color: #ffffff;
    position: relative;
    z-index: 1;
}

/* 過濾按鈕容器 */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

/* 過濾按鈕樣式 */
.filter-btn {
    padding: 9px 16px;
    border: none;
    border-radius: 25px;
    background-color: #f0f0f0;
    color: #555;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
}
.filter-btn[data-filter="all"].active, 
.filter-btn[data-filter="all"]:hover {
    background-color: #4169e1; /* 蓝色 */
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #4169e1;
}

/* 項目卡片容器 */
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* 項目卡片樣式 */
.project-card {
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease, opacity 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
}

/* 卡片內容 */
.project-content {
    display: flex;
    flex-direction: row;
}

/* 項目圖片容器 */
.project-image {
    flex: 0.4;
    position: relative;
    overflow: hidden;
}

/* 保持3:4的長寬比 */
.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    aspect-ratio: 4/3;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}
.project-image-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
.project-image-link:hover img {
    transform: scale(1.05);
}

/* 項目信息容器 */
.project-info {
    flex: 0.6;
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
}

/* 項目標題 */
.project-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #222;
}

/* 項目標籤容器 */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

/* 標籤樣式 */
.tag {
    padding: 6px 12px;
    border-radius: 20px;
    background-color: rgba(65, 105, 225, 0.1);
    color: #4169e1;
    font-size: 12px;
    font-weight: 500;
}
/* 不同类型标签的颜色 - 更柔和的版本 */
.tag-production {
    background-color: rgba(255, 120, 67, 0.08);
    color: #FF7843; /* 橙色 */
}

.tag-ux-research {
    background-color: rgba(138, 43, 226, 0.08);
    color: #8A2BE2; /* 紫色 */
}

.tag-strategic {
    background-color: rgba(46, 204, 113, 0.08);
    color: #2ECC71; /* 绿色 */
}

.tag-contextual {
    background-color: rgba(255, 105, 180, 0.08);
    color: #FF69B4; /* 粉色 */
}

.tag-ui-design {
    background-color: rgba(65, 105, 225, 0.08);
    color: #4169E1; /* 蓝色 */
}

/* 为过滤按钮添加柔和的颜色 */
.filter-btn[data-filter="Production Project"] {
    background-color: #f8f8f8;
    color: rgba(255, 120, 67, 0.85);
    border: 1px solid rgba(255, 120, 67, 0.2);
}

.filter-btn[data-filter="UX Research / Design"] {
    background-color: #f8f8f8;
    color: rgba(138, 43, 226, 0.85);
    border: 1px solid rgba(138, 43, 226, 0.2);
}

.filter-btn[data-filter="Strategic experience design"] {
    background-color: #f8f8f8;
    color: rgba(46, 204, 113, 0.85);
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.filter-btn[data-filter="Contextual design"] {
    background-color: #f8f8f8;
    color: rgba(255, 105, 180, 0.85);
    border: 1px solid rgba(255, 105, 180, 0.2);
}

.filter-btn[data-filter="UI Develop"] {
    background-color: #f8f8f8;
    color: rgba(65, 105, 225, 0.85);
    border: 1px solid rgba(65, 105, 225, 0.2);
}

/* 按钮悬停和激活状态 - 更加柔和 */
.filter-btn[data-filter="Production Project"]:hover,
.filter-btn[data-filter="Production Project"].active {
    background-color: rgba(255, 120, 67, 0.15);
    color: rgba(255, 120, 67, 1);
    border: 1px solid rgba(255, 120, 67, 0.3);
}

.filter-btn[data-filter="UX Research / Design"]:hover,
.filter-btn[data-filter="UX Research / Design"].active {
    background-color: rgba(138, 43, 226, 0.15);
    color: rgba(138, 43, 226, 1);
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.filter-btn[data-filter="Strategic experience design"]:hover,
.filter-btn[data-filter="Strategic experience design"].active {
    background-color: rgba(46, 204, 113, 0.15);
    color: rgba(46, 204, 113, 1);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.filter-btn[data-filter="Contextual design"]:hover,
.filter-btn[data-filter="Contextual design"].active {
    background-color: rgba(255, 105, 180, 0.15);
    color: rgba(255, 105, 180, 1);
    border: 1px solid rgba(255, 105, 180, 0.3);
}

.filter-btn[data-filter="UI Develop"]:hover,
.filter-btn[data-filter="UI Develop"].active {
    background-color: rgba(65, 105, 225, 0.15);
    color: rgba(65, 105, 225, 1);
    border: 1px solid rgba(65, 105, 225, 0.3);
}

/* 項目描述 */
.project-description {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-description strong {
    color: #4169e1;
    font-weight: 600;
}

/* 查看項目按鈕 */
.view-project {
    align-self: flex-start;
    color: #4169e1;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.view-project span {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.view-project:hover {
    color: #FF7843;
}

.view-project:hover span {
    transform: translateX(5px);
}

/* More of Me 區塊樣式 */
.more-of-me {
    padding: 100px 0;
    background-color: #ffffff;
    position: relative;
    z-index: 1;
}
.carousel-nav {
    display: none; /* 默認不顯示 */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* 照片輪播容器 */
.photo-carousel-container {
    margin: 50px 0;
    overflow: hidden;
    position: relative;
}

.photo-carousel {
    display: flex;
    gap: 20px;
    transition: transform 0.5s linear;
    padding: 10px 0;
}

.carousel-photo {
    flex: 0 0 auto;
    width: 180px;
    height: 180px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.carousel-photo:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.carousel-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.carousel-photo:hover img {
    transform: scale(1.05);
}

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px;
    font-size: 12px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    text-align: center;
}

.carousel-photo:hover .photo-caption {
    transform: translateY(0);
}

/* 照片放大遮罩 */
.photo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* 極高的 z-index 值 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.photo-overlay.active {
    opacity: 1;
    visibility: visible;
    z-index: 99999; /* 確保激活狀態也有相同高 z-index */
}

/* 確保內容也有正確的樣式 */
.overlay-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    transform: scale(0.9);
    z-index: 10000; /* 確保內容在遮罩上方 */
}

.photo-overlay.active .overlay-content {
    transform: scale(1);
}

/* 確保關閉按鈕也能正確顯示 */
.close-overlay {
    position: absolute;
    top: -40px;
    right: 10px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 100001;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.7); /* 添加文字陰影使叉叉在任何背景上都清晰可見 */
}

.overlay-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.overlay-caption {
    color: white;
    font-size: 18px;
    margin-top: 15px;
    text-align: center;
}

.close-overlay {
    position: absolute;
    top: -30px;
    right: -30px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close-overlay:hover {
    transform: rotate(90deg);
}
.photo-grid {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 20px 0 30px;
}

.grid-photo {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    cursor: pointer;
}

.grid-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}


/* 報導連結樣式 */
.featured-articles {
    margin-top: 50px;
}

.featured-articles h3 {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.article-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.article-link {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    background-color: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    max-width: 400px;
    width: 45%;
}

.article-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    background-color: #f5f5f5;
}
.article-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-info {
    flex: 1;
    margin-right: 10px;
}

.article-source {
    display: block;
    font-size: 14px;
    color: #4169e1;
    margin-bottom: 5px;
    font-weight: 500;
}

.article-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.article-icon {
    margin-left: 10px;
    color: #4169e1;
    font-size: 18px;
    transition: transform 0.3s ease;
}

.article-link:hover .article-icon {
    transform: translateY(-3px);
}


/* 圖片容器設計 */
.article-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Contact 區塊樣式 */
.contact {
    padding: 100px 0;
    background-color: #ffffff;
    position: relative;
    z-index: 1;
}

.contact-content {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 80px;
    margin-top: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    max-width: 400px;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.contact-icon {
    margin-right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(90deg, #4169e1, #6495ED);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon .material-symbols-outlined {
    font-size: 28px;
    color: white;
}
.contact-icon .fa-solid {
    font-size: 28px;
    color: white;
}

.contact-info h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.contact-info p {
    font-size: 16px;
    color: #555;
}

.contact-info a {
    color: #4169e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #FF7843;
}
.download-container {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

/* Download CV 按鈕樣式 */
.download-container {
    margin-top: 80px;
    display: flex;
    justify-content: center;
}

.download-btn-simple {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    background-color: #FF7843;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    max-width: 200px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.download-btn-simple:hover {
    background-color: #FF6B34;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 120, 67, 0.3);
}
/* Footer 樣式 */
.footer {
    background-image: linear-gradient(to bottom, #ffffff, #e8f0ff);
    padding: 80px 0 70px; /* 增加上下 padding */
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-bottom: 20px;
    padding-top: 80px;
}

.footer-info {
    max-width: 600px;
}

.copyright {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}

.motto {
    font-size: 16px;
    font-style: italic;
    color: #4169e1;
    margin-bottom: 12px;
    font-weight: 500;
}

.thank-you {
    font-size: 15px;
    color: #333;
}

.scroll-top-btn {
    position: absolute;
    right: 30px;
    bottom: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4169e1, #6495ED);
    border: none;
    box-shadow: 0 2px 10px rgba(65, 105, 225, 0.3);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1); /* 更溫和的過渡 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top-btn .fa-arrow-up {
    font-size: 20px;
    color: white; /* 確保箭頭是白色 */
}

.scroll-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(65, 105, 225, 0.4);
    background: linear-gradient(45deg, #5079f1, #74a5fd); /* 微調 hover 時的背景 */
}

/* 初始隱藏回到頂部按鈕 */
.scroll-top-btn {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1), background 0.5s ease; /* 更溫和的過渡 */
}

/* 淡入和淡出動畫 */
.fade-in {
    animation: fadeIn 0.5s forwards;
}

.fade-out {
    animation: fadeOut 0.5s forwards;
}

/* 隱藏項目 */
.hidden {
    display: none;
}

@media (max-width: 1024px){
    .header {
        display: flex;
        flex-direction: row; /* 確保水平佈局 */
        align-items: center;
        justify-content: space-between;
        padding: 20px 40px;
        min-height: 85vh;
    }
    
    /* 調整文字容器的比例 */
    .text-container {
        flex: 1.5; /* 增加比例但不要太多 */
        padding: 30px;
        max-width: 60%; /* 控制最大寬度 */
    }
    
    /* 減少照片容器的比例但保留 */
    .photo-container {
        flex: 1; /* 減少比例 */
        padding: 30px;
        max-width: 40%; /* 控制最大寬度 */
    }
    
    /* 縮小照片尺寸 */
    .img-placeholder {
        width: 85%;
        max-width: 280px;
    }
    
    /* 調整標題文字大小 */
    .title-text {
        font-size: 34px;
        display: inline-flex;
        flex-wrap: nowrap;
        width: auto;
    }
    
    .typing-text {
        font-size: 34px;
        white-space: nowrap;
        overflow: visible;
        margin-left: 8px;
    }
    
    .typing-text::after {
        font-size: 34px;
    }
    
    /* 縮小介紹文字的字體大小 */
    .intro-text {
        font-size: 26px;
        margin-bottom: 25px;
    }
    .container{
        padding-left: 10%;
        padding-right: 10%;
    }
    .projects {
        padding: 70px 0;
    }
    .filter-btn {
        padding: 4px 8px;
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .project-content {
        flex-direction: column;
    }
    
    .project-image {
        flex: auto;
        width: 100%;
    }
    
    .project-info {
        flex: auto;
        width: 100%;
        padding: 20px;
    }
    
    /* 照片保持3:4比例 */
    .project-image img {
        aspect-ratio: 4/3;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: row; /* 明確保持水平佈局 */
        padding: 15px 20px;
    }
    
    .text-container {
        flex: 2; /* 進一步增加文字區域比例 */
        max-width: 65%;
        padding: 20px 15px;
    }
    
    .photo-container {
        flex: 1;
        max-width: 35%;
        padding: 15px;
    }
    
    /* 縮小照片尺寸 */
    .img-placeholder {
        width: 90%;
        max-width: 220px;
    }

    
    .title-text {
        font-size: 32px;
    }
    
    .typing-text {
        font-size: 32px;
    }
    
    .typing-text::after {
        font-size: 32px;
    }
    
    .intro-text {
        font-size: 20px;
        margin-bottom: 20px;
    }
    .gradient-transition {
        height: 100px;
        margin-top: 30px;
    }
    .about-me {
        padding: 70px 0;
    }
    
    .about-content {
        flex-direction: column;
        gap: 50px;
    }
    
    .section-title h2 {
        font-size: 32px;
    }
    
    .about-text h3, .stats-title h3 {
        font-size: 22px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
    
    /* 確保統計條和數字在響應式設計下仍然顯示 */
    .stat-bar {
        flex: 1;
        min-width: 120px;
        height: 10px;
    }
    
    .stat-fill {
        display: block !important;
        min-width: 5px;
    }
    
    .stat-value {
        width: 80px;
        display: block !important;
    }
    .projects {
        padding: 50px 0;
    }
    
    .filter-container {
        gap: 8px;
        margin-bottom: 30px;
    }
    
    .filter-btn {
        padding: 9px 16px;
        border: 1px solid #e0e0e0;
        border-radius: 25px;
        background-color: #f8f8f8;
        color: #555;
        font-size: 14px;
        font-weight: 400;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .projects-grid {
        gap: 30px;
    }
    
    .project-image {
        flex: 0.4;
    }
    
    .project-info {
        flex: 0.6;
        padding: 15px 20px;
    }
    
    .project-title {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .project-description {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .article-links {
        flex-direction: column;
        align-items: center;
    }
    
    .article-link {
        width: 90%;
        margin-bottom: 20px;
    }
    
    .article-image {
        width: 60px;
        height: 60px;
    }
   /* 內容容器 */
    .article-content {
        flex: 1;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .article-info {
        flex: 1;
    }
        
    .carousel-photo {
        width: 150px;
        height: 150px;
    }
    
    .carousel-nav {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .photo-carousel {
        transition: transform 0.3s ease;
    }

    .contact {
        padding: 70px 0;
    }
    
    .contact-content {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .contact-item {
        width: 100%;
        max-width: 100%;
        padding: 25px;
    }
    .footer {
        padding: 30px 0 20px;
    }
    
    .copyright, .thank-you {
        font-size: 13px;
    }
    
    .motto {
        font-size: 14px;
    }
    
    .scroll-top-btn {
        width: 40px;
        height: 40px;
        right: 20px;
        bottom: 20px;
    }
    
    .scroll-top-btn .material-symbols-outlined {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .header {
        flex-direction: column;
        padding: 20px;
    }
    
    .text-container {
        order: 1; /* 文字區塊放在最上方 */
        max-width: 90%;
    }
    
    .photo-container {
        order: 2; /* 照片放在第二位 */
        max-width: 100%;
    }
    .img-placeholder {
        border-radius: 50%; /* 圓形照片 */
        width: 70%; /* 控制圓形大小 */
        max-width: 250px;
        aspect-ratio: 1/1; /* 確保是正方形基礎 */
        object-fit: cover; /* 確保照片填滿區域 */
        overflow: hidden;
        margin: 0 auto;
        object-position: center 10%;
    }
    /* 移除照片上方的藍色線條，因為圓形設計不適合 */
    .img-placeholder::before {
        display: none;
    }
    
    .intro-text {
        font-size: 18px; /* 縮小字體 */
        line-height: 1.4;
        margin-bottom: 20px;
        text-align: center; /* 文字置中 */
        max-width: 280px; /* 控制最大寬度避免過長換行 */
        margin-left: auto; /* 水平置中 */
        margin-right: auto;
        padding: 0 10px;
    }
    
    /* 調整標題和打字效果 */
    .title-text {
        font-size: 28px;
        display: flex;
        flex-direction: row;
        justify-content: center;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .typing-text {
        font-size: 28px;
    }
    
    .typing-text::after {
        font-size: 28px;
    }
    /* Portfolio 按鈕放在照片下方 */
    .portfolio-btn-container {
        order: 3; /* 按鈕放在最下方 */
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 25px 0 10px;
    }
    .portfolio-btn {
        margin-top: 0; /* 重置上邊距 */
        max-width: 160px;
        padding-left: 32px;
        padding-right: 32px;
        font-size: 15px;
    }
    .portfolio-btn .icon {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .portfolio-btn:hover .icon {
        transform: translateX(0);
        opacity: 1;
    }
    /* 調整按鈕中的箭頭圖標大小 */
    .material-symbols-outlined {
        margin: 0 auto; /* 水平居中 */
    }
    
    .gradient-transition {
        height: 80px;
        margin-top: 20px;
    }
    .about-me {
        padding: 50px 0;
    }
    
    .container {
        padding: 0 10%; /* 增加左右 padding */
    }
    
    .section-title {
        margin-bottom: 40px;
    }
    
   .section-title h2 {
    font-size: 26px;
}
    .section-subtitle {
        font-size: 14px;
        line-height: 1.5;
    }
    .about-text p {
        font-size: 14px;
        line-height: 1.5;
    }
    .about-text h3, .stats-title h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .about-stats{
        display: none;
    }
    .projects {
        padding: 40px 0;
    }
    
    .filter-container {
        gap: 6px;
        margin-bottom: 25px;
    }
    
    .filter-btn {
        padding: 4px 8px;
        font-size: 9px;
        margin-bottom: 5px;
    }
    
    .projects-grid {
        gap: 25px;
    }
    
    /* 改為上下排版 */
    .project-content {
        flex-direction: column;
    }
    
    .project-image {
        flex: auto;
        width: 100%;
    }
    
    /* 照片依然保持3:4比例 */
    .project-image img {
        aspect-ratio: 4/3;
        width: 100%;
    }
    
    .project-info {
        flex: auto;
        width: 100%;
        padding: 15px;
    }
    
    .project-title {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .project-tags {
        margin-bottom: 10px;
    }
    
    .tag {
        padding: 4px 10px;
        font-size: 11px;
    }
    
    .project-description {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .view-project {
        font-size: 13px;
    }
     /* 隱藏輪播版本 */
     .photo-carousel-container {
        display: none;
    }
    
    /* 九宮格照片庫樣式 */
     /* 手機版：隱藏輪播，顯示九宮格 */
     .photo-carousel-container {
        display: none !important;
    }

    .more-of-me{
        display: none;
    }
    
    .photo-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    
    .close-overlay {
        top: -40px; /* 移到圖片上方 */
        right: 10px; /* 距離右邊一些距離 */
    }
    .grid-photo {
        width: 100%;
        aspect-ratio: 1/1;
        border-radius: 0;
        overflow: hidden;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
        position: relative;
        cursor: pointer;
    }
    
    .grid-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }
    
    .grid-photo:active img {
        transform: scale(0.95);
    }
    
    /* 確保照片容器有足夠的上邊距來顯示叉叉 */
    .overlay-content {
        margin-top: 45px;
    }

    /* 確保Featured Articles區塊在照片九宮格下方 */
    .more-of-me .featured-articles {
        margin-top: 0;
    }
    
    .featured-articles h3 {
        font-size: 20px;
    }
    
    .article-source {
        font-size: 12px;
    }
    
    .article-title {
        font-size: 14px;
    }
    .article-link {
        padding: 20px 8px;
        margin-bottom: 5px;
    }
    
    .overlay-caption {
        font-size: 16px;
    }
    .article-image {
        width: 70px;
        height: 70px;
    }
    
    .article-title {
        font-size: 14px;
    }
    
    .article-source {
        font-size: 12px;
    }
    
    .article-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .contact {
        padding: 50px 0;
    }
    
    .contact-item {
        padding: 20px;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        margin-right: 15px;
    }
    
    .contact-icon .material-symbols-outlined {
        font-size: 24px;
    }
    
    .contact-info h3 {
        font-size: 18px;
    }
    
    .contact-info p {
        font-size: 14px;
    }
    .download-btn-simple {
        max-width: 180px;
        padding-left: 25px;
        padding-right: 25px;
        font-size: 16px;
        padding: 12px 28px;
    }
    
    .download-container {
        margin-top: 40px;
    }
    .footer {
        background-image: linear-gradient(to bottom, #ffffff, #e8f0ff);
        padding: 30px 0 40px; /* 增加上下 padding */
        position: relative;
        z-index: 1;
    }
    
    .copyright, .thank-you {
        font-size: 12px;
    }
    
    .motto {
        font-size: 13px;
    }
    
    .scroll-top-btn {
        width: 30px;
        height: 30px;
        right: 15px;
        bottom: 15px;
    }
    
    /* 添加這段來縮小箭頭 */
    .scroll-top-btn .fa-arrow-up {
        font-size: 14px; /* 原本是 20px，這裡縮小為 14px */
    }
}

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

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