* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00d4ff;
    --secondary-color: #0099cc;
    --bg-color: #0a0e27;
    --bg-card: #1a1f3a;
    --text-primary: #ffffff;
    --text-secondary: #b4b9d1;
    --accent-color: #00ff88;
    --border-color: #2a2f4a;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* 主容器 */
.container {
    margin-top: 70px;
}

/* 主页区域 */
.hero {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--bg-color) 0%, #151932 100%);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    color: var(--primary-color);
    position: relative;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-color);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    transform: translateY(-2px);
}

/* 代码块 */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-block {
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
}

.code-header {
    background: #252a3f;
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-block pre {
    padding: 1.5rem;
    margin: 0;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-block code {
    color: var(--text-primary);
}

.keyword { color: #ff79c6; }
.variable { color: #8be9fd; }
.property { color: #50fa7b; }
.string { color: #f1fa8c; }

/* 通用区域样式 */
.section {
    padding: 5rem 2rem;
}

.section-alt {
    background: rgba(26, 31, 58, 0.5);
}

.section-content {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

/* 关于区域 */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.about-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    border-color: var(--primary-color);
}

.about-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.about-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 技能区域 */
.skills-container {
    max-width: 800px;
    margin: 0 auto;
}

.skill-item {
    margin-bottom: 2rem;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.skill-percent {
    color: var(--primary-color);
}

.skill-bar {
    background: var(--bg-card);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.skill-progress {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    height: 100%;
    border-radius: 5px;
    transition: width 1s ease;
    animation: progress-animation 2s ease;
}

@keyframes progress-animation {
    from { width: 0; }
}

/* 项目区域 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    border-color: var(--primary-color);
}

.project-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

/* 联系区域 */
.contact-content {
    text-align: center;
}

.contact-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--primary-color);
    transition: all 0.3s;
    text-decoration: none;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
}

.contact-icon:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.3);
}

/* 页脚 */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer p {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.footer .icp {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-content {
        padding: 0 1rem;
    }

    .nav-menu {
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .section {
        padding: 3rem 1rem;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
