/* 重置和基础样式 */

/* 全局样式更新 */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

/* 导航栏样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981 0%, #065f46 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #10b981 0%, #065f46 100%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #059669;
}

/* 主要内容区域 */
.main {
    margin-top: 80px;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    text-align: center;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.cta-button {
    display: inline-block;
    background: white;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 1s ease 0.4s both;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2),
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* 博客区域 */
.blog-section {
    padding: 5rem 0;
    background: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #1f2937;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    align-items: stretch;
}

.blog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                border 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 16px;
    z-index: 1;
}

.blog-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 18px;
    background: linear-gradient(135deg, #10b981, #059669);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 0;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
}



.blog-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15),
                0 0 0 2px rgba(16, 185, 129, 0.2);
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #10b981, #059669) border-box;
}

.blog-card:hover::before {
    opacity: 1;
}

.blog-card:hover::after {
    opacity: 1;
}

.blog-card:hover .blog-card-image {
    transform: scale(1.05);
}

.blog-card:hover .blog-card-title {
    color: #10b981;
}

.blog-card-image {
    height: 200px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    transition: all 0.4s ease;
    overflow: hidden;
}

.blog-card-content {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
    background: white;
    border-radius: 0 0 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
    transition: color 0.4s ease;
}

.blog-card-excerpt {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.9rem;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #9ca3af;
    margin-top: 1rem;
}

.blog-card-category {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.75rem;
}

.blog-card-date {
    color: #9ca3af;
    font-size: 0.75rem;
}

/* 图标样式更新 */
.icon-emoji {
    font-size: 3rem;
    line-height: 1;
    transition: all 0.4s ease;
    display: block;
}

.icon-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: all 0.4s ease;
    display: block;
}

.icon-image[src*="http"] {
    filter: none;
}

.blog-card:hover .icon-emoji,
.blog-card:hover .icon-image,
.blog-card:hover .icon-svg {
    transform: scale(1.1);
}

.icon-svg {
    width: 60px;
    height: 60px;
    fill: white;
    transition: all 0.4s ease;
    display: block;
}

.icon-svg svg {
    width: 100%;
    height: 100%;
}

/* 关于部分 */
.about-section {
    padding: 5rem 0;
    background: #f8fafc;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about-skills h3 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* 技能和联系部分 */
.skills-section,
.contact-section {
    padding: 4rem 2rem;
    background: #f8fafc;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.skill-item {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #e5e7eb;
    cursor: pointer;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.skill-item h3 {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.contact-item {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #e5e7eb;
    cursor: pointer;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.contact-item h3 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.contact-item p {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.contact-link {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.contact-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* 页脚 */
.footer {
    background: #f8fafc;
    color: #6b7280;
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #e5e7eb;
}

/* 移动端导航 */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    justify-content: space-around;
}

.nav-toggle span {
    width: 100%;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 文章详情页样式更新 */
.post-header {
    background: #f8fafc;
    padding: 4rem 2rem;
    text-align: center;
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    color: #6b7280;
}

.post-category {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

.post-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

.post-icon .icon-emoji {
    font-size: 2.5rem;
}

.post-icon .icon-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.post-icon .icon-image[src*="http"] {
    filter: none;
}

.post-icon .icon-svg {
    width: 80px;
    height: 80px;
    fill: #10b981;
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: -2rem;
    position: relative;
    z-index: 10;
    border: 1px solid #e5e7eb;
}

.post-content h2 {
    color: #1f2937;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content p {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.post-content ul {
    color: #6b7280;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.back-button {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    margin-bottom: 2rem;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.post-footer {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.post-share {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.post-share span {
    color: #6b7280;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

.share-link {
    background: #f1f5f9;
    color: #1f2937;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.share-link:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-card {
        margin: 0 1rem;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
    grid-template-columns: 1fr;
}
    
    .post-title {
        font-size: 2rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 博客卡片加载动画 */
.blog-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
    will-change: opacity, transform;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }
.blog-card:nth-child(7) { animation-delay: 0.7s; }
.blog-card:nth-child(8) { animation-delay: 0.8s; }

/* 确保动画完成后卡片完全可见 */
.blog-card.animated {
    opacity: 1 !important;
    transform: translateY(0) !important;
}
