/* Author Links in Bridge Authors Section */
.bridge-author-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
    cursor: pointer;
    position: relative;
}

.bridge-author-link:hover {
    border-bottom-color: #8b7355;
}

/* Modal Overlay */
.author-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 9999;
    overflow-y: auto;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.author-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Container */
.author-modal {
    background: #fafaf8;
    border: 1px solid rgba(139, 115, 85, 0.3);
    border-radius: 8px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.4s ease;
    box-shadow: 0 10px 40px rgba(139, 115, 85, 0.1);
}

/* Close Button */
.author-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #2c2c2c;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, color 0.3s ease;
    z-index: 10;
}

.author-modal-close:hover {
    color: #8b7355;
    transform: rotate(90deg);
}

/* Modal Header */
.author-modal-header {
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid rgba(139, 115, 85, 0.2);
}

.author-modal-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #2c2c2c;
}

.author-wikipedia-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #8b7355;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.2s ease;
}

.author-wikipedia-link:hover {
    opacity: 0.7;
}

.author-wikipedia-link::after {
    content: '→';
}

/* Modal Body */
.author-modal-body {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Biography Section */
.author-biography {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #2c2c2c;
}

.author-biography h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #8b7355;
}

.author-biography-loading {
    font-style: italic;
    opacity: 0.6;
    animation: pulse 1.5s ease-in-out infinite;
}

.author-biography-error {
    font-style: italic;
    opacity: 0.7;
    color: #8b7355;
}

/* Metadata Section */
.author-metadata {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.author-metadata-section h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: #8b7355;
}

/* Works List */
.author-works {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #2c2c2c;
    padding-left: 1.2rem;
}

.author-works li {
    margin-bottom: 0.5rem;
}

.author-works li:last-child {
    margin-bottom: 0;
}

/* Domain Badges */
.author-domains {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.domain-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    border: 1px solid;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: transform 0.2s ease;
}

.domain-badge:hover {
    transform: translateY(-2px);
}

.domain-badge.primary {
    background: rgba(139, 115, 85, 0.1);
    border-color: #8b7355;
    color: #8b7355;
    font-weight: 600;
}

.domain-badge.bridge {
    background: rgba(44, 44, 44, 0.05);
    border-color: rgba(44, 44, 44, 0.2);
    color: rgba(44, 44, 44, 0.6);
}

/* Related Authors */
.related-authors-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-author-card {
    background: rgba(139, 115, 85, 0.05);
    border: 1px solid rgba(139, 115, 85, 0.15);
    border-radius: 6px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.related-author-card:hover {
    background: rgba(139, 115, 85, 0.1);
    border-color: rgba(139, 115, 85, 0.3);
    transform: translateX(4px);
}

.related-author-card h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #2c2c2c;
}

.related-author-card p {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    margin: 0;
    color: #6b6b6b;
    line-height: 1.5;
}

.related-authors-empty {
    font-style: italic;
    opacity: 0.6;
    color: #2c2c2c;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.3;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .author-modal-overlay {
        padding: 1rem;
    }

    .author-modal {
        max-height: 95vh;
    }

    .author-modal-header {
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }

    .author-modal-header h2 {
        font-size: 2rem;
        padding-right: 2rem;
    }

    .author-modal-close {
        top: 1rem;
        right: 1rem;
    }

    .author-modal-body {
        padding: 1.5rem;
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .author-biography {
        font-size: 1rem;
    }

    .author-metadata {
        gap: 1.5rem;
    }
}

/* Scrollbar Styling for Modal */
.author-modal::-webkit-scrollbar {
    width: 8px;
}

.author-modal::-webkit-scrollbar-track {
    background: rgba(139, 115, 85, 0.1);
}

.author-modal::-webkit-scrollbar-thumb {
    background: rgba(139, 115, 85, 0.3);
    border-radius: 4px;
}

.author-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 115, 85, 0.5);
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}
