
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Titillium+Web:wght@300;400;600;700&display=swap');

/* 未來感 Preloader 樣式 */
.futuristic-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    overflow: hidden;
}

.preloader-content {
    position: relative;
    text-align: center;
    z-index: 2;
}

/* 主要載入環 */
.loader-ring {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    position: relative;
}

.ring {
    position: absolute;
    border: 2px solid transparent;
    border-radius: 50%;
    animation: preloaderRotate 2s linear infinite;
}

.ring:nth-child(1) {
    width: 120px;
    height: 120px;
    border-top: 3px solid #00d4ff;
    border-right: 3px solid #00d4ff;
    animation-duration: 2s;
    box-shadow: 0 0 20px #00d4ff, inset 0 0 20px #00d4ff;
}

.ring:nth-child(2) {
    width: 100px;
    height: 100px;
    top: 10px;
    left: 10px;
    border-bottom: 3px solid #ff006e;
    border-left: 3px solid #ff006e;
    animation-duration: 1.5s;
    animation-direction: reverse;
    box-shadow: 0 0 20px #ff006e, inset 0 0 20px #ff006e;
}

.ring:nth-child(3) {
    width: 80px;
    height: 80px;
    top: 20px;
    left: 20px;
    border-top: 2px solid #8338ec;
    border-right: 2px solid #8338ec;
    animation-duration: 1s;
    box-shadow: 0 0 15px #8338ec, inset 0 0 15px #8338ec;
}

/* 中心點 */
.loader-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #00d4ff, #ff006e);
    border-radius: 50%;
    box-shadow: 0 0 30px #00d4ff;
    animation: preloaderPulse 1.5s ease-in-out infinite;
}

/* 載入文字 */
.loader-text {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: bold;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
    animation: preloaderTextGlow 2s ease-in-out infinite;
}

.loader-subtext {
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    color: #8338ec;
    opacity: 0.8;
    animation: preloaderFadeInOut 3s ease-in-out infinite;
}

/* 進度條 */
.progress-container {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 20px auto;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #ff006e, #8338ec);
    border-radius: 2px;
    animation: preloaderProgressLoad 3s ease-in-out forwards;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: preloaderShine 1.5s infinite;
}

/* 背景粒子 */
.particle {
    position: absolute;
    background: #00d4ff;
    border-radius: 50%;
    pointer-events: none;
    animation: preloaderFloat 6s infinite ease-in-out;
}

.particle:nth-child(odd) {
    background: #ff006e;
    animation-duration: 8s;
    animation-delay: -2s;
}

.particle:nth-child(3n) {
    background: #8338ec;
    animation-duration: 10s;
    animation-delay: -4s;
}

/* Preloader 動畫關鍵幀 */
@keyframes preloaderRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes preloaderPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 30px #00d4ff;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2);
        box-shadow: 0 0 50px #ff006e;
    }
}

@keyframes preloaderTextGlow {
    0%, 100% { 
        text-shadow: 0 0 20px #00d4ff, 0 0 40px #00d4ff;
        color: #00d4ff;
    }
    50% { 
        text-shadow: 0 0 20px #ff006e, 0 0 40px #ff006e;
        color: #ff006e;
    }
}

@keyframes preloaderFadeInOut {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.4; }
}

@keyframes preloaderProgressLoad {
    0% { width: 0%; }
    25% { width: 25%; }
    50% { width: 65%; }
    75% { width: 85%; }
    100% { width: 100%; }
}

@keyframes preloaderShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes preloaderFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.2;
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-40px) rotate(180deg);
        opacity: 1;
    }
    75% {
        transform: translateY(-20px) rotate(270deg);
        opacity: 0.6;
    }
}

/* 預載器淡出動畫 */
.preloader-fadeout {
    animation: preloaderFadeOut 1s ease-out forwards;
}

@keyframes preloaderFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
    100% {
        opacity: 0;
        transform: scale(1.1);
        visibility: hidden;
    }
}

/* Preloader 響應式設計 */
@media (max-width: 768px) {
    .loader-ring {
        width: 100px;
        height: 100px;
    }
    
    .ring:nth-child(1) {
        width: 100px;
        height: 100px;
    }
    
    .ring:nth-child(2) {
        width: 80px;
        height: 80px;
        top: 10px;
        left: 10px;
    }
    
    .ring:nth-child(3) {
        width: 60px;
        height: 60px;
        top: 20px;
        left: 20px;
    }
    
    .loader-text {
        font-size: 20px;
        letter-spacing: 2px;
    }
    
    .progress-container {
        width: 250px;
    }
}

/* 全局動畫關鍵幀 */
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px #4fc3f7, 0 0 10px #4fc3f7, 0 0 15px #4fc3f7; }
    50% { box-shadow: 0 0 10px #4fc3f7, 0 0 20px #4fc3f7, 0 0 30px #4fc3f7; }
}

    @keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes techGlow {
    0% { text-shadow: 0 0 5px #4fc3f7; }
    50% { text-shadow: 0 0 10px #4fc3f7, 0 0 20px #4fc3f7; }
    100% { text-shadow: 0 0 5px #4fc3f7; }
}

@keyframes techPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

@keyframes lineFlow {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    20% {
        opacity: 0.8;
    }
    80% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(100vw);
        opacity: 0;
    }
}

html {
    scroll-behavior: smooth;
}

/* 全域觸摸優化 */
* {
    /* 確保所有元素都有合適的觸摸行為 */
    -webkit-tap-highlight-color: transparent;
}

/* 可互動元素的觸摸優化 */
button, a, .btn, .nav-link, .cta-button, .project-link, .lang-btn, 
.img-thumb, .footer-link, .social-link, .timeline-content {
    /* 優化觸摸響應 */
    -webkit-tap-highlight-color: rgba(79, 195, 247, 0.2);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
    /* 防止意外縮放 */
    -webkit-user-zoom: normal;
}

/* 文字選擇恢復 */
p, span, h1, h2, h3, h4, h5, h6, .timeline-description, 
.project-description, .about-me p {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* 自定義文字選取樣式 */
::selection {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.6), rgba(1, 87, 155, 0.8));
    color: #ffffff;
    text-shadow: 0 0 8px rgba(79, 195, 247, 1);
}

::-moz-selection {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.6), rgba(1, 87, 155, 0.8));
    color: #ffffff;
    text-shadow: 0 0 8px rgba(79, 195, 247, 1);
}

body{
    margin: 0;
    background: linear-gradient(135deg, #050505 0%, #0a0a0a 50%, #0f0f23 100%);
    color: #e0e0e0;
    font-family: 'Noto Sans TC', 'Titillium Web', ui-sans-serif, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    position: relative;
    overflow-x: hidden;
}

/* 滑鼠跟隨泡泡效果 */
.mouse-bubble {
    position: fixed;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(79, 195, 247, 0.8), rgba(79, 195, 247, 0.3));
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: all 0.02s ease;
    box-shadow: 
        0 0 20px rgba(79, 195, 247, 0.6),
        0 0 40px rgba(79, 195, 247, 0.3),
        0 0 60px rgba(79, 195, 247, 0.1);
    animation: bubblePulse 2s ease-in-out infinite;
}

.mouse-trail {
    position: fixed;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(79, 195, 247, 0.6), rgba(79, 195, 247, 0.2));
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: all 0.01s ease;
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.4);
}

@keyframes bubblePulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
}

/* 滑鼠懸停時的效果 */
.mouse-bubble.hover {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(79, 195, 247, 0.9), rgba(79, 195, 247, 0.4));
    box-shadow: 
        0 0 30px rgba(79, 195, 247, 0.8),
        0 0 60px rgba(79, 195, 247, 0.4),
        0 0 90px rgba(79, 195, 247, 0.2);
    animation: bubbleHover 1s ease-in-out infinite;
}

