/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 进度条样式 */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    z-index: 9999;
    transition: width 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* Hero Section */
.hero {
    padding: 60px 0 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.profile-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5rem;
    height: 80px;
}

.username {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.hero-content h2 {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.social-links {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.twitter-link,
.telegram-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.twitter-link:hover,
.telegram-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.twitter-link svg,
.telegram-link svg {
    width: 16px;
    height: 16px;
}

/* Sections */
section {
    padding: 20px 0;
}

section h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

/* About Section */
.about {
    background-color: #f8fafc;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #475569;
}

.tech-stack {
    margin-top: 2rem;
}

.tech-stack h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.tech-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.tech-category h4 {
    font-size: 1.1rem;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.tech-category p {
    color: #64748b;
    font-size: 0.95rem;
}

.contact-info {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
}

.contact-item i {
    color: #2563eb;
    width: 20px;
}

.contact-item a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #2563eb;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.3rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #1d4ed8;
}

.project-description {
    color: #64748b;
    margin-bottom: 1.25rem;
    line-height: 1.7;
    font-size: 0.95rem;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.5rem;
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.features-grid li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0;
    line-height: 1.5;
    color: #64748b;
}

.features-grid li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: bold;
}

.project-features h4 {
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.project-features ul {
    color: #64748b;
    padding-left: 1.5rem;
}

.project-date {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Projects Section */
.projects {
    background-color: #f8fafc;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding-left: 80px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 21px;
    top: 0;
    width: 18px;
    height: 18px;
    background: #2563eb;
    border-radius: 50%;
    border: 4px solid #ffffff;
    box-shadow: 0 0 0 4px #e2e8f0;
}

.timeline-item::after {
    content: attr(data-date);
    position: absolute;
    left: -5px;
    top: 30px;
    width: 48px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    white-space: nowrap;
}

.timeline-content {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.1);
}

.timeline-content h3 {
    color: #1e293b;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.timeline-content h4 {
    color: #2563eb;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}


.timeline-content ul {
    color: #64748b;
    padding-left: 1.5rem;
    margin-top: 1rem;
}

.timeline-content li {
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
    color: #1e293b;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-align: center;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.skill-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.skill-tag:hover {
    transform: translateY(-2px);
}

.open-source {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.open-source h3 {
    color: #1e293b;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.open-source-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.open-source-item {
    padding: 1rem;
    border-left: 4px solid #2563eb;
    background: #f8fafc;
}

.open-source-item h4 a {
    color: #2563eb;
    text-decoration: none;
    font-size: 1.1rem;
}

.open-source-item h4 a:hover {
    text-decoration: underline;
}

.open-source-item p {
    color: #64748b;
    margin-top: 0.5rem;
}


/* Footer */
.footer {
    background-color: #1e293b;
    color: #94a3b8;
    text-align: center;
    padding: 2rem 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 40px 0 30px;
    }

    .profile-row {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .profile-info {
        height: auto;
        align-items: center;
        text-align: center;
    }

    .avatar {
        width: 70px;
        height: 70px;
    }

    .hero-content h2 {
        font-size: 1.3rem;
    }

    .social-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .twitter-link,
    .telegram-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }


    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-header {
        flex-direction: column;
        gap: 1rem;
    }

    .timeline {
        padding-left: 0;
    }

    .timeline::before {
        left: 15px;
    }

    .timeline-item {
        padding-left: 50px;
        margin-bottom: 2rem;
    }

    .timeline-item::before {
        left: 6px;
    }

    .timeline-item::after {
        left: -15px;
        top: 25px;
        width: 45px;
        text-align: center;
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        border-radius: 12px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }


    section {
        padding: 40px 0;
    }

    section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

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

    .hero-content h2 {
        font-size: 1.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }


    .project-card {
        padding: 1.5rem;
    }

    .timeline-content {
        padding: 1.25rem;
    }

    .project-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}