main {
    padding: 2rem;
}

.title {
    font-weight: normal;
    text-align: center;
    text-shadow: -1px 1.5px 0 var(--text-shadow-color);
    transition: text-shadow 0.3s ease;
}

.grid {
    display: grid;
    gap: 2rem;
    padding: 2rem;
    padding-top: 0;
    margin: 0 auto;
    grid-template-columns: repeat(auto-fit, 300px);
    justify-content: center;
}

.tile {
    overflow: visible;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    position: relative;
    transform: translateZ(0);
    transition: transform 160ms ease;
    will-change: transform;
}

.tile:hover,
.tile:focus-visible {
    transform: scale(1.04);
    z-index: 10;
}

.tile-thumbnail {
    aspect-ratio: 16/9;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    border: 3px solid #444;
    border-bottom: none;
}

.tile-title {
    background-color: #232324;
    border: 3px solid #444;
    color: white;
    font-family: Monocraft;
    font-weight: normal;
    text-shadow: -1px 1.5px 0 black;
    padding: 0.5rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.2;
    position: relative;
    margin: 0;
}

.tile-title::after {
    content: "";
    position: absolute;
    left: -3px;
    width: calc(100% + 6px);
    height: 3px;
    bottom: -6px;
    background-color: #111;
}

.tile-title span {
    position: relative;
    display: inline-block;
    z-index: 2;
}

.tile:hover .tile-title span::after {
    transform: scaleX(1);
}