@keyframes bubbleHover {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
    }
}

/* 自定義滾動軸樣式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(256, 256, 256, 0.1)
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #01579b, #0277bd, #0288d1);
    border-radius: 6px;
    border: 1px solid rgba(1, 87, 155, 0.4);
    box-shadow: 0 0 10px rgba(1, 87, 155, 0.6);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #004ba0, #01579b, #0277bd);
    box-shadow: 0 0 15px rgba(1, 87, 155, 0.8);
    transform: scale(1.05);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #002f6c, #004ba0, #01579b);
    box-shadow: 0 0 20px rgba(1, 87, 155, 1);
}

/* Firefox 滾動軸樣式 */
* {
    scrollbar-width: thin;
    scrollbar-color: #01579b transparent;
}

/* Language Switcher Styles */
.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 8px;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(79, 195, 247, 0.3);
    border-radius: 25px;
    padding: 8px;
    box-shadow: 0 4px 20px rgba(79, 195, 247, 0.2);
}

/* 確保桌面版時移動版按鈕完全隱藏 */
@media (min-width: 769px) {
    .language-drawer-toggle {
        display: none !important;
    }
}

.lang-btn {
    background: transparent;
    border: none;
    color: #4fc3f7;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 195, 247, 0.2), transparent);
    transition: left 0.5s ease;
}

.lang-btn:hover::before {
    left: 100%;
}

.lang-btn:hover {
    color: #2196f3;
    transform: translateY(-2px);
}

.lang-btn.active {
    background: linear-gradient(135deg, #0288d1, #4fc3f7);
    color: #000;
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.5);
    transform: translateY(-2px);
}

