:root {
    --bg-pink: #FEECEF;
    --main-pink: #E58B9D;
    --dark-pink: #F6B5C0;
    --white: #FFFFFF;
    --text-gray: #555;
    --text-light: #888;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }


body { 
    font-family: 'Montserrat', 'Noto Sans TC', sans-serif;
    color: var(--text-gray);
    line-height: 1.8;
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    /* 移除 overflow-x: hidden; 這樣手機上才能自由左右滑動縮放 */
}

.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* --- SECTION 0: HEADER BROWSER --- */
/* 這裡改為獨立背景，佈滿整個 Header 區域 */
.page-header {
    width: 100vw;           /* 強制寬度為視窗的 100% */
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;    
    margin-right: -50vw;
    
    background-image: url('img/hero-bg.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px 20px 20px;
    
    border-radius: 0;
}

.browser-window {
    background: #fff;
    border: 2px solid var(--dark-pink);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(229, 139, 157, 0.15);
    width: 100%;                     /* 讓寬度自適應容器 */
    max-width: 980px;                /* 擴大寬度以利並列展示 */
    margin: 0 auto;                  /* 確保水平置中 */
}

.browser-bar {
    padding: 15px 25px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--dark-pink);
    background: #fffafa;
}

.dots { display: flex; gap: 8px; margin-right: 20px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--dark-pink); }
.browser-title { max-width: 250px; margin: 0 auto; }

/* --- 工作經歷表 (Experience Board) - 橫向滑動 (Horizontal Scrollable Tracks) --- */
.experience-board {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 26px;
    background: #FFF8F9;
}

.exp-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exp-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 2px dashed #F6B5C0;
    margin-bottom: 2px;
}

.exp-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #D16B82;
    font-family: 'Montserrat', 'Noto Sans TC', sans-serif;
    letter-spacing: 0.5px;
    margin: 0;
}

.exp-scroll-hint {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--main-pink);
    background: #FEECEF;
    padding: 3px 12px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    user-select: none;
}

.exp-scroll-track {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 6px 4px 16px 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #F6B5C0 #FEECEF;
}

.exp-scroll-track::-webkit-scrollbar {
    height: 6px;
}

.exp-scroll-track::-webkit-scrollbar-track {
    background: #FEECEF;
    border-radius: 10px;
}

.exp-scroll-track::-webkit-scrollbar-thumb {
    background: #F6B5C0;
    border-radius: 10px;
}

.exp-scroll-track::-webkit-scrollbar-thumb:hover {
    background: var(--main-pink);
}

.exp-card {
    flex: 0 0 380px;
    max-width: calc(100% - 20px);
    scroll-snap-align: start;
    background: #ffffff;
    border: 1.5px solid #F6B5C0;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 4px 15px rgba(229, 139, 157, 0.08);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    user-select: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.exp-card:hover {
    transform: translateY(-2px);
    border-color: var(--main-pink);
    box-shadow: 0 8px 22px rgba(229, 139, 157, 0.16);
    background: #fffdfd;
}

.exp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.exp-role {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2C2C2C;
    font-family: 'Montserrat', 'Noto Sans TC', sans-serif;
    line-height: 1.35;
    flex: 1;
    min-width: 140px;
}

.exp-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--main-pink);
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.2px;
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
}

.exp-org-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.exp-org {
    font-size: 0.88rem;
    font-weight: 600;
    color: #666666;
    line-height: 1.4;
    flex: 1;
}

.exp-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--main-pink);
    background: #FEECEF;
    padding: 2px 8px;
    border-radius: 12px;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.exp-card:hover .exp-expand-btn {
    background: var(--main-pink);
    color: #ffffff;
}

.chevron-icon {
    transition: transform 0.3s ease;
}

.exp-card.expanded .chevron-icon {
    transform: rotate(180deg);
}

.exp-desc {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
    border-top: 1px dashed transparent;
    transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.3s ease, padding-top 0.3s ease, border-color 0.3s ease;
}

.exp-card.expanded .exp-desc {
    max-height: 350px;
    opacity: 1;
    margin-top: 10px;
    padding-top: 10px;
    border-top-color: #FEE1E7;
}

