:root {
    --primary-color: #4a6cf7;
    --primary-dark: #3a56d4;
    --secondary-color: #6c757d;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --body-bg: #ffffff;
    --text-color: #333333;
    --border-color: #e9ecef;
    --code-bg: #f5f7ff;
    --code-color: #5e6687;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 5px;
    --section-padding: 80px 0;
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #5d7bf9;
        --primary-dark: #4a6cf7;
        --body-bg: #121212;
        --text-color: #e0e0e0;
        --border-color: #2d2d2d;
        --code-bg: #1e1e3f;
        --code-color: #9efeff;
        --shadow-color: rgba(0, 0, 0, 0.3);
    }
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--body-bg);
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    color: white;
}

/* 头部样式 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--body-bg);
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: var(--transition);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 主要内容样式 */
main {
    margin-top: 80px;
    min-height: calc(100vh - 80px - 200px); /* 减去头部和底部的高度 */
}

/* 页面头部 */
.page-header {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* 部分通用样式 */
section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.underline {
    height: 4px;
    width: 70px;
    background-color: var(--primary-color);
    margin: 0 auto;
}

/* 英雄区域样式 */
.hero {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--body-bg) 0%, var(--light-color) 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    padding-right: 30px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-content h2 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.hero-content .lead {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.highlight {
    color: var(--primary-color);
}

/* 代码容器样式 */
.code-container {
    background-color: var(--code-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 5px 15px var(--shadow-color);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
}

.code-container pre {
    margin: 0;
    overflow-x: auto;
}

.code-container code {
    color: var(--code-color);
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 关于部分样式 */
.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text p {
    margin-bottom: 15px;
}

.about-stats {
    flex: 1;
    min-width: 300px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-title {
    font-size: 1rem;
    color: var(--secondary-color);
}

/* 专业领域样式 */
.expertise {
    background-color: var(--light-color);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.expertise-card {
    background-color: var(--body-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px var(--shadow-color);
    text-align: center;
    transition: var(--transition);
}

.expertise-card:hover {
    transform: translateY(-10px);
}

.expertise-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.expertise-card h3 {
    margin-bottom: 15px;
}

/* CTA部分样式 */
.cta {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
}

.cta h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.cta p {
    margin-bottom: 30px;
    font-size: 1.2rem;
}

.cta .btn-primary {
    background-color: white;
    color: var(--primary-color);
}

.cta .btn-primary:hover {
    background-color: var(--light-color);
}

/* 技能页面样式 */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.skill-category {
    flex: 1;
    min-width: 300px;
}

.skill-category h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.skill-item {
    margin-bottom: 20px;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.skill-name {
    font-weight: 500;
}

.skill-percentage {
    color: var(--primary-color);
}

.tech-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.tech-category {
    background-color: var(--light-color);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.tech-category h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.tech-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.tech-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.cert-item {
    display: flex;
    align-items: center;
    background-color: var(--light-color);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.cert-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-right: 20px;
}

.cert-info h3 {
    margin-bottom: 5px;
}

.cert-info p {
    color: var(--secondary-color);
}

/* 项目页面样式 */
.projects-filter {
    margin-bottom: 40px;
    text-align: center;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-btn {
    padding: 8px 20px;
    background-color: var(--light-color);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-image {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--code-bg);
}

.project-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.project-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    margin-bottom: 10px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.tag {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.project-content p {
    margin-bottom: 20px;
    flex: 1;
}

.project-links {
    margin-top: auto;
}

.case-study {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
    background-color: var(--light-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.case-study-content {
    flex: 2;
    min-width: 300px;
}

.case-study-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-study-meta {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.case-study h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.case-study h4 {
    margin: 20px 0 10px;
}

.case-study ul {
    padding-left: 20px;
}

.case-study ul li {
    margin-bottom: 5px;
    list-style-type: disc;
}

/* 联系页面样式 */
.contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-details,
.contact-form-container {
    flex: 1;
    min-width: 300px;
}

.contact-methods {
    margin-bottom: 40px;
}

.contact-method {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 20px;
}

.contact-text h3 {
    margin-bottom: 5px;
}

.social-links-large h3 {
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: var(--light-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: white;
}

.contact-form {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--body-bg);
    color: var(--text-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 表单状态消息样式 */
.status-message {
    margin-top: 20px;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.status-message.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
    opacity: 1;
}

.status-message.error {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
    opacity: 1;
}

/* 加载动画 */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.faq-item {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    position: relative;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

.faq-item.active .faq-question::after {
    content: '-';
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 500px;
}

.availability {
    background-color: var(--light-color);
}

.availability-content {
    text-align: center;
}

.availability-status {
    display: inline-flex;
    align-items: center;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: var(--body-bg);
    border-radius: 30px;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.status-indicator {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin-right: 10px;
}

.status-indicator.available {
    background-color: var(--success-color);
}

.status-indicator.busy {
    background-color: var(--warning-color);
}

.status-indicator.unavailable {
    background-color: var(--danger-color);
}

/* 底部样式 */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h3 {
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.social-links li {
    margin-bottom: 10px;
}

.social-links li a {
    color: #adb5bd;
    transition: var(--transition);
}

.social-links li a:hover {
    color: white;
}

.social-links li a i {
    margin-right: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #495057;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 40px;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-content,
    .contact-grid {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    header .container {
        padding: 15px;
    }
    
    nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--body-bg);
        transition: var(--transition);
        z-index: 999;
    }
    
    nav.active {
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
    }
    
    nav ul li {
        margin: 15px 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .expertise-grid,
    .projects,
    .tech-categories,
    .cert-grid,
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .case-study {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content h2 {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        flex-direction: column;
    }
}