/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF6B35;
    --secondary-color: #F7931E;
    --accent-color: #2C3E50;
    --dark-color: #1a1a2e;
    --light-color: #f0f3f7;
    --text-color: #333;
    --text-light: #666;
    --white: #ffffff;
    --background: #f8f9fa;
    --gradient-1: linear-gradient(135deg, #FF6B35, #F7931E);
    --gradient-2: linear-gradient(135deg, #2C3E50, #34495e);
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.logo-2 {
    color: var(--primary-color);
    font-weight: 900;
    font-size: 1.8rem;
}

.logo-o {
    color: var(--secondary-color);
    font-weight: 900;
    font-size: 1.8rem;
    margin: 0 2px;
}

.logo-22 {
    color: var(--accent-color);
    font-weight: 900;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* 主页部分 */
.hero {
    min-height: 100vh;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    padding: 80px 0;
    margin-top: -70px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="100" fill="rgba(255,255,255,0.05)">2O22</text></svg>');
    background-size: 100px 100px;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100px, -100px); }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    color: var(--white);
    z-index: 2;
    position: relative;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    color: var(--secondary-color);
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* 统计数据样式 */
.hero-stats {
    display: flex;
    gap: 3rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    position: relative;
}

.digital-animation {
    width: 300px;
    height: 300px;
    position: relative;
}

.digit-animation {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.floating-digit {
    position: absolute;
    font-size: 3rem;
    font-weight: 900;
    color: var(--white);
    animation: floatDigit 6s infinite ease-in-out;
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.floating-digit:nth-child(1) {
    top: 20%;
    left: 25%;
    animation-delay: 0s;
}

.floating-digit:nth-child(2) {
    top: 20%;
    right: 25%;
    animation-delay: 1s;
}

.floating-digit:nth-child(3) {
    bottom: 20%;
    left: 25%;
    animation-delay: 2s;
}

.floating-digit:nth-child(4) {
    bottom: 20%;
    right: 25%;
    animation-delay: 3s;
}

@keyframes floatDigit {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 1; }
    25% { transform: translateY(-20px) rotate(5deg); opacity: 0.8; }
    50% { transform: translateY(0) rotate(-5deg); opacity: 1; }
    75% { transform: translateY(20px) rotate(5deg); opacity: 0.8; }
}

/* 通用部分样式 */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

/* 关于我部分 */
.about {
    background-color: var(--background);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    text-align: center;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.about-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
}

.info-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* 哲理网格样式 */
.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.philosophy-item {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.philosophy-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.philosophy-number {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.philosophy-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.philosophy-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* 服务部分 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-item {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: var(--transition);
}

.service-item:hover::before {
    transform: scaleX(1);
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.8rem;
}

.service-item h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    text-align: center;
}

.service-item p {
    color: var(--text-light);
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.6;
}

.service-item ul {
    list-style: none;
    padding: 0;
}

.service-item li {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.service-item li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* 项目部分 */
.projects {
    background-color: var(--background);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.project-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.project-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tech-tag {
    background-color: var(--light-color);
    color: var(--text-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.project-link:hover {
    color: var(--secondary-color);
}

/* 时间轴样式 */
.timeline {
    background: var(--background);
}

.timeline-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-1);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-year {
    background: var(--gradient-1);
    color: var(--white);
    padding: 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 100px;
    text-align: center;
    box-shadow: var(--shadow);
    z-index: 2;
}

.timeline-content-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 0 2rem;
    flex: 1;
    box-shadow: var(--shadow);
    position: relative;
}

.timeline-content-item::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    transform: translateY(-50%);
}

.timeline-item:nth-child(odd) .timeline-content-item::before {
    right: -20px;
    border-left-color: var(--white);
}

.timeline-item:nth-child(even) .timeline-content-item::before {
    left: -20px;
    border-right-color: var(--white);
}

.timeline-content-item h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.timeline-content-item p {
    color: var(--text-light);
    line-height: 1.6;
}

/* 联系部分 */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.5rem;
    width: 30px;
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}

.contact-item p {
    color: var(--text-light);
    margin: 0;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), #6a5acd);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* 表单样式 */
.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    padding: 10px;
}

/* 页脚 */
.footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 2rem;
}

.footer-brand h3 {
    margin-bottom: 0.5rem;
}

.footer-brand p {
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer-info {
    text-align: right;
}

.footer-info p {
    margin: 0.25rem 0;
}

.footer-content i {
    color: var(--secondary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .profile-img {
        width: 250px;
        height: 250px;
    }

    .about-info {
        flex-direction: column;
        gap: 1rem;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-info {
        text-align: center;
    }

    .timeline-content::before {
        left: 2rem;
    }

    .timeline-item {
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: 4rem;
    }

    .timeline-year {
        margin-bottom: 1rem;
    }

    .timeline-content-item::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .contact-form {
        padding: 1.5rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), #6a5acd);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}