/* --- style.css --- */

/* 1. 全站共用變數與基礎設定 */
:root {
    --spotlight-bg: radial-gradient(circle at 50% 20%, #FFFFFF 0%, #F2Ebe5 40%, #D0C5B8 100%);
    --caramel: #A67B5B;
    --caramel-light: rgba(166, 123, 91, 0.1);
    --text-main: #2A2A2A;
    --text-light: #888888;
    --paper-texture: url('https://www.transparenttextures.com/patterns/cream-paper.png');
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { width: 100%; max-width: 100vw; overflow-x: hidden; }

body {
    background: var(--spotlight-bg);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: block;
    position: relative;
}

body::after {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: var(--paper-texture); opacity: 0.5; pointer-events: none; z-index: -1; position: fixed; 
}

/* 2. Sidebar 標準樣式 */
.sidebar {
    width: 280px; height: 100vh;
    position: fixed; top: 0; left: 0;
    background: rgba(255,255,255,0.4); 
    border-right: 1px solid rgba(166, 123, 91, 0.2);
    display: flex; flex-direction: column; padding: 60px 40px;
    z-index: 1000; backdrop-filter: blur(10px);
}

.sidebar-logo {
    width: 100%; max-width: 220px; height: auto;
    display: block; margin: 0 auto 50px;
    transition: opacity 0.3s ease;
}
.sidebar-logo:hover { opacity: 0.8; cursor: pointer; }

.nav-menu { display: flex; flex-direction: column; gap: 35px; }

.nav-item {
    text-decoration: none; color: var(--text-light); font-family: 'Inter', sans-serif;
    font-size: 1.15rem; font-weight: 400; display: flex; align-items: center;
    transition: color 0.3s ease; position: relative;
}

.nav-item:hover { color: var(--caramel); }
.nav-item span { font-size: 0.95rem; opacity: 0.7; margin-left: 12px; font-family: 'Noto Serif TC', serif; }

/* JS 自動加入的 active 樣式 */
.nav-item.active { color: var(--text-main); font-weight: 500; }
.nav-item::before {
    content: '•'; color: var(--caramel); position: absolute; left: -20px;
    font-size: 1.2rem; opacity: 0; transform: scale(0.5); transition: all 0.3s ease;
}
.nav-item:hover::before, .nav-item.active::before { opacity: 1; transform: scale(1); }

.mobile-menu-overlay, .mobile-toggle { display: none; }

/* 3. 首頁專屬內容樣式 (Homepage Specific) */
.main-stage {
    margin-left: 280px; width: calc(100% - 280px);
    min-height: 100vh;
    display: flex; flex-direction: column; 
    justify-content: center; align-items: center;
    position: relative; text-align: center;
}

.spotlight-glow {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 600px; height: 400px;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 70%);
    z-index: 0; pointer-events: none;
}

.hero-content {
    z-index: 10; max-width: 800px; padding: 20px;
    position: relative; margin-top: auto; margin-bottom: auto;
    padding-top: 10vh;
}

.hero-title {
    font-family: 'Noto Serif TC', serif; font-weight: 400; font-size: 2.8rem;
    line-height: 1.8; margin-bottom: 50px; color: var(--text-main);
    text-shadow: 0 2px 10px rgba(0,0,0,0.05); cursor: default;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.highlight {
    color: var(--caramel); border-bottom: 2px solid rgba(166, 123, 91, 0.3);
    padding-bottom: 5px; display: inline-block;
}

.cta-group { display: flex; gap: 30px; justify-content: center; }

.btn {
    padding: 14px 36px; font-size: 1rem; text-decoration: none;
    border: 1px solid var(--text-main); border-radius: 50px; cursor: pointer;
    transition: all 0.3s ease; background: rgba(255,255,255,0.5);
}
.btn-primary { background: var(--text-main); color: #fff; }
.btn-outline { color: var(--text-main); }
.btn:hover { transform: translateY(-3px); }

.blob {
    position: absolute;
    background: var(--caramel);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.1;
    z-index: -1;
    animation: float 20s ease-in-out infinite;
    /* 關鍵修復：讓氣泡不攔截任何點擊事件 */
    pointer-events: none; 
}

@keyframes float {
    0% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
    100% { transform: translate(0, 0); }
}

@keyframes enterStage {
    0% { opacity: 0; transform: translateY(30px) scale(0.95); filter: blur(10px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* Footer */
.site-footer {
    width: 100%;
    padding: 30px 20px;
    font-size: 0.75rem;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: auto;
    font-family: 'Inter', sans-serif;
    /* 關鍵修復：提升層級並確保 z-index 生效 */
    position: relative; 
    z-index: 50; 
}
.footer-social { display: flex; gap: 20px; }
.social-link { text-decoration: none; color: var(--text-light); transition: all 0.3s ease; display: flex; align-items: center; gap: 6px; }
.social-link:hover { color: var(--caramel); transform: translateY(-2px); }

/* Back Button (其他頁面會用到，先留著) */
.back-btn-container { text-align: center; margin: 40px 0 60px; }
.back-btn {
    display: inline-block; padding: 10px 30px;
    border: 1px solid var(--text-light); border-radius: 50px;
    color: var(--text-light); text-decoration: none;
    transition: all 0.3s ease; font-size: 0.9rem;
}
.back-btn:hover { border-color: var(--caramel); color: var(--caramel); background: #fff; }

/* 4. RWD 手機版 */
@media (max-width: 768px) {
    .main-stage { margin-left: 0; width: 100%; padding-top: 70px; }
    
    .sidebar { 
        position: fixed; width: 100%; height: 70px; 
        flex-direction: row; justify-content: space-between; align-items: center; 
        padding: 0 20px; background: rgba(247, 245, 242, 0.95);
        border-right: none; border-bottom: 1px solid rgba(0,0,0,0.05); 
    }

    .sidebar-logo { width: auto; height: 40px; margin: 0; }
    .nav-menu { display: none; }

    .mobile-toggle { display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
    .bar { width: 25px; height: 2px; background: var(--caramel); transition: 0.3s; }
    
    .mobile-menu-overlay { display: flex; position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(247, 245, 242, 0.98); flex-direction: column; justify-content: center; align-items: center; gap: 25px; z-index: 99; opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }
    .mobile-menu-overlay.open { opacity: 1; pointer-events: auto; }
    
    /* 手機選單樣式 */
    .mobile-link { text-decoration: none; color: var(--text-light); display: flex; flex-direction: column; align-items: center; opacity: 0; transform: translateY(20px); transition: all 0.5s ease; }
    .mobile-link .en { font-size: 1.3rem; }
    .mobile-link.active { color: var(--caramel); }
    
    .mobile-menu-overlay.open .mobile-link { opacity: 1; transform: translateY(0); }
    .mobile-menu-overlay.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
    .mobile-menu-overlay.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
    .mobile-menu-overlay.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
    .mobile-menu-overlay.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
    .mobile-menu-overlay.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

    /* 首頁 RWD 調整 */
    .hero-content { padding-top: 5vh; animation: enterStage 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
    .hero-title { font-size: 1.4rem; line-height: 1.6; margin-bottom: 30px; padding: 0 10px; }
    .spotlight-glow { width: 300px; height: 300px; }
    .blob { max-width: 80vw; right: -20% !important; }
}

.mobile-toggle.open .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.mobile-toggle.open .bar:nth-child(2) { opacity: 0; }
.mobile-toggle.open .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* =========================================
   以下是新增的：About 頁面專屬樣式
   ========================================= */

/* 修正 Main Stage: 讓長頁面內容可以正常從上往下排，不要強制置中 */
.main-stage.scroll-layout {
    justify-content: flex-start;
    align-items: stretch;
    text-align: left;
}

/* 通用區塊設定 */
section {
    padding: 100px 10%;
    position: relative;
}

.section-header {
    font-family: 'Noto Serif TC', serif;
    font-size: 0.9rem;
    color: var(--caramel);
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
    display: block;
    text-transform: uppercase;
    opacity: 0.8;
}

/* --- 1. Manifesto (關於這裡) --- */
.manifesto {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.manifesto-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 40px;
    color: var(--text-main);
    position: relative;
}

.manifesto-title::after {
    content: ''; display: block; width: 60px; height: 2px;
    background: var(--caramel); margin: 20px auto 0; opacity: 0.5;
}

.manifesto-text {
    font-family: 'Noto Serif TC', serif;
    font-size: 1.2rem;
    line-height: 2.2;
    color: #555;
    max-width: 700px;
    margin-bottom: 60px;
}

.scroll-indicator {
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none; color: var(--caramel);
    font-size: 0.9rem; opacity: 0.7; transition: all 0.3s ease; cursor: pointer;
}

.scroll-icon {
    width: 40px; height: 40px; border: 1px solid var(--caramel);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin-bottom: 10px; animation: bounce 2s infinite;
}
.scroll-indicator:hover { opacity: 1; transform: translateY(5px); }

/* --- 履歷按鈕樣式 --- */
.resume-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background-color: var(--text-main); /* 深灰色背景 */
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.resume-btn:hover {
    background-color: var(--caramel); /* Hover 變焦糖色 */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(166, 123, 91, 0.3);
    color: #fff;
}

.resume-btn i {
    font-size: 1.1rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* --- 2. Brand Story (概念) --- */
.brand-story {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
    align-items: center; background: rgba(255,255,255,0.3);
}

.abstract-unit {
    width: 200px; height: 200px; border: 1px solid var(--caramel);
    transform: rotate(45deg); position: relative; margin: 0 auto;
    animation: breathe 8s infinite ease-in-out;
}
.abstract-unit::before {
    content: ''; position: absolute; top: -20px; left: -20px; right: -20px; bottom: -20px;
    border: 1px solid rgba(166, 123, 91, 0.3); animation: spin-slow 20s infinite linear;
}

.story-content h2 { font-size: 2rem; margin-bottom: 30px; font-family: 'Noto Serif TC', serif; }
.story-content p { font-size: 1rem; line-height: 1.8; color: #555; margin-bottom: 20px; text-align: justify; }

@keyframes breathe { 0%, 100% { transform: rotate(45deg) scale(1); } 50% { transform: rotate(45deg) scale(0.9); } }
@keyframes spin-slow { 100% { transform: rotate(360deg); } }

/* --- 3. The Operator (個人介紹) --- */
.operator {
    border-top: 1px solid rgba(0,0,0,0.05); border-bottom: 1px solid rgba(0,0,0,0.05);
}

.operator-grid {
    display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; align-items: center;
}

.photo-frame {
    position: relative; background: transparent; padding: 0;
    transform: rotate(-2deg); transition: transform 0.3s ease;
}
.photo-frame:hover { transform: rotate(0deg) scale(1.02); }
.photo-frame img { width: 100%; height: auto; display: block; filter: none; border-radius: 12px; }

.tags-container { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.tag { font-size: 0.8rem; padding: 5px 12px; border: 1px solid var(--text-light); border-radius: 20px; color: var(--text-light); transition: all 0.3s ease; }
.tag:hover { border-color: var(--caramel); color: var(--caramel); background: #fff; }
.hidden-joke { font-size: 0.8rem; color: #ccc; margin-top: 20px; font-style: italic; }

/* --- 4. Skills Marquee (跑馬燈) --- */
.skills-section {
    padding: 80px 0;
    background: #fff;
    overflow: hidden; /* 隱藏超出的部分 */
}

.skills-container {
    width: 100%;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.marquee-row {
    display: flex;
    width: 100%;
    overflow: hidden;
    position: relative;
    /* 遮罩效果：讓左右兩邊稍微淡出，更有質感 (可選) */
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.marquee-track {
    display: flex;
    gap: 40px;
    width: max-content; /* 強制內容不換行，根據圖標數量撐開 */
    will-change: transform; /* 效能優化，減少閃爍 */
    animation: scroll-left 30s linear infinite; /* 30s 速度較為平滑 */
}

.marquee-row.reverse .marquee-track {
    /* 反向播放，從 -33.33% 回到 0 */
    animation: scroll-right 30s linear infinite;
}

/* 暫停效果 */
.marquee-row:hover .marquee-track {
    animation-play-state: paused;
}

/* 圖標盒子樣式 */
.skill-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FAF8F6;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    flex-shrink: 0;         /* 防止圖標被擠扁 */
    transition: all 0.3s ease;
    user-select: none;      /* 防止被選取 */
}

.skill-icon-box img {
    width: 50px;
    height: 50px;
    filter: none;
    transition: all 0.3s ease;
}

.skill-icon-box:hover {
    transform: scale(1.1);
    background: #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* --- 動畫定義 --- */
/* 原理：我們有三組內容 (A, B, C)，移動一組的距離 (33.33%) 後跳回起點 */
@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-33.3333%); } 
}

@keyframes scroll-right {
    0% { transform: translateX(-33.3333%); }
    100% { transform: translateX(0); }
}

/* --- 5. Fragments (生活碎片) --- */
.fragments-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 30px; margin-top: 30px;
}

.fragment-card {
    background: #fff; padding: 30px; box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 2px solid transparent; position: relative;
}
.fragment-card:nth-child(odd) { transform: rotate(-1deg); }
.fragment-card:nth-child(even) { transform: rotate(1deg); }
.fragment-card:hover { transform: rotate(0deg) translateY(-10px); border-top: 2px solid var(--caramel); z-index: 10; }

.fragment-card::after {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 40px; height: 10px; background: rgba(166, 123, 91, 0.2); opacity: 0.5;
}
.fragment-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 15px; color: var(--text-main); }
.fragment-desc { font-size: 0.95rem; color: #666; line-height: 1.6; }

/* --- RWD 針對 About 頁面的調整 --- */
@media (max-width: 768px) {
    section { padding: 60px 20px; }
    .manifesto { min-height: 80vh; }
    .manifesto-title { font-size: 2rem; }
    .brand-story, .operator-grid { grid-template-columns: 1fr; gap: 40px; }
    .photo-frame { width: 80%; margin: 0 auto; transform: rotate(-2deg); }
}

/* =========================================
   Project 頁面專屬樣式 (Major Units)
   ========================================= */

/* --- Project Header --- */
.project-header {
    padding: 80px 10% 40px;
    text-align: center;
    animation: fadeInDown 1s ease forwards;
}

.page-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-main);
    white-space: nowrap;
}

.page-subtitle {
    color: #666;
    font-size: 1rem;
    letter-spacing: 0.05em;
}

/* --- Filter System (膠囊過濾器) --- */
.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
    padding: 0 20px;
    animation: fadeIn 1s ease forwards 0.3s;
    opacity: 0;
}

.filter-btn {
    padding: 8px 24px;
    border: 1px solid var(--caramel);
    border-radius: 50px;
    background: transparent;
    color: var(--caramel);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Serif TC', serif;
}

.filter-btn:hover { background: rgba(166, 123, 91, 0.1); }

.filter-btn.active {
    background: var(--caramel);
    color: #fff;
    box-shadow: 0 4px 10px rgba(166, 123, 91, 0.3);
}

/* --- Projects Grid (檔案室) --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    padding: 0 8%;
    margin-bottom: 100px;
}

.project-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

/* 篩選時隱藏用 */
.project-card.hide { display: none; }

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

.card-thumb {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    position: relative;
}

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

.project-card:hover .card-thumb img { transform: scale(1.08); }

.card-chip {
    position: absolute; top: 15px; right: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--caramel);
    padding: 4px 12px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    backdrop-filter: blur(4px);
}

.card-body {
    padding: 25px;
    display: flex; flex-direction: column; flex-grow: 1;
}

.card-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 1.2rem; margin-bottom: 10px;
    font-weight: 600; line-height: 1.4;
}

.card-desc {
    font-size: 0.9rem; color: #666; margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 3;
    -webkit-box-orient: vertical; overflow: hidden;
    flex-grow: 1;
}

.card-tags {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-top: auto;
}

.mini-tag {
    font-size: 0.7rem; color: #888;
    background: #f5f5f5; padding: 3px 8px; border-radius: 4px;
}

/* 補上 FadeIn 動畫 (如果 style.css 前面沒有的話) */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* RWD 針對 Project 頁面調整 */
@media (max-width: 768px) {
    .projects-grid { grid-template-columns: 1fr; padding: 0 20px; gap: 30px; }
    .project-header { padding: 40px 20px; }
}

/* =========================================
   Fragments 頁面專屬樣式 (生活碎片)
   ========================================= */

.fragments-container {
    padding: 80px 5%;
    width: 100%; max-width: 1400px; margin: 0 auto;
}

.page-header {
    text-align: center; margin-bottom: 60px;
    opacity: 1; animation: fadeInDown 1s ease forwards;
}
.page-title { font-family: 'Noto Serif TC', serif; font-size: 2.5rem; margin-bottom: 20px; color: var(--text-main); }
.page-desc { color: #666; line-height: 1.8; max-width: 600px; margin: 0 auto; }

/* --- Grid Layout --- */
.fragments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    padding: 20px;
}

/* --- Card Style (Scattered Polaroids) --- */
.frag-card {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border: 1px solid rgba(0,0,0,0.02);
    /* 進場動畫 */
    opacity: 1; animation: fadeInUp 0.8s ease forwards;
}

/* 隨機旋轉效果 */
.frag-card:nth-child(odd) { transform: rotate(-1.5deg); }
.frag-card:nth-child(even) { transform: rotate(1.5deg); }
.frag-card:nth-child(3n) { transform: rotate(0.5deg); }
.frag-card:nth-child(4n) { transform: rotate(-2deg); }

.frag-card:hover {
    transform: rotate(0deg) translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(166, 123, 91, 0.15);
    z-index: 10;
    border-color: var(--caramel-light);
}

/* 假膠帶裝飾 */
.frag-card::before {
    content: ''; position: absolute; top: -10px; left: 50%; transform: translateX(-50%) rotate(-2deg);
    width: 80px; height: 25px; background: rgba(255,255,255,0.4);
    border: 1px solid rgba(0,0,0,0.05); box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    opacity: 0.8; z-index: 2;
}

.frag-media {
    width: 100%; aspect-ratio: 16/10; overflow: hidden; border-radius: 4px;
    background: #f0f0f0; position: relative;
}

.frag-media img, .frag-media video {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease;
}

.frag-card:hover .frag-media img, 
.frag-card:hover .frag-media video { transform: scale(1.05); }

.frag-chip {
    position: absolute; top: 10px; right: 10px;
    background: rgba(255,255,255,0.9); color: var(--text-main);
    padding: 4px 10px; border-radius: 20px; font-size: 0.75rem;
    font-weight: 500; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.frag-body { display: flex; flex-direction: column; gap: 10px; flex: 1; }

.frag-title {
    font-size: 1.1rem; font-weight: 600; color: var(--text-main); margin: 0;
    font-family: 'Noto Serif TC', serif;
}

.frag-desc { font-size: 0.9rem; color: #666; line-height: 1.5; flex: 1; }

.frag-tags {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
}
.frag-tag {
    font-size: 0.75rem; color: var(--caramel); background: var(--caramel-light);
    padding: 3px 8px; border-radius: 4px;
}

.frag-actions {
    margin-top: 15px; display: flex; gap: 10px;
}

.frag-btn {
    flex: 1; text-align: center; padding: 10px; font-size: 0.9rem;
    border-radius: 50px; text-decoration: none; transition: all 0.3s ease;
    cursor: pointer; display: inline-flex; justify-content: center; align-items: center; gap: 5px;
}

.btn-primary { background: var(--text-main); color: #fff; border: 1px solid var(--text-main); }
.btn-primary:hover { background: var(--caramel); border-color: var(--caramel); transform: translateY(-2px); }

.btn-outline { border: 1px solid #ddd; color: var(--text-light); background: transparent; }
.btn-outline:hover { border-color: var(--text-main); color: var(--text-main); background: #fff; }

/* --- Custom Modal (自製彈窗) --- */
.custom-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(5px);
    z-index: 2000; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease; display: flex; justify-content: center; align-items: center;
}
.custom-modal-overlay.active { opacity: 1; pointer-events: auto; }

.custom-modal {
    background: #fff; width: 90%; max-width: 800px; max-height: 90vh;
    border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    overflow-y: auto; position: relative; transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(0,0,0,0.05); display: flex; flex-direction: column;
}
.custom-modal-overlay.active .custom-modal { transform: translateY(0); }

.modal-header {
    padding: 20px 30px; border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; background: #fff; z-index: 10;
}
.modal-title { font-size: 1.3rem; font-weight: 600; color: var(--caramel); font-family: 'Noto Serif TC', serif; }
.modal-close {
    background: none; border: none; font-size: 1.5rem; color: #999; cursor: pointer; transition: color 0.3s;
}
.modal-close:hover { color: var(--text-main); }

.modal-body { padding: 30px; }
.modal-video-wrap {
    width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 8px; overflow: hidden; margin-bottom: 20px;
}
.modal-video-wrap video { width: 100%; height: 100%; object-fit: contain; }

.modal-section-title { font-size: 0.9rem; color: #999; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; margin-top: 20px; }
.modal-text { font-size: 1rem; color: #555; line-height: 1.7; }
.modal-list { list-style: disc; padding-left: 20px; color: #555; }
.modal-list li { margin-bottom: 5px; }

.modal-footer {
    padding: 20px 30px; border-top: 1px solid #eee; background: #fafafa;
    display: flex; gap: 15px; justify-content: flex-end;
}

/* RWD 調整 */
@media (max-width: 768px) {
    .fragments-container { padding: 40px 20px; }
    .frag-card:nth-child(n) { transform: rotate(0deg); } /* 手機版取消旋轉 */
}

/* =========================================
   2D Gallery 頁面專屬樣式
   ========================================= */

.gallery-container {
    padding: 80px 5%; width: 100%; max-width: 1400px; margin: 0 auto; flex: 1;
}

/* 這一頁的 Header 與前面類似，但為了保險起見還是列出來 */
.page-header {
    text-align: center; margin-bottom: 50px;
    opacity: 1; animation: fadeInDown 1s ease forwards;
}
.page-title { font-family: 'Noto Serif TC', serif; font-size: 2.5rem; margin-bottom: 20px; color: var(--text-main); }
.page-desc { color: #666; line-height: 1.8; max-width: 600px; margin: 0 auto; }

/* --- Filter Buttons --- */
.filter-bar {
    display: flex; justify-content: center; gap: 15px; margin-bottom: 60px;
    flex-wrap: wrap; opacity: 0; animation: fadeIn 1s ease forwards 0.3s;
}

.filter-btn {
    background: transparent; border: 1px solid rgba(166, 123, 91, 0.3);
    color: var(--text-light); padding: 8px 24px; border-radius: 50px;
    cursor: pointer; font-family: 'Noto Serif TC', serif; font-size: 0.95rem;
    transition: all 0.3s ease;
}

.filter-btn:hover { border-color: var(--caramel); color: var(--caramel); }
.filter-btn.active {
    background: var(--caramel); color: #fff; border-color: var(--caramel);
    box-shadow: 0 5px 15px rgba(166, 123, 91, 0.2);
}

/* --- Gallery Grid (Masonry-like) --- */
.gallery-grid {
    columns: 3 300px; column-gap: 40px; padding: 20px;
}

.gallery-item {
    break-inside: avoid; margin-bottom: 40px; position: relative;
    cursor: pointer; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0; transform: translateY(20px);
}

.polaroid-frame {
    background: #fff; padding: 15px 15px 40px 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: all 0.4s ease; position: relative; transform-origin: center top;
}

/* Random Rotation */
.gallery-item:nth-child(odd) .polaroid-frame { transform: rotate(-1.5deg); }
.gallery-item:nth-child(even) .polaroid-frame { transform: rotate(1.5deg); }
.gallery-item:nth-child(3n) .polaroid-frame { transform: rotate(0.5deg); }

.gallery-item:hover .polaroid-frame {
    transform: rotate(0deg) scale(1.03);
    box-shadow: 0 20px 40px rgba(166, 123, 91, 0.2); z-index: 10;
}

.img-wrap { overflow: hidden; width: 100%; background: #f0f0f0; }
.img-wrap img {
    width: 100%; height: auto; display: block;
    transition: filter 0.3s ease; filter: sepia(10%);
}
.gallery-item:hover .img-wrap img { filter: sepia(0%); }

.item-tag {
    position: absolute; bottom: 10px; right: 15px;
    font-family: 'Inter', cursive; font-size: 0.85rem; color: #999; transform: rotate(-2deg);
}

/* --- Lightbox --- */
.lightbox-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(20, 20, 20, 0.95); backdrop-filter: blur(5px);
    z-index: 2000; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease; display: flex; justify-content: center; align-items: center;
}
.lightbox-overlay.active { opacity: 1; pointer-events: auto; }

.lightbox-content {
    max-width: 90%; max-height: 90vh; position: relative; transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.lightbox-overlay.active .lightbox-content { transform: scale(1); }

.lightbox-content img {
    max-width: 100%; max-height: 90vh; display: block;
    border: 10px solid #fff; box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute; top: -40px; right: -40px;
    background: none; border: none; color: #fff; font-size: 2rem;
    cursor: pointer; transition: transform 0.3s;
}
.lightbox-close:hover { transform: rotate(90deg); }

/* RWD */
@media (max-width: 768px) {
    .gallery-container { padding: 40px 20px; }
    .gallery-grid { columns: 1; column-gap: 0; }
    .gallery-item:nth-child(n) .polaroid-frame { transform: rotate(0deg); }
    .lightbox-close { top: -40px; right: 0; }
}

/* =========================================
   3D Works 頁面專屬樣式 (強制生效版)
   ========================================= */

/* 3D 專用的 Grid 設定 */
.grid-3d-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
    padding: 0 8%;
    margin-bottom: 100px;
}

/* 卡片本體 */
.item-3d {
    background: #fff;
    padding: 15px 15px 25px 15px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    text-align: center;
    border: 1px solid rgba(0,0,0,0.02);
    position: relative;
    
    /* 關鍵：強制顯示，無視任何隱藏設定 */
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    display: block !important;
    visibility: visible !important;
}

.item-3d:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 15px 30px rgba(166, 123, 91, 0.15);
}

/* 圖片容器 */
.thumb-3d {
    width: 100%;
    aspect-ratio: 1/1;
    min-height: 200px; /* 強制給高度，避免塌陷 */
    overflow: hidden;
    border-radius: 2px;
    margin-bottom: 15px;
    background-color: #f0f0f0;
    position: relative;
}

.thumb-3d img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    opacity: 1 !important;
}

.item-3d:hover .thumb-3d img { transform: scale(1.08); }

/* 遮罩設定 */
.overlay-3d {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(166, 123, 91, 0.2);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; 
    transition: opacity 0.3s ease;
    z-index: 2;
}
.item-3d:hover .overlay-3d { opacity: 1; }
.overlay-3d i { color: #fff; font-size: 2rem; }

.title-3d {
    font-family: 'Noto Serif TC', serif;
    font-size: 1rem; color: var(--text-main);
    margin: 0; font-weight: 600;
}

/* RWD */
@media (max-width: 768px) {
    .grid-3d-layout { grid-template-columns: 1fr; padding: 0 20px; gap: 30px; }
}

/* =========================================
   AI Art 頁面專屬樣式
   ========================================= */

/* 確保 Gallery 容器與標題對齊 (若前面已有定義可共用，但為了保險這邊再寫一次) */
.gallery-container {
    padding: 80px 5%;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    flex: 1;
}

/* 【強制顯示修正】 */
/* 覆蓋掉原本的動畫設定，確保內容一定會出現，解決鬼隱問題 */
.page-header, 
.filter-bar, 
.gallery-item {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
}

/* RWD 微調 */
@media (max-width: 768px) {
    .gallery-container { padding: 40px 20px; }
    .gallery-grid { columns: 1; column-gap: 0; }
    .gallery-item:nth-child(n) .polaroid-frame { transform: rotate(0deg); }
}

/* =========================================
   Contact 頁面專屬樣式 (訊號)
   ========================================= */

.contact-container {
    padding: 80px 10%; display: flex; flex-direction: column; align-items: center;
    width: 100%; max-width: 1200px; margin: 0 auto; flex: 1; justify-content: center;
}

.contact-grid {
    display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; width: 100%; align-items: start;
}

/* --- Info Cards (3D Tilt) --- */
.info-cards { display: flex; flex-direction: column; gap: 20px; perspective: 1000px; }

.info-card {
    background: #fff; padding: 25px; border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    display: flex; align-items: center; gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; overflow: hidden; border: 1px solid rgba(0,0,0,0.02);
    opacity: 0; animation: slideInLeft 0.8s ease forwards;
}

.info-card:nth-child(1) { animation-delay: 0.2s; }
.info-card:nth-child(2) { animation-delay: 0.4s; }
.info-card:nth-child(3) { animation-delay: 0.6s; }

.info-card:hover {
    transform: translateY(-5px) rotateX(5deg);
    box-shadow: 0 15px 30px rgba(166, 123, 91, 0.15); border-color: var(--caramel-light);
}

.info-icon {
    font-size: 1.5rem; color: var(--caramel); background: var(--caramel-light);
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.info-content h3 { font-size: 0.8rem; color: #999; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.1em; }
.info-content p { font-size: 1rem; color: var(--text-main); margin: 0; font-weight: 500; }

/* Map Filter */
.map-frame {
    margin-top: 30px; border-radius: 12px; overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    filter: sepia(50%) grayscale(30%) contrast(0.9);
    transition: all 0.5s ease; opacity: 0; animation: fadeIn 1s ease forwards 0.8s;
}
.map-frame:hover { filter: sepia(0%) grayscale(0%) contrast(1); transform: scale(1.02); }

/* --- Form (Writing Effect) --- */
.form-paper {
    background: #fff; padding: 50px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05); border-radius: 2px;
    position: relative; opacity: 0; animation: slideInRight 0.8s ease forwards 0.3s;
}

.form-paper::after {
    content: ''; position: absolute; bottom: -5px; left: 5px; right: 5px; height: 5px;
    background: #fff; border-radius: 2px; z-index: -1; opacity: 0.5; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.form-group { margin-bottom: 35px; position: relative; }

.form-label {
    font-size: 0.9rem; color: var(--text-light); position: absolute; top: 10px; left: 0;
    pointer-events: none; transition: all 0.3s ease; font-family: 'Noto Serif TC', serif;
}

.form-control {
    width: 100%; border: none; border-bottom: 1px solid #ddd; padding: 10px 0;
    font-size: 1.1rem; color: var(--text-main); background: transparent; border-radius: 0;
}
.form-control:focus { outline: none; }

.focus-border {
    position: absolute; bottom: 0; left: 50%; width: 0; height: 1px;
    background-color: var(--caramel); transition: all 0.4s ease;
}

.form-control:focus ~ .focus-border { width: 100%; left: 0; }

.form-control:focus ~ .form-label,
.form-control:not(:placeholder-shown) ~ .form-label {
    top: -20px; font-size: 0.8rem; color: var(--caramel);
}

/* Success/Error Message */
.sent-message {
    color: var(--caramel); font-weight: 500; margin-bottom: 15px; font-size: 0.9rem;
    display: none; padding: 10px; background: rgba(166, 123, 91, 0.1); border-radius: 4px;
}
.error-message {
    color: #d9534f; font-weight: 500; margin-bottom: 15px; font-size: 0.9rem;
    display: none;
}

/* Button */
.submit-btn {
    background: var(--text-main); color: #fff; border: none; padding: 15px 50px;
    font-size: 1rem; border-radius: 50px; cursor: pointer; transition: all 0.3s ease;
    margin-top: 10px; display: inline-flex; align-items: center; gap: 10px;
    position: relative; overflow: hidden;
}
.submit-btn:hover { background: var(--caramel); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(166, 123, 91, 0.2); }
.submit-btn:disabled { background: #ccc; cursor: not-allowed; transform: none; box-shadow: none; }
.submit-btn i { transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
.submit-btn:hover i { transform: translate(5px, -5px) scale(1.2); }

/* Animation Keyframes (如果前面style.css沒有這些，請加上) */
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

/* RWD */
@media (max-width: 768px) {
    .contact-container { padding: 40px 20px; }
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .form-paper { padding: 30px 20px; }
}

/* =========================================
   Allies / Partners 區塊樣式 (最終橫排修正版)
   ========================================= */

.allies-section {
    margin-bottom: 60px;
    padding-bottom: 60px;
    border-bottom: 1px dashed rgba(166, 123, 91, 0.3); /* 底部虛線分隔 */
    border-top: none;
}

.allies-header {
    text-align: center;
    margin-bottom: 30px;
}

.allies-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 1.5rem;
    color: var(--caramel);
    margin-bottom: 10px;
}

.allies-desc {
    font-size: 0.9rem;
    color: #888;
}

/* --- 關鍵佈局：橫排 + 自動換行 + 置中 --- */
.allies-grid {
    display: flex;
    flex-direction: row;     /* 橫向排列 */
    flex-wrap: wrap;         /* 空間不夠時自動換行 */
    justify-content: center; /* 讓卡片在畫面正中間，不會歪左邊 */
    gap: 20px;               /* 卡片之間的間距 */
    max-width: 1000px;       /* 限制最大寬度，避免卡片拉太開 */
    margin: 0 auto;          /* 區塊置中 */
}

/* --- 卡片樣式 --- */
.ally-card {
    background: #fff;
    padding: 10px 25px;
    border-radius: 50px;     /* 膠囊形狀 */
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    
    /* 彈性寬度設定 */
    flex: 1 1 280px;         /* 基礎寬度 280px，有空間會變寬 */
    max-width: 450px;        /* 限制單張卡片最大寬度，避免太長 */
}

.ally-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(166, 123, 91, 0.15);
    border-color: var(--caramel);
}

.ally-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #f0f0f0;
    flex-shrink: 0;          /* 防止頭像被擠扁 */
}

.ally-info {
    display: flex;
    flex-direction: column;
    text-align: left;        /* 確保文字靠左 */
}

.ally-name {
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Noto Serif TC', serif;
    white-space: nowrap;     /* 防止名字換行 */
}

.ally-intro {
    font-size: 0.85rem;   /* 字體比標題小一點 */
    color: #666;          /* 使用深灰色 */
    margin-top: 6px;      /* 跟上面的 Tag 拉開一點距離 */
    line-height: 1.5;     /* 增加行高，閱讀起來比較舒服 */
    display: block;       /* 讓它強制換行 */
}

.ally-tag {
    margin-top: 2px;
    margin-bottom: 2px;
    font-size: 0.75rem;
    color: #888;
}

/* --- 手機版 RWD --- */
@media (max-width: 768px) {
    .allies-grid {
        max-width: 100%;     /* 手機版佔滿寬度 */
        flex-direction: column; /* 手機版改成直排，比較好閱讀 */
    }
    .ally-card {
        max-width: 100%;     /* 卡片寬度佔滿 */
        border-radius: 12px; /* 手機版改回圓角矩形，視覺較整齊 */
    }
}
/* =========================================
   Case Study 專案內頁通用樣式
   (適用於: 混沌漫游, 雅環保齡球, 未來圖書館...等所有詳細頁)
   ========================================= */

/* --- 1. 頂部標題區 (Header & Meta Info) --- */
.case-header {
    padding: 80px 10% 40px; text-align: center;
    animation: fadeInDown 1s ease forwards;
}

.case-title {
    font-family: 'Noto Serif TC', serif; font-size: 2.8rem;
    margin-bottom: 15px; color: var(--text-main);
}
.case-subtitle { font-size: 1.1rem; color: #666; letter-spacing: 0.05em; }

/* 專案資訊表格 (Type, Role, Date...) */
.meta-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
    max-width: 900px; margin: 40px auto;
    border-top: 1px solid rgba(166, 123, 91, 0.2);
    border-bottom: 1px solid rgba(166, 123, 91, 0.2);
    padding: 20px 0; text-align: left;
}

.meta-item h4 {
    font-size: 0.8rem; color: var(--caramel);
    text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 5px;
}
.meta-item p { font-size: 0.95rem; color: var(--text-main); margin: 0; }

/* --- 2. 主視覺大圖/影片 (Hero Media) --- */
.hero-media {
    width: 100%; max-width: 1000px; margin: 0 auto 60px;
    border-radius: 8px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.hero-media video, .hero-media img { width: 100%; height: auto; display: block; }

/* --- 3. 內容排版容器 (左右佈局) --- */
.content-wrapper {
    display: flex; max-width: 1000px; margin: 0 auto; gap: 60px;
    padding: 0 5%; position: relative; overflow: visible !important;
    align-items: flex-start;
}

/* --- 4. 電腦版側邊目錄 (Sticky TOC) --- */
.toc-sidebar {
    width: 200px; flex-shrink: 0;
    position: sticky; top: 150px; align-self: flex-start;
    max-height: 80vh; border-right: 2px solid rgba(0,0,0,0.05);
    padding-right: 20px; text-align: right; z-index: 10;
}

.toc-link {
    display: block; font-size: 0.9rem; color: var(--text-light);
    text-decoration: none; margin-bottom: 15px;
    transition: all 0.3s ease; position: relative;
}
.toc-link:hover, .toc-link.active {
    color: var(--caramel); font-weight: 600; transform: translateX(-5px);
}
.toc-link.active::after {
    content: ''; position: absolute; right: -22px; top: 50%;
    transform: translateY(-50%); width: 4px; height: 4px;
    background: var(--caramel); border-radius: 50%;
}

/* --- 5. 手機版上方滑動目錄 (Mobile Sticky TOC) --- */
.mobile-toc {
    display: none; /* 預設隱藏，手機版才會打開 */
}

/* --- 6. 文章內容樣式 --- */
.article-content { flex-grow: 1; font-size: 1.05rem; line-height: 1.9; color: #444; min-width: 0; }
.article-section { padding-top: 20px; margin-bottom: -50px; }

.section-title {
    font-family: 'Noto Serif TC', serif; font-size: 1.8rem;
    color: var(--text-main); margin-bottom: 30px;
    position: relative; display: inline-block;
}
.section-title::after {
    content: ''; position: absolute; bottom: 5px; left: 0;
    width: 100%; height: 8px; background: rgba(166, 123, 91, 0.15); z-index: -1;
}

.article-img {
    width: 100%; border-radius: 8px; margin: 30px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.caption {
    font-size: 0.85rem; color: #888; text-align: center;
    margin-top: -20px; margin-bottom: 30px;
}
blockquote {
    border-left: 4px solid var(--caramel); margin: 30px 0;
    font-style: italic; color: #666;
    background: rgba(255,255,255,0.5); padding: 20px;
}

/* --- 7. 內頁相簿 (Project Gallery) --- */
.project-gallery {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px; margin-top: 40px;
}
/* 這裡加上 .project-gallery 前綴，避免跟 3D 頁面的 thumb 衝突 */
.project-gallery .gallery-thumb {
    width: 100%; aspect-ratio: 16/10;
    overflow: hidden; border-radius: 4px; cursor: pointer; position: relative;
}
.project-gallery .gallery-thumb img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease;
}
.project-gallery .gallery-thumb:hover img { transform: scale(1.1); }

/* --- RWD 響應式設定 --- */
@media (max-width: 992px) {
    .content-wrapper { flex-direction: column; }
    .toc-sidebar { display: none; } /* 手機版隱藏側邊目錄 */
    .meta-grid { grid-template-columns: 1fr 1fr; gap: 30px; padding: 20px; }
    
    /* 顯示手機版滑動目錄 */
    .mobile-toc {
        display: flex; gap: 15px; overflow-x: auto; white-space: nowrap;
        padding: 15px 20px; background: rgba(247, 245, 242, 0.98);
        backdrop-filter: blur(10px); border-bottom: 1px solid rgba(0,0,0,0.05);
        position: sticky; top: 70px; /* 緊貼在 Header 下方 */
        z-index: 90; margin-bottom: 20px;
        -webkit-overflow-scrolling: touch; scroll-behavior: smooth;
        -ms-overflow-style: none; scrollbar-width: none;
    }
    .mobile-toc::-webkit-scrollbar { display: none; }

    .mobile-toc-link {
        color: var(--text-light); text-decoration: none; font-size: 0.95rem;
        padding: 8px 16px; border-radius: 50px;
        background: rgba(255,255,255,0.5); transition: all 0.3s ease;
        border: 1px solid transparent;
    }
    .mobile-toc-link.active {
        background: var(--caramel); color: #fff;
        box-shadow: 0 4px 10px rgba(166, 123, 91, 0.2);
    }
}

@media (max-width: 768px) {
    .case-header { padding: 30px 20px; }
    .case-title { font-size: 2rem; }

    .section-title {
        font-size: 1.4rem;
    }
    
    .section-title::after {
        height: 6px; /* 原本是 8px，縮小一點點視覺上比較精緻 */
        bottom: 3px; /* 向上微調一點，確保貼合字體 */
    }
}

/* =========================================
   Resume Design 頁面專屬樣式
   ========================================= */

/* 標題區 (Showcase Header) */
.showcase-header {
    padding: 80px 10% 40px;
    text-align: center;
    animation: fadeInDown 1s ease forwards;
}

/* --- Resume Grid (展示牆) --- */
.resume-grid {
    display: grid;
    /* 自適應列數，最小寬度 300px */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    padding: 0 8%;
    margin-bottom: 100px;
}

.resume-item {
    opacity: 1;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

/* A4 紙張質感與邊框 */
.paper-frame {
    background: #fff;
    padding: 10px; /* 留白邊框 */
    border-radius: 2px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08); /* 微微浮起 */
    transition: all 0.4s ease;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

/* 內細框線 */
.paper-frame::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    border: 1px solid rgba(0,0,0,0.05);
    pointer-events: none;
    z-index: 10;
}

.resume-item:hover .paper-frame {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(166, 123, 91, 0.15); /* 懸浮焦糖色陰影 */
}

/* 圖片容器 (固定 A4 比例 1:1.414) */
.img-wrap {
    width: 100%;
    aspect-ratio: 1/1.414; 
    overflow: hidden;
    background-color: #f9f9f9;
}

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

/* Hover 時圖片微放大 */
.resume-item:hover .img-wrap img { transform: scale(1.05); }

/* 放大鏡遮罩 */
.hover-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(166, 123, 91, 0.1);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.3s ease;
    z-index: 20;
}
.hover-overlay i {
    font-size: 2rem; color: var(--caramel);
    background: rgba(255,255,255,0.9);
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: scale(0.8); transition: transform 0.3s ease;
}
.resume-item:hover .hover-overlay { opacity: 1; }
.resume-item:hover .hover-overlay i { transform: scale(1); }

.resume-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 0.9rem; color: #888;
    text-align: center; margin-top: 15px;
    letter-spacing: 0.05em;
}

/* RWD */
@media (max-width: 768px) {
    .resume-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); padding: 0 20px; gap: 30px; }
    .showcase-header { padding: 40px 20px; }
}

/* =========================================
   Demo / Slide Design 頁面專屬樣式 (最終確認版)
   ========================================= */

/* --- 頁面基礎微調 --- */
html { scroll-behavior: smooth; }

/* --- 標題置中 (Flexbox) --- */
.section-header-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 60px 0 30px;
    width: 100%;
}

.section-label {
    font-family: 'Noto Serif TC', serif;
    font-size: 1.5rem;
    color: var(--caramel);
    text-align: center;
    position: relative;
    padding-bottom: 15px;
    display: inline-block;
}

.section-label::after {
    content: ''; 
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 50px; height: 3px; background: rgba(166, 123, 91, 0.4);
}

/* --- [關鍵] 統一 Grid 排版 (Canva & Slide 共用) --- */
/* 設定 minmax(280px, 1fr) 確保能並排 3 個 */
.grid-layout-fix {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
    padding: 0 5%;
    margin-bottom: 80px;
    width: 100%;
    max-width: 1400px;
    margin-left: auto; margin-right: auto; /* 置中 Grid 本身 */
    box-sizing: border-box;
    justify-content: center;
}

/* --- 卡片樣式 --- */
.grid-item {
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    opacity: 1; 
    animation: fadeInUp 0.6s ease forwards;
    display: flex;
    flex-direction: column;
}
.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(166, 123, 91, 0.15);
}

/* --- 16:9 媒體容器 (圖片/Iframe) --- */
.media-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 比例，防止跑版 */
    overflow: hidden;
    border-radius: 4px;
    background: #f0f0f0;
}

/* Canva Iframe */
.media-frame iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;
}

/* 靜態圖片 */
.media-frame img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    object-fit: cover; transition: transform 0.5s ease;
    display: block;
}
.grid-item:hover .media-frame img { transform: scale(1.05); }

/* --- 文字連結 --- */
.item-title {
    text-align: center; margin-top: 15px; font-size: 1rem; font-weight: 600;
}
.item-title a { text-decoration: none; color: var(--text-main); transition: color 0.3s; }
.item-title a:hover { color: var(--caramel); }

/* --- 遮罩 --- */
.hover-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(166, 123, 91, 0.1);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.3s ease; z-index: 2;
}
.hover-overlay i {
    font-size: 2rem; color: var(--caramel);
    background: rgba(255,255,255,0.9);
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: scale(0.8); transition: transform 0.3s ease;
}
.grid-item:hover .hover-overlay { opacity: 1; }
.grid-item:hover .hover-overlay i { transform: scale(1); }

/* RWD */
@media (max-width: 992px) {
    .grid-layout-fix { grid-template-columns: repeat(2, 1fr); padding: 0 30px; }
}
@media (max-width: 768px) {
    .grid-layout-fix { grid-template-columns: 1fr; padding: 0 20px; gap: 30px; }
}

/* =========================================
   Game Dev 頁面專屬樣式
   ========================================= */

/* --- 篩選按鈕 (Filter Buttons) --- */
.filter-bar {
    display: flex; justify-content: center; gap: 15px; margin-bottom: 50px;
    opacity: 0; animation: fadeIn 1s ease forwards 0.3s;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(166, 123, 91, 0.3);
    color: #888;
    padding: 8px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Noto Serif TC', serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--caramel);
    color: #fff;
    border-color: var(--caramel);
}

/* --- Game Grid (卡片列表) --- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    padding: 0 8%;
    margin-bottom: 100px;
}

.game-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
    text-decoration: none;
    color: #2A2A2A;
    display: flex;
    flex-direction: column;
    position: relative;
    opacity: 1;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(166, 123, 91, 0.15);
}

/* 封面圖容器 */
.game-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
}

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

.game-card:hover .game-thumb img { transform: scale(1.1); }

/* Play 按鈕遮罩 */
.play-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.3s ease;
}

.play-btn {
    background: var(--caramel); color: #fff;
    padding: 10px 25px; border-radius: 30px;
    font-size: 0.9rem; font-weight: 500;
    display: flex; align-items: center; gap: 8px;
    transform: translateY(10px); transition: all 0.3s ease;
}

.game-card:hover .play-overlay { opacity: 1; }
.game-card:hover .play-btn { transform: translateY(0); }

/* 卡片內容 */
.card-body {
    padding: 20px;
    display: flex; flex-direction: column; gap: 8px;
}

.game-year {
    font-size: 0.75rem; color: #999; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
}

.game-title {
    font-size: 1.1rem; font-weight: 600; margin: 0;
    font-family: 'Noto Serif TC', serif;
}

/* 標籤 (Tags) */
.tag-row {
    display: flex; gap: 8px; margin-top: 10px;
}

.tech-tag {
    font-size: 0.7rem; padding: 4px 10px; border-radius: 4px;
    background: #f5f5f5; color: #666;
}

.tag-unity { background: rgba(0, 0, 0, 0.05); color: #222; }
.tag-scratch { background: rgba(255, 165, 0, 0.1); color: #d35400; }

/* RWD */
@media (max-width: 768px) {
    .game-grid { grid-template-columns: 1fr; padding: 0 20px; gap: 30px; }
}

/* =========================================
   Lecture / Workshop 頁面專屬樣式 (未來圖書館)
   ========================================= */

/* 內容容器 */
.event-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 5%;
    animation: fadeInDown 1s ease forwards;
}

/* Header 區域 */
.event-header {
    text-align: center;
    margin-bottom: 50px;
}

.event-tag {
    display: inline-block;
    background: var(--caramel);
    color: #fff;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
}

/* 標題與 Meta 資訊 */
.event-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    color: #666;
    font-size: 0.95rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 15px 0;
    margin-top: 30px;
}
.event-meta span { display: flex; align-items: center; gap: 8px; }

/* Swiper 輪播樣式微調 */
.swiper {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.swiper-slide img {
    width: 100%; height: auto; display: block;
}
/* 覆寫 Swiper 分頁點顏色 */
.swiper-pagination-bullet-active { background: var(--caramel) !important; }

/* 文章內容 */
.event-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}
.event-body p { margin-bottom: 20px; }

/* 強調區塊 (Highlight Box) */
.highlight-box {
    background: rgba(255,255,255,0.6);
    border-left: 4px solid var(--caramel);
    padding: 25px;
    margin: 40px 0;
    border-radius: 0 8px 8px 0;
}
.highlight-box h3 {
    font-size: 1.2rem; margin-bottom: 10px; color: var(--caramel);
    font-family: 'Noto Serif TC', serif;
}
.highlight-box ul {
    margin: 0; padding-left: 20px;
}
.highlight-box li { margin-bottom: 8px; }

/* RWD */
@media (max-width: 768px) {
    .event-container { padding: 40px 20px; }
    .event-meta { flex-direction: column; gap: 10px; align-items: center; }
}

/* =========================================
   母校演講 (Lecture) 頁面專屬樣式
   ========================================= */

/* Canva 嵌入區塊 */
.canva-frame {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 56.25%; /* 16:9 比例 */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    margin: 40px 0;
    background: #f0f0f0;
}
.canva-frame iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;
}

/* 回饋留言網格 (Feedback Grid) */
.feedback-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feedback-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    font-style: italic;
    position: relative;
}

/* 加上引號裝飾 */
.feedback-card::before {
    content: '“';
    font-size: 2rem;
    color: var(--caramel);
    opacity: 0.3;
    display: block;
    line-height: 1;
    margin-bottom: 5px;
}

/* RWD */
@media (max-width: 768px) {
    .feedback-grid { grid-template-columns: 1fr; }
}

/* =========================================
   Poster Design 頁面專屬樣式 (Polaroid & Lightbox)
   ========================================= */

/* --- Gallery 容器 --- */
.gallery-container {
    padding: 80px 5%;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: 60px;
    opacity: 0;
    animation: fadeInDown 1s ease forwards;
}

/* --- Gallery Grid --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    padding: 20px;
}

.gallery-item {
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

/* --- Polaroid Frame (拍立得風格) --- */
.polaroid-frame {
    background: #fff;
    padding: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
    position: relative;
    transform-origin: center top;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 隨機微旋轉效果 */
.gallery-item:nth-child(odd) .polaroid-frame { transform: rotate(-1deg); }
.gallery-item:nth-child(even) .polaroid-frame { transform: rotate(1deg); }

.gallery-item:hover .polaroid-frame {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 0 20px 40px rgba(166, 123, 91, 0.2);
    z-index: 10;
}

.img-wrap {
    overflow: hidden;
    width: 100%;
    background: #f0f0f0;
    aspect-ratio: 210/297; /* A4 比例 */
}

.img-wrap img {
    width: 100%; height: 100%; object-fit: cover;
    transition: filter 0.3s ease;
}

.item-info {
    position: relative;
    text-align: center;
    width: 100%;
}

.item-title {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 8px;
    font-family: 'Noto Serif TC', serif;
    line-height: 1.4;
}

.item-tag {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    margin: 0 3px;
}

/* --- 自製 Lightbox 樣式 --- */
.lightbox-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex; justify-content: center; align-items: center;
}
.lightbox-overlay.active { opacity: 1; pointer-events: auto; }

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.lightbox-overlay.active .lightbox-content { transform: scale(1); }

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    border: 10px solid #fff;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute; top: -40px; right: -40px;
    background: none; border: none;
    color: #fff; font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s;
}
.lightbox-close:hover { transform: rotate(90deg); }

/* RWD */
@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-item:nth-child(n) .polaroid-frame { transform: rotate(0deg); }
    .lightbox-close { top: -40px; right: 0; }
}

/* --- 手機版 Hero Logo 設定 --- */

/* 1. 預設隱藏 (電腦版看不到) */
.mobile-hero-logo {
    display: none !important;
}

/* 2. 手機版樣式 (螢幕寬度小於 768px 時顯示) */
@media (max-width: 768px) {
    .mobile-hero-logo {
        display: block !important;        /* 顯示圖片 */
        width: 220px;          /* 設定寬度 (可依喜好調整) */
        height: auto;
        margin: 0 auto 20px;   /* 置中，並與下方標題保持 20px 距離 */
        opacity: 0.9;          /* 稍微調整透明度 */
    }
    
    /* 微調手機版標題，讓它跟 Logo 的距離好看一點 */
    .hero-title {
        margin-top: 10px;
    }
}

.brand-label {
    font-family: 'Noto Serif TC', serif; /* 使用宋體增加氣質 */
    font-size: 2rem;                   /* 較小的字體 */
    color: var(--caramel);               /* 使用你的焦糖色變數 */
    letter-spacing: 0.3em;               /* 增加字距讓它看起來更優雅 */
    margin-bottom: 20px;                 /* 與下方主標題的距離 */
    text-transform: uppercase;           /* 英文強制大寫 */
    opacity: 0.8;                        /* 稍微透明一點，增加層次感 */
    display: block;                      /* 確保它獨佔一行 */
}

/* 針對手機版的微調 */
@media (max-width: 768px) {
    .brand-label {
        font-size: 1.2rem;               /* 手機版字體再縮小一點 */
        letter-spacing: 0.2em;
        margin-bottom: 15px;             /* 手機版距離縮減 */
    }
}

/* --- 1. 修正手機版 Contact 頁面歪斜 --- */
@media (max-width: 768px) {
    .contact-container {
        padding: 40px 20px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    .contact-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }
    .info-section, .form-section, .info-cards, .info-card {
        width: 100% !important;
    }
    .info-card {
        justify-content: flex-start !important;
    }
    .allies-grid {
        flex-direction: column !important;
    }
}

/* --- Back to Top 懸浮按鈕 --- */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(166, 123, 91, 0.3);
    border-radius: 50%;
    color: var(--caramel);
    cursor: pointer;
    z-index: 2000;
    opacity: 0; /* 預設隱藏 */
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 顯示狀態 */
.back-to-top.show {
    opacity: 0.6; /* 不要太明顯，保持低調 */
    visibility: visible;
}

.back-to-top:hover {
    opacity: 1;
    background: #fff;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(166, 123, 91, 0.15);
}

/* 零件旋轉特效 */
.unit-icon {
    position: relative;
    font-size: 1.5rem;
    transition: transform 0.6s ease;
}

.back-to-top:hover .unit-icon {
    transform: rotate(360deg); /* 懸浮時旋轉 */
}

.unit-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 35px; height: 35px;
    border: 1px dashed var(--caramel);
    border-radius: 50%;
    opacity: 0.3;
    animation: spin 10s linear infinite;
}

@keyframes spin {
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (max-width: 768px) {
    .back-to-top { right: 20px; bottom: 20px; width: 45px; height: 45px; }
}

/* --- [緊急修復] 手機版面撐爆問題 --- */
@media (max-width: 768px) {
    /* 1. 解除標題的不換行限制，並縮小字體 */
    .page-title {
        white-space: normal !important; /* 允許換行 */
        font-size: 1.8rem !important;   /* 字體縮小，避免單字過長 */
        line-height: 1.4 !important;    /* 增加行距，換行後比較好看 */
        word-break: break-word !important; /* 防止長單字撐開 */
    }

    /* 2. 確保整個網頁容器強制隱藏超出部分 */
    html, body {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    /* 3. 確保主要內容區不會被內部元件撐大 */
    .main-stage, .event-container, .content-wrapper {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
}

/* --- 懶人法：用 CSS 幫所有頁面加上中間標題 --- */
@media (max-width: 768px) {
    .sidebar::after {
        content: "焦糖零件 | Caramel Unit"; /* 這裡就是你要的文字 */
        
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%); /* 完美置中 */
        
        font-family: 'Noto Serif TC', serif;
        font-size: 0.9rem;       /* 字體大小 */
        color: var(--caramel);   /* 你的品牌色 */
        font-weight: 600;
        letter-spacing: 0.05em;
        white-space: nowrap;     /* 強制不換行 */
        pointer-events: none;    /* 讓點擊穿透，不會擋到別人 */
        z-index: 1001;
    }
}