/**** Reset ****/

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

a {
    text-decoration: none;
}

/**** body ****/

body {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    font-family: "Montserrat", sans-serif;
    overflow-x: hidden;
    padding: 50px;
}

/**** header ****/

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 50px;
}

.user__image {
    width: 30%;
    margin-bottom: 10px;
}

.user__image,
img {
    border-radius: 70px;
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user__name {
    font-size: 24px;
    margin-bottom: 10px;
}

.user__name,
.user__location,
.box__number,
.box__text {
    font-weight: 600;
    text-transform: capitalize;
}

.user__name,
.box__number {
    color: #4e5150;
}

.user__location {
    color: #a9a9a9;
    margin-bottom: 25px;
}

.user__location,
.box__text {
    font-size: 14px;
}

.user__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 20px;
}

.box {
    background-color: #e5e5e5;
    border-radius: 10px;
    padding: 15px 30px;
    transition: box-shadow 0.3s ease-in-out,
        cursor 0.3s ease-in-out;
}

.box:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.box__number {
    font-size: 18px;
    line-height: 1.4;
}

.box__text {
    line-height: 1.2;
    color: #bdbdbd;
}

/**** main ****/

.main__content {
    flex-grow: 1;
    max-width: 900px;
    width: 100%;
    height: auto;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 31%);
    grid-template-rows: repeat(3, 30%);
    grid-gap: 3.5%;
    margin-bottom: 50px;
}

.image__box,
.image__box img {
    border-radius: 15px;
    transition: transform 0.3s ease-in-out;
}

.image__box:hover,
.image__box img:hover {
    transform: scale(1.02);
}

.image__2 {
    grid-column: 2 / 4;
}

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

.image__4 {
    grid-column: 3;
    grid-row: 2 / 4;
}

/**** footer ****/

footer {
    margin-top: 50px;
}

.dev__challenges__link {
    font-size: 16px;
    color: #a9a9a9;
    transition: all 0.3s ease-in-out;
}

.dev__challenges__link:hover {
    text-decoration: underline;
}

/**** Responsive design version mobile ****/

@media screen and (max-width: 572px) {

    body {
        padding: 20px;
    }

    .user__name {
        font-size: 16px;
    }

    .user__location {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .user__stats {
        grid-gap: 10px;
    }

    .box {
        padding: 10px;
    }

    .box__number,
    .box__text {
        font-size: 12px;
        line-height: 1.2;
    }

    footer {
        margin-top: 25px;
    }
}