.exp-zh {
    font-size: 0.86rem;
    color: #444444;
    line-height: 1.6;
    text-align: justify;
    margin: 0;
}

.exp-en {
    font-size: 0.78rem;
    color: #888888;
    font-style: italic;
    line-height: 1.5;
    text-align: justify;
    margin: 0;
}

/* --- 通用 Section 背景設定 --- */
.section { 
    padding: 100px 0; /* 增加間距，讓每區背景更有層次 */
    position: relative; 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* --- SECTION 1: GRAPHIC DESIGN --- */
/* --- 1. 平面設計 SECTION (重疊效果) --- */
#graphic {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    background-image: url('img/graphic-bg.png');
    background-position: top center;
    background-size: cover;
    z-index: 2;
    padding: 30px 0 40px 0;
}

.peek-character {
    position: absolute; 
    top: 15px;         
    right: 5%;
    z-index: 999;       
    width: 220px; 
    height: auto;
    transform: translateX(10%) rotate(-5deg);
    animation: peekAnimation 3s infinite ease-in-out;
    pointer-events: none; 
}

@keyframes peekAnimation {
    0%, 100% {
        transform: translateX(10%) rotate(-5deg);
    }
    50% {
        transform: translateX(5%) rotate(-3deg);
    }
}

.graphic-content-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    z-index: 1;
}

.sec-title-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.sec-title-img { max-width: 320px; }
.sw-icons { display: flex; gap: 12px; }
.sw-icons img { width: 42px; height: 42px; border-radius: 8px; }

/* --- 垂直輪播容器 (Vertical Project Carousel) --- */
.graphic-carousel-container,
.web-carousel-container,
.software-carousel-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.software-title-img {
    max-width: 480px;
    width: 100%;
    height: auto;
}

.carousel-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: rgba(255, 255, 255, 0.92);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1.5px solid #F6B5C0;
    box-shadow: 0 4px 15px rgba(229, 139, 157, 0.08);
}

.carousel-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.carousel-tab-btn {
    background: transparent;
    border: 1.5px solid transparent;
    border-radius: 14px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Montserrat', 'Noto Sans TC', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666666;
}

.carousel-tab-btn .tab-num {
    font-size: 0.74rem;
    color: var(--main-pink);
    font-weight: 700;
}

.carousel-tab-btn:hover {
    background: #FEECEF;
    color: #D16B82;
}

.carousel-tab-btn.active {
    background: var(--main-pink);
    color: #ffffff;
    border-color: var(--main-pink);
    box-shadow: 0 4px 12px rgba(229, 139, 157, 0.25);
}

.carousel-tab-btn.active .tab-num {
    color: #ffffff;
}

.carousel-arrow-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

.carousel-arrow-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid #F6B5C0;
    background: #ffffff;
    color: #D16B82;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.carousel-arrow-btn:hover {
    background: var(--main-pink);
    color: #ffffff;
    border-color: var(--main-pink);
    transform: scale(1.06);
}

.carousel-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 24px;
    transition: height 0.35s ease;
}

.carousel-track {
    display: flex;
    flex-direction: column;
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.33, 1, 0.68, 1);
}

.carousel-slide {
    width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
}

.carousel-slide .project-showcase-card {
    margin-bottom: 0;
}

/* --- 專案展示卡片 (Project Showcase Card) --- */
.project-showcase-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px 30px;
    box-shadow: 0 10px 30px rgba(229, 139, 157, 0.1);
    border: 2px solid #F6B5C0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-showcase-card:hover {
    box-shadow: 0 15px 35px rgba(229, 139, 157, 0.16);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1.5px dashed #FEE1E7;
}

.project-title-group {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.project-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--main-pink);
    margin: 0;
    font-family: 'Montserrat', 'Noto Sans TC', sans-serif;
    letter-spacing: 0.5px;
}

.project-subtitle {
    font-size: 0.95rem;
    color: #888888;
    font-weight: 500;
    font-family: 'Montserrat', 'Noto Sans TC', sans-serif;
}

.project-links {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.proj-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    font-family: 'Montserrat', sans-serif;
}

.ig-btn {
    background: #FEECEF;
    color: #D16B82;
    border: 1.5px solid #F6B5C0;
}

