/*

All grid code is placed in a 'supports' rule (feature query) at the bottom of the CSS (Line 310). 
        
The 'supports' rule will only run if your browser supports CSS grid.

Flexbox and floats are used as a fallback so that browsers which don't support grid will still recieve a similar layout.

*/

/* Base Styles */

:root {
    font-size: 10px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.bodyW {
    font-family: "Open Sans", Arial, sans-serif;
    min-height: 100vh;
    background-color: #fafafa;
    color: #262626;
    padding-bottom: 3rem;
}

.imgW {
    display: block;
}

.containerW {
    max-width: 93.5rem;
    margin: 0 auto;
    padding: 0 2rem;
}

.btnW {
    display: inline-block;
    font: inherit;
    background: none;
    border: none;
    color: inherit;
    padding: 0;
    cursor: pointer;
}

.btnW:focus {
    outline: 0.5rem auto #4d90fe;
}

.visually-hiddenW {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
}

/* Profile Section */

.profileW {
    padding: 5rem 0;
}

.profileW::after {
    content: "";
    display: block;
    clear: both;
}

.profile-imageW {
    float: left;
    width: calc(33.333% - 1rem);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 3rem;
    scale: 0.8;
}

.profile-imageW img {
    border-radius: 50%;
}

.profile-user-settingsW,
.profile-statsW,
.profile-bioW {
    float: left;
    width: calc(66.666% - 2rem);
}

.profile-user-settingsW {
    margin-top: 1.1rem;
}

.profile-user-nameW {
    display: inline-block;
    font-size: 3.2rem;
    font-weight: 300;
}

.profile-edit-btnW {
    font-size: 1.4rem;
    line-height: 1.8;
    border: 0.1rem solid #dbdbdb;
    border-radius: 0.3rem;
    padding: 0 2.4rem;
    margin-left: 2rem;
}

.profile-settings-btnW {
    font-size: 2rem;
    margin-left: 1rem;
}

.profile-statsW {
    margin-top: 2.3rem;
}

.profile-statsW li {
    display: inline-block;
    font-size: 1.6rem;
    line-height: 1.5;
    margin-right: 4rem;
    cursor: pointer;
}

.profile-statsW li:last-of-type {
    margin-right: 0;
}

.profile-bioW {
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.5;
    margin-top: 2.3rem;
}

.profile-real-nameW,
.profile-stat-countW,
.profile-edit-btnW {
    font-weight: 600;
}

/* Gallery Section */

.galleryW {
    display: flex;
    flex-wrap: wrap;
    margin: -1rem -1rem;
    padding-bottom: 3rem;
}

.gallery-itemW {
    position: relative;
    flex: 1 0 22rem;
    margin: 1rem;
    color: #fff;
    cursor: pointer;
}

.gallery-itemW:hover .gallery-item-infoW,
.gallery-itemW:focus .gallery-item-infoW {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
}

.gallery-item-infoW {
    display: none;
}

.gallery-item-infoW li {
    display: inline-block;
    font-size: 1.7rem;
    font-weight: 600;
}

.gallery-item-likesW {
    margin-right: 2.2rem;
}

.gallery-item-typeW {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2.5rem;
    text-shadow: 0.2rem 0.2rem 0.2rem rgba(0, 0, 0, 0.1);
}

.fa-cloneW,
.fa-commentW {
    transform: rotateY(180deg);
}

.gallery-imageW {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Loader */

.loaderW {
    width: 5rem;
    height: 5rem;
    border: 0.6rem solid #999;
    border-bottom-color: transparent;
    border-radius: 50%;
    margin: 0 auto;
    animation: loader 500ms linear infinite;
}

/* Media Query */

@media screen and (max-width: 40rem) {
    .profileW {
        display: flex;
        flex-wrap: wrap;
        padding: 4rem 0;
    }

    .profileW::after {
        display: none;
    }

    .profile-imageW,
    .profile-user-settingsW,
    .profile-bioW,
    .profile-statsW {
        float: none;
        width: auto;
    }

    .profile-imageW img {
        width: 7.7rem;
    }

    .profile-user-settingsW {
        flex-basis: calc(100% - 10.7rem);
        display: flex;
        flex-wrap: wrap;
        margin-top: 1rem;
    }

    .profile-user-nameW {
        font-size: 2.2rem;
    }

    .profile-edit-btnW {
        order: 1;
        padding: 0;
        text-align: center;
        margin-top: 1rem;
    }

    .profile-edit-btnW {
        margin-left: 0;
    }

    .profile-bioW {
        font-size: 1.4rem;
        margin-top: 1.5rem;
    }

    .profile-edit-btnW,
    .profile-bioW,
    .profile-statsW {
        flex-basis: 100%;
    }

    .profile-statsW {
        order: 1;
        margin-top: 1.5rem;
    }

    .profile-statsW ul {
        display: flex;
        text-align: center;
        padding: 1.2rem 0;
        border-top: 0.1rem solid #dadada;
        border-bottom: 0.1rem solid #dadada;
    }

    .profile-statsW li {
        font-size: 1.4rem;
        flex: 1;
        margin: 0;
    }

    .profile-stat-countW {
        display: block;
    }
}

/* Spinner Animation */

@keyframes loader {
    to {
        transform: rotate(360deg);
    }
}

/*

The following code will only run if your browser supports CSS grid.

Remove or comment-out the code block below to see how the browser will fall-back to flexbox & floated styling. 

*/

@supports (display: grid) {
    .profileW {
        display: grid;
        grid-template-columns: 1fr 2fr;
        grid-template-rows: repeat(3, auto);
        grid-column-gap: 3rem;
        align-items: center;
    }

    .profile-imageW {
        grid-row: 1 / -1;
    }

    .galleryW {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
        grid-gap: 2rem;
    }

    .profile-imageW,
    .profile-user-settingsW,
    .profile-statsW,
    .profile-bioW,
    .gallery-itemW,
    .galleryW {
        width: auto;
        margin: 0;
    }

    @media (max-width: 40rem) {
        .profileW {
            grid-template-columns: auto 1fr;
            grid-row-gap: 1.5rem;
        }

        .profile-imageW {
            grid-row: 1 / 2;
        }

        .profile-user-settingsW {
            display: grid;
            grid-template-columns: auto 1fr;
            grid-gap: 1rem;
        }

        .profile-edit-btnW,
        .profile-statsW,
        .profile-bioW {
            grid-column: 1 / -1;
        }

        .profile-user-settingsW,
        .profile-edit-btnW,
        .profile-settings-btnW,
        .profile-bioW,
        .profile-statsW {
            margin: 0;
        }
    }
}


/* containerW
profileW
profile-imageW
profile-user-settingWs
profile-user-nameW
btn
fas fa-cog
profile-stats
profile-stat-countW
                <li><span class="profile-stat-countW">188</span> followers</li>
profile-bioW
profile-real-nameW */