/* Papers Section */
.papers .section-content {
    width: calc(100% - var(--section-title-width) - var(--section-gap));
}

.papers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

/* Card */
.paper-card {
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: paperFadeIn 0.6s ease forwards;
    opacity: 0;
}

.paper-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

@keyframes paperFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Banner (replaces image) */
.paper-banner {
    position: relative;
    height: 140px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #3a9bb0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.paper-banner::before {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    top: -40px;
    right: -40px;
}

.paper-banner::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    bottom: -30px;
    left: 20px;
}

.paper-banner-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.paper-card:hover .paper-banner-icon {
    transform: scale(1.1);
}

/* PGP badge inside the banner */
.paper-signed-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: background 0.2s ease;
    z-index: 2;
}

.paper-signed-badge:hover {
    background: rgba(255, 255, 255, 0.35);
    color: white;
}

.paper-signed-badge i {
    font-size: 0.65rem;
}

/* Content */
.paper-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.paper-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.paper-description {
    font-size: 0.875rem;
    color: var(--secondary-color);
    line-height: 1.6;
    margin-bottom: 1.1rem;
    flex-grow: 1;
}

/* Topic tags */
.paper-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.paper-topic {
    padding: 0.25rem 0.7rem;
    background-color: #e8f4f8;
    color: var(--accent-color);
    border-radius: 15px;
    font-size: 0.72rem;
    font-weight: 500;
}

/* Action row */
.paper-actions {
    display: flex;
    gap: 0.75rem;
}

.paper-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.paper-btn-primary {
    background-color: var(--accent-color);
    color: white;
    flex: 1;
    justify-content: center;
}

.paper-btn-primary:hover {
    background-color: #48b0c5;
    transform: translateY(-2px);
    color: white;
}

.paper-btn-secondary {
    background-color: #e8f4f8;
    color: var(--accent-color);
}

.paper-btn-secondary:hover {
    background-color: #d0eaf3;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1024px) {
    .papers .section-content {
        width: calc(100% - var(--section-title-width) - 2rem);
    }

    .papers-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .papers .section-content {
        width: 100%;
    }

    .papers-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .paper-banner {
        height: 120px;
    }

    .paper-banner-icon {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .paper-content {
        padding: 1.2rem;
    }

    .paper-title {
        font-size: 1rem;
    }

    .paper-description {
        font-size: 0.82rem;
    }
}
