@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@200..900&display=swap');


:root {
    --primary-yellow: #F3C14C;
    --light-yellow: #ffdc88;
    --primary-brown: #A65D33;
    --primary-dark-brown: #593825;
    --dark-gray: #777777;
    --black: #333333;
    --bg-light: #f9f9f9;
    --white: #f1f1f1;
    font-size: 16px;
}

* {
    margin: 0;
    padding: 0;
    font-family: "Noto Serif TC", serif;
    box-sizing: border-box;
}

body {
    background-color: var(--white);
    color: var(--black);
}

a {
    text-decoration: none;
    color: inherit;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    /* 移除手機版點擊時的灰色遮罩 */
}

header {
    background: var(--light-yellow);
    padding: 0 10%;
}

.navbar {
    padding: 20px 50px;
}

.nav-links {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-brown);
    font-size: 1.2rem;
    font-weight: 800;

}

.nav-links a:hover {
    color: var(--primary-dark-brown);
}

/* 1. 禁用狀態樣式 */
.nav-links li.disabled {
    position: relative;
    /* 為了讓提示文字對齊 */
}

/* downDisabled 也需要定位基準，否則 ::after 會以整頁為參考 */
.nav-links li.downDisabled {
    position: relative;
}

.nav-links li.downDisabled a {
    color: var(--primary-brown) !important;
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

.nav-links li.disabled a {
    color: var(--primary-brown) !important;
    /* 使用之前規範中的灰色 #8c8c8c */
    opacity: 0.6;
    pointer-events: none;
    /* 徹底禁止點擊事件 */
}

/* 2. 滑鼠滑過去的提示文字 (Tooltip) */
.nav-links li.disabled::after {
    content: attr(data-tooltip);
    /* 抓取 HTML 裡的文字 */
    position: absolute;
    bottom: -45px;
    /* 顯示在選項下方 */
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    /* 初始縮小，增加彈出感 */
    background: var(--primary-brown);
    /* 使用你規範中的 core-900 黑色 */
    color: var(--white);
    /* 使用你的主色黃 #FFDD00 讓文字明顯 */
    margin-top: 10px;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 1rem;
    white-space: nowrap;
    z-index: 100;
    /* 玻璃擬態效果與陰影 */
    backdrop-filter: blur(4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 221, 0, 0.3);
    /* 帶點主色邊框 */
    /* 預設隱藏 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* 貝茲曲線彈跳動畫 */
}




/* 3. Hover 時秀出提示 */
.nav-links li.disabled:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: -35px;
    /* 稍微往下飄移的動態感 */
}

/* --- 下拉選單基礎設定 --- */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--white);
    /* 使用背景白 */
    list-style: none;
    min-width: 180px;
    padding: 10px 0;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--light-yellow);

    /* 預設隱藏動畫 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

/* 讓下拉選單與選單項之間沒有間隙，避免滑鼠移出時選單消失 */
.dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 15px;
}

/* --- 顯示狀態 --- */
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* --- 下拉項目樣式 --- */
.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--primary-brown) !important;
    /* 強制使用你的深棕色 */
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    white-space: nowrap;
    transition: background 0.2s ease;
    text-align: center;
}

.dropdown-menu a:hover {
    background-color: var(--light-yellow);
    color: var(--primary-dark-brown) !important;
}


/* 2. 滑鼠滑過去的提示文字 (Tooltip) */
.nav-links li.downDisabled::after {
    content: attr(data-tooltip);
    /* 抓取 HTML 裡的文字 */
    position: absolute;
    top: 50%;
    /* 顯示在選項右邊 */
    left: 100%;
    margin-left: 10px;
    transform: translateY(-50%) translateX(-5px) scale(0.9);
    /* 初始縮小，增加彈出感 */
    background: var(--primary-brown);
    /* 使用你規範中的 core-900 黑色 */
    color: var(--white);
    /* 使用你的主色黃 #FFDD00 讓文字明顯 */
    margin-top: 10px;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 1rem;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    /* 玻璃擬態效果與陰影 */
    backdrop-filter: blur(4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 221, 0, 0.3);
    /* 帶點主色邊框 */
    /* 預設隱藏 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* 貝茲曲線彈跳動畫 */
}




/* 3. Hover 時秀出提示 */
.nav-links li.downDisabled:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0) scale(1);
    /* 稍微往右飄移的動態感 */
}




/* 針對原本 disabled 提示的微調 (避免擋到下拉選單) */
.nav-links li:not(.downDisabled) {
    cursor: pointer;
}



.hero-section {
    display: flex;
    padding-top: 5%;
    background: var(--light-yellow);
}

.hero-text {
    margin: auto;
    width: 50%;
    text-align: center;
}

.hero-text h1 {
    font-size: 3rem;
    text-align: left;
    margin-bottom: 20%;
}