.lang-btn.active:hover {
    background: linear-gradient(135deg, #0277bd, #0288d1);
    color: #fff;
}

/* Mobile Language Drawer - 右上角固定位置 */
.language-drawer-toggle {
    /* 桌面版隱藏，只在手機版顯示 */
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(79, 195, 247, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: #4fc3f7;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(79, 195, 247, 0.2);
    /* 確保觸摸友好 */
    touch-action: manipulation;
    user-select: none;
    /* 強制位置，不被其他樣式影響 */
    margin: 0 !important;
    padding: 0 !important;
    /* 確保文字居中 */
    align-items: center !important;
    justify-content: center !important;
}

.language-drawer-toggle:hover {
    background: rgba(79, 195, 247, 0.1);
    transform: scale(1.05);
}

.language-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(5, 5, 5, 0.95), rgba(15, 15, 35, 0.95));
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(79, 195, 247, 0.3);
    z-index: 1000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.language-drawer.active {
    right: 0;
}

.language-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.language-drawer-overlay.active {
    opacity: 1;
}

.language-drawer-header {
    padding: 20px;
    border-bottom: 1px solid rgba(79, 195, 247, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.language-drawer-title {
    color: #4fc3f7;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.language-drawer-close {
    background: transparent;
    border: none;
    color: #4fc3f7;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.language-drawer-close:hover {
    background: rgba(79, 195, 247, 0.1);
    transform: rotate(90deg);
}

.language-drawer-content {
    padding: 20px;
}

.language-drawer .lang-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(79, 195, 247, 0.05);
    border: 1px solid rgba(79, 195, 247, 0.2);
    transition: all 0.3s ease;
}

.language-drawer .lang-btn:hover {
    background: rgba(79, 195, 247, 0.1);
    transform: translateX(5px);
}

.language-drawer .lang-btn.active {
    background: linear-gradient(135deg, #0288d1, #4fc3f7) !important;
    color: #000 !important;
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.4) !important;
    transform: translateX(5px) !important;
    border-color: #4fc3f7 !important;
}

.language-drawer .lang-btn::before {
    display: none;
}

/* Mobile Responsive */
/* 手機安全區域設定 - 適應有瀏海的手機 */
@supports (padding-top: env(safe-area-inset-top)) {
    .language-drawer-toggle {
        top: max(20px, env(safe-area-inset-top) + 5px) !important;
        right: max(20px, env(safe-area-inset-right) + 5px) !important;
    }
}

/* 手機端強制修正 - 在所有螢幕尺寸下都生效 */
.mobile-touch-fix,
.nav-tabs .nav-link,
.portfolio-tabs .nav-link,
.oval-tab-bar .nav-link,
button[data-bs-toggle="tab"],
.lang-btn,
.cta-button,
.img-thumb {
    min-height: 44px !important;
    min-width: 44px !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-tap-highlight-color: rgba(79, 195, 247, 0.3) !important;
    -webkit-touch-callout: none !important;
    position: relative !important;
    z-index: 10 !important;
}

@media (max-width: 768px) {
    /* 在移動版隱藏滑鼠泡泡效果 */
    .mouse-bubble,
    .mouse-trail {
        display: none !important;
    }
    
    /* 移動版滾動軸樣式 */
    ::-webkit-scrollbar {
        width: 8px;
    }
    
    ::-webkit-scrollbar-track {
        background: transparent;
        border-radius: 4px;
    }
    
    ::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, #01579b, #0277bd);
        border-radius: 4px;
        border: 1px solid rgba(1, 87, 155, 0.3);
        box-shadow: 0 0 8px rgba(1, 87, 155, 0.5);
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, #004ba0, #01579b);
        box-shadow: 0 0 12px rgba(1, 87, 155, 0.7);
    }
    
    /* 隱藏桌面版語言切換器 */
    .language-switcher {
        display: none !important;
    }
    
    .language-drawer-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        /* 確保在右上角 */
        position: fixed !important;
        top: 20px !important;
        right: 20px !important;
        /* 尺寸設定 */
        width: 50px !important;
        height: 50px !important;
        min-width: 50px !important;
        min-height: 50px !important;
        /* 層級與樣式 */
        z-index: 1001 !important;
        background: rgba(0, 0, 0, 0.8) !important;
        border: 2px solid #4fc3f7 !important;
        border-radius: 50% !important;
        box-shadow: 0 0 15px rgba(79, 195, 247, 0.5) !important;
        /* 觸摸優化 */
        -webkit-tap-highlight-color: rgba(79, 195, 247, 0.2) !important;
        user-select: none !important;
        touch-action: manipulation !important;
        cursor: pointer !important;
        /* 確保不受其他樣式影響 */
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }
    
    .language-drawer {
        display: block;
    }
    
    .language-drawer-overlay {
        display: none; /* 預設隱藏，只有當 active 時才顯示 */
    }
    
    .language-drawer-overlay.active {
        display: block; /* 只有當 active 時才顯示 */
    }
    
    /* 全域響應式設定 */
    body {
        overflow-x: hidden; /* 防止水平滾動 */
        /* 改善觸摸滾動 */
        -webkit-overflow-scrolling: touch;
    }
    
    /* 隱藏可能干擾的漂浮元素 */
    .floating-tech-tags {
        display: none !important;
    }
    
    /* 確保所有按鈕都有適當的觸摸區域 - 使用更強的選擇器 */
    button, .btn, .nav-link, .cta-button, .project-link, .lang-btn,
    a.btn, a.nav-link, a.cta-button, a.project-link,
    button.nav-link, button.lang-btn, .bootstrap .nav-link {
        min-height: 44px !important;
        min-width: 44px !important;
        /* 觸摸優化 */
        -webkit-tap-highlight-color: rgba(79, 195, 247, 0.2) !important;
        user-select: none !important;
        touch-action: manipulation !important;
        /* 確保在合適的層級 */
        position: relative !important;
        z-index: 10 !important;
        /* 強制指針事件 */
        pointer-events: auto !important;
        /* 防止被覆蓋 */
        cursor: pointer !important;
    }
    
    /* 語言切換按鈕特別處理 */
    .language-drawer .lang-btn {
        min-height: 48px !important;
        padding: 12px 20px !important;
        margin-bottom: 8px !important;
        font-size: 1rem !important;
        line-height: 1.4;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 移動版語言抽屜按鈕的active狀態 */
    .language-drawer .lang-btn.active {
        background: linear-gradient(135deg, #0288d1, #4fc3f7) !important;
        color: #000 !important;
        box-shadow: 0 4px 15px rgba(79, 195, 247, 0.4) !important;
        transform: translateX(5px) !important;
        border-color: #4fc3f7 !important;
    }
    
    /* 作品集分頁按鈕 - 強制覆蓋Bootstrap */
    .portfolio-tabs .nav-link,
    .nav-tabs .nav-link,
    ul.nav-tabs .nav-link,
    #portfolioTab .nav-link,
    .portfolio-tabs button.nav-link {
        min-height: 44px !important;
        padding: 12px 20px !important;
        margin: 4px !important;
        font-size: 0.95rem !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 1px solid rgba(79, 195, 247, 0.3) !important;
        background: rgba(79, 195, 247, 0.1) !important;
        color: #4fc3f7 !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(79, 195, 247, 0.3) !important;
        /* 增加邊框半徑 */
        border-radius: 25px !important;
        transition: all 0.3s ease !important;
    }
    
    /* 手機版的active狀態 - 必須在基本樣式之後 */
    .portfolio-tabs .nav-link.active,
    .nav-tabs .nav-link.active,
    ul.nav-tabs .nav-link.active,
    #portfolioTab .nav-link.active,
    .portfolio-tabs button.nav-link.active {
        color: #000 !important;
        background: linear-gradient(135deg, #0288d1, #4fc3f7) !important;
        border: 1px solid #4fc3f7 !important;
        box-shadow: 0 0 15px rgba(79, 195, 247, 0.5) !important;
        transform: translateY(-2px) !important;
    }
    
    /* CTA 按鈕優化 */
    .cta-button {
        min-height: 48px !important;
        padding: 14px 28px !important;
        font-size: 1rem !important;
        margin: 8px 0 !important;
    }
    
    /* 專案內部標籤 - 強制覆蓋 */
    .oval-tab-bar .nav-link,
    #calenzyTab .nav-link,
    #bookingGuysTab .nav-link,
    #swissRecyclingTab .nav-link,
    #uptimeTab .nav-link,
    .tab-pane .nav-tabs .nav-link {
        min-height: 44px !important;
        padding: 12px 20px !important;
        margin: 4px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(79, 195, 247, 0.1) !important;
        border: 1px solid rgba(79, 195, 247, 0.3) !important;
        color: #4fc3f7 !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(79, 195, 247, 0.3) !important;
        border-radius: 25px !important;
        transition: all 0.3s ease !important;
    }
    
    /* 專案內部標籤的active狀態 */
    .oval-tab-bar .nav-link.active,
    #calenzyTab .nav-link.active,
    #bookingGuysTab .nav-link.active,
    #swissRecyclingTab .nav-link.active,
    #uptimeTab .nav-link.active,
    .tab-pane .nav-tabs .nav-link.active {
        color: #000 !important;
        background: linear-gradient(135deg, #0288d1, #4fc3f7) !important;
        border: 1px solid #4fc3f7 !important;
        box-shadow: 0 0 15px rgba(79, 195, 247, 0.5) !important;
        transform: translateY(-2px) !important;
    }
    
    /* 確保圖片縮圖可點擊 */
    .img-thumb {
        min-height: 60px !important;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(79, 195, 247, 0.3);
        touch-action: manipulation;
    }
    
    /* Modal 按鈕 */
    #imgModal .btn-close {
        min-width: 25px !important;
        min-height: 25px !important;
        padding: 8px !important;
    }
    

    
    /* 手機版圖片模態框優化 */
    #imgModal .modal-dialog {
        margin: 0 !important;
        max-width: 100vw !important;
        height: 100vh !important;
    }
    
    #imgModal .modal-content {
        height: 100vh !important;
        border-radius: 0 !important;
        background: rgba(0, 0, 0, 0.95) !important;
    }
    
    #imgModal .modal-body {
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 100vh !important;
        position: relative !important;
    }
    
    #modalImg {
        max-width: 100vw !important;
        max-height: 100vh !important;
        object-fit: contain !important;
        cursor: grab !important;
    }
    
    #modalImg:active {
        cursor: grabbing !important;
    }
    
    /* 手機版隱藏左右按鈕，改用滑動手勢 */
    #prevBtn, #nextBtn {
        display: none !important;
    }
    
    /* 桌面版左右按鈕樣式 */
    @media (min-width: 769px) {
        /* 桌面版隱藏滑動指示器 */
        #imgModal .swipe-indicator {
            display: none !important;
        }
        #prevBtn, #nextBtn,
        .prevBtn, .nextBtn {
            display: flex !important;
            min-width: 50px !important;
            min-height: 50px !important;
            font-size: 1.5rem !important;
            z-index: 1002 !important;
            background: rgba(0, 0, 0, 0.6) !important;
            border: 2px solid rgba(79, 195, 247, 0.5) !important;
            color: white !important;
            border-radius: 50% !important;
            backdrop-filter: blur(10px) !important;
            box-shadow: 0 0 15px rgba(79, 195, 247, 0.3) !important;
            align-items: center !important;
            justify-content: center !important;
        }
        
        #prevBtn:hover, #nextBtn:hover,
        .prevBtn:hover, .nextBtn:hover {
            background: rgba(79, 195, 247, 0.3) !important;
            border-color: #4fc3f7 !important;
            box-shadow: 0 0 25px rgba(79, 195, 247, 0.6) !important;
            transform: none !important;
        }
    }
    
    /* 手機版關閉按鈕優化 */
#imgModal .btn-close {
    position: fixed !important;
    top: 15px !important;
    z-index: 1004 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 50% !important;
    width: 25px !important;
    height: 25px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
    border: 2px solid rgba(79, 195, 247, 0.5) !important;
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.3) !important;
    transition: all 0.3s ease !important;
    filter: none !important;
    opacity: 1 !important;
    backdrop-filter: blur(10px) !important;
}

#imgModal .btn-close:hover {
    background: rgba(79, 195, 247, 0.3) !important;
    border-color: #4fc3f7 !important;
    box-shadow: 0 0 25px rgba(79, 195, 247, 0.6) !important;
    transform: none !important;
}
    
    /* 手機版滑動指示器 */
#imgModal .swipe-indicator {
    position: fixed !important;
    top: 30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1004 !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 25px !important;
    font-size: 0.9rem !important;
    opacity: 0.9 !important;
    animation: swipeHint 3s ease-in-out infinite !important;
    border: 1px solid rgba(79, 195, 247, 0.3) !important;
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    display: block !important;
    pointer-events: none !important;
}

@keyframes swipeHint {
    0%, 100% { 
        opacity: 0.9; 
        transform: translateX(-50%) translateY(0); 
    }
    50% { 
        opacity: 1; 
        transform: translateX(-50%) translateY(-8px); 
    }
}
    
    /* 區段響應式 */
    .education-section,
    .work-experience-section {
        padding: 40px 0;
        overflow-x: hidden;
    }
    
    /* 確保所有文字內容不會超出螢幕 */
    .timeline-degree,
    .timeline-job-title,
    .timeline-institution,
    .timeline-company,
    .timeline-description,
    .timeline-date {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Footer 連結優化 */
    .footer-link, .social-link {
        min-height: 44px !important;
        padding: 12px 16px !important;
        margin: 4px 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        -webkit-tap-highlight-color: rgba(79, 195, 247, 0.2);
        touch-action: manipulation;
    }
}

