/* ========================================= */
/* 基礎設定 */
/* ========================================= */

body {
    font-family: "Segoe UI", sans-serif;
    transition: background 0.4s ease, color 0.4s ease;

    background: var(--bg-color);
    color: var(--text-color);
}


/* ========================================= */
/* Theme Variables */
/* ========================================= */

.light-mode {

    --bg-color: #ffffff;
    --text-color: #111;

    --nav-bg: #ffffff;
    --nav-border: #e8e8e8;

    --nav-text: #222;

    --particle-color: #222; /* 粒子顏色 */
}


.dark-mode {

    --bg-color: #0b0b0b;
    --text-color: #f2f2f2;

    --nav-bg: #121212;
    --nav-border: #333;

    --nav-text: #f2f2f2;

    --particle-color: #ffffff; /* 粒子顏色 */
}


/* ========================================= */
/* Navbar */
/* ========================================= */

.custom-navbar {
    height: 70px;
    display: flex;
    align-items: center;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    z-index: 1000;
    transition: background 0.3s;
}


.navbar-brand {
    font-weight: bold;
    letter-spacing: 2px;
    color: var(--nav-text);
}


.navbar-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}


/* icon */

.theme-icon {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--nav-text);
    transition: transform 0.2s;
}

.theme-icon:hover {
    transform: scale(1.1);
}


/* ========================================= */
/* Hero Section */
/* ========================================= */


/* 圖片版 hero  */
/*.hero-section {*/
/*    min-height: 100vh;*/
/*    padding-top: 70px; !* 避開 navbar *!*/
/*    background-image: url("https://images.unsplash.com/photo-1518770660439-4636190af475");*/
/*    background-size: cover;*/
/*    background-position: center;*/
/*    color: white;*/
/*    display: flex;*/
/*    align-items: center;*/
/*    position: relative;*/
/*}*/


/* 粒子背景 */
.hero-section {
    min-height:100vh;
    padding-top:70px;
    position:relative;
    overflow:hidden;
    display:flex;
    align-items:center;
}


/* 粒子背景 */
#particles-js{
    position:absolute;
    width:100%;
    height:100%;
    top:0;
    left:0;
    z-index:0;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            rgba(0, 0, 0, 0.2),
            rgba(0, 0, 0, 0.3)
    );
    z-index: 1;
    pointer-events: none;
}


/* Hero 標題 */
.hero-content{
    position:relative;
    z-index:2;

    max-width:900px;
    margin:auto;
}

.hero-main-title {
    font-size: 4rem;
    font-weight: 700;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;

    max-width:900px;
    margin:auto;
}

/* Hero 副標 */
.hero-subtitle {
    padding-top: 15px;
    font-size: 1.3rem;

    max-width:700px;
    margin:auto;
}


/* ========================================= */
/* Video Section */
/* ========================================= */

.video-section {
    padding: 80px 0;
}

.video-desc{
    padding-top: 30px;
    font-size: 1.2rem;
    max-width:1200px;
    margin:auto;
}


/* ========================================= */
/* 手機 RWD */
/* ========================================= */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .video-section {
        padding: 60px 0;
    }

    .theme-icon {
        font-size: 1.3rem;
    }

    .navbar-brand {
        font-size: 1rem;
    }
}


/* ========================================= */
/* 小裝飾 (optional but nice) */
/* ========================================= */

.btn-outline-secondary {
    border-radius: 20px;
    padding: 4px 12px;
}



/* ========================================= */
/* --- NVIDIA 風格影像卡片 --- */
/* ========================================= */

.card-img {
    width: 100%;
    aspect-ratio: 16 / 9;   /* 設定固定比例 */
    object-fit: cover;
    border-radius: 4px 4px 0 0; /* 如果卡片有圓角，記得設定上方圓角 */
}

.nvidia-card {
    /* 確保圖片放大時不會超出卡片圓角 */
    overflow: hidden;
    border-radius: 8px; /* 可依你的設計微調 */
    background-color: #000; /* 底色設為黑，以防圖片載入前閃白 */
}

/* 設定底圖行為 */
.nvidia-card .card-img {
    height: 100%;
    min-height: 350px; /* 給定一個最低高度，確保內容有足夠空間 */
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* 平滑的放大動效 */
}

/* 漸層遮罩：讓底部變暗，頂部透明，確保文字清晰 */
.gradient-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,   /* 底部最暗 */
        rgba(0, 0, 0, 0.6) 40%,   /* 中間過渡 */
        rgba(0, 0, 0, 0) 100%     /* 頂部透明 */
    );
    transition: background 0.4s ease;
}

/* 文字區域微動效 */
.nvidia-card .content-wrapper {
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

/* --- 滑鼠懸停 (Hover) 效果 --- */

.nvidia-card:hover .card-img {
    transform: scale(1.05); /* 圖片微微放大 */
}

/* 懸停時，讓文字稍微往上浮動，增加互動感 */
.nvidia-card:hover .content-wrapper {
    transform: translateY(0);
}


/* ========================================= */
/* --- 成員區塊 --- */
/* ========================================= */
/* --- 教師卡片 (Teacher Profile) --- */

.nvidia-profile-card {
    background-color: #333 !important; /* 深邃黑 */
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    /* 限制卡片大小 */
    max-width: 350px; /* 限制卡片的最大寬度。*/
    margin: 0 auto;
}

.nvidia-profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5) !important;
}

/* 統一瘦長照片的比例 */
.img-wrapper {
    width: 100%;
    aspect-ratio: 3 / 4; /* 強制設定為 3:4 的瘦長比例 */
    overflow: hidden;
}

.teacher-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 確保照片填滿且不變形 */
    object-position: top center; /* 焦點對準人物頭部 */
    filter: grayscale(10%); /* 加上10%灰階*/
    transition: filter 0.3s ease;
}

.nvidia-profile-card:hover .teacher-img {
    filter: grayscale(0%); /* 滑鼠移入時恢復全彩 */
}

/* --- 聯絡人特別標記 (Highlight) --- */

/* 給聯絡人卡片加上 NVIDIA 綠的頂部邊框 */
.highlight-card {
    border-top: 4px solid #76b900 !important;
}

/* 浮動的聯絡人徽章 */
.contact-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(118, 185, 0, 0.9); /* 半透明綠 */
    color: #000;
    font-weight: bold;
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: 20px;
    z-index: 10;
    box-shadow: 0 0 10px rgba(118, 185, 0, 0.5); /* 發光效果 */
}

/* --- 研究室成員標籤 (Member Tag) --- */

.member-tag {
    background-color: #333;
    border-left: 3px solid #333;
    border-radius: 6px; /* 圓滑方塊 */
    transition: all 0.3s ease;
    cursor: default;
}

.member-tag:hover {
    background-color: #222;
    border-left-color: #76b900;
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); /* 浮起時加上淡淡的陰影 */
}

/* --- 成員正方形小頭像 --- */
.member-img-wrapper {
    width: 100px;          /* 設定固定的小尺寸*/
    height: 180px;
    flex-shrink: 0;       /* 防止在手機版螢幕變窄時，圖片被擠壓變形 */
    border-radius: 4px;   /* 微圓角，保留科技方塊感，不要變成正圓形 */
    overflow: hidden;
    border: 1px solid #444; /* 添加暗色邊框 */
}

.member-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;    /* 確保照片填滿且不變形 */
    filter: grayscale(20%); /* 微灰階 */
    transition: filter 0.3s ease;
}

/* 滑鼠移入標籤時，照片也跟著恢復全彩 */
.member-tag:hover .member-img-wrapper img {
    filter: grayscale(0%);
}