/* 全局样式和变量 */
:root {
    --bg-color: #121212;
    --primary-color: #1e1e1e;
    --secondary-color: #2a2a2a;
    --font-color: #e0e0e0;
    --accent-color: #bb86fc;
    --light-gray: #b0b0b0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--font-color);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3 {
    color: #ffffff;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; text-align: center; margin-bottom: 3rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffffff;
}

section {
    padding: 6rem 2rem;
}

/* 导航栏 */
header {
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--secondary-color);
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

nav .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 2rem;
}

/* 英雄区 */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 2rem;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--light-gray);
    margin-bottom: 2rem;
}

.social-links {
    margin-top: 1.5rem;
}

.social-links a {
    font-size: 1.8rem;
    margin: 0 1rem;
    color: var(--light-gray);
}

/* 项目区 */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--primary-color);
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card h3, .project-card p, .project-card .tags, .project-card .btn {
    padding: 0 1.5rem;
}
.project-card h3 {
    margin-top: 1.5rem;
}
.project-card .btn {
    display: inline-block;
    margin-bottom: 1.5rem;
    padding: 0;
}

.tags {
    margin-bottom: 1rem;
}

.tags span {
    background-color: var(--secondary-color);
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    display: inline-block;
    margin-top: 0.5rem;
}

.btn {
    display: inline-block;
    background-color: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 0.7rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
}

.btn:hover {
    background-color: var(--accent-color);
    color: #121212;
}


/* 关于我 */
#about {
    background-color: var(--primary-color);
}
.about-content {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--secondary-color);
}

.about-text {
    flex: 1;
}

.about-text ul {
    list-style: none;
    padding-left: 0;
}
.about-text li {
    margin-bottom: 0.5rem;
}

/* 联系方式 */
.contact {
    text-align: center;
}

.contact p {
    max-width: 500px;
    margin: 0 auto 2rem;
    color: var(--light-gray);
}

/* 页脚 */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--primary-color);
    border-top: 1px solid var(--secondary-color);
    color: var(--light-gray);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }

    nav ul {
        display: none; /* 在移动端隐藏导航 */
    }

    .about-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-pic {
        margin-bottom: 2rem;
    }
}