/* 项目介绍页样式。
   复用 main.css 里已有的设计变量（--accent / --text-secondary / --radius-card 等），
   保证与博客其余页面观感一致。 */

/* ---------- Hero ---------- */
.proj-hero {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
    background: var(--card-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 2rem;
}

.proj-logo {
    width: 150px;
    height: auto;
    flex-shrink: 0;
    border-radius: var(--radius-md);
}

.proj-hero-text {
    flex: 1;
    min-width: 260px;
}

.proj-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.proj-hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    background: linear-gradient(135deg, var(--accent), #1e40af);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.proj-sub {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0.4rem 0 0.9rem;
}

.proj-desc {
    color: var(--text-secondary);
    line-height: 1.75;
}

.proj-desc strong {
    color: var(--accent-dark);
}

.proj-desc code,
.proj-section code {
    background: #f1f5f9;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    font-size: 0.88em;
    font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
}

/* 徽章 */
.proj-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.1rem 0 1.3rem;
}

.proj-badge {
    background: #eef2ff;
    color: var(--accent-dark);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.28rem 0.8rem;
    border-radius: 40px;
}

.proj-badge.warn {
    background: #fef3c7;
    color: #92400e;
}

/* 按钮 */
.proj-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.proj-btn {
    display: inline-block;
    padding: 0.55rem 1.3rem;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--border-light);
    background: #f8fafc;
    color: var(--text-secondary);
    transition: var(--transition);
}

.proj-btn:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
    transform: translateY(-2px);
}

.proj-btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.proj-btn.primary:hover {
    background: var(--accent-dark);
    color: #fff;
}

/* ---------- 事实表 ---------- */
.proj-facts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.fact {
    background: var(--card-white);
    border: 1px solid var(--border-light);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.1rem;
    box-shadow: var(--shadow-sm);
}

.fact-k {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
}

.fact-v {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

/* ---------- 通用区块 ---------- */
.proj-section {
    background: var(--card-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    padding: 1.8rem;
    margin-bottom: 2rem;
}

.proj-h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    position: relative;
    display: inline-block;
    margin-bottom: 1.6rem;
}

.proj-h2:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 46px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
}

.proj-h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 1.8rem 0 0.9rem;
}

.proj-section > p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.proj-section > p:last-child {
    margin-bottom: 0;
}

.proj-note {
    background: #f8fafc;
    border-left: 3px solid var(--border-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 0.9rem 1.1rem;
    font-size: 0.92rem;
}

/* ---------- 特性卡片 ---------- */
.proj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.2rem;
}

.proj-card {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    transition: var(--transition);
}

.proj-card:hover {
    border-color: #cbd5e1;
    background: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.proj-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

/* ---------- 架构分层 ---------- */
.proj-layers {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin: 1.2rem 0 0;
}

.layer {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.1rem;
}

.layer-idx {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layer-name {
    font-size: 0.95rem;
    font-weight: 700;
}

.layer-desc {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 0.15rem;
}

.proj-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.proj-tag {
    background: #f1f5f9;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
    padding: 0.3rem 0.8rem;
    border-radius: 40px;
}

/* ---------- 开发状态 ---------- */
.proj-status {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 1.4rem;
}

.status-row {
    display: grid;
    grid-template-columns: 140px 90px 1fr;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px dashed var(--border-light);
}

.status-row:last-child {
    border-bottom: none;
}

.status-label {
    font-weight: 600;
    font-size: 0.92rem;
}

.status-state {
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    padding: 0.22rem 0.5rem;
    border-radius: 40px;
}

.status-state.wip {
    background: #fef3c7;
    color: #92400e;
}

.status-state.done {
    background: #dcfce7;
    color: #166534;
}

.status-state.dropped {
    background: #f1f5f9;
    color: var(--text-muted);
    text-decoration: line-through;
}

.status-note {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ---------- CTA ---------- */
.proj-cta .proj-actions {
    margin-top: 1.2rem;
}

/* ---------- 响应式 ---------- */
@media (max-width: 880px) {
    .proj-hero {
        padding: 1.5rem;
        gap: 1.2rem;
    }
    .proj-logo {
        width: 110px;
    }
    .proj-hero h1 {
        font-size: 1.9rem;
    }
    .proj-section {
        padding: 1.4rem;
    }
}

@media (max-width: 640px) {
    .status-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
    .status-state {
        justify-self: start;
    }
}