/* 网站端样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background: var(--bg-light);
    line-height: 1.6;
}

/* 头部导航 */
.header {
    background: var(--bg-white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 700;
}

.logo img {
    height: 40px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

/* 主内容区 */
.main {
    min-height: calc(100vh - 200px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* 首页Hero区 */
.hero {
    text-align: center;
    padding: 80px 0;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero .btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.2s;
}

.hero .btn:hover {
    background: #1d4ed8;
}

/* 关于我页面 */
.about-section {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 48px;
    align-items: start;
}

.about-avatar {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    object-fit: cover;
    background: var(--bg-light);
}

.about-info h2 {
    font-size: 32px;
    margin-bottom: 8px;
}

.about-info .title {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.about-info .signature {
    font-size: 16px;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
}

.about-info .bio {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 技能卡片 */
.skills-section {
    margin-top: 48px;
}

.skills-section h3 {
    font-size: 24px;
    margin-bottom: 24px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.skill-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.skill-card h4 {
    font-size: 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-card h4 img {
    width: 24px;
    height: 24px;
}

.skill-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-item {
    padding: 4px 12px;
    background: var(--bg-light);
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* 联系方式 */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

.contact-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.contact-card .icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.contact-card h4 {
    margin-bottom: 8px;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

.contact-card .qr-code {
    width: 120px;
    height: 120px;
    margin-top: 12px;
    border-radius: 8px;
}

/* 联系表单 */
.contact-form-section {
    max-width: 600px;
    margin: 48px auto 0;
}

.contact-form {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.contact-form h3 {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-checkbox input {
    width: 16px;
    height: 16px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* 文章列表 */
.articles-header {
    margin-bottom: 32px;
}

.articles-header h2 {
    font-size: 32px;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.article-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: grid;
    grid-template-columns: 240px 1fr;
    transition: transform 0.2s;
}

.article-card:hover {
    transform: translateY(-4px);
}

.article-card .cover {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--bg-light);
}

.article-card .content {
    padding: 24px;
}

.article-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.article-card h3 a {
    text-decoration: none;
    color: var(--text-primary);
}

.article-card .summary {
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 13px;
}

.article-tags {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.tag {
    padding: 4px 10px;
    background: var(--bg-light);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* 文章详情 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-detail h1 {
    font-size: 36px;
    margin-bottom: 16px;
}

.article-detail .meta {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.article-detail .cover {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 32px;
}

.article-detail .content {
    line-height: 1.8;
    font-size: 16px;
}

.article-detail .content p {
    margin-bottom: 16px;
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-white);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.faq-question {
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 20px;
    color: var(--text-secondary);
}

.faq-item.active .faq-question::after {
    content: '-';
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
    color: var(--text-secondary);
    line-height: 1.8;
}

.faq-item.active .faq-answer {
    padding: 0 24px 20px;
    max-height: 500px;
}

/* 页脚 */
.footer {
    background: #1f2937;
    color: white;
    padding: 48px 0 24px;
}

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

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 32px;
}

.footer-section h4 {
    font-size: 16px;
    margin-bottom: 16px;
    color: white;
}

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

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.footer-section p {
    color: #9ca3af;
    font-size: 14px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid #374151;
}

.footer-bottom p {
    color: #9ca3af;
    font-size: 14px;
}

.footer-bottom p:first-child {
    font-style: italic;
}

/* 分类筛选 */
.category-filter {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.category-filter button {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.category-filter button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .about-section {
        grid-template-columns: 1fr;
    }
    
    .article-card {
        grid-template-columns: 1fr;
    }
    
    .article-card .cover {
        height: 200px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}