/* 全局设置 */
:root {
    --bg-color: #ffffff;
    --text-main: #333333;
    --text-light: #666666;
    --accent-color: #0056b3; /* 学术蓝 */
    --border-color: #eaeaea;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: 'Helvetica Neue', 'Arial', sans-serif;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

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

/* Header */
header {
    text-align: center;
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--border-color);
}

header h1 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.95rem;
}

.social-links a {
    text-decoration: none;
    color: var(--text-main);
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--accent-color);
}


/* Main Content */
main {
    padding: 40px 20px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    border-bottom: 2px solid var(--text-main);
    display: inline-block;
    margin-bottom: 40px;
    padding-bottom: 5px;
}

/* Grid System */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* 响应式布局 */
    gap: 40px;
}

/* Cards (学术风 + 视觉优先) */
.project-card {
    border: 1px solid var(--border-color);
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 4px; /* 轻微圆角 */
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.card-image {
    width: 100%;
    height: 220px; /* 固定高度，确保整齐 */
    background-color: #f4f4f4;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保证截图填满且不变形 */
    object-position: top center;
}

.card-content {
    padding: 25px;
}

.tags {
    margin-bottom: 15px;
}

.tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    border: 1px solid #ddd;
    padding: 2px 8px;
    border-radius: 2px;
    margin-right: 5px;
}

.project-card h3 {
    font-family: var(--font-serif);
    margin: 0 0 10px 0;
    font-size: 1.25rem;
}

.project-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

/* Buttons */
.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.btn {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 空心按钮风格 (Live Demo) */
.btn-outline {
    color: var(--text-main);
    border: 1px solid var(--text-main);
    padding: 6px 15px;
    border-radius: 2px;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--text-main);
    color: #fff;
}

/* 文字链接风格 (Source Code) */
.btn-text {
    color: var(--accent-color);
}

.btn-text:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

/* 手机端适配 */
@media (max-width: 600px) {
    .container { padding: 0 15px; }
    header h1 { font-size: 2rem; }
    .social-links { flex-wrap: wrap; }
}