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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background: #0f172a;
    overflow-x: hidden;
}

.container {
    max-width: 85%;
    width: 85%;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 背景动画 */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #6366f1;
    border-radius: 50%;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.particle:nth-child(2) {
    top: 60%;
    left: 80%;
    animation-delay: 2s;
    animation-duration: 6s;
}

.particle:nth-child(3) {
    top: 80%;
    left: 40%;
    animation-delay: 4s;
    animation-duration: 10s;
}

.particle:nth-child(4) {
    top: 40%;
    left: 60%;
    animation-delay: 1s;
    animation-duration: 7s;
}

.particle:nth-child(5) {
    top: 10%;
    left: 90%;
    animation-delay: 3s;
    animation-duration: 9s;
}

.particle:nth-child(6) {
    top: 70%;
    left: 10%;
    animation-delay: 5s;
    animation-duration: 8s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 85%;
    width: 85%;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #6366f1;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #e2e8f0;
    margin: 3px 0;
    transition: 0.3s;
}

/* 主页区域 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-container {
    width: 85%;
    max-width: 85%;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.typing-text {
    display: block;
    color: #94a3b8;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.name-highlight {
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient 3s ease-in-out infinite;
}

@keyframes gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #6366f1;
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #e2e8f0;
    border: 2px solid #6366f1;
}

.btn-secondary:hover {
    background: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.2);
}

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

.avatar-container {
    position: relative;
    width: 300px;
    height: 300px;
}

.avatar-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    border-radius: 50%;
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.5;
    }
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    border: 4px solid rgba(99, 102, 241, 0.3);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border-right: 2px solid #6366f1;
    border-bottom: 2px solid #6366f1;
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) rotate(45deg);
    }
    40% {
        transform: translateY(-10px) rotate(45deg);
    }
    60% {
        transform: translateY(-5px) rotate(45deg);
    }
}

/* 区域标题 */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 2px;
}

/* 关于区域 */
.about {
    padding: 5rem 0;
    background: rgba(30, 41, 59, 0.3);
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.about-text-tech {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-intro {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(51, 65, 85, 0.3);
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: #6366f1;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #94a3b8;
    font-size: 0.9rem;
}

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

.tech-item {
    padding: 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    color: #6366f1;
    transition: all 0.3s ease;
}

.tech-item:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-3px);
}

/* 技能区域 */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: rgba(30, 41, 59, 0.5);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: #6366f1;
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.1);
}

.skill-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.skill-icon i {
    font-size: 1.5rem;
    color: white;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #e2e8f0;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-item span {
    display: block;
    margin-bottom: 0.5rem;
    color: #94a3b8;
    font-weight: 500;
}

.skill-bar {
    height: 8px;
    background: rgba(51, 65, 85, 0.5);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 4px;
    width: 0;
    transition: width 1s ease-in-out;
}

/* 项目区域 */
.projects {
    padding: 1rem 0;
    background: rgba(30, 41, 59, 0.3);
}

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

.project-card {
    background: rgba(51, 65, 85, 0.3);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: #6366f1;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.1);
}

