/* 1. 統一變數定義 */
:root {
    --primary-color: #190fdd;
    --secondary-color: #7c3aed;
    --hero-bg-image: url('../images/bg.jpg'); 
    --text-main: #1f2937;
    --text-light: #6b7280;
    --bg-light: #a8afebe3;
    /* 修正：內容卡片建議使用純白或高不透明度白色，以確保可讀性 */
    --white: #ffffff; 
    --primary-gradient: linear-gradient(to right, #fde047, #facc15);
    --profile-size: 200px;
}

/* 2. 基礎重設與響應式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans TC', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.7;
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .nav-container { width: 95%; }
    nav ul li a { margin-left: 1rem; font-size: 0.9rem; }
}

/* 3. 導覽列 */
nav {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    height: 70px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul { display: flex; list-style: none; }

nav ul li a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    margin-left: 2rem;
    transition: color 0.3s;
}

nav ul li a:hover { color: var(--primary-color); }

/* 4. 英雄區塊 */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), var(--hero-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    width: 100%;
    min-height: 100vh; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff; /* 強制英雄區文字為純白 */
    text-align: center;
    padding: 0 20px;
}

.profile-img {
    width: var(--profile-size);
    height: var(--profile-size);
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1.5rem;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); 
}

.highlight {
    background: var(--primary-gradient);
    -webkit-background-clip: text; 
    background-clip: text; 
    -webkit-text-fill-color: transparent; 
    font-weight: 800;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: opacity 0.3s;
}

.social-links a:hover { opacity: 0.7; }

/* 5. 內容佈局與標題 */
.container {
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 20px;
}

.section { margin-bottom: 5rem; }

/* 修正：正規的章節標題樣式 */
.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 10px;
    color: var(--text-main);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 4px;
    background-color: var(--primary-color);
}

/* 新增：關於我專用的金句樣式 (請在 HTML 中手動套用 class="about-quote") */
.about-quote {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
    margin: 2rem 0;
    font-style: italic;
    background: rgba(25, 15, 221, 0.05); /* 使用您的 primary-color 低透明度 */
    padding: 1rem 1.5rem;
}

/* 6. 組件樣式 */
.skills-grid { display: flex; flex-wrap: wrap; gap: 12px; }

.skill-item {
    background: var(--white);
    padding: 8px 20px;
    border-radius: 50px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-weight: 500;
    border: 1px solid rgba(0,0,0,0.05);
    display: inline-block; 
    transition: all 0.3s ease;
    cursor: default;
}

.skill-item:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.project-card:hover { transform: translateY(-10px); }

.project-info { padding: 1.5rem; }

.btn-sm {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

footer {
    text-align: center;
    padding: 3rem 0;
    background-color: #111827;
    color: #9ca3af;
}