/*--------------------------------------------------------------
# Components — Works Listing Page
--------------------------------------------------------------*/

main.works {
    padding-top: 300px;
    padding-bottom: 300px;
    background-size: cover;
}

main.works #background-works {
    position: fixed;
    top: 0;
    height: 100vh;
    width: 100vw;
}

main.works #myworks {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    margin: auto;
    z-index: 100;
}

main.works #works_filter {
    position: absolute;
    top: 282px;
    left: 50%;
    -webkit-transform: translate(calc(-50% - 8px));
    transform: translate(calc(-50% - 8px));
    width: calc(80% - 8px);
    margin: auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

@media (max-width: 2100px) {
    main.works #works_filter {
        width: calc(85% - 8px);
    }
}

@media (max-width: 1000px) {
    main.works #works_filter {
        width: calc(90% - 8px);
    }
}

/* Work grid */
.work_grid_title {
    background-color: white;
    padding: 10px 50px;
    font-weight: 900;
    font-size: 40px;
    width: 80%;
}

main.works .work_grid_title {
    background-color: white;
    padding: 10px 50px;
    width: 1200px;
    font-weight: 900;
    font-size: 40px;
    width: 80%;
}

@media (max-width: 2100px) {
    main.works .work_grid_title {
    	width: 85%;
    }
}

@media (max-width: 1000px) {
    main.works .work_grid_title {
        display: none;
    }
}

main.works .work_grid {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    margin-top: 140px;
    position: relative;
    -webkit-transition: .25s ease;
    transition: .25s ease;
}

