/* Main container - centres content with fixed width */
.author-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--spacing-xl) 0;
}

/* Circular author portrait with fallback styles */
.author-image.large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto var(--spacing-lg) auto;
    background-color: var(--background-300);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-500);
}

.author-image.large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-image.large i {
    font-size: 4rem;
}

/* Author info section - centred text layout */
.author-meta {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.author-name {
    font-size: var(--text-xxl);
    font-family: var(--font-heading);
    color: var(--text-900);
    margin-bottom: var(--spacing-xs);
}

.author-years,
.author-nationality {
    font-size: var(--text-md);
    color: var(--text-700);
    margin-bottom: var(--spacing-xs);
}

.author-genres {
    margin-top: var(--spacing-sm);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    justify-content: center;
}

.author-genre {
    background-color: var(--secondary-200);
    color: var(--secondary-800);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-full);
    font-size: var(--text-sm);
}

/* Biography section with styled heading and text */
.author-biography {
    margin-bottom: var(--spacing-xl);
}

.author-biography h2 {
    font-size: var(--text-xl);
    color: var(--text-900);
    margin-bottom: var(--spacing-md);
}

.author-bio {
    font-size: var(--text-md);
    line-height: 1.6;
    color: var(--text-800);
}

/* Responsive statistics grid layout */
.author-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

/* Interactive statistic cards with hover effect */
.stat-card {
    background: var(--background-200);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 2rem;
    color: var(--accent-500);
    margin-bottom: var(--spacing-sm);
}

.stat-value {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-900);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--text-600);
}

/* Author works section heading and layout */
.available-audiobooks {
    margin-bottom: var(--spacing-xl);
}

.available-audiobooks h2 {
    font-size: var(--text-xl);
    color: var(--text-900);
    margin-bottom: var(--spacing-lg);
}

/* Responsive grid layout for book displays */
.audiobooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--spacing-lg);
}

/* Interactive audiobook card with visual feedback on hover */
.work-card {
    background: var(--color-bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-md);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px var(--color-shadow);
}

.work-title {
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--text-900);
    margin-top: var(--spacing-sm);
}

/* Mobile and tablet responsive adjustments */
@media (max-width: 768px) {
    .author-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-meta {
        text-align: center;
    }

    .author-genres {
        justify-content: center;
    }

    /* Single column layout for statistics on mobile */
    .author-stats {
        grid-template-columns: 1fr;
    }

    /* Smaller book cards on mobile devices */
    .audiobooks-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}