.ig-btn:hover {
    background: var(--main-pink);
    color: #ffffff;
    border-color: var(--main-pink);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 139, 157, 0.25);
}

.web-btn {
    background: var(--main-pink);
    color: #ffffff;
    border: 1.5px solid var(--main-pink);
}

.web-btn:hover {
    background: #d17586;
    border-color: #d17586;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 139, 157, 0.3);
}

.yt-btn {
    background: #FF0000;
    color: #ffffff;
    border: 1.5px solid #FF0000;
}

.yt-btn:hover {
    background: #d60000;
    border-color: #d60000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.28);
}

.github-btn {
    background: #24292e;
    color: #ffffff;
    border: 1.5px solid #24292e;
}

.github-btn:hover {
    background: #111111;
    border-color: #111111;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tech-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #FEECEF;
    color: #D16B82;
    border: 1px solid #F6B5C0;
    font-family: 'Montserrat', sans-serif;
}

.project-desc-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.project-info-desc {
    width: 100%;
    max-width: 860px;
    background: #FFFBFB;
    border-radius: 16px;
    padding: 16px 22px;
    border: 1.5px solid #FEE1E7;
    text-align: left;
}

.project-info-desc .desc-zh {
    font-size: 0.95rem;
    color: #444444;
    line-height: 1.65;
    margin-bottom: 6px;
    font-weight: 500;
}

.project-info-desc .desc-en {
    font-size: 0.82rem;
    color: #888888;
    line-height: 1.55;
    font-style: italic;
    margin: 0;
}

/* 軟體專案縮小圖片專用樣式 */
.software-media-wrapper {
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.software-preview-img {
    max-width: 100%;
    max-height: 340px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.software-preview-img:hover {
    transform: scale(1.015);
    box-shadow: 0 10px 26px rgba(229, 139, 157, 0.2);
}

#software .project-info-desc {
    max-width: 840px;
}

.project-media-wrapper {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-cover-img {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    height: auto;
    display: block;
    border-radius: 16px;
    transition: transform 0.4s ease;
}

.project-cover-img:hover {
    transform: scale(1.015);
}
.project-gallery-grid {
    display: grid;
    gap: 18px;
    width: 100%;
}

.project-gallery-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.project-gallery-grid.grid-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 680px;
    margin: 0 auto;
}

.project-gallery-grid a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.gallery-img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

.gallery-img:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 22px rgba(229, 139, 157, 0.2);
}

/* --- 2. 網頁設計 SECTION --- */
#web {
    background-color: #FFF0F3; /* 替換網頁設計背景圖 */
    background-size: cover;
    background-position: center;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 45px 0 65px 0; /* 縮小上下內距，消除過多空白 */
    z-index: 1;
}

.web-flow-container {
    background: #FFFBFB;
    padding: 18px;
    border-radius: 20px;
    border: 1.5px solid #FEE1E7;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.web-flow-img {
    width: 100%;
    max-width: 920px;
    height: auto;
    border-radius: 12px;
}
.web-showcase {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.web-showcase:hover {
    transform: scale(1.01);
    box-shadow: 0 14px 35px rgba(229, 139, 157, 0.18);
}

/* --- 3. 軟體開發與AI應用 SECTION --- */
#software {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background-color: #FFFFFF; /* 保持白色底 */
    padding: 45px 0 70px 0;
}

/* =========================================
   可點擊圖片的提示標籤 (Click Hint Link)
   ========================================= */
.click-hint-link {
    position: relative;
    display: block;
    width: 100%;
    height: fit-content;
}
.intro-flex .click-hint-link { flex: 1; } /* 針對平面設計並排區塊的尺寸修正 */
.software-card .click-hint-link { margin-bottom: 20px; } /* 修正軟體卡片圖片下的間距 */
.software-card .click-hint-link img.main-preview { margin-bottom: 0; }

.click-hint-link::after {
    content: 'Click to View';
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(237, 176, 188, 0.95); /* 品牌粉色帶微透明 */
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: 'Montserrat', 'Noto Sans TC', sans-serif;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    pointer-events: none; /* 確保不會擋住使用者的點擊 */
    opacity: 0.85;
    transition: all 0.3s ease;
    z-index: 10;
}
.click-hint-link:hover::after {
    opacity: 1;
    background: #d17586;
    transform: scale(1.05) translateY(-2px); /* 滑鼠移過去時微放大上浮 */
}

