/* 基礎設定與字體 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft JhengHei', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: #fafafa;
    color: #333;
    line-height: 1.6;
}

/* 導航列與按鈕設計 */
.navbar {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
    z-index: 1000;
}

/* .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    letter-spacing: 2px;
} */

.logo {
    display: flex;
    /* 開啟彈性佈局 */
    align-items: center;
    /* 垂直居中所有子元素 */
    gap: 0px;
    /* 直接設定間距，取代 margin-right */
    font-size: 24px;
    /* 根據您的設計調整字體大小 */
    font-weight: bold;
}

.logo img {
    width: 24px;
    /* 保持圖片寬度 */
    height: auto;
    /* 保持比例 */
    display: block;
    /* 消除圖片下方的微小空隙 */
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 10px 22px;
    border-radius: 30px;
    transition: all 0.3s ease;
    background-color: transparent;
    border: 1px solid transparent;
}

/* 按鈕懸停效果 */
.btn:hover {
    color: #ffffff;
    background-color: #3498db;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    transform: translateY(-2px);
}

/* 內容區塊共用設定 */
section {
    padding: 100px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

h1 {
    font-size: 3rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 30px;
    position: relative;
}

h2::after {
    content: '';
    width: 50px;
    height: 3px;
    background-color: #3498db;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

p {
    font-size: 1.1rem;
    max-width: 600px;
    color: #666;
    margin-bottom: 20px;
}

/* 首頁獨立設定 */
#home {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.main-btn {
    background-color: #2c3e50;
    color: white;
    margin-top: 20px;
}

/* 其他區塊獨立設定 */
#about {
    background-color: #ffffff;
}

#portfolio {
    background-color: #f9f9f9;
}

.contact-section {
    min-height: 50vh;
}

/* 底部版權宣告 */
footer {
    text-align: center;
    padding: 20px;
    background-color: #2c3e50;
    color: #ffffff;
}

/* 手機版響應式設定 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 15px;
    }

    .nav-buttons {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    h1 {
        font-size: 2.2rem;
    }
}