/* ====== 全局重置与变量 ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #ffffff;
    --text-primary: #1e1e1e;
    --text-secondary: #5a5a5a;
    --text-light: #8a8a8a;
    --border-color: #eaeaea;
    --accent-color: #2563eb;      /* 科技蓝，作为点缀 */
    --accent-light: #dbeafe;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
    --max-width: 900px;
    --spacing: 2rem;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    font-size: 16px;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 2rem 0;
}

/* ====== 导航栏 ====== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

/* ====== 页脚 ====== */
.footer {
    margin-top: 5rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

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

.footer-links a:hover {
    color: var(--text-primary);
}

/* ====== 主页特有样式 ====== */
.hero {
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.hero .subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.hero .focus {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2rem;
}

.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
    list-style: none;
    margin: 2rem 0 3rem;
}

.badge-list li {
    background-color: var(--accent-light);
    color: var(--accent-color);
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(37,99,235,0.2);
}

/* 卡片网格（用于展示四个方向） */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.card {
    background: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.8rem 1.2rem;
    transition: all 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0,0,0,0.1);
    border-color: var(--accent-color);
}

.card i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 时间线 */
.timeline {
    list-style: none;
    margin: 2rem 0;
}

.timeline li {
    display: flex;
    padding: 1rem 0;
    border-bottom: 1px dashed var(--border-color);
}

.timeline-date {
    min-width: 100px;
    color: var(--text-light);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.timeline-content {
    color: var(--text-primary);
}

/* 关于、项目等页面通用样式 */
.page-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.section-title {
    font-size: 1.8rem;
    margin: 2.5rem 0 1rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* 联系页面列表 */
.contact-list {
    list-style: none;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    margin: 2rem 0;
}

.contact-list li {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: #fafafa;
}

.contact-list li:last-child {
    border-bottom: none;
}

.contact-icon {
    width: 40px;
    font-size: 1.3rem;
    color: var(--accent-color);
}

.contact-detail {
    flex: 1;
}

.contact-detail a {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--border-color);
}

.contact-detail a:hover {
    text-decoration-color: var(--text-primary);
}

/* 表单 */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
    color: var(--text-primary);
}

input, textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background: #fafafa;
    transition: border 0.2s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: #fff;
}

button {
    background: var(--text-primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 40px;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: var(--accent-color);
}

.note {
    margin-top: 0.8rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 响应式 */
@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }
    .hero h1 {
        font-size: 3rem;
    }
    .timeline li {
        flex-direction: column;
    }
    .timeline-date {
        margin-bottom: 0.3rem;
    }
    .footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .footer-links {
        justify-content: center;
    }
}
