/* ===== CURRENTLY: reading / listening to / watching =====
   Three columns, each as wide as its picture frame, spread across the full
   width: the first frame starts at the left edge of the content, the last
   ends at the right edge. Frames are all the same 2:3 size, so the titles
   and descriptions start on one line. */

.media {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 300px));
    justify-content: space-between;
    column-gap: 48px;
    align-items: start;
}

.media__kind {
    font-size: 1.4em;
    font-weight: 400;
    color: var(--secondary-accent);
    margin-bottom: 20px;
}

/* Every picture gets the same 2:3 frame: a blurred, zoomed copy of the
   picture fills it (--cover, set by the script in index.html), and the
   picture itself sits centred on top with a drop shadow. Covers of any
   shape or size end up looking uniform. */
.media__cover {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%; /* the column is sized to the frame */
    aspect-ratio: 2 / 3;
    overflow: hidden;
    isolation: isolate;
    background: var(--secondary-dark);
    margin-bottom: 24px;
}

.media__cover::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--cover, none) center / cover no-repeat;
    filter: blur(18px) brightness(0.7);
    transform: scale(1.25); /* hide the blur's soft edges */
}

.media__cover img {
    display: block;
    width: auto;
    height: auto;
    max-width: 78%;
    max-height: 78%;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6);
}

/* stand-in until there's a picture */
.media__cover--empty {
    background: none;
    border: 1px dashed color-mix(in srgb, var(--secondary-accent) 35%, transparent);
}

.media__title {
    font-size: 1.2em;
    color: var(--secondary-accent);
    margin-bottom: 4px;
}

.media__creator {
    color: color-mix(in srgb, var(--secondary-accent) 65%, transparent);
    margin-bottom: 16px;
}

.media__desc {
    line-height: 1.7;
}

.media__desc:empty {
    display: none;
}

/* tablets: three columns get too narrow, so stack them */
@media (max-width: 768px) {
    .media {
        grid-template-columns: 1fr;
        gap: 56px;
    }

    .media__cover {
        max-width: 260px;
    }
}
