/* ==================== 首页样式 ==================== */
:root {
    --bg: #f6f7fb;
    --bg-card: #ffffff;
    --text: #1f2430;
    --text-soft: #666e80;
    --border: #e4e7ef;
    --accent: #5b5bd6;
    --accent-soft: #ecebfd;
    --shadow: 0 2px 10px rgba(20, 25, 50, .06);
    --shadow-hover: 0 10px 28px rgba(20, 25, 50, .13);
}

body.theme-dark {
    --bg: #14161d;
    --bg-card: #1c1f29;
    --text: #e8eaf0;
    --text-soft: #9aa1b4;
    --border: #2b2f3d;
    --accent: #8b8bf5;
    --accent-soft: #262a3b;
    --shadow: 0 2px 10px rgba(0, 0, 0, .3);
    --shadow-hover: 0 10px 28px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    transition: background .25s, color .25s;
}

/* 顶栏 */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
}

.brand-mark { font-size: 24px; }

.theme-btn {
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 17px;
    cursor: pointer;
    transition: transform .15s, border-color .15s;
}

.theme-btn:hover { transform: scale(1.08); border-color: var(--accent); }

/* 主体 */
.wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.hero { padding: 32px 0 40px; }

.hero h1 {
    margin: 0 0 10px;
    font-size: clamp(26px, 4vw, 40px);
    letter-spacing: -.5px;
}

.hero-sub {
    margin: 0;
    color: var(--text-soft);
    font-size: 16px;
}

/* 项目卡片 */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.card-live:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.card-soon { opacity: .62; }

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.card-icon { font-size: 30px; }

.tag {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 600;
}

.tag-live { background: var(--accent-soft); color: var(--accent); }
.tag-soon { background: var(--border); color: var(--text-soft); }

.card-title { margin: 0 0 8px; font-size: 20px; }

.card-desc {
    margin: 0 0 14px;
    color: var(--text-soft);
    font-size: 14px;
    flex-grow: 1;
}

.card-desc code {
    background: var(--accent-soft);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 13px;
}

.card-meta {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    padding: 0;
}

.card-meta li {
    font-size: 12px;
    color: var(--text-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 10px;
}

.card-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    padding: 11px;
    border-radius: 10px;
    transition: opacity .15s;
}

.card-btn:hover { opacity: .88; }

.card-btn-disabled {
    background: var(--border);
    color: var(--text-soft);
    cursor: not-allowed;
}

.site-footer {
    margin-top: 50px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 13px;
    text-align: center;
}

@media (max-width: 560px) {
    .wrap { padding: 0 16px 44px; }
    .hero { padding: 20px 0 28px; }
}