/* 背景科技效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(79, 195, 247, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(2, 136, 209, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(128, 222, 234, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.hero-section {
    height: 100vh;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 48px;
    color: #e0e0e0;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(79, 80, 246, 0.1) 50%, transparent 100%);
    animation: techGlow 8s ease-in-out infinite;
    pointer-events: none;
}

/* 高科技背景動畫 */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(79, 195, 247, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(2, 136, 209, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(33, 150, 243, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 60% 60%, rgba(79, 195, 247, 0.1) 0%, transparent 50%);
    animation: techPulse 18s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* 動態粒子效果 */
.hero-section {
    position: relative;
}

.hero-section .tech-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.tech-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: linear-gradient(45deg, #4fc3f7, #2196f3);
    border-radius: 50%;
    box-shadow: 
        0 0 8px #4fc3f7, 
        0 0 16px #4fc3f7,
        0 0 24px rgba(79, 195, 247, 0.5);
    animation: particleFloat 18s linear infinite;
    opacity: 0;
}

.tech-particle:nth-child(even) {
    background: linear-gradient(45deg, #0288d1, #1976d2);
    box-shadow: 
        0 0 8px #0288d1, 
        0 0 16px #0288d1,
        0 0 24px rgba(2, 136, 209, 0.5);
}

.tech-particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.tech-particle:nth-child(2) { left: 20%; animation-delay: 1s; }
.tech-particle:nth-child(3) { left: 30%; animation-delay: 2s; }
.tech-particle:nth-child(4) { left: 40%; animation-delay: 3s; }
.tech-particle:nth-child(5) { left: 50%; animation-delay: 4s; }
.tech-particle:nth-child(6) { left: 60%; animation-delay: 5s; }
.tech-particle:nth-child(7) { left: 70%; animation-delay: 6s; }
.tech-particle:nth-child(8) { left: 80%; animation-delay: 7s; }
.tech-particle:nth-child(9) { left: 90%; animation-delay: 0.5s; }
.tech-particle:nth-child(10) { left: 15%; animation-delay: 1.5s; }
.tech-particle:nth-child(11) { left: 25%; animation-delay: 2.5s; }
.tech-particle:nth-child(12) { left: 35%; animation-delay: 3.5s; }
.tech-particle:nth-child(13) { left: 45%; animation-delay: 4.5s; }
.tech-particle:nth-child(14) { left: 55%; animation-delay: 5.5s; }
.tech-particle:nth-child(15) { left: 65%; animation-delay: 6.5s; }
.tech-particle:nth-child(16) { left: 75%; animation-delay: 7.5s; }
.tech-particle:nth-child(17) { left: 85%; animation-delay: 1.2s; }
.tech-particle:nth-child(18) { left: 95%; animation-delay: 2.2s; }
.tech-particle:nth-child(19) { left: 5%; animation-delay: 3.2s; }
.tech-particle:nth-child(20) { left: 85%; animation-delay: 4.2s; }

/* 動態連接線效果 */
.hero-section .tech-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.tech-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(33, 150, 243, 0.4), transparent);
    animation: lineFlow 15s linear infinite;
    opacity: 0;
}

.tech-line:nth-child(1) { top: 20%; width: 30%; animation-delay: 0s; }
.tech-line:nth-child(2) { top: 40%; width: 25%; animation-delay: 2s; }
.tech-line:nth-child(3) { top: 60%; width: 35%; animation-delay: 4s; }
.tech-line:nth-child(4) { top: 80%; width: 20%; animation-delay: 1s; }
.tech-line:nth-child(5) { top: 30%; width: 40%; animation-delay: 3s; }
.tech-line:nth-child(6) { top: 70%; width: 28%; animation-delay: 5s; }

/* 漂浮的程式語言標籤 */
.floating-tech-tags {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    z-index: 5;
    /* 確保在手機上完全不干擾 */
    touch-action: none;
    user-select: none;
}

.tech-tag {
    position: absolute;
    color: rgba(79, 195, 247, 0.4);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 12px;
    background: rgba(79, 195, 247, 0.05);
    border: 1px solid rgba(79, 195, 247, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(5px);
    animation: float 15s ease-in-out infinite;
    animation-delay: var(--delay);
    left: var(--position);
    opacity: 0;
    /* 允許滑鼠互動 */
    pointer-events: auto;
    touch-action: none;
    user-select: none;
    transition: transform 0.3s ease-out;
    z-index: 10;
}

.tech-tag:nth-child(odd) {
    animation-name: float-reverse;
    animation-duration: 15s;
    top: 15%;
}

.tech-tag:nth-child(even) {
    top: 85%;
}

.tech-tag:nth-child(3n) {
    top: 35%;
    animation-duration: 18s;
}

.tech-tag:nth-child(3n+1) {
    top: 65%;
    animation-duration: 17s;
}

.tech-tag:nth-child(3n+2) {
    top: 25%;
    animation-duration: 19s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.4;
    }
    25% {
        transform: translateY(-20px) rotate(2deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-10px) rotate(-1deg);
        opacity: 0.6;
    }
    75% {
        transform: translateY(-15px) rotate(1deg);
        opacity: 0.9;
    }
}

@keyframes float-reverse {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.4;
    }
    25% {
        transform: translateY(20px) rotate(-2deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(10px) rotate(1deg);
        opacity: 0.6;
    }
    75% {
        transform: translateY(15px) rotate(-1deg);
        opacity: 0.9;
    }
}

/* 磁力排斥效果時的樣式 */
.tech-tag.magnetic-active {
    animation-play-state: paused;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    max-width: 1200px;
    width: 100%;
    height: 100vh;
    position: relative;
    z-index: 1;
    padding: 20px;
    box-sizing: border-box;
}

.hero-left {
    display: flex;
    align-items: center;
    gap: 32px;
    animation: slideIn 0.8s ease-out;
}

.hero-avatar {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #4fc3f7;
    box-shadow: 0 0 30px rgba(79, 195, 247, 0.6);
    animation: glow 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

.hero-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(79, 195, 247, 0.9);
}

.hero-name-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-name {
    font-size: 2.5rem;
    font-weight: bold;
    color: #4fc3f7;
    text-shadow: 0 0 15px #4fc3f7;
    margin: 0 0 4px 0;
    animation: techGlow 2s ease-in-out infinite;
}

.hero-title {
    font-size: 1.3rem;
    font-weight: 400;
    color: #2196f3;
    margin: 0 0 12px 0;
    text-shadow: 0 0 8px #2196f3;
}

.hero-underline {
    width: 50px;
    height: 4px;
    background: linear-gradient(to right, #4fc3f7, #0288d1);
    border-radius: 2px;
    margin-top: 4px;
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

.hero-right {
    flex: 1;
    max-width: 500px;
    animation: slideIn 0.8s ease-out 0.2s both;
}

.hero-description {
    text-align: left;
}

.hero-intro {
    font-size: 1.8rem;
    font-weight: bold;
    color: #e0e0e0;
    margin: 0 0 16px 0;
    text-shadow: 0 0 5px rgba(224, 224, 224, 0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #4fc3f7;
    margin: 0 0 12px 0;
    text-shadow: 0 0 8px #4fc3f7;
}

.hero-summary {
    font-size: 1rem;
    color: #b0b0b0;
    line-height: 1.6;
    margin: 0 0 32px 0;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0288d1, #4fc3f7);
    color: #000;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid rgba(79, 195, 247, 0.3);
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 195, 247, 0.5);
    background: linear-gradient(135deg, #0277bd, #0288d1);
    color: #fff;
}

.cta-button.secondary {
    background: rgba(79, 195, 247, 0.1);
    color: #4fc3f7;
    border: 1px solid rgba(79, 195, 247, 0.3);
}

.cta-button.secondary:hover {
    background: rgba(79, 195, 247, 0.2);
    color: #80deea;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 195, 247, 0.3);
}

.download-resume {
    background: linear-gradient(135deg, #4caf50, #45a049) !important;
    border: 2px solid #4caf50 !important;
}

.download-resume:hover {
    background: linear-gradient(135deg, #45a049, #388e3c) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.about-section {
    background: linear-gradient(135deg, #0a0a0a 0%, #0f0f23 100%);
    padding: 40px 48px 32px 48px;
    margin: 0;
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #4fc3f7 50%, transparent 100%);
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
}

.skills-section {
    background: linear-gradient(135deg, #0f0f23 0%, #0a0a0a 100%);
    padding: 40px 48px 32px 48px;
    margin: 0;
    position: relative;
}

.skills-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #4fc3f7 50%, transparent 100%);
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
}

.about-me {
    max-width: 800px;
    margin: 0 auto;
    animation: slideIn 0.8s ease-out 0.4s both;
}

.about-title {
    color: #4fc3f7;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 16px;
    margin-bottom: 32px;
    text-align: center;
    text-shadow: 0 0 10px #4fc3f7;
    animation: techGlow 8s ease-in-out infinite;
}

.about-me p {
    color: #e0e0e0;
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.8;
    text-align: justify;
}

.about-me p:last-child {
    margin-bottom: 0;
}

.personal-skills {
    max-width: 800px;
    margin: 0 auto;
    animation: slideIn 0.8s ease-out 0.6s both;
}

.skills-title {
    color: #4fc3f7;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 16px;
    margin-bottom: 32px;
    text-align: center;
    text-shadow: 0 0 10px #4fc3f7;
    animation: techGlow 8s ease-in-out infinite;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
}

.skill-row {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
    gap: 15px;
    transition: all 0.3s ease;
}

/* 桌面版：技能名稱和百分比橫向排列 */
.skill-row-header {
    display: contents; /* 桌面版時不產生額外容器 */
}

.skill-row:hover {
    transform: translateX(5px);
}

.skill-row span {
    width: 250px;
    font-size: 1rem;
    color: #4fc3f7;
    flex-shrink: 0;
    text-shadow: 0 0 3px #4fc3f7;
}

.skill-percent{
    width: 50px!important;
}

.skill-bar {
    flex: 2 1 0%;
    height: 10px;
    background: rgba(51, 51, 51, 0.5);
    border-radius: 5px;
    margin: 0 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(79, 195, 247, 0.2);
}

.skill-bar-inner {
    height: 100%;
    background: transparent;
    border-radius: 5px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    left: 0;
    top: 0;
    width: 0; /* 初始寬度為 0 */
}

.skill-bar-inner.animate {
    animation: skillBarLoad 1.5s ease-out forwards;
}

.skill-bar-inner.completed {
    background: linear-gradient(90deg, #0288d1, #4fc3f7, #2196f3);
    box-shadow: 0 0 20px #4fc3f7;
    animation: glow 2s ease-in-out infinite;
}

@keyframes skillBarLoad {
    0% {
        width: 0;
        opacity: 0;
        background: linear-gradient(90deg, #0288d1, #4fc3f7, #2196f3);
        box-shadow: 0 0 10px #4fc3f7;
    }
    50% {
        opacity: 1;
        background: linear-gradient(90deg, #0288d1, #4fc3f7, #2196f3);
        box-shadow: 0 0 15px #4fc3f7;
    }
    100% {
        width: var(--target-width);
        opacity: 1;
        background: linear-gradient(90deg, #0288d1, #4fc3f7, #2196f3);
        box-shadow: 0 0 20px #4fc3f7;
    }
}

.skill-percent {
    min-width: 38px;
    text-align: right;
    color: #4fc3f7;
    font-weight: bold;
    font-size: 1rem;
    flex-shrink: 0;
    text-shadow: 0 0 3px #4fc3f7;
}

.portfolio-section {
    background: linear-gradient(135deg, #0a0a0a 0%, #0f0f23 100%);
    padding: 48px 0 32px 0;
    margin: 0;
    position: relative;
}

.portfolio-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #4fc3f7 50%, transparent 100%);
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
}

.portfolio-title {
    color: #4fc3f7;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 16px;
    margin-bottom: 32px;
    text-align: center;
    text-shadow: 0 0 10px #4fc3f7;
    animation: techGlow 8s ease-in-out infinite;
}

.portfolio-tabs {
    justify-content: center;
    margin-bottom: 32px;
    --bs-nav-tabs-border-color : none;
}

.portfolio-tabs .nav-link {
    color: #4fc3f7;
    font-weight: 500;
    border: none;
    background: rgba(79, 195, 247, 0.1);
    border: 1px solid rgba(79, 195, 247, 0.3);
    border-radius: 999px;
    padding: 8px 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.portfolio-tabs .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 195, 247, 0.2), transparent);
    transition: left 0.5s ease;
}

.portfolio-tabs .nav-link:hover::before {
    left: 100%;
}

.portfolio-tabs .nav-link.active {
    color: #000;
    background: linear-gradient(135deg, #0288d1, #4fc3f7);
    border: 1px solid #4fc3f7;
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.5);
    transform: translateY(-2px);
}

.portfolio-tabs .nav-link:hover {
    transform: translateY(-2px) scale(1.05);
    background: rgba(79, 195, 247, 0.2);
    color: #2196f3;
    box-shadow: 0 5px 15px rgba(79, 195, 247, 0.3);
}

.portfolio-tab-content {
    max-width: 900px;
    margin: 0 auto;
}

.portfolio-content {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    background: linear-gradient(135deg, #0a0a0a 0%, #0f0f23 100%);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(79, 195, 247, 0.1);
    padding: 32px 24px;
    border: 1px solid rgba(79, 195, 247, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.portfolio-content:hover {
    box-shadow: 0 12px 40px rgba(79, 195, 247, 0.2);
    transform: translateY(-2px);
}

.portfolio-desc {
    flex: 1;
    min-width: 200px;
}

.portfolio-img {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-img img {
    max-width: 320px;
    max-height: 220px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(79, 195, 247, 0.2);
    border: 1px solid rgba(79, 195, 247, 0.3);
}

.img-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
}

.img-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(79, 195, 247, 0.3);
    position: relative;
    overflow: hidden;
}

.img-thumb::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 195, 247, 0.3), transparent);
    transition: left 0.5s ease;
}

.img-thumb:hover::before {
    left: 100%;
}

.img-thumb:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 8px 25px rgba(79, 195, 247, 0.4);
    border-color: #4fc3f7;
}

.project-features{
    li{
        padding-top: 2px;
        padding-bottom: 2px;
        transition: all 0.3s ease;
    }
    li:hover {
        color: #80deea;
        transform: translateX(5px);
    }
}

/* 全螢幕圖片 Modal 樣式 */
#imgModal .modal-dialog {
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#imgModal .modal-content {
    background: rgba(0, 0, 0, 0.9);
    border: none;
    box-shadow: none;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

#imgModal .modal-body {
    width: 100vw;
    height: 100vh;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modalImg {
    max-width: 100vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 0 30px rgba(79, 195, 247, 0.3);
    border: 1px solid rgba(79, 195, 247, 0.2);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: pan-x pan-y;
    transition: transform 0.3s ease;
}

#modalImg:active {
    cursor: grabbing;
}

#imgModal .btn-close {
    filter: none !important;
    opacity: 1 !important;
    z-index: 10;
    width: 25px;
    height: 25px;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 50%;
    border: 2px solid rgba(79, 195, 247, 0.5) !important;
    color: white !important;
    backdrop-filter: blur(10px);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
}

#imgModal .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
    background: rgba(79, 195, 247, 0.3) !important;
    border-color: #4fc3f7 !important;
    box-shadow: 0 0 20px rgba(79, 195, 247, 0.5) !important;
}

#imgModal .modal-prev-btn,
#imgModal .modal-next-btn,
#imgModal #prevBtn,
#imgModal #nextBtn,
#imgModal .prevBtn,
#imgModal .nextBtn {
    font-size: 1.5rem!important;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.6) !important;
    border: 2px solid rgba(79, 195, 247, 0.5) !important;
    color: white !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.3) !important;
}

#imgModal .modal-prev-btn:hover,
#imgModal .modal-next-btn:hover,
#imgModal #prevBtn:hover,
#imgModal #nextBtn:hover,
#imgModal .prevBtn:hover,
#imgModal .nextBtn:hover {
    background: rgba(79, 195, 247, 0.3) !important;
    border-color: #4fc3f7 !important;
    box-shadow: 0 0 25px rgba(79, 195, 247, 0.6) !important;
}

