/* Book cover styles */
:root {
    --max-dimension: 300px; /* Maximum width or height */
}

.book-cover {
    float: right;
    margin: 0 0 1rem 2rem;
    clear: both;
}

.book-cover img {
    display: block;
    width: calc(200px / sqrt(var(--aspect-ratio, 1.5)));
    height: calc(200px * sqrt(var(--aspect-ratio, 1.5)));
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    object-fit: fill;
}

.cover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem;
    margin: 1rem 0 2rem;
}

.cover-grid-item {
    display: block;
}

.cover-grid-item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

/* Ensure each book entry is properly contained */
.post {
    overflow: auto; /* Creates a new block formatting context */
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 2rem;
}