main.works .work_grid.corporate_identity .row { background-color: #FCF6B0; }
main.works .work_grid.graphic_design      .row { background-color: #A2B6D2; }
main.works .work_grid.illustration        .row { background-color: #F4CAB0; }

main.works .work_grid.corporate_identity .row:hover { background-color: #FFF184; }
main.works .work_grid.graphic_design     .row:hover { background-color: #6B97D2; }
main.works .work_grid.illustration       .row:hover { background-color: #F8AD81; }

main.works .work_grid a {
    width: 80%;
}

@media (max-width: 2100px) {
    main.works .work_grid a {
   	width: 85%;
    }
}

@media (max-width: 1000px) {
    main.works .work_grid a {
        width: 90%;
    }
}

main.works .work_grid a.row-wrapper {
    position: relative;
}

/* Row layout */
main.works a.row-wrapper .row {
    display: grid;
    grid-template-areas: "skills title year";
    grid-template-columns: 70% 20% 10%;
	transition: all 3s ;
    padding: 20px 40px 30px 40px;
}

@media (max-width: 1200px) {
    main.works a.row-wrapper .row {
        grid-template-areas: "title year" "preview preview" "skills skills";
        grid-template-columns: 70% 30%;
        grid-template-rows: 60px 1fr 60px;
        padding: 10px 15px 5px 15px;
    }
}

main.works .row:hover {
    background-color: white;
    width: 100%;
    -webkit-transition: 0.35s linear;
    transition: 0.35s linear;
    position: relative;
    padding: 20px 40px;
}

main.works .row:hover div {
    margin-top: 13px;
    -webkit-transform: scale(0.95);
    transform: scale(0.95);
}

/* Remove duplicate top border */
main.works .work_grid a:not(:nth-of-type(1)) .row.bordered {
    border-top: 0;
}

main.works .work_grid .work_grid_title + a .row.bordered {
    border-top: 0;
}

@media (max-width: 1000px) {
    main.works .work_grid a:not(:nth-of-type(1)) .row.bordered,
    main.works .work_grid .work_grid_title + a .row.bordered {
        border-top: 1px solid black;
    }
}

/* Skill chips in rows */
main.works .skills {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-pack: start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    grid-area: skills;
}

@media (max-width: 1000px) {
    main.works .skills {
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    }
}

main.works .skills .skill:nth-child(1) {
    margin-left: 0;
}

main.works .row .skill {
    -webkit-transition: 0.35s linear;
    transition: 0.35s linear;
}

main.works .row:hover .skill {
    color: white;
    background-color: black;
    -webkit-box-shadow: none;
    box-shadow: none;
}

/* Row columns */
main.works .row .title {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    font-weight: 700;
    -ms-grid-column-align: right;
    justify-self: left;
    grid-area: title;
}

@media (max-width: 1000px) {
    main.works .row .title {
        -ms-grid-column-align: left;
        justify-self: left;
    }
}

main.works .row .year {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    font-weight: 700;
    -ms-grid-column-align: right;
    justify-self: right;
    grid-area: year;
}

/* Preview image */
main.works a .preview {
    position: absolute;
    display: none;
    top: 0;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    height: auto;
    z-index: 100;
    -webkit-transform: scale(0.6);
    transform: scale(0.6);
    grid-area: preview;
    max-width: 40%;
}

main.works a:hover .preview {
    display: block;
    z-index: 100;
    -webkit-transform: scaleZ(1.5);
    transform: scaleZ(1.5);
}

@media (max-width: 1200px) {
    main.works a .preview {
        display: block;
        position: static;
        -webkit-transform: unset;
        transform: unset;
	transition: 2s;
        width: 100%;
	max-width: unset;
	max-height: 2000px;
	height: 100%;
    }
}

/* Project link */
main.works a.project-link {
    position: absolute;
    top: 50%;
    right: 5px;
    grid-area: link;
}

/* Row checkbox (mobile expand) */
main.works .work_grid a.row-wrapper input.row-checkbox {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    opacity: 0;
}

@media (min-width: 1200px) {
    main.works .work_grid a.row-wrapper input.row-checkbox {
        display: none;
    }
}

@media (max-width: 1200px) {
    main.works .work_grid a.row-wrapper input.row-checkbox:not(:checked) + .row {
      grid-template-rows: 60px 0 60px;
    }
    
    main.works .work_grid a.row-wrapper input.row-checkbox:not(:checked) + .row div.skills {
    //    height: 0;
     //   overflow: hidden;
    }

    main.works .work_grid a.row-wrapper input.row-checkbox:not(:checked) + .row img.preview {
        height: 0;
    }
}

/* Row link visibility */
main.works a.row-wrapper .link {
    position: absolute;
    top: 50%;
    z-index: 250;
    right: 0;
}

main.works a.row-wrapper .link:has(+ .row-checkbox:not(:checked)) {
    display: none;
}

/* Radio picker filter tabs */
radio-picker input {
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

radio-picker label:has(> input:checked) {
    background-color: white;
}

radio-picker label:has(> input#corporate_tab:checked),
radio-picker label:has(> input#corporate_tab:hover) {
    background-color: #FCF6B0;
}

radio-picker label:has(> input#graphic_tab:checked),
radio-picker label:has(> input#graphic_tab:hover) {
    background-color: #A2B6D2;
}

radio-picker label:has(> input#illustration_tab:checked),
radio-picker label:has(> input#illustration_tab:hover) {
    background-color: #F4CAB0;
}

radio-picker:has(input#all_tab:checked) ~ .work_grid {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

radio-picker:has(input#corporate_tab:checked) ~ .work_grid#graphic_design,
radio-picker:has(input#corporate_tab:checked) ~ .work_grid#illustration {
    display: none;
}

radio-picker:has(input#corporate_tab:checked) ~ .work_grid#corporate_identity {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

radio-picker:has(input#graphic_tab:checked) ~ .work_grid#graphic_design {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

radio-picker:has(input#graphic_tab:checked) ~ .work_grid#illustration,
radio-picker:has(input#graphic_tab:checked) ~ .work_grid#corporate_identity {
    display: none;
}

radio-picker:has(input#illustration_tab:checked) ~ .work_grid#illustration {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

radio-picker:has(input#illustration_tab:checked) ~ .work_grid#graphic_design,
radio-picker:has(input#illustration_tab:checked) ~ .work_grid#corporate_identity {
    display: none;
}