body.modal-open {
    overflow: hidden !important;
}

/* 圖片切換動畫 */
#modalImg {
    transition: transform 0.35s cubic-bezier(.4,2,.6,1), opacity 0.35s;
}

#modalImg.slide-out-left {
    transform: translateX(-100vw);
    opacity: 0;
}

#modalImg.slide-in-right {
    transform: translateX(100vw);
    opacity: 0;
}

#modalImg.slide-out-right {
    transform: translateX(100vw);
    opacity: 0;
}

#modalImg.slide-in-left {
    transform: translateX(-100vw);
    opacity: 0;
}

#modalImgWrap {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modalImgWrap img {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: 100vw;
    max-height: 90vh;
    transform: translate(-50%, -50%);
    transition: transform 0.18s cubic-bezier(.4,0,.2,1);
    will-change: transform;
    user-select: none;
    pointer-events: none;
}

#modalImgWrap img.active {
    pointer-events: auto;
}

.project-links {
  margin: 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #0288d1, #4fc3f7);
    color: #000;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(79, 195, 247, 0.3);
    box-shadow: 0 2px 8px rgba(79, 195, 247, 0.2);
}

.project-link:hover {
    background: linear-gradient(135deg, #0277bd, #0288d1);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.4);
}

@media (max-width: 900px) {
    .hero-section {
        height: 100vh;
        padding: 24px 16px;
    }
    
    .hero-content {
        flex-direction: column;
        gap: 40px;
        text-align: center;
        height: 100vh;
        justify-content: flex-start;
        padding-top: 15lvh;
    }
    
    .hero-left {
        flex-direction: column;
        gap: 20px;
    }
    
    .hero-name-title {
        align-items: center;
    }
    
    .hero-right {
        max-width: 100%;
    }
    
    .hero-description {
        text-align: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .floating-tech-tags {
        display: none;
    }
}

@media (max-width: 480px) {
    /* 小螢幕滾動軸樣式 */
    ::-webkit-scrollbar {
        width: 6px;
    }
    
    ::-webkit-scrollbar-track {
        background: transparent;
    }
    
    ::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, #01579b, #0277bd);
        border-radius: 3px;
        box-shadow: 0 0 6px rgba(1, 87, 155, 0.4);
    }
    
    .hero-section {
        height: 100vh;
        padding: 20px 12px;
    }


    .hero-content {
        flex-direction: column;
        gap: 40px;
        text-align: center;
        height: 100vh;
        justify-content: flex-start;
        padding-top: 8lvh;
    }
    
    .hero-avatar {
        width: 100px;
        height: 100px;
    }
    
    .hero-name {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 1.1rem;
    }
    
    .hero-intro {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 12px 24px !important;
        font-size: 0.95rem !important;
        min-height: 48px !important;
        min-width: 120px;
        justify-content: center !important;
        text-align: center !important;
        /* 確保觸摸友好 */
        -webkit-tap-highlight-color: rgba(79, 195, 247, 0.2);
        touch-action: manipulation;
        user-select: none;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .download-resume {
        width: auto !important;
        max-width: 240px;
        min-width: 180px;
        justify-content: center;
        text-align: center;
        margin: 0 auto;
    }
    
    /* 語言切換器在小螢幕上的優化 */
    .language-drawer-toggle {
        /* 小螢幕上稍微小一點，但保持在右上角 */
        width: 45px !important;
        height: 45px !important;
        min-width: 45px !important;
        min-height: 45px !important;
        font-size: 1rem !important;
        /* 保持在右上角，距離邊緣稍近一些 */
        top: 15px !important;
        right: 15px !important;
        /* 小螢幕上更明顯的邊框 */
        border: 2px solid rgba(79, 195, 247, 0.8) !important;
        box-shadow: 0 0 12px rgba(79, 195, 247, 0.6) !important;
    }
    
    /* 作品集按鈕優化 */
    .portfolio-tabs .nav-link {
        min-height: 44px !important;
        padding: 10px 16px !important;
        margin: 2px !important;
        font-size: 0.9rem !important;
    }
    
    /* 小螢幕作品集按鈕active狀態 */
    .portfolio-tabs .nav-link.active {
        color: #000 !important;
        background: linear-gradient(135deg, #0288d1, #4fc3f7) !important;
        border: 1px solid #4fc3f7 !important;
        box-shadow: 0 0 12px rgba(79, 195, 247, 0.6) !important;
        transform: translateY(-2px) !important;
    }
    
    /* 專案內部標籤優化 */
    .oval-tab-bar .nav-link {
        min-height: 44px !important;
        padding: 10px 16px !important;
        font-size: 0.9rem !important;
    }
    
    /* 小螢幕專案內部標籤active狀態 */
    .oval-tab-bar .nav-link.active {
        color: #000 !important;
        background: linear-gradient(135deg, #0288d1, #4fc3f7) !important;
        border: 1px solid #4fc3f7 !important;
        box-shadow: 0 0 12px rgba(79, 195, 247, 0.6) !important;
        transform: translateY(-2px) !important;
    }
    
    /* 圖片縮圖在小螢幕上的優化 */
    .img-thumb {
        min-height: 80px !important;
        border-radius: 8px;
    }
    
    /* Footer 社交連結優化 */
    .social-link {
        min-height: 48px !important;
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
        min-width: 160px;
    }
}

/* Tech List Styles */
.tech-list {
    list-style: none;
    padding: 0;
    margin: 0;
    line-height: 1.6;
}

.tech-list li {
    margin-bottom: 12px;
    padding: 6px 0;
    color: #e0e0e0;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.tech-list li strong {
    color: #4fc3f7;
    text-shadow: 0 0 3px #4fc3f7;
}

.tech-list li:hover {
    color: #80deea;
    transform: translateX(5px);
}

.tech-title {
    color: #4fc3f7;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 0 0 5px #4fc3f7;
}

.project-description {
    color: #e0e0e0;
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1rem;
}

.project-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-features li {
    margin-bottom: 12px;
    padding: 6px 0;
    color: #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-features li strong {
    color: #4fc3f7;
    text-shadow: 0 0 3px #4fc3f7;
}

@media (max-width: 900px) {
    .about-section,
    .skills-section {
        padding: 24px 12px 16px 12px;
    }
    .skills-list {
        flex-direction: column;
        gap: 10px;
    }
    .skill-row {
        width: 100%;
        /* 手機版改為垂直佈局 */
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 16px;
    }
    
    /* 技能名稱和百分比在同一行 */
    .skill-row-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 5px;
    }
    
    .skill-row span:first-child {
        width: auto !important;
        flex: 1;
        font-size: 0.95rem;
    }
    
    .skill-percent {
        width: auto !important;
        font-size: 0.9rem;
        margin-left: 10px;
    }
    
    .skill-bar {
        width: 100% !important;
        flex: none !important;
        margin: 0 !important;
        height: 12px;
    }
    .portfolio-content {
        flex-direction: column;
        gap: 16px;
        padding: 20px 8px;
    }
    .portfolio-img img {
        max-width: 100%;
        max-height: 180px;
    }
}

/* Oval Tab Bar Styles */
.oval-tab-bar .nav-link {
    color: #4fc3f7;
    font-weight: 500;
    border: none;
    background: rgba(79, 195, 247, 0.1);
    border: 1px solid rgba(79, 195, 247, 0.3);
    border-radius: 999px;
    padding: 6px 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.oval-tab-bar .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 195, 247, 0.2), transparent);
    transition: left 0.5s ease;
}

.oval-tab-bar .nav-link:hover::before {
    left: 100%;
}

.oval-tab-bar .nav-link.active {
    background: linear-gradient(135deg, #0288d1, #4fc3f7);
    color: #000;
    border: 1px solid #4fc3f7;
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.5);
    transform: translateY(-2px);
}

.oval-tab-bar .nav-link:hover {
    transform: translateY(-2px) scale(1.05);
    background: rgba(79, 195, 247, 0.2);
    color: #2196f3;
    box-shadow: 0 5px 15px rgba(79, 195, 247, 0.3);
}

/* Education Timeline Styles */
.education-section {
    background: linear-gradient(135deg, #0a0a0a 0%, #0f0f23 100%);
    padding: 48px 0 32px 0;
    margin: 0;
    position: relative;
}

.education-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #4fc3f7 50%, transparent 100%);
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
}

.education-title {
    color: #4fc3f7;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 16px;
    margin-bottom: 48px;
    text-align: center;
    text-shadow: 0 0 10px #4fc3f7;
    animation: techGlow 8s ease-in-out infinite;
}

/* Work Experience Timeline Styles */
.work-experience-section {
    background: linear-gradient(135deg, #0f0f23 0%, #0a0a0a 100%);
    padding: 48px 0 32px 0;
    margin: 0;
    position: relative;
}

.work-experience-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #4fc3f7 50%, transparent 100%);
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
}

.work-experience-title {
    color: #4fc3f7;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 16px;
    margin-bottom: 48px;
    text-align: center;
    text-shadow: 0 0 10px #4fc3f7;
    animation: techGlow 8s ease-in-out infinite;
}

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

.timeline {
    position: relative;
    padding: 40px 0;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

/* 時間軸主線 */
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 10px;
    height: 2px;
    background: linear-gradient(to right, 
        transparent 0%, 
        #4fc3f7 10%, 
        #4fc3f7 90%, 
        transparent 100%);
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
    animation: glow 2s ease-in-out infinite;
}

.timeline-item {
    position: relative;
    flex: 1;
    opacity: 0;
    transform: translateY(30px);
    animation: slideIn 0.8s ease-out forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.2s; }
.timeline-item:nth-child(2) { animation-delay: 0.4s; }
.timeline-item:nth-child(3) { animation-delay: 0.6s; }
.timeline-item:nth-child(4) { animation-delay: 0.8s; }

/* 時間軸圓點 */
.timeline-dot {
    position: absolute;
    left: 50%;
    top: 0px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #0288d1, #4fc3f7);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.6);
    z-index: 2;
    animation: pulse 2s ease-in-out infinite;
}

.timeline-dot-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* 時間軸內容 */
.timeline-content {
    position: relative;
    width: 100%;
    padding: 24px;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.9) 0%, rgba(15, 15, 35, 0.9) 100%);
    border-radius: 12px;
    border: 1px solid rgba(79, 195, 247, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(79, 195, 247, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 30px;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(79, 195, 247, 0.2);
    border-color: rgba(79, 195, 247, 0.4);
}

/* 連接線 */
.timeline-content::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -30px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 30px solid rgba(26, 26, 46, 0.8);
    transform: translateX(-50%);
}