/* =========================================
   回到頂部按鈕 (Back to Top)
   ========================================= */
   .back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: var(--main-pink);
    color: white;
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(229, 139, 157, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999; /* 確保按鈕永遠在最上層 */
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    transform: translateY(-5px); /* 滑鼠移入稍微上浮 */
    background-color: #d17586; /* 稍微變深的粉紅色 */
}

/* =========================================
   修正：強制鎖定滿版區塊在手機上維持電腦版尺寸
   解決 100vw 導致高度縮水、內部內容超過顯示範圍的問題
   ========================================= */
@media (max-width: 1024px) {
    /* 1. 在手機版隱藏探頭小動畫 */
    .peek-character {
        display: none;
    }

    /* 2. 強制鎖定滿版區塊，避免手機寬度縮水 */
    .page-header, 
    #graphic, 
    #web, 
    #software, 
    #ai-application {
        width: 1024px;
        margin-left: -512px;
        margin-right: -512px;
    }

    /* 3. 解決平面設計區塊改為固定寬度後產生的底部空白問題 */
    #graphic {
        padding-top: 0;
        padding-bottom: 80px; 
    }
    .graphic-content-wrapper {
        position: relative;
        height: auto;
    }
    
    /* 4. 強制內容容器不縮水，解決左側文字被擠壓變長的問題 */
    .container {
        min-width: 1000px;
    }
}


/* =========================================
   手機版專屬放大設定 (參考 style.css 的作法)
   維持排版完全不變，僅針對觸控螢幕稍微放大按鈕
   ========================================= */
@media (max-device-width: 896px), (pointer: coarse) {
    .nav-item {
        padding: 20px;
        font-size: 1.1rem;
    }
    .nav-item span {
        font-size: 0.85rem;
    }
}

/* =========================================
   左側漂浮目錄 (Floating TOC - 超輕量半透明不遮擋設計)
   ========================================= */
.floating-toc {
    position: fixed;
    left: max(10px, calc((100vw - 1040px) / 2 - 110px));
    top: 50%;
    transform: translateY(-50%) translateX(-15px);
    background: rgba(255, 255, 255, 0.48); /* 高透光度毛玻璃，絕不遮擋底層資訊 */
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 12px 14px;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(229, 139, 157, 0.12), 0 1px 3px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(254, 236, 239, 0.85);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.3s ease, background 0.3s ease;
    max-width: 105px;
}

.floating-toc:hover {
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 8px 24px rgba(229, 139, 157, 0.18);
}

.floating-toc.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0); /* 滑動時向右滑入顯示 */
}

.floating-toc ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.floating-toc a {
    color: var(--text-gray);
    text-decoration: none;
    position: relative;
    padding-left: 9px;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.floating-toc .toc-zh {
    font-size: 0.8rem;
    font-weight: 700;
    color: #444;
    transition: color 0.25s ease;
}

.floating-toc .toc-en {
    font-size: 0.62rem;
    font-weight: 500;
    color: #888;
    letter-spacing: 0.2px;
    transition: color 0.25s ease;
}

.floating-toc a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--main-pink);
    transform: scale(0);
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.floating-toc a:hover .toc-zh,
.floating-toc a:hover .toc-en {
    color: var(--main-pink);
}

.floating-toc a.active .toc-zh {
    color: var(--main-pink);
    font-weight: 800;
}

.floating-toc a.active .toc-en {
    color: var(--main-pink);
    opacity: 0.9;
}

.floating-toc a.active::before,
.floating-toc a:hover::before {
    transform: scale(1.3);
}

/* 螢幕小於 1240px 時貼靠左側邊界，小於 1060px 時隱藏以確保不與內容重疊 */
@media (max-width: 1240px) {
    .floating-toc {
        left: 8px;
        padding: 10px 12px;
        background: rgba(255, 255, 255, 0.42);
        backdrop-filter: blur(16px);
    }
}

@media (max-width: 1060px) {
    .floating-toc {
        display: none !important;
    }
}

