/* 全局样式 */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --dark-color: #212529;
    --light-bg: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    scroll-behavior: smooth;
}

/* 导航栏样式 */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: #fff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero 区域 */
.hero-section {
    min-height: 100vh;
    padding-top: 100px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero-section h1 {
    animation: fadeInUp 1s ease;
}

.hero-section .lead {
    animation: fadeInUp 1.2s ease;
}

.hero-section p {
    animation: fadeInUp 1.4s ease;
}

.hero-section .btn {
    animation: fadeInUp 1.6s ease;
}

.avatar-wrapper img {
    animation: fadeIn 1.5s ease;
    border: 5px solid #fff;
}

/* 章节标题 */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* 特性盒子 */
.feature-box {
    padding: 2rem;
    transition: transform 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-10px);
}

/* 技能进度条 */
.progress {
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #0a58ca 100%);
    transition: width 1s ease;
}

/* 时间线样式 */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-marker {
    position: absolute;
    left: -35px;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-content {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* 项目卡片 */
.project-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
}

.project-card img {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-card .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
}

/* 联系表单 */
#contactForm .form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contactForm .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

#contactForm .btn {
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#contactForm .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

/* 页脚 */
footer {
    background: #212529 !important;
}

.social-links a {
    display: inline-block;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: var(--primary-color) !important;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .hero-section {
        padding-top: 80px;
        text-align: center;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline-marker {
        left: -25px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0a58ca;
}
