/* 페이퍼 첫 화면 — 배치는 이전 포털 카드(정방형·가운데 정렬), 모양은 마켓플레이스 카드(테두리 1px·회색 아이콘 상자·회색 버튼)
   색은 마켓플레이스(marketplace.css --mk-*)의 회색 값. 공용 --color-* 는 라이트에서 선·글자가 푸른 계열이라 쓰지 않는다(원장 261002).
   연구실 포털(portal.css)은 research.html 과 함께 쓰여 건드리지 않는다. */
.paper-home {
    --ph-surface: #ffffff;
    --ph-surface-2: #f3f4f6;
    --ph-border: #e6e7ea;
    --ph-border-2: #d3d5da;
    --ph-text: #1f2328;
    --ph-text-muted: #565b62;

    max-width: 1040px;
    margin: 0 auto;
    padding: 2.5rem 1rem 4rem;
}

body[data-theme="dark"] .paper-home {
    --ph-surface: #171717;
    --ph-surface-2: #1d1d1d;
    --ph-border: #2a2a2a;
    --ph-border-2: #3a3a3a;
    --ph-text: #edf0f3;
    --ph-text-muted: #aeb6c1;
}

.ph-head {
    margin-bottom: 1.75rem;
    text-align: center;
}

.ph-head h1 {
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--ph-text);
    margin: 0 0 0.4rem;
}

.ph-head p {
    font-size: 1rem;
    color: var(--ph-text-muted);
    margin: 0;
    line-height: 1.6;
}

.ph-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(248px, 300px));
    justify-content: center;
    gap: 1rem;
}

.ph-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    aspect-ratio: 1 / 1;
    background: var(--ph-surface);
    border: 1px solid var(--ph-border);
    border-radius: 14px;
    padding: 2rem 1.5rem;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.ph-card:hover {
    border-color: var(--ph-border-2);
    transform: translateY(-2px);
}

.ph-icon {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--ph-surface-2);
    border: 1px solid var(--ph-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--ph-text-muted);
    margin-bottom: 1rem;
}

.ph-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ph-text);
    margin: 0 0 0.75rem;
}

.ph-desc {
    font-size: 0.95rem;
    color: var(--ph-text-muted);
    line-height: 1.5;
    margin: 0 0 1.5rem;
}

.ph-action {
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.6rem 1rem;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 600;
    background: var(--ph-surface-2);
    color: var(--ph-text);
    border: 1px solid var(--ph-border);
    transition: border-color 0.15s ease;
}

.ph-card:hover .ph-action {
    border-color: var(--ph-border-2);
}

.ph-action i {
    font-size: 0.8rem;
    transition: transform 0.15s ease;
}

.ph-card:hover .ph-action i {
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .ph-card {
        aspect-ratio: auto;
        padding: 1.35rem 1rem;
    }

    .ph-card h3 {
        font-size: 1.08rem;
    }

    .ph-desc {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 640px) {
    .paper-home {
        padding: 1.75rem 1rem 3rem;
    }

    .ph-head h1 {
        font-size: 1.55rem;
    }

    .ph-grid {
        grid-template-columns: 1fr;
    }
}
