@import url(http://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900italic,900);

html,
body,
html * {
    font-family: 'Roboto', sans-serif;
    color: white;
}

body {
    background-color: rgb(12, 12, 12);
    margin: 0;
    padding: 0;
}

ul {
    display: flex;
    flex-direction: row;
    gap: 30px;
}

.col-row {
    display: flex;
    flex-direction: row;
}

.card {
    display: flex;
    flex-direction: row;
    background-color: #191919;
    border-radius: 2rem 1rem 1rem 2rem;
    box-shadow: 2px 3px 3px 1px #0000001e;
    margin-bottom: 1em;
}

.withbottom div {
    margin-left: 3%;
    margin-right: 3%;
}

/* Правый элемент для балансировки */
.nav-right {
    display: flex;
    justify-content: flex-end;
}

li {
    list-style-type: none;
}

a {
    text-decoration: none;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

.logo img {
    margin-right: 1em;
    width: 3rem;
    border-radius: 35%;
}

nav {
    display: flex;
    flex-direction: row;
    background-color: black;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.card-image-with-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #909090;
}



.card-image-with-text-grid::after {
    content: "Типо я фотограф. Мама, я в Казани.";
    grid-column: 1 / -1;
    text-align: center;
    padding: 15px;
    font-style: italic;
    color: #666;
}

.div-wow {
    display: flex;
    justify-content: center;
}

section {
    padding: 2%;
    padding-left: 10%;
    padding-right: 10%;
}

#home {
    background-image: url("/imgs/top.gif"), linear-gradient(#00000000, #000000);
    background-size: contain;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

.avatar {
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    margin-right: 5%;
}

.card-image {
    width: 50%;
    border-radius: 2rem;
}

.card-image-30 {
    width: 30%;
    border-radius: 2rem;
}


footer {
    text-align: center;
    color: #909090;
}

#projects {
    background-image: url(/imgs/back.jpg);
    backdrop-filter: blur(15px);
}

.row {
    display: flex;
    flex-direction: row;
    gap: 1%;
}

.withbottom {
    display: flex;
    flex-direction: column;
}

.bottom {
    margin-top: auto;
    padding-bottom: 3%;
}

.link {
    display: flex;
    align-items: center;
    background-color: #191919;
    width: fit-content;
    padding: 1%;
    padding-right: 2%;
    border-radius: 5rem;
    white-space: nowrap;
}

.tme {
    background-color: #229ED9;
}

.web {
    background-color: #4d4d4d;
}

.link i {
    font-size: xx-large;
    margin-right: 3%;
}

@media (max-width: 920px) {
    ul {
        gap: 15px;
    }

    .card {
        width: 100%;
    }

    #home {
        background-size: 150% 50%;
    }

    ul li:nth-child(1) {
        display: none;
    }


    #links .row {
        flex-direction: column;
    }

    section {
        padding-left: 5%;
        padding-right: 5%;
    }

    .card {
        flex-direction: column;
        padding-right: 3%;
    }

    .card .link {
        width: 100%;
    }

    #links .link {
        width: 100%;
        margin-bottom: 1%;
    }

    .card-image-with-text-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 0;
    }

    .card-image-with-text-grid .card-image {
        width: 100%;
        object-fit: cover;
        border-radius: 15px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
}

@media (min-width: 920px) {
    .card-image-with-text-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(2, 200px);
        gap: 10px;
        margin: 20px;
    }

    .card-image-with-text-grid .card-image:nth-child(1) {
        grid-column: 1 / 5;
        grid-row: 1 / 3;
    }

    .card-image-with-text-grid .card-image:nth-child(2) {
        grid-column: 3 / 9;
        grid-row: 1 / 2;
    }

    .card-image-with-text-grid .card-image:nth-child(3) {
        grid-column: 2 / 6;
        grid-row: 2 / 6;
    }

    .card-image-with-text-grid .card-image:nth-child(4) {
        grid-column: 1 / 3;
        grid-row: 2 / 4;
    }

    .card-image-with-text-grid .card-image:nth-child(5) {
        grid-column: 6 / 4;
        grid-row: 2 / 2;
    }
}