.project-image {
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(99, 102, 241, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

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

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

.project-link {
    width: 50px;
    height: 50px;
    background: white;
    color: #6366f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-link:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #e2e8f0;
}

.project-content p {
    color: #94a3b8;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.3rem 0.8rem;
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 工作经历区域 */
.experience {
    background: rgba(30, 41, 59, 0.3);
}

.timeline {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-date {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    z-index: 2;
}

.timeline-content {
    width: 45%;
    background: rgba(51, 65, 85, 0.3);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: #6366f1;
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.1);
}

.experience-header {
    padding: 1.5rem 2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.experience-header:hover {
    background: rgba(99, 102, 241, 0.1);
}

.company-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.company-details h3 {
    margin: 0;
    color: #e2e8f0;
    font-size: 1.3rem;
}

.company-details h4 {
    margin: 0.5rem 0 0 0;
    color: #6366f1;
    font-size: 1rem;
    font-weight: 500;
}

.toggle-icon {
    color: #6366f1;
    font-size: 1.2rem;
}

.toggle-icon i {
    transition: transform 0.3s ease;
}

.toggle-icon.rotated i {
    transform: rotate(180deg);
}

.experience-details {
    padding: 0 2rem 0 2rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}

.experience-details.expanded {
    max-height: 500px;
    padding: 1rem 2rem 2rem 2rem;
    opacity: 1;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: auto;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
}

.company-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-logo i {
    font-size: 1.5rem;
    color: white;
}

.experience-details p {
    color: #94a3b8;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.achievements {
    list-style: none;
    margin-bottom: 1.5rem;
}

.achievements li {
    color: #94a3b8;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.achievements li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: #6366f1;
    font-size: 0.8rem;
}

.tech-used {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    padding: 0.3rem 0.8rem;
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 博客区域 */


.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-10px);
    border-color: #6366f1;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.1);
}

.blog-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.blog-date {
    color: #94a3b8;
    font-size: 0.9rem;
}

.blog-category {
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.blog-content h3 {
    color: #e2e8f0;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.blog-content p {
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-stats {
    display: flex;
    gap: 1rem;
    color: #64748b;
    font-size: 0.9rem;
}

.blog-stats span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.blog-stats-summary {
    display: flex;
    gap: 2rem;
}

.blog-stats-summary .stat-item {
    text-align: center;
}

.blog-stats-summary .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #6366f1;
    display: block;
}

.blog-stats-summary .stat-label {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.95));
    border-top: 1px solid rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #6366f1, transparent);
}

.footer-content {
    padding: 3rem 0 1rem;
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.footer-brand h3 {
    color: #e2e8f0;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: #94a3b8;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.footer-description {
    color: #64748b !important;
    font-size: 0.95rem !important;
    line-height: 1.6;
    margin-top: 1rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-section h4 {
    color: #e2e8f0;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 1px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #6366f1;
}

.footer-section ul li.no-link {
    color: #94a3b8;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: #6366f1;
    color: #6366f1;
    transform: translateY(-2px);
}

.contact-info {
    color: #94a3b8 !important;
    font-size: 0.9rem !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info i {
    color: #6366f1;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright p {
    color: #64748b;
    margin: 0;
    font-size: 0.9rem;
}

.footer-copyright i {
    color: #ec4899;
    margin: 0 0.3rem;
}

.footer-legal p {
    color: #64748b;
    margin: 0;
    font-size: 0.5rem;
}

.footer-legal a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: #6366f1;
}

.footer-legal .separator {
    margin: 0 0.5rem;
    color: #475569;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* 中等屏幕优化 */
@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        width: 95%;
        max-width: 95%;
        padding: 0 1rem;
    }
    
    .nav-container {
        width: 95%;
        max-width: 95%;
        padding: 1rem;
    }
    
    .hero-container {
        width: 95%;
        max-width: 95%;
        padding: 0 1rem;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(15, 23, 42, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .typing-text {
        font-size: 1.5rem;
    }
    
    .about-text-tech {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .tech-stack {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        flex-direction: column !important;
        margin-bottom: 2rem;
    }
    
    .timeline-date {
        position: relative;
        left: auto;
        transform: none;
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
        margin-bottom: 1rem;
        align-self: flex-start;
        margin-left: 40px;
    }
    
    .timeline-content {
        width: calc(100% - 40px);
        margin-left: 40px !important;
        margin-right: 0 !important;
    }
    
    .experience-header {
        padding: 1rem;
    }
    
    .company-info {
        gap: 0.8rem;
        flex: 1;
    }
    
    .company-logo {
        width: 45px;
        height: 45px;
        flex-shrink: 0;
    }
    
    .company-details {
        flex: 1;
        min-width: 0;
    }
    
    .company-details h3 {
        font-size: 1rem;
        line-height: 1.3;
        margin-bottom: 0.3rem;
    }
    
    .company-details h4 {
        font-size: 0.85rem;
        line-height: 1.2;
    }
    
    .toggle-icon {
        font-size: 1rem;
        flex-shrink: 0;
    }
    
    .experience-details {
        padding: 0 1rem 0 1rem;
    }
    
    .experience-details.expanded {
        padding: 1rem 1.5rem 1.5rem 1.5rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-brand {
        display: none;
    }
    
    .footer-links {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .footer-section:last-child {
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-section ul li.no-link {
        color: #94a3b8;
        font-size: 0.9rem;
    }
    
    .social-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        justify-items: center;
        max-width: 120px;
        margin: 0 auto;
    }
    
    .blog-footer {
        flex-direction: column;
        text-align: center;
    }
    
    .blog-stats-summary {
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        width: 98%;
        max-width: 98%;
        padding: 0 1rem;
    }
    
    .nav-container {
        width: 98%;
        max-width: 98%;
        padding: 1rem;
    }
    
    .hero-container {
        width: 98%;
        max-width: 98%;
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .typing-text {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tech-stack {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .avatar-container {
        width: 250px;
        height: 250px;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 0.8rem;
        flex-wrap: wrap;
    }
    
    .btn {
        flex: 1;
        min-width: 120px;
        max-width: 160px;
        font-size: 0.85rem;
        padding: 0.7rem 0.8rem;
        justify-content: center;
        text-align: center;
    }
    
    .footer-brand {
        display: none;
    }
    
    .footer-links {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section h4 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-section ul li {
        margin-bottom: 0.3rem;
    }
    
    .footer-section ul li a {
        font-size: 0.8rem;
    }
    
    .footer-section ul li.no-link {
        color: #94a3b8;
        font-size: 0.8rem;
    }
    
    .social-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
        justify-items: center;
        max-width: 100px;
        margin: 0 auto;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 0.8rem;
        flex-wrap: wrap;
    }
    
    .btn {
        flex: 1;
        min-width: 120px;
        max-width: 160px;
        font-size: 0.85rem;
        padding: 0.7rem 0.8rem;
    }
    
    /* 更小屏幕的额外优化 */
    .timeline-date {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
        margin-left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 30px);
        margin-left: 30px !important;
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .company-details h3 {
        font-size: 0.95rem;
    }
    
    .company-details h4 {
        font-size: 0.8rem;
    }
    
    .experience-header {
        padding: 0.8rem;
    }
}

/* 动画类 - 修改为默认可见 */
.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

.fade-in:not(.visible) {
    opacity: 0;
    transform: translateY(30px);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.6s ease;
}

.slide-in-left:not(.visible) {
    opacity: 0;
    transform: translateX(-50px);
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.6s ease;
}

.slide-in-right:not(.visible) {
    opacity: 0;
    transform: translateX(50px);
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

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

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}
