/* 基礎重設 - 元素選擇器 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #1a1b26;
    color: #a9b1d6;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><circle cx="30" cy="30" r="2" fill="%233b4261" opacity="0.5"/></svg>');
    background-repeat: repeat;
    background-size: 60px 60px;
    background-attachment: fixed;
}

/* 四個角落花邊裝飾 - 使用 corner-decoration class */
body::before,
body::after {
    content: '';
    position: fixed;
    width: 100px;
    height: 100px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M0 0 Q50 0 50 50 Q50 0 100 0 Q100 50 50 50 Q100 50 100 100 Q50 100 50 50 Q50 100 0 100 Q0 50 50 50 Q0 50 0 0Z" fill="%237aa2f7" opacity="0.3"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    z-index: 1000;
}

body::before {
    top: 0;
    left: 0;
}

body::after {
    bottom: 0;
    right: 0;
    transform: rotate(180deg);
}

/* 四角花邊額外兩個 */
.corner-top-right::before,
.corner-bottom-left::before {
    content: '';
    position: fixed;
    width: 100px;
    height: 100px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M0 0 Q50 0 50 50 Q50 0 100 0 Q100 50 50 50 Q100 50 100 100 Q50 100 50 50 Q50 100 0 100 Q0 50 50 50 Q0 50 0 0Z" fill="%23bb9af7" opacity="0.3"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    z-index: 1000;
}

.corner-top-right::before {
    top: 0;
    right: 0;
    transform: rotate(90deg);
}

.corner-bottom-left::before {
    bottom: 0;
    left: 0;
    transform: rotate(270deg);
}

/* 容器限制 - class選擇器 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* 導覽列 - class選擇器 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 10%;
    background: linear-gradient(135deg, #16161e 0%, #1f2335 100%);
    border-bottom: 2px solid #3b4261;
}

/* LOGO美化 - 使用border-radius, box-shadow, text-shadow, linear-gradient */
.logo {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(45deg, #7aa2f7, #bb9af7, #73daca);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    border-radius: 10px;
    padding: 10px 20px;
    box-shadow: 0 4px 15px rgba(122, 162, 247, 0.3);
    position: relative;
}

/* 虛擬元素用於LOGO裝飾 */
.logo::before {
    content: '◆';
    -webkit-text-fill-color: #7aa2f7;
    margin-right: 10px;
    font-size: 1.5rem;
}

.logo::after {
    content: '◆';
    -webkit-text-fill-color: #73daca;
    margin-left: 10px;
    font-size: 1.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 20px;
}

/* 虛擬類別 - :hover */
.nav-links a {
    text-decoration: none;
    color: #c0caf5;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #bb9af7;
}

/* 虛擬類別 - :first-child */
.nav-links li:first-child {
    margin-left: 0;
}

/* 區塊樣式 */
.content-section {
    padding: 40px 0;
}

/* ID選擇器 */
#about,
#skills,
#contact {
    background-color: rgba(36, 40, 59, 0.8);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
}

/* 標題美化 - text-shadow, border-radius */
.section-title {
    border-left: 4px solid #7aa2f7;
    padding-left: 15px;
    margin-bottom: 20px;
    color: #7aa2f7;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    padding: 10px 15px;
    background: linear-gradient(90deg, rgba(122, 162, 247, 0.2) 0%, transparent 100%);
}

/* 虛擬類別 - :nth-child */
.content-section:nth-child(odd) .section-title {
    background: linear-gradient(90deg, rgba(187, 154, 247, 0.2) 0%, transparent 100%);
    border-left-color: #bb9af7;
    color: #bb9af7;
}

/* 卡片設計 */
.card {
    background: linear-gradient(145deg, #24283b 0%, #1f2335 100%);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(122, 162, 247, 0.2);
}

/* 卡片懸停效果 */
.card:hover {
    box-shadow: 0 12px 30px rgba(122, 162, 247, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* 標籤與按鈕 */
.badge {
    background: linear-gradient(135deg, #3b4261 0%, #414868 100%);
    color: #73daca;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-right: 10px;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(59, 66, 97, 0.5);
}

/* 虛擬類別 - :last-child */
.skill-list li:last-child {
    margin-bottom: 0;
}

/* 虛擬類別 - :nth-child */
.skill-list li:nth-child(1) {
    border-left: 3px solid #7aa2f7;
}

.skill-list li:nth-child(2) {
    border-left: 3px solid #bb9af7;
}

.skill-list li:nth-child(3) {
    border-left: 3px solid #73daca;
}

.btn-github {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #7aa2f7 0%, #89ddff 100%);
    color: #1a1b26;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(122, 162, 247, 0.4);
}

.btn-github:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(122, 162, 247, 0.6);
}

/* 虛擬類別 - :active */
.btn-github:active {
    transform: translateY(0) scale(0.98);
}

/* 虛擬元素 - ::first-letter */
.card p::first-letter {
    font-size: 1.5em;
    color: #7aa2f7;
    font-weight: bold;
}

/* 頁腳 */
.footer {
    text-align: center;
    padding: 40px 0;
    font-size: 0.8rem;
    color: #565f89;
    border-top: 1px solid #3b4261;
    background: linear-gradient(180deg, transparent 0%, rgba(22, 22, 30, 0.8) 100%);
}

/* 虛擬元素用於頁腳裝飾 */
.footer p::before {
    content: '━━ ';
    color: #7aa2f7;
}

.footer p::after {
    content: ' ━━';
    color: #7aa2f7;
}

/* 響應式微調 */
@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
}
