/*Modal*/

#modal_background {
    backdrop-filter: blur(8px);
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 101;
    display: none;
}

.modal:hover {
    transition: 100ms;
    cursor: pointer;
    background-color: var(--lighter_background);
}

.modal_info {
    display: none;
    position: fixed;
    z-index: 102;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    align-content: center;
}

.modal_info_content {
    overflow: auto;
    margin: auto;
    height: 80%;
    width: 80%;
    max-width: 800px;
    border: 1px solid var(--text);
    border-radius: 10px;
    background-color: black;
    background-color: rgba(0, 0, 0, 0.6);
    position: relative;
}

.modal_text, .modal_title {
    margin: 0 20px 15px;
}

.modal_img {
    width: 100%;
    height: fit-content;
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);

    img {
        width: 100%;
        height: 100%;
    }
}

.modal_gallery {
    align-self: center;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding-bottom: 30px;
    gap: 10px;
    width: 95%;

    img {
        max-width: 49%;
    }
}

body.modal_open {
    overflow: hidden;
}

.modal_close {
    color: var(--text);
    font-size: var(--size_section-titles);
    font-weight: bold;
    position: absolute;
    top: 5px;
    right: 30px;
    cursor: pointer;
    z-index: 105;
}

.modal_close:hover, .modal_close:focus {
    color: gray;
    text-decoration: none;
    cursor: pointer;
}

.projects {
    padding-top: 100px;

    h1 {
        margin-bottom: 50px
    }
}

.project_category {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    gap: 20px;
    max-width: 1200px;
    margin: 30px auto 0;
}

.project {
    width: 300px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    border-color: var(--lighter_background);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 30%, transparent), inset 6em 3.5em 0 0 var(--lighter_background);
}

.modal {
    height: 100%;
    background-color: var(--lighter_background);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    img {
        max-height: 500px;
        width: 100%;
    }
}

.project_name, .project_text {
    padding: 0 15px;
    margin: 10px 0;
}

.modal_link {
    padding-top: 10px;

    svg {
        margin: 0 0 10px 15px;
        width: 30px;
        height: 30px;
        z-index: 999;

        path {
            fill: var(--light);
        }
    }
}

.project:hover {
    background-color: var(--lighter_background);
    border: 2px solid var(--primary);
    transition: all 300ms ease;
    box-shadow: 0.3em 0.3em 0 0 color-mix(in srgb, var(--primary) 30%, transparent), inset 0 0 0 0 var(--lighter_background);
}

.project_icon {
    border-radius: 10px 10px 0 0;
}