.hero-text h1 br {
    margin-left: 5px;
}

.hero-text h1 span {
    color: var(--primary-brown);
}

.hero-describe {
    margin-right: 20%;
    text-align: right;
}

.hero-describe h2 {
    font-size: 1.8rem;
    margin-bottom: 3%;
}

/* .hero-img{
    width: 50%
} */

/* 右側不規則圖形容器 */
.hero-image-container {
    position: relative;
}

.blob-shape {
    width: 350px;
    height: 300px;
    background-color: var(--primary-yellow);
    /* 創造不規則形狀的關鍵 */
    /* border-radius: 60% 40% 60% 40% / 50% 60% 40% 50%; */
    border-radius: 67% 33% 67% 33% / 45% 60% 40% 55%;
    border: 2px dashed #555;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 狗狗圖片縮放與位置調整 */
.avatar {
    width: 80%;
    height: auto;
    /* 視圖片情況可能需要調整 margin-top 或 position */
}


/* 作品集區域 */
.section-title {
    text-align: center;
    padding: 100px 0 50px;
    font-size: 2rem;
    color: var(--black);
    letter-spacing: 4px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    padding: 0 10% 100px;
}

.work-item {
    position: relative;
    background: var(--bg-light);
    height: 400px;
    overflow: hidden;
    /* border: 1px solid #eee; */
    transition: transform 0.4s ease;
}

.work-item:hover {
    transform: translateY(-10px);
}

.work-image {
    width: 100%;
    height: 100%;
    background-color: var(--primary-yellow);
    /* 預設圖片占位色 */
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
}

.work-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: var(--white);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.work-item:hover .work-info {
    transform: translateY(0);
}

.main-container {
    width: 80%;
    margin: 10% auto;
}

.main-container h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-top: 40px;
}

/* 頁面大標題設計 (通用) */
.page-title {
    text-align: center;
    margin: 80px auto 20px auto;
    position: relative;
    padding-bottom: 20px;
}

.page-title h2 {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.page-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 6px;
    background: var(--primary-yellow);
    margin: 10px auto 0;
    border-radius: 10px;
}

.page-title p {
    font-size: 1rem;
    color: var(--dark-gray);
    letter-spacing: 2px;
    font-weight: 500;
}

/* --- 作品集卡片系統 --- */
.portfolio-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 25px;
    margin: 40px auto;
}

.portfolio-item {
    background: #fff;
    /* 或 var(--card-bg) */
    border-radius: 20px;
    overflow: hidden;
    vertical-align: top;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}

.portfolio-item:hover {
    transform: translateY(-8px);
}

.card-content {
    padding: 24px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* 標籤與時間樣式 */
.tag {
    background: var(--primary-yellow);
    color: #fff;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: bold;
}

.date {
    font-size: 0.75rem;
    color: var(--dark-gray);
}

.date i {
    margin-right: 5px;
}


/* 聯絡資訊 */
footer {
    background-color: var(--black);
    color: var(--primary-yellow);
    flex-shrink: 0;
    /* 防止 Footer 被壓縮 */
    padding: 25px 5%;
    text-align: center;
    font-size: 0.8rem;
}

.contact-email {
    margin: 0px auto;
    font-size: 1rem;
    display: block;
    color: var(--white);
    text-decoration: none;

}

/* 外層容器：確保背景滿版且不斷層 */
.section-wrapper {
    width: 100%;
    padding: 100px 0;
    /* 用 padding 撐開間距 */
    box-sizing: border-box;
}

/* 內層容器：確保內容絕對置中不偏左 */
.container {
    width: 100%;
    /* max-width: 1200px; */
    /* 這裡限制你的美感邊界 */
    margin: 0 auto;
    /* 核心：自動平分左右 */
    padding: 0 40px;
}

/* 針對 web.html 的三列架構 */
.portfolio-grid-web {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 768px) {
    .hero-section {
        flex-direction: column-reverse;
        /* 關鍵：從橫向並排改為上下垂直排列 */
        width: 100%;
        /* 寬度撐滿，避免在小螢幕縮得太小 */
        margin: 10% 0;
        /* 調整上下間距 */
        text-align: center;
        /* 讓內容在手機上居中看 */
    }

    .hero-text {
        width: 90%;
        /* 從 50% 改為 90%，給兩邊留點呼吸空間 */
        text-align: center;
        /* 讓文字在手機上居中，重心才不會偏左 */
    }

    .hero-describe h2 {

        margin-right: 0 !important;
        /* 強制歸零，消除右側推力 */
    }

    .hero-text h1 {
        text-align: center;
        /* 強制標題也居中 */
        margin-bottom: 20px;
    }

    .hero-content h1 {
        font-size: 3rem;
    }
}