:root {
    --primary-color: #ff69b4;
    --secondary-color: #ff80ab;
    --background-color: #ffffff;
    --text-color: #333333;
    --light-text-color: #666666;
    --accent-color: #f3e8f1;
    --card-bg: #ffffff;
    --border-color: rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    background: #ffffff;
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-pic:hover {
    transform: scale(1.05);
}

.page-header {
    text-align: center;
    padding: 30px 20px;
    background: var(--accent-color);
    border-radius: 12px;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.page-header p {
    color: var(--light-text-color);
}

.site-nav {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.nav-inner {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: linear-gradient(180deg, #ffffff 0%, #fff6fb 100%);
    color: var(--text-color);
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nav-link.inactive:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-link.active {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 6px 14px rgba(255, 105, 180, 0.35);
}

.about-section,
.articles-section,
.projects-section,
.contact-section,
.article-detail,
.project-detail {
    background: var(--background-color);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.about-section h2,
.articles-section h2,
.projects-section h2,
.contact-section h2,
.article-detail h2,
.project-detail h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    border-left: 5px solid var(--primary-color);
    padding-left: 10px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.skill {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s ease;
}

.skill:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    justify-content: center;
}

.articles-section .grid,
.projects-section .grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
    justify-content: flex-start;
}

.articles-section .card,
.projects-section .card {
    max-width: 320px;
    width: 100%;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.media {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(180deg, #fafbfc 0%, #f2f4f7 100%);
    position: relative;
    overflow: hidden;
}

.media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media.no-image::after {
    content: '无封面';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--light-text-color);
    font-size: 0.95em;
}

.card-content {
    padding: 18px;
}

.card-content h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.card-content p {
    font-size: 0.95em;
    color: var(--light-text-color);
    margin-bottom: 10px;
}

.card-content .meta {
    font-size: 0.85em;
    color: var(--light-text-color);
    margin-bottom: 10px;
}

.card-content a {
    display: inline-block;
    margin-top: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

.card-content a:hover {
    color: var(--secondary-color);
}

.section-footer {
    text-align: center;
    margin-top: 20px;
}

.view-all {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.view-all:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.search-container {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.search-form {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: flex-end;
}

.search-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1em;
}

.search-form button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-form button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
}

.search-result-panel {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.search-result-panel ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-result-panel a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95em;
}

.categories-container {
    margin: 10px 0 24px 0;
}

.categories-container h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-btn {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 105, 180, 0.35);
    background: linear-gradient(180deg, #ffffff 0%, #fff5fb 100%);
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    text-decoration: none;
}

.category-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.18);
}

.category-btn.active {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 6px 14px rgba(255, 105, 180, 0.35);
}

.list-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.list-status {
    color: var(--light-text-color);
    font-size: 0.93em;
    background: #f9f5f8;
    border: 1px solid rgba(255, 105, 180, 0.18);
    padding: 6px 12px;
    border-radius: 999px;
}

.load-more-btn {
    padding: 10px 18px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(255, 105, 180, 0.25);
}

.load-more-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.25);
}

.pagination-wrapper {
    width: 100%;
}

.pagination-wrapper ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0;
}

.pagination-wrapper li a,
.pagination-wrapper li span {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
}

.pagination-wrapper li.active span,
.pagination-wrapper li a:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.empty-placeholder {
    width: 100%;
    min-height: 180px;
    padding: 28px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--light-text-color);
    text-align: center;
}

.empty-emoji {
    font-size: 42px;
    line-height: 1;
    margin-bottom: 6px;
}

.empty-title {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 5px rgba(255, 105, 180, 0.3);
}

button {
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.3);
}

.success-message,
.error-message {
    margin-top: 20px;
    padding: 15px;
    border-left: 5px solid var(--primary-color);
    border-radius: 6px;
}

.success-message {
    background-color: #f3e8f1;
    color: var(--text-color);
}

.error-message {
    background-color: #ffe8ed;
    color: #d92e5b;
}

.back-link {
    margin-top: 24px;
}

.back-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.back-link a:hover {
    text-decoration: underline;
}

.site-footer {
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    color: var(--light-text-color);
    border-top: 1px solid var(--border-color);
}

.site-footer .footer-inner {
    font-size: 0.9em;
}

.markdown-body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
    word-break: break-word;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    margin: 1.5em 0 0.8em;
    font-weight: 600;
    color: var(--primary-color);
}

.markdown-body p {
    margin: 0.8em 0;
}

.markdown-body pre {
    background: #1e1e1e;
    color: #f5f5f5;
    padding: 14px;
    border-radius: 8px;
    overflow: auto;
    font-size: 0.95em;
}

.markdown-body code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.95em;
}

.markdown-body ul,
.markdown-body ol {
    padding-left: 1.5em;
    margin: 0.8em 0;
}

.markdown-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 14px;
    color: var(--light-text-color);
    margin: 1em 0;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
}

.markdown-body th,
.markdown-body td {
    border: 1px solid var(--border-color);
    padding: 8px 10px;
}

.markdown-body a {
    color: var(--primary-color);
    text-decoration: none;
}

.markdown-body a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .profile-pic {
        width: 120px;
        height: 120px;
    }

    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form button {
        width: 100%;
    }
}
