/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* 头部导航 */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-brand h1 {
    color: #2563eb;
    font-size: 1.5rem;
    font-weight: 700;
}

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

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
    background-color: #eff6ff;
}

/* 主要内容区域 */
.main {
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

/* 首页英雄区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    font-weight: 300;
}

/* 博客区域 */
.blog-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #1e293b;
    text-align: center;
}

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

.blog-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.blog-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
    line-height: 1.4;
}

.blog-card .excerpt {
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.read-more {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* 简历页面样式 */
.resume-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
}

.resume-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    border: 4px solid rgba(255,255,255,0.3);
}

.basic-info .name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.basic-info .title {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.resume-section {
    padding: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.resume-section:last-child {
    border-bottom: none;
}

.resume-section .section-title {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 1.5rem;
    text-align: left;
    position: relative;
    padding-bottom: 0.5rem;
}

.resume-section .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #2563eb;
    border-radius: 2px;
}

.summary {
    font-size: 1rem;
    line-height: 1.8;
    color: #475569;
}

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

.skill-category h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

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

.skill-tag {
    background: #eff6ff;
    color: #2563eb;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.experience-list,
.education-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.experience-item,
.education-item {
    border-left: 3px solid #2563eb;
    padding-left: 1.5rem;
    position: relative;
}

.experience-item::before,
.education-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 12px;
    height: 12px;
    background: #2563eb;
    border-radius: 50%;
}

.experience-header,
.education-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.company,
.school {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.period {
    background: #f1f5f9;
    color: #64748b;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.position,
.degree {
    font-weight: 500;
    color: #2563eb;
    margin-bottom: 1rem;
}

.responsibilities {
    list-style: none;
    padding-left: 0;
}

.responsibilities li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: #475569;
    line-height: 1.6;
}

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

/* 博客详情页样式 */
.blog-detail {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    overflow: hidden;
    max-width: 800px;
    margin-right: 2rem;
}

.blog-header {
    padding: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.breadcrumb {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.blog-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-content {
    padding: 2rem;
    line-height: 1.8;
    color: #374151;
}

.blog-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: #1e293b;
}

.blog-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
    color: #1e293b;
}

.blog-content p {
    margin-bottom: 1rem;
}

.blog-content ul,
.blog-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content pre {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
    font-size: 0.875rem;
}

.blog-content code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #e11d48;
}

.blog-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.blog-footer {
    padding: 2rem;
    border-top: 1px solid #e2e8f0;
}

.tags {
    margin-bottom: 2rem;
}

.tag {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.share-buttons h4 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.share-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin-right: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.share-btn:hover {
    background: #1d4ed8;
}

/* 侧边栏 */
.main .container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

.widget {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.widget h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
}

.related-posts {
    list-style: none;
}

.related-posts li {
    margin-bottom: 0.75rem;
}

.related-posts a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.related-posts a:hover {
    color: #2563eb;
}

.toc {
    font-size: 0.9rem;
}

.toc ul {
    list-style: none;
    padding-left: 0;
}

.toc li {
    margin-bottom: 0.5rem;
}

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

.toc a:hover {
    color: #2563eb;
}

/* 底部 */
.footer {
    background: #1e293b;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* 关于页面样式 */
.about-hero {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 4rem;
    padding: 3rem 0;
}

.about-avatar {
    flex-shrink: 0;
}

.avatar-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-intro h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.intro-subtitle {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.intro-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.about-content {
    max-width: 800px;
}

.about-section {
    margin-bottom: 3rem;
}

.about-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.section-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

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

.skill-category h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.skill-tag {
    background: var(--bg-secondary);
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.interest-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.interest-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.interest-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.interest-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.interest-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.contact-label {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 80px;
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .about-hero {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .avatar-placeholder {
        width: 120px;
        height: 120px;
        font-size: 2.5rem;
    }
    
    .about-intro h1 {
        font-size: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .interests-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-info {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .experience-header,
    .education-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .main .container {
        flex-direction: column;
    }
    
    .blog-detail {
        margin-right: 0;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .blog-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .blog-card,
    .resume-section,
    .blog-header,
    .blog-content,
    .blog-footer {
        padding: 1rem;
    }
    
    .resume-header {
        padding: 2rem 1rem;
    }
}