:root {
    --bg-color: #eaf6f4; 
    --card-bg: #ffffff;
    --primary-color: #7a5c58; 
    --accent-color: #ffb7b2; 
    --text-main: #333333;
    --text-light: #666666;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    background-image: radial-gradient(#ffffff 1.5px, transparent 0);
    background-size: 20px 20px; 
}

/* 導航列 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px dashed #dcdcdc;
}
.logo { font-weight: bold; font-size: 1.2rem; color: var(--primary-color); }
.nav-links { list-style: none; display: flex; gap: 20px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-main); font-weight: 500; transition: 0.3s; }
.nav-links a:hover { color: var(--primary-color); }
.nav-btn { background: var(--primary-color); color: white !important; padding: 8px 20px; border-radius: 20px; }

/* 共用區塊設定 */
.section { padding: 80px 20px; max-width: 1000px; margin: 0 auto; }
.bg-alt { background-color: rgba(255,255,255,0.6); border-radius: 30px; padding: 60px 40px; margin-bottom: 50px; box-shadow: 0 10px 30px rgba(0,0,0,0.02);}
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 2rem; color: var(--primary-color); }
.section-title p { color: var(--text-light); font-size: 0.9rem; letter-spacing: 2px; }

/* 關於我 / Hero 區塊 */
.hero-content { display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.hero-text { flex: 1; }
.hero-text h1 { font-size: 3.5rem; margin: 15px 0; color: var(--text-main); }
.hero-text h1 .highlight { color: var(--primary-color); }
.hero-text h2 { font-size: 1.2rem; color: var(--text-light); margin-bottom: 20px; font-weight: 400;}
.hero-buttons { margin-top: 30px; display: flex; gap: 15px; }
.btn { padding: 12px 25px; border-radius: 25px; text-decoration: none; font-weight: bold; transition: 0.3s; }
.btn-primary { background: var(--primary-color); color: white; }
.btn-primary:hover { background: #5a413e; }
.btn-secondary { background: white; color: var(--primary-color); border: 2px solid var(--primary-color); }
.btn-secondary:hover { background: #f0f0f0; }
.btn-link { color: var(--primary-color); text-decoration: underline; font-weight: bold; display: inline-block; margin-top: 20px; transition: 0.3s; }
.btn-link:hover { color: var(--accent-color); }

/* 關於我 頭像 (圖5) */
.hero-image { flex: 1; display: flex; justify-content: center; }
.profile-img { 
    width: 280px; 
    height: 280px; 
    border-radius: 50%; 
    object-fit: cover; /* 確保圖片不變形 */
    border: 4px dashed var(--primary-color); /* 虛線外框 */
    padding: 8px; /* 圖片與外框的距離 */
    background-color: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* 🌟 技能區塊 (圖6) 🌟 */
.skills-container { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.skills-card { background: var(--card-bg); padding: 30px; border-radius: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.skills-card h3 { margin-bottom: 25px; color: var(--text-main); font-size: 1.2rem; }

/* 進度條 */
.skill-item { margin-bottom: 20px; }
.skill-info { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.95rem; font-weight: 500; }
.progress-bar { width: 100%; height: 10px; background: #f0f0f0; border-radius: 10px; overflow: hidden; }
.progress { height: 100%; border-radius: 10px; transition: width 1s ease-in-out; }
.bar-pink { background: #ffb7b2; }
.bar-green { background: #b5e2d3; }

/* 標籤 (工具) */
.tags-container { display: flex; flex-wrap: wrap; gap: 12px; }
.tag { 
    background: #f4f9f8; 
    color: var(--text-main); 
    padding: 8px 16px; 
    border-radius: 20px; 
    font-size: 0.9rem; 
    border: 1px dashed #b5e2d3; /* 參考圖6的虛線邊框 */
}

/* 時間軸 (工作/教育) */
.timeline { position: relative; max-width: 800px; margin: 0 auto; border-left: 3px dashed #ccc; padding-left: 30px; }
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-dot { position: absolute; left: -38px; top: 0; width: 16px; height: 16px; background: var(--primary-color); border-radius: 50%; border: 3px solid white; }
.timeline-content { background: var(--card-bg); padding: 25px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.timeline-header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.timeline-header h3 { color: var(--primary-color); }
.date { background: var(--primary-color); color: white; padding: 3px 10px; border-radius: 10px; font-size: 0.8rem; height: fit-content;}

/* 卡片 (學習經驗) */
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card { background: var(--card-bg); padding: 30px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); border-top: 5px solid var(--accent-color); }

/* 聯絡區塊 */
.contact-card { background: var(--card-bg); padding: 50px; border-radius: 30px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.05); border: 2px dashed #dcdcdc; }
.contact-card h2 { color: var(--primary-color); margin-bottom: 10px; }
.contact-links { display: flex; justify-content: center; gap: 20px; margin-top: 30px; flex-wrap: wrap; }
.contact-item { background: #f8f9fa; padding: 15px 25px; border-radius: 20px; text-decoration: none; color: var(--text-main); font-weight: bold; transition: 0.3s; border: 1px solid #eee; }
.contact-item:hover { background: var(--bg-color); border-color: var(--primary-color); transform: translateY(-3px); }

/* 🌟 衣架特殊效果 🌟 */
.ochiu-display { margin-top: 30px; padding: 20px 20px 80px; background: #fdfdfd; border-radius: 10px; text-align: center; position: relative; overflow: hidden; }
.hanger-rod { position: relative; width: 85%; height: 3px; background: #b0b0b0; margin: 50px auto 0; border-radius: 10px; box-shadow: 0 3px 5px rgba(0,0,0,0.1); z-index: 5; }
.carved-text { position: absolute; top: -35px; left: 50%; transform: translateX(-50%); font-family: 'Georgia', serif; font-size: 1.3rem; color: #888; letter-spacing: 3px; text-shadow: 1px 1px 0px white; }
.clothes-container { display: flex; justify-content: center; align-items: flex-start; gap: 20px; margin-top: -5px; padding-bottom: 20px; position: relative; z-index: 1; }
.clothes-item { position: relative; width: 16%; max-width: 130px; cursor: pointer; transition: margin 0.4s ease; }
.cloth-img { width: 100%; height: auto; display: block; filter: drop-shadow(0 5px 8px rgba(0,0,0,0.1)); transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform-origin: top center; }
.cloth-img.front { position: absolute; top: 0; left: 0; opacity: 0; transform: scale(0.9); }
.clothes-item:hover .cloth-img.back { transform: scale(1.05); }
.clothes-item.active .cloth-img.back { opacity: 0; }
.clothes-item.active .cloth-img.front { opacity: 1; transform: translateY(20px) scale(1.6); filter: drop-shadow(0 15px 25px rgba(0,0,0,0.2)); z-index: 20; }
.clothes-item.active { z-index: 10; }

/* 動畫與頁腳 */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
footer { text-align: center; padding: 30px; color: var(--text-light); font-size: 0.9rem; border-top: 2px dashed #dcdcdc; }

/* =========================================
   📱 手機版專屬設定 (嚴格保持左右並排)
   ========================================= */
@media (max-width: 768px) {
    /* 1. 導覽列設定 (漢堡選單) */
    .hamburger {
        display: block;
        background: none;
        border: none;
        font-size: 1.8rem;
        color: var(--primary-color);
        cursor: pointer;
    }
    .nav-links {
        display: none; /* 預設隱藏 */
        width: 100%;
        flex-direction: column;
        text-align: center;
        padding-top: 15px;
        gap: 15px;
    }
    .nav-links li {
        width: 100%;
    }
    
    /* 縮小整體留白，讓內容更緊湊 */
    .section {
        padding: 30px 10px;
    }
    .bg-alt {
        padding: 30px 15px;
        margin-bottom: 20px;
    }
    .section-title {
        margin-bottom: 20px;
    }
    .section-title h2 {
        font-size: 1.5rem;
    }

    /* 2. 關於我區塊 (強制左右並排) */
    .hero-content {
        flex-direction: row; /* 絕對不改成 column */
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
    }
    .hero-text {
        flex: 1; /* 左邊文字佔據剩餘空間 */
        min-width: 0; /* 防止文字撐破容器 */
    }
    .hero-text h1 {
        font-size: 1.8rem; /* 縮小名字 */
        margin: 5px 0;
    }
    .hero-text h2 {
        font-size: 0.8rem; /* 縮小副標題 */
        line-height: 1.2;
        margin-bottom: 10px;
    }
    .hero-text p {
        font-size: 0.75rem; /* 縮小內文 */
        line-height: 1.4;
        word-break: break-word;
    }
    .hero-buttons {
        margin-top: 15px;
        gap: 8px;
        flex-wrap: wrap; /* 按鈕若太擠可以換行 */
    }
    .btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    /* 右邊頭像 */
    .hero-image {
        width: 90px; /* 固定極小寬度 */
        flex-shrink: 0;
        display: flex;
        justify-content: flex-end;
    }
    .profile-img {
        width: 90px;
        height: 90px;
        padding: 3px;
        border-width: 2px;
    }

    /* 3. 我的技能區塊 (強制左右並排) */
    .skills-container {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 絕對保持兩欄 */
        gap: 10px;
    }
    .skills-card {
        padding: 15px 10px; /* 縮小內邊距 */
    }
    .skills-card h3 {
        font-size: 0.9rem; /* 縮小標題 */
        margin-bottom: 15px;
    }
    
    /* 進度條縮小 */
    .skill-item {
        margin-bottom: 10px;
    }
    .skill-info {
        font-size: 0.7rem;
        margin-bottom: 4px;
    }
    .progress-bar {
        height: 6px;
    }

    /* 標籤雲縮小 */
    .tags-container {
        gap: 6px;
    }
    .tag {
        padding: 4px 8px;
        font-size: 0.65rem;
        border-radius: 10px;
    }

    /* 4. 衣架區塊 (保持橫向，允許滑動) */
    .ochiu-display {
        padding: 10px 5px 20px;
    }
    .hanger-rod {
        width: 95%;
        margin-top: 30px;
    }
    .carved-text {
        font-size: 1rem;
        top: -25px;
    }
    .clothes-container {
        gap: 5px;
        flex-wrap: nowrap; /* 絕不換行 */
        overflow-x: auto; /* 允許左右滑動 */
        justify-content: flex-start;
        padding-bottom: 10px;
        scrollbar-width: none; /* 隱藏滾動條 */
    }
    .clothes-container::-webkit-scrollbar {
        display: none;
    }
    .clothes-item {
        width: 18%; 
        min-width: 60px; /* 確保衣服不會小到看不見 */
        flex-shrink: 0;
    }
    .clothes-item.active .cloth-img.front {
        transform: translateY(10px) scale(1.4);
    }

    /* 5. 工作與教育經驗 (時間軸) */
    .timeline {
        padding-left: 15px;
    }
    .timeline-dot {
        left: -23px;
        width: 12px;
        height: 12px;
    }
    .timeline-content {
        padding: 15px;
    }
    .timeline-header {
        flex-direction: column; /* 日期標籤換行比較好看 */
        align-items: flex-start;
        gap: 5px;
    }
    .timeline-header h3 {
        font-size: 1rem;
    }
    .timeline-content p {
        font-size: 0.8rem;
    }
    .date {
        font-size: 0.7rem;
        padding: 2px 8px;
    }

    /* 6. 學習經驗卡片 */
    .card-grid {
        grid-template-columns: 1fr 1fr; /* 強制並排 */
        gap: 10px;
    }
    .card {
        padding: 15px;
    }
    .card h3 {
        font-size: 0.9rem;
    }
    .card p {
        font-size: 0.75rem;
    }

    /* 7. 聯絡區塊 */
    .contact-card {
        padding: 20px 10px;
    }
    .contact-card h2 {
        font-size: 1.2rem;
    }
    .contact-links {
        flex-direction: column;
        gap: 10px;
    }
    .contact-item {
        padding: 10px;
        font-size: 0.8rem;
    }
}
