/* 基本 */
body {
    font-family: 'Roboto', 'Noto Sans JP', 'Noto Sans TC', 'Yu Gothic', 'Meiryo', sans-serif;
    line-height: 1.6; /* 文字行間距 */
    background-color: #1e1e1e; /* 背景色 */
    color: #FFFFFF;
    margin: 0;
    padding: 0;
    font-size: 18px;
    transition: background-color 0.3s, color 0.3s;
}

body.light-mode {
    background-color: #f7f7f7; /* 背景色 */
    color: #1E1E1E;
}

/* Navbar */
.navbar {
    padding: 20px; /* 內邊距*/
    position: fixed; /* 設定為固定定位 */
    top: 30px;  /* 離視窗頂部 */
    left: 0; /* 離視窗左邊緣 */
    right: 0; /* 離視窗右邊緣 */
    z-index: 1000;  /* 設定堆疊順序，確保其他元素之上 */
    background-color: rgba(30, 30, 30, 0.8); /* 背景顏色半透明深灰色 */
    backdrop-filter: blur(10px); /* 背景上模糊效果 */
    transition: background-color 0.3s, color 0.3s;
    border-radius: 40px; /* 圓角半徑 */
    max-width: 800px; /* 最大寬度 */
    width: 90%; /* 設定寬度 */
    margin: 0 auto;
}

body.light-mode .navbar {
    background-color: rgba(255, 255, 255, 0.8);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.left-container, .center-container {
    flex: 1;
}

.center-container {
    text-align: center;
}

.navbar ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.navbar li {
    margin: 0 20px;
}

.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 20px;
    transition: color 0.3s;
    font-weight: 600;
}

body.light-mode .navbar a {
    color: #1E1E1E;
}

/* Mouse hover color*/
.navbar a:hover {
    color: #4CAF50; /*Green*/
}

/* 日夜切換開關 */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, #19072b 20%, #343066 100%); /* 星空顏色 */
    transition: 0.3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background: radial-gradient(circle at 60% 40%, #adadad 30%, #f4f4f4 100%); /* 月亮滑塊顏色 */
    transition: 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background: linear-gradient(to bottom, #87ceeb 0%, #e0f6ff 100%); /* 天空顏色 */
}

input:checked + .slider:before {
    transform: translateX(26px);
    background: radial-gradient(circle, #ffcc00 30%, #f4f4f4 100%); /* 太陽滑塊顏色 */
    box-shadow: 0 10px 10px rgba(241, 196, 15, 0.2);
}

.slider.round {
    border-radius: 34px;
}

/* 滑塊樣式 */
.slider.round:before {
    background-color: #f4f4f4; /* 白色 */
    box-shadow: 0 10px 30px rgba(0, 0, 15, 0.8);  /* 帶些光暈 */
    border-radius: 50%;  /* 圓形 */
}

/* Available Badge */
.available-badge {
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 20px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: breathe 2s ease-in-out infinite;
    margin-top: 20px;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: #ffffff;
    border-radius: 50%;
    margin-right: 12px;
    animation: blink 2s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    box-sizing: border-box;
/* 背景圖設定 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;    
}

/* 背景圖根據模式切換 */
body.dark-mode .hero-section {
    background-image: linear-gradient(to bottom,
                          rgba(0, 0, 0, 0.3) 0%,
                          rgba(0, 0, 0, 0.6) 60%,
                          #1e1e1e 100%
                      ),
                      url('https://mir-s3-cdn-cf.behance.net/project_modules/fs/f3fbbd220712515.684ac5d08670c.jpg');
}


.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.hero-text {
    font-family: 'Poppins', sans-serif;
    font-size: 5.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

/* 打字機效果 */
.cursor {
    display: inline-block; /* 設定inline區塊 */
    width: 15px; /* 寬度 */
    height: 1.2em; /* 與文字高度一致 */
    vertical-align: middle; /* 與文字對齊 */
    background-color: #4CAF50; /*Green*/
    margin-left: 5px;
    animation: blink 0.7s infinite;
}

/* Projects */
.projects-section {
    min-height: 100vh;
    padding: 80px 2rem;
}

#card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: #2a2a2a;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

body.light-mode .card {
    background: #FFFFFF;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    margin: 0 0 1rem;
    color: #FFFFFF;
}

body.light-mode .card-title {
    color: #1E1E1E;
}

.card-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin: 0.25rem;
    font-size: 0.875rem;
    background-color: #F0F0F0;
    border-radius: 999px;
}

body.dark-mode .card-tag {
    background-color: #444;
    color: #FFFFFF;
}

/* Dashed Card */
.dashed-card {
    border: 2px dashed #C9C9C9;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    font-size: 1.5rem;
    color: #C9C9C9;
    min-height: 200px;
}

/* Info */
.info {
    min-height: 100vh;
    padding: 80px 2rem;
    background-color: #2A2A2A;
    transition: background-color 0.3s;
}

body.light-mode .info {
    background-color: #F5F5F5;
}

.info-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 4rem;
}

.info-left {
    flex: 1;
    text-align: center;
}

.info-image img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    margin: 2rem 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.social-link {
    font-size: 1.8rem;
    color: #666;
    transition: color 0.3s, transform 0.3s;
}

.social-link:hover {
    transform: scale(1.2);
}

.info-right {
    flex: 2;
}

.info-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Wave Animation */
@keyframes wave {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-15deg); }
    100% { transform: rotate(0deg); }
}

/* Emoji Icon */
.wave-emoji {
    display: inline-block;
    font-size: 1.5em;
    animation: wave 1.5s infinite;
}

/* Emoji Hover */
.wave-emoji:hover {
    animation: none;
}

/* Emoji 平滑過渡效果 */
.hover-effect {
    transition: transform 0.2s ease-in-out; 
}

/* Emoji Hover Zoom */
.hover-effect:hover {
    transform: scale(4.5);
    transition: color 0.3s, transform 0.3s;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .info-container {
        flex-direction: column;
    }

    .hero-text {
        font-size: 2.5rem;
    }

    .navbar {
        padding: 1rem;
    }

    .available-badge {
        font-size: 16px;
        padding: 10px 20px;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        align-items: center;
    }

    .left-container, .center-container {
        margin-bottom: 10px;
    }

    .hero-text {
        font-size: 2rem;
    }

    #card-container {
        grid-template-columns: 1fr;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}
