/* GRID */

.grid {
    margin-top: 6em;
    margin-left: auto;
    margin-right: auto;
    display: grid;
    max-width: fit-content;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 5em;
    justify-items: center;
    align-items: center;
}

/* PLL */

.cs {
    position: relative;
    width: 10em;
}

.cs-logo {
    display: block; /* Could be useless */
    width: 100%;
    border-radius: 1em;
}

.cs-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    border-radius: 1em;
    transition: opacity 250ms;
}

.cs-overlay:hover {
    opacity: 1;
}

.cs-overlay:hover > .cs-text {
    transform: translateY(0);
}

.cs-text {
    color: #ffffff;
    font-size: 1.5em;
    font-weight: bold;
    transform: translateY(0.5em);
    transition: transform 250ms;
}

/* PLL */

.pll {
    position: relative;
    width: 10em;
}

.pll-logo {
    display: block; /* Could be useless */
    width: 100%;
    border-radius: 1em;
}

.pll-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    border-radius: 1em;
    transition: opacity 250ms;
}

.pll-overlay:hover {
    opacity: 1;
}

.pll-overlay:hover > .pll-text {
    transform: translateY(0);
}

.pll-text {
    color: #ffffff;
    font-size: 1.5em;
    font-weight: bold;
    transform: translateY(0.5em);
    transition: transform 250ms;
}

/* PLL+1 */

.pll1 {
    position: relative;
    width: 10em;
}

.pll1-logo {
    display: block;
    width: 100%;
    border-radius: 1em;
}

.pll1-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    display: flex;
    /* flex-direction: column; */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 250ms;
    border-radius: 1em;
}

.pll1-overlay:hover {
    opacity: 1;
}

.pll1-overlay:hover > .pll1-text {
    transform: translateY(0);
}

.pll1-text {
    color: #ffffff;
    font-size: 1.5em;
    font-weight: bold;
    transform: translateY(0.5em);
    transition: transform 250ms;
}

/* RSB */

.rsb {
    position: relative;
    width: 10em;
}

.rsb-logo {
    display: block;
    width: 100%;
    border-radius: 1em;
}

.rsb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    display: flex;
    /* flex-direction: column; */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 250ms;
    border-radius: 1em;
}

.rsb-overlay:hover {
    opacity: 1;
}

.rsb-overlay:hover > .rsb-text {
    transform: translateY(0);
}

.rsb-text {
    color: #ffffff;
    font-size: 1.5em;
    font-weight: bold;
    transform: translateY(0.5em);
    transition: transform 250ms;
}

/* MORE */

.more {
    position: relative;
    width: 10em;
}

.more-logo {
    display: block;
    width: 100%;
    border-radius: 1em;
}

.more-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    display: flex;
    /* flex-direction: column; */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 250ms;
    border-radius: 1em;
}

.more-overlay:hover {
    opacity: 1;
}

.more-overlay:hover > .more-text {
    transform: translateY(0);
}

.more-text {
    color: #ffffff;
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
    transform: translateY(0.5em);
    transition: transform 250ms;
}

/* ABOUT ME */

.about {
    display: none;
}

/* PHONE LAYOUT */

@media only screen and (max-width: 700px) {
    /* MENU */

    header {
        height: 5em;
    }
    
    .menu {
        height: 5em; /* same as the height of header */
    }
    
    .menu ul li {
        line-height: 5em; /* same as the height of header */
        display: none;
    }

    .brand-title {
        display: inline-block;
    }

    .toggle-button {
        display: flex;
    }

    /* GRID */

    .grid {
        margin-top: 3em;
        max-width: 85%;
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 3em;
    }

    /* PLL */

    .cs {
        width: 8em;
    }

    .cs-text {
        font-size: 1.2em;
    }

    /* PLL */

    .pll {
        width: 8em;
    }

    .pll-text {
        font-size: 1.2em;
    }

    /* PLL+1 */

    .pll1 {
        width: 8em;
    }

    .pll1-text {
        font-size: 1.2em;
    }

    /* MORE */

    .more {
        display: none;
    }

    /* ABOUT ME */

    .about {
        display: initial;
        position: relative;
        width: 8em;
    }

    .about-logo {
        display: block;
        width: 100%;
        border-radius: 1em;
    }

    .about-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.75);
        font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 250ms;
        border-radius: 1em;
    }

    .about-overlay:hover {
        opacity: 1;
    }

    .about-overlay:hover > .about-text {
        transform: translateY(0);
    }

    .about-text {
        color: #ffffff;
        font-size: 1.2em;
        font-weight: bold;
        text-align: center;
        transform: translateY(0.5em);
        transition: transform 250ms;
    }
}

@media only screen and (max-width:414px) {
    header {
        height: 4em;
    }
    
    .menu {
        height: 4em;
    }
    
    .menu ul li {
        line-height: 4em; /* same as the height of header */
    }
}

@media only screen and (max-width: 358px) {
    .grid {
        grid-template-columns: repeat(1, 1fr);
    }
}