* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    font-family: 'Hepta Slab', sans-serif;
    font-size: 50%;
}

body {
    background-color: #121214;
    color: white;
    padding: 14rem 13.4rem 14rem 11rem;
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1/1;
}

.grid {
    display: grid;
    gap: 3.2rem;
}

header {
    position: fixed;
    max-width: 30rem;
}

header h1 {
    font-size: 4.8rem;
}

header i {
    font-size: 3.2rem;
    display: block;
    margin-top: 3.2rem;
}

main {
    margin-left: 50.6rem;
}

.group-1 .container:nth-child(1) {
    grid-row: 1/3;
}

.group-1 .container:nth-child(1) img, .group-2 .container:nth-child(3) img {
    aspect-ratio: 9/16;
}

.horizontal {
    grid-column: 1/3;
}

.horizontal img {
    aspect-ratio: 16/9;
}

.group-2 .container:nth-child(3) {
    grid-column: 2;
    grid-row: 1/3;
}

.container {
    position: relative;
    outline: 4px solid transparent;
    transition: all .4s;
}

.container span {
    font-size: 2rem;
    display: block;
    width: 100%;
    padding: 2.4rem;
    position: absolute;
    bottom: 0;
    background-image: linear-gradient(to bottom, transparent, black 80%);
    opacity: 0;
    transition: all .4s;
}

.container:hover span {
    visibility: visible;
    opacity: 1;
}

.container:hover {
    outline-color: white;
}



@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }

    header {
        flex-direction: column;
        align-items: center;
        padding: 10px 20px;
    }

    header h1 {
        margin-bottom: 10px;
        font-size: 18px;
    }

    main {
        margin-top: 60px;
    }

    .container {
        width: 250px;
    }

    .container.horizontal {
        width: 100%;
    }
}