/* 日期樣式 */
.timeline-date {
    color: #4fc3f7;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 0 0 5px #4fc3f7;
    display: inline-block;
    padding: 4px 12px;
    background: rgba(79, 195, 247, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(79, 195, 247, 0.3);
}

/* 職位標題 */
.timeline-job-title {
    color: #2196f3;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 0 4px 0;
    text-shadow: 0 0 5px #2196f3;
}

/* 學位標題 */
.timeline-degree {
    color: #2196f3;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 0 4px 0;
    text-shadow: 0 0 5px #2196f3;
}

/* 公司名稱 */
.timeline-company {
    color: #4fc3f7;
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 12px 0;
    text-shadow: 0 0 3px #4fc3f7;
}

/* 學校名稱 */
.timeline-institution {
    color: #4fc3f7;
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 12px 0;
    text-shadow: 0 0 3px #4fc3f7;
}

/* 工作描述 */
.timeline-description {
    color: #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 16px 0;
    text-align: justify;
}

/* 成就列表 */
.achievements-list {
    color: #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 16px 0;
    padding-left: 20px;
}

.achievements-list li {
    margin-bottom: 8px;
}

/* 技能標籤 */
.timeline-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.2), rgba(128, 222, 234, 0.2));
    color: #4fc3f7;
    font-size: 0.8rem;
    border-radius: 15px;
    border: 1px solid rgba(79, 195, 247, 0.3);
    transition: all 0.3s ease;
    cursor: default;
}

.skill-tag:hover {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.3), rgba(128, 222, 234, 0.3));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 195, 247, 0.3);
}

/* 響應式設計 */
@media (max-width: 1200px) {
    .timeline-container {
        max-width: 100%;
        padding: 0 16px;
    }
    
    .timeline {
        gap: 15px;
    }
    
    .timeline-item {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .timeline {
        flex-direction: column;
        gap: 30px;
        padding: 30px 0;
    }
    
    .timeline-item {
        flex: none;
        width: 100%;
    }
    
    .timeline-content {
        padding: 20px;
        max-width: calc(100vw - 80px); /* 確保不超出螢幕 */
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .timeline-container {
        padding: 0 12px;
        overflow-x: hidden; /* 防止水平滾動 */
    }
    
    /* 手機版時間軸改為垂直佈局 */
    .timeline::before {
        left: 30px;
        top: 0;
        bottom: 0;
        width: 2px;
        height: auto;
        transform: none;
    }
    
    .timeline-dot {
        left: 30px;
        top: 20px;
    }
    
    .timeline-content {
        margin-left: 60px !important;
        margin-right: 15px !important; /* 添加右邊距 */
    }
    
    .timeline-content::before {
        left: -15px;
        right: auto;
        border-right: 15px solid rgba(26, 26, 46, 0.8);
        border-left: none;
        border-top: 15px solid transparent;
        border-bottom: 15px solid transparent;
    }
    
    /* 時間軸文字內容響應式 */
    .timeline-description {
        font-size: 0.95rem;
        line-height: 1.6;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .timeline-degree,
    .timeline-job-title {
        font-size: 1.2rem;
        word-break: break-word;
    }
    
    .timeline-institution,
    .timeline-company {
        font-size: 1rem;
        word-break: break-word;
    }
    
    .timeline-date {
        font-size: 0.9rem;
    }
    
    /* 技能標籤響應式 */
    .timeline-skills {
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 12px;
    }
    
    .skill-tag {
        font-size: 0.8rem;
        padding: 4px 8px;
        white-space: nowrap;
    }
    
    /* 成就列表響應式 */
    .achievements-list {
        padding-left: 16px;
        margin: 12px 0;
    }
    
    .achievements-list li {
        margin-bottom: 8px;
        font-size: 0.9rem;
        line-height: 1.5;
        word-break: break-word;
    }
}



@media (max-width: 480px) {
    .timeline {
        gap: 20px;
        padding: 25px 0;
    }
    
    .timeline-content {
        padding: 16px;
        margin-left: 50px !important;
        margin-right: 10px !important;
        max-width: calc(100vw - 70px); /* 更小螢幕的寬度限制 */
    }
    
    .timeline-container {
        padding: 0 8px; /* 減少左右邊距 */
    }
    
    .timeline-dot {
        left: 25px;
        width: 12px;
        height: 12px; /* 縮小圓點 */
    }
    
    .timeline::before {
        left: 25px;
    }
    
    /* 更小的字體大小 */
    .timeline-degree,
    .timeline-job-title {
        font-size: 1.1rem;
        word-break: break-word;
        line-height: 1.3;
    }
    
    .timeline-institution,
    .timeline-company {
        font-size: 0.9rem;
        word-break: break-word;
    }
    
    .timeline-description {
        font-size: 0.85rem;
        line-height: 1.5;
        word-break: break-word;
    }
    
    .timeline-date {
        font-size: 0.8rem;
    }
    
    .skill-tag {
        font-size: 0.7rem;
        padding: 3px 8px;
        margin: 2px;
    }
    
    .timeline-skills {
        gap: 4px;
        margin-top: 10px;
    }
    
    .achievements-list {
        padding-left: 12px;
        margin: 10px 0;
    }
    
    .achievements-list li {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 6px;
    }
    
    /* 教育和工作經驗標題也要響應式 */
    .education-title,
    .work-experience-title {
        font-size: 1.8rem !important;
        margin: 20px 0 !important;
    }
}

/* 超小螢幕響應式 (320px - 375px) */
@media (max-width: 375px) {
    .timeline-content {
        padding: 12px;
        margin-left: 45px !important;
        margin-right: 8px !important;
        max-width: calc(100vw - 60px);
    }
    
    .timeline-container {
        padding: 0 5px;
    }
    
    .timeline-dot {
        left: 20px;
        width: 10px;
        height: 10px;
    }
    
    .timeline::before {
        left: 20px;
        width: 1px;
    }
    
    .timeline-degree,
    .timeline-job-title {
        font-size: 1rem;
        line-height: 1.2;
    }
    
    .timeline-institution,
    .timeline-company {
        font-size: 0.85rem;
    }
    
    .timeline-description {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .timeline-date {
        font-size: 0.75rem;
    }
    
    .skill-tag {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
    
    .achievements-list li {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .education-title,
    .work-experience-title {
        font-size: 1.6rem !important;
        margin: 15px 0 !important;
    }
}

/* Footer Styles */
.footer-section {
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);
    padding: 48px 0 24px 0;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.footer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #4fc3f7 50%, transparent 100%);
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
}

.footer-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(79, 195, 247, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(2, 136, 209, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 48px;
    margin-bottom: 32px;
}

/* 左側區域 */
.footer-section-left {
    animation: slideIn 0.8s ease-out 0.2s both;
}

.footer-logo {
    margin-bottom: 24px;
}

.footer-name {
    color: #4fc3f7;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 0 8px 0;
    text-shadow: 0 0 10px #4fc3f7;
    animation: techGlow 8s ease-in-out infinite;
}

.footer-tagline {
    color: #2196f3;
    font-size: 1rem;
    margin: 0;
    text-shadow: 0 0 5px #2196f3;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e0e0e0;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    a {
        color: #e0e0e0;
        text-decoration: none;
    }
}

.contact-item:hover, .contact-item > span > a:hover {
    color: #4fc3f7!important;
    transform: translateX(5px);
}

.contact-item i {
    color: #4fc3f7;
    width: 16px;
    text-align: center;
    text-shadow: 0 0 5px #4fc3f7;
}

/* 中間區域 */
.footer-section-center {
    animation: slideIn 0.8s ease-out 0.4s both;
}

.footer-title {
    color: #4fc3f7;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 0 20px 0;
    text-shadow: 0 0 8px #4fc3f7;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0;
}

.footer-link::before {
    content: '-  ';
    color: #4fc3f7;
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: #4fc3f7;
    text-shadow: 0 0 5px #4fc3f7;
    transform: translateX(5px);
}

.footer-link:hover::before {
    opacity: 1;
}

/* 右側區域 */
.footer-section-right {
    animation: slideIn 0.8s ease-out 0.6s both;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(79, 195, 247, 0.1);
    border: 1px solid rgba(79, 195, 247, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 195, 247, 0.2), transparent);
    transition: left 0.5s ease;
}

.social-link:hover::before {
    left: 100%;
}

.social-link:hover {
    color: #4fc3f7;
    background: rgba(79, 195, 247, 0.2);
    border-color: rgba(79, 195, 247, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 195, 247, 0.3);
}

.social-link i {
    color: #4fc3f7;
    width: 16px;
    text-align: center;
    text-shadow: 0 0 5px #4fc3f7;
}

/* 底部區域 */
.footer-bottom {
    animation: slideIn 0.8s ease-out 0.8s both;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #4fc3f7 50%, transparent 100%);
    margin-bottom: 24px;
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
}

.footer-copyright {
    text-align: center;
    color: #b0b0b0;
    font-size: 0.9rem;
}

.footer-copyright p {
    margin: 4px 0;
}

.footer-motto {
    color: #4fc3f7 !important;
    font-style: italic;
    text-shadow: 0 0 5px #4fc3f7;
    margin-top: 8px !important;
}

.footer-ai-credit {
    color: #2196f3;
    font-size: 0.85rem;
    margin-top: 12px;
    text-align: center;
    font-weight: 500;
    text-shadow: 0 0 8px #2196f3;
    animation: aiGlow 2s ease-in-out infinite alternate;
}

.ai-heart {
    color: #ff4081;
    animation: heartbeat 1.5s ease-in-out infinite;
    display: inline-block;
    text-shadow: 0 0 10px #ff4081;
}

@keyframes aiGlow {
    0% { text-shadow: 0 0 8px #2196f3; }
    100% { text-shadow: 0 0 15px #2196f3, 0 0 25px #2196f3; }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* 響應式設計 */
@media (max-width: 900px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-section-left {
        text-align: center;
    }
    
    .footer-section-center {
        text-align: center;
    }
    
    .footer-section-right {
        text-align: center;
    }
    
    .footer-contact {
        align-items: center;
    }
    
    .contact-item {
        justify-content: center;
    }
    
    .social-links {
        align-items: center;
    }
    
    .social-link {
        width: fit-content;
        min-width: 200px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-section {
        padding: 32px 0 16px 0;
    }
    
    .footer-container {
        padding: 0 16px;
    }
    
    .footer-content {
        gap: 24px;
    }
    
    .footer-name {
        font-size: 1.5rem;
    }
    
    .footer-title {
        font-size: 1.1rem;
    }
    
    .contact-item,
    .footer-link,
    .social-link {
        font-size: 0.9rem;
    }
    
    .social-link {
        min-width: 180px;
        padding: 6px 10px;
    }
    
    .footer-ai-credit {
        font-size: 0.8rem;
        margin-top: 10px;
    }
}