/****    CHESLEYSMITH.STUDIO STYLES.CSS    ****/

* {
    padding: 0;
    margin: 0;
}

body {
    font-family: 'Fauna One', serif;
    font-size: 20px;
}

li {
    list-style: none;
}

a {
    color: white;
    text-decoration: none;
}

a:hover,
a:focus {
    color: white;
    text-decoration: none;
}

h1 {
    color: white;
    text-align: center;
    margin-top: 4%;
    font-size: 412.5%;
}

h1>small {
    display: block;
    color: white;
}

h2 {
    font-size: 245%;
    margin-top: 140px;
}

h2:after {
    display: block;
    margin: 42px 0;
    content: "";
}

h3 {
    font-weight: bold;
}

h4 {
    font-size: 92%;
}

h6 {
    color: #F0F0F0;
}

h1 .logo {
    font-size: 230%;
    font-family: 'Brush Script MT', cursive;
    font-weight: normal;
    line-height: 1em;
    font-size: 3em;
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
    width: 200px;
    margin-left: -20px;
}

@media (max-width: 500px) {
    h1 .logo {
        font-size: 130%;
    }
    #home nav a {
        padding: 10px;
    }
}

nav ul {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
}


/**************************************************/


/************    HOME PAGE STYLES    **************/


/**************************************************/

.container {
    margin: 0 5%;
}

.blue-border {
    border: 2px solid #114190;
}

.magenta-border {
    border: 2px solid #e11a61;
}

.purple-border {
    border: 2px solid #9d1098;
}

.red-border {
    border: 2px solid #9d102b;
}

.overflow {
    overflow: hidden;
}

#home {
    background: url("CS Guitar paper collage 9X11.jpg") no-repeat;
    width: 100%;
    background-size: cover;
}

#home nav {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    margin: 0 auto;
    width: 700px;
    padding-top: 60px;
}

#home nav ul {
    overflow: hidden;
}

#home nav ul li {
    width: 25%;
}

#home nav a {
    padding: 16px;
    padding-right: 30px;
    display: table-cell;
}

#home nav.fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    padding: 0;
    -webkit-transition: background-color .8s;
    transition: background-color .8s;
}

#home nav.fixed ul {
    max-width: 700px;
    margin: 0 auto;
}

#about::before {
    height: 0px;
    width: 0px;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-top: 30px solid #131c23;
    margin: 0 auto;
    content: "";
    display: block;
}


/************    SOCIAL MEDIA LINKS    ************/

.noir {
    display: block;
    background-color: black;
    padding: 18px;
    border: 3px solid white;
}

.social-links {
    overflow: hidden;
    padding-bottom: 10px;
    display: table;
    margin: 0 auto;
    margin-top: 90px;
}

.social-links li {
    display: inline-table;
    margin-right: 10px;
}

.twitter {
    border-color: #4A8D65;
}

.instagram {
    border-color: #FA393C;
}

.facebook {
    border-color: #f2853a;
}

.twitter:hover {
    background-color: #4A8D65;
    -webkit-transition: background-color .4s;
    transition: background-color .4s;
}

.instagram:hover {
    background-color: #FA393C;
    -webkit-transition: background-color .4s;
    transition: background-color .4s;
}

.facebook:hover {
    background-color: #f2853a;
    -webkit-transition: background-color .4s;
    transition: background-color .4s;
}


/***********************************************************/


/*********************    HOME ABOUT    ********************/


/***********************************************************/

#about .info {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
}

#about h2 {
    color: #0d2435;
}

#about h2::after {
    border-bottom: 2px solid #918D8D;
}

#about .info p {
    line-height: 270%;
}


/****************    SIGNATURE    ****************/

#about .signature {
    font-family: 'Brush Script MT', cursive;
    font-size: 150%;
    float: right;
    color: #0d2435;
    opacity: .9;
}


/***********************************************************/


/*********************    HOME LOVE    *********************/


/***********************************************************/

#what-i-like {
    margin-top: 80px;
    padding-bottom: 80px;
}

#what-i-like h3 {
    margin-top: 80px;
    padding-bottom: 50px;
}

#what-i-like ul {
    overflow: hidden;
}

#love01 {
    background-color: #fc413e;
}

#love02 {
    background-color: #F2853A;
}

#love03 {
    background-color: #4C8D66;
}

.love {
    color: white;
}

.love li {
    padding: 20px;
}


/***********************************************************/


/******************    SOME OF MY WORK    ******************/


/***********************************************************/

#features {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    background-color: #423a3a;
    padding-bottom: 20px;
    width: 100vw;
    height: auto;
}

#features h2 {
    color: #F0F0F0;
    margin-bottom: 140px;
}

#features h2:after {
    border-bottom: 2px solid #b4b4b4;
}

#features .row {
    margin: 0px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    padding: 0 60px;
}

#features .heading {
    color: #F0F0F0;
    padding: 15px;
    text-align: center;
    position: absolute;
    font-size: 18px;
    letter-spacing: 2px;
}

#features div section {
    cursor: pointer;
    height: auto;
    width: 100%;
}

#features div:nth-child(odd) section {
    background-color: #483F3F;
    padding: 5px;
    border: 3px solid #4D4343;
}

#features div:nth-child(even) section {
    background-color: #3D3636;
    padding: 10px;
    border: 3px solid #393333;
}

#features img {
    width: 100%;
}

#features section {
    height: 100%;
    margin-bottom: 20px;
}

#features .overlay {
    position: relative;
    padding-bottom: 0px;
    min-height: 550px;
    overflow: auto;
    background-color: rgba(7, 7, 7, .3);
}

#features .description h4 {
    color: white;
}

#features .heading {
    position: relative;
    margin: 0 auto;
}

#features section {
    width: 50%;
    float: left;
}

#features section:hover .overlay img {
    opacity: 0;
    -webkit-transition: opacity .32s;
    transition: opacity .32s;
}

#features section:hover .description {
    top: 140px;
    -webkit-transition: top .5s;
    transition: top .5s;
}

#features section:hover .overlay .heading span {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
    position: relative;
    top: -80px;
    left: -30px;
    color: rgba(4, 14, 22, .83);
    ;
}

#features section:hover .overlay .description>* {
    display: block;
}

#features section:hover .overlay .heading {
    position: absolute;
    top: -60px;
    -webkit-transition: top .9s;
    transition: top .9s;
}


/***************    BEAUTY QUOTE    ***************/

.beauty {
    margin-bottom: -140px;
    border-top: 6px solid #FCB42A;
    border-bottom: 6px solid #9d102b;
    padding-top: 105px;
    padding-bottom: 95px;
    padding-left: 75px;
    padding-right: 55px;
}

.beauty .signature {
    font-family: 'Brush Script MT', cursive;
    font-size: 150%;
    float: right;
    color: #0d2435;
    opacity: .9;
}


/***********************************************************/


/*******************   GLOBAL CONTACT     ******************/


/***********************************************************/

#contact {
    background-color: #5A6C61;
    ;
}

#contact .overlay {
    background: rgba(0, 0, 0, .068);
}

#contact h2 {
    color: white;
    padding-top: 15px;
}

#contact h2:after {
    border-bottom: 2px solid white;
}

#contact form {
    position: relative;
}

#contact .form-group label {
    display: block;
    color: white;
    font-weight: normal;
    margin: 15px;
}

#contact .form-group input,
#contact .form-group textarea {
    outline: none;
    border: 0;
    border-bottom: 6px solid #4a8d65;
    padding: 19px;
    background-color: #2b2b2b;
    color: white;
}

#contact .form-group input#nameTXT {
    width: 40%;
    border-bottom: 6px solid #4a8d65;
}

#contact .form-group input#emailTXT {
    width: 55%;
    border-bottom: 6px solid #FCB42A;
}

#contact .form-group input#subjectTXT {
    width: 40%;
    border-bottom: 6px solid #2F5662;
}

#contact .form-group #messageTXT {
    border-bottom: 6px solid #9d102b;
    resize: none;
    width: 50%;
}

#contact #submitBTN {
    color: white;
    border: none;
    font-family: 'Brush Script MT', cursive;
    font-size: 245%;
    margin-top: 10px;
    padding-bottom: 40px;
    -webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 75%, 75% 75%, 75% 100%, 50% 75%, 0% 75%);
    clip-path: polygon(0% 0%, 100% 0%, 100% 75%, 75% 75%, 75% 100%, 50% 75%, 0% 75%);
}

#contact #submitBTN:hover {
    background-color: white;
    color: black;
    -webkit-transition: background-color .4s;
    transition: background-color .4s;
    -webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 75%, 75% 75%, 75% 100%, 50% 75%, 0% 75%);
    clip-path: polygon(0% 0%, 100% 0%, 100% 75%, 75% 75%, 75% 100%, 50% 75%, 0% 75%);
}

#contact .social-links li {
    margin-bottom: 20px;
}


/***********************************************************/


/*******************   GLOBAL FOOTER     *******************/


/***********************************************************/

footer {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    background-color: #2E2929;
    padding-top: 2%;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    border-top: 6px solid #FCB42A;
}

footer p {
    color: white;
    padding-bottom: 20px;
}


/***********************************************************/


/*******************    HOME MEDIA QUERY    ****************/


/*******************         LAPTOP         ****************/


/***********************************************************/

@media screen and (max-width: 1200px) {
    #features [class^="col"] section {
        width: 80%;
        margin-right: auto;
        margin-left: auto;
        margin-bottom: 10px;
        min-height: 400px;
    }
    #features .overlay {
        width: 100%;
        height: auto;
    }
    #features img {
        width: 100%;
        height: auto;
    }
    #features section:hover .overlay .heading span {
        -webkit-transform: rotate(90deg);
        transform: rotate(90deg);
        top: 70px;
        left: -240px;
        position: relative;
    }
}


/***********************************************************/


/*******************    HOME MEDIA QUERY    ****************/


/*******************         TABLET         ****************/


/***********************************************************/

@media screen and (max-width: 790px) {
    body {
        font-size: 18px;
        text-align: center;
    }
    h2 {
        margin-top: 80px;
    }
    input {
        text-align: center;
    }
    #about img {
        display: block;
        margin: 0 auto;
        width: 30%;
    }
    #about .info {
        -webkit-box-orient: vertical;
        -webkit-box-direction: reverse;
        -ms-flex-direction: column-reverse;
        flex-direction: column-reverse;
    }
    #skill-set .skills {
        margin-top: 20px;
    }
    form {
        text-align: left;
    }
    #features .description p {
        margin-top: 40px;
    }
    #features section {
        font-size: 10px;
    }
    #features .overlay>* {
        font-size: 200%;
    }
    #features p,
    h6 {
        text-align: left;
    }
    #contact textarea {
        width: 90%;
    }
}


/***********************************************************/


/*******************    HOME MEDIA QUERY    ****************/


/*******************         PHONE         ****************/


/***********************************************************/

@media screen and (max-width: 570px) {
    #home nav {
        width: inherit;
    }
    #about .signature {
        float: none;
    }
    #features h2 {
        margin-bottom: 0;
    }
    #features section img {
        width: 100%;
    }
}

#features .description>* {
    display: block;
}

#features .description {
    display: table-footer-group;
}

#features .heading {
    display: table-header-group;
    font-size: 180%;
    text-align: left;
}

#features .overlay {
    min-height: auto;
    padding: 20px;
}

#features .description {
    top: 100px;
    position: static;
}

#features section {
    min-height: auto;
}

#features section:hover .overlay .heading {
    position: relative;
    top: -0px;
    color: white;
    -webkit-transition: none;
    transition: none;
}

#features .heading span {
    display: none;
}


/***********************************************************/


/*********************    MEDIA QUERY    *******************/


/***********************************************************/

@media screen and (max-width: 480px) {
    .social-links li {
        display: block;
        width: 100%;
    }
    .social-links {
        width: 100%;
    }
    h1 {
        font-size: 300%;
    }
    #about img {
        width: 60%;
    }
    #skill-set #web-development-skills::before {
        display: none;
    }
    #skill-set .skills {
        width: 100%;
        display: block;
    }
    #features .overlay {
        height: 70%;
    }
}


/***********************************************************/


/********************    LIGHT BOX    *********************/


/***********************************************************/

.short-animate {
    -webkit-transition: .5s ease-in-out;
    transition: .5s ease-in-out;
}

.long-animate {
    -webkit-transition: .5s .5s ease-in-out;
    transition: .5s .5s ease-in-out;
}

.lightbox {
    position: fixed;
    top: -100%;
    bottom: 100%;
    left: 0;
    right: 0;
    background: rgba(14, 16, 21, 1);
    z-index: 501;
    opacity: 0;
}

.lightbox img {
    position: absolute;
    margin: auto;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto !important;
    /* set to anything and aspect ratio is maintained - also corrects glitch in Internet Explorer */
    height: auto !important;
    /* set to anything and aspect ratio is maintained */
    max-height: 100vh !important;
}

#lightbox-controls {
    position: fixed;
    height: 70px;
    width: 70px;
    top: -90px;
    right: 0;
    z-index: 502;
    background: rgba(0, 0, 0, 0);
}

#close-lightbox {
    display: block;
    position: absolute;
    overflow: hidden;
    height: 50px;
    width: 50px;
    text-indent: -5000px;
    right: 10px;
    top: 10px;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
}

#close-lightbox:before {
    content: '';
    display: block;
    position: absolute;
    height: 0px;
    width: 3px;
    left: 24px;
    top: 0;
    background: white;
    border-radius: 2px;
    -webkit-transition: .5s .5s ease-in-out;
    transition: .5s .5s ease-in-out;
}

#close-lightbox:after {
    content: '';
    display: block;
    position: absolute;
    width: 0px;
    height: 3px;
    top: 24px;
    left: 0;
    background: white;
    border-radius: 2px;
    -webkit-transition: .5s 1s ease-in-out;
    transition: .5s 1s ease-in-out;
}

.lightbox:target {
    top: 0%;
    bottom: 0%;
    opacity: 1;
}

.lightbox:target img {
    max-width: 100%;
    max-height: 100%;
}

.lightbox:target~#lightbox-controls {
    top: 0px;
}

.lightbox:target~#lightbox-controls #close-lightbox:after {
    width: 50px;
}

.lightbox:target~#lightbox-controls #close-lightbox:before {
    height: 50px;
}


/***********************************************************/


/******************    BIOGRAPHY PAGE    *******************/


/******************     ACCESABILITY    ********************/


/********    TEXT MEANT ONLY FOR SCREEN READERS    *********/

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

.screen-reader-text:hover,
.screen-reader-text:active,
.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    -webkit-box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
    /* Above WP toolbar */
}


/***********************************************************/


/******************    BIOGRAPHY PAGE    *******************/


/***********************************************************/

.content-title {
    text-align: center;
}

.splash {
    background: #FFF6E5;
}

.splash-content {
    padding: 1.5em;
}

@media screen and (min-width: 600px) {
    .splash-text {
        -webkit-columns: 2;
        columns: 2;
        -webkit-column-gap: 2em;
        column-gap: 2em;
    }
    .splash-text p {
        padding-top: 0;
    }
}


/* Buckets section */

@media screen and (max-width: 1110px) {
    .splash {
        padding: 0 auto;
    }
    .buckets {
        display: none;
    }
    .sidebar {
        display: none;
    }
}

.buckets {
    padding: 2em 1em;
    background: #3E454C;
    margin: auto;
}

.buckets img {
    margin: auto;
}


/**.buckets ul {
    margin: 0;
    padding: 0;
}

.buckets li {
    margin-bottom: 1em;
    list-style-type: none;
}

.bucket {
    padding: 1.5em;
}


/* More section */

.more {
    padding: 2em;
}

.more-content {
    text-align: center;
}


/* Twins section */

.sidebar {
    background: hsl(0, 0%, 90%);
}

.twin {
    padding: 2em;
    background: #FA393C;
    color: white;
}

.twin:last-of-type {
    background: #5A6C61;
}

.content-title {
    padding: .5em;
}


/* Colophon section */


/***********************************************************/


/*********************    MEDIA QUERY    *******************/


/***********************************************************/

@media screen and (min-width: 700px) {
    @supports ((display: -webkit-box) or (display: flex)) {
        .buckets ul {
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -ms-flex-pack: distribute;
            justify-content: space-around;
        }
        .buckets li {
            width: 48%;
        }
    }
}


/***********************************************************/


/*********************    MEDIA QUERY    *******************/


/***********************************************************/

.site {
    max-width: 50em;
    margin: 0 auto;
}


/***********************************************************/


/*********************    MEDIA QUERY    *******************/


/***********************************************************/

@supports (grid-area: auto) {
    @media screen and (min-width: 50em) {
        .site {
            max-width: none;
            display: grid;
            grid-template-columns: 15em auto;
        }
        .masthead {
            grid-column: 1/3;
        }
        .main-area {
            grid-column: 2/3;
        }
        .sidebar {
            grid-column: 1/2;
            grid-row: 2/4;
        }
        .colophon {
            grid-column: 1/3;
        }
    }
    /***********************************************************/
    /*********************    MEDIA QUERY    *******************/
    /***********************************************************/
    @media screen and (min-width: 65em) {
        .site {
            grid-template-columns: 15em auto 15em;
        }
        .masthead {
            grid-column: 1/4;
        }
        .sidebar {
            display: inherit;
            grid-template-columns: inherit;
            grid-column: 1/4;
            grid-row: 2/3;
        }
        .twin:last-of-type {
            grid-column: 3/4;
        }
        .main-area {
            grid-row: 2;
            z-index: 1;
        }
        .colophon {
            grid-column: 1/4;
        }
    }
}


/***********************************************************/


/*********************    PORTFOLIO PAGE  ******************/


/***********************************************************/

.grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.167fr 0.45fr .225fr 0.3fr 0.8fr;
    grid-template-rows: 0.44fr 0.1875fr 0.4fr .9fr;
    grid-gap: .5em;
    margin-bottom: -7em;
    background-color: #090603;
    border-top: .5em solid #090603;
    border-bottom: .5em solid #090603;
}

.grid figure {
    overflow: hidden;
    background: var(--main-color);
    position: relative;
    opacity: 0;
    -webkit-transition: .2s;
    transition: .2s;
    /* Fix for Safari 10 */
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
}

.grid figure img {
    vertical-align: middle;
    height: auto;
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    -webkit-transition: .2s;
    transition: .2s;
    will-change: transform;
    -webkit-clip-path: polygon( var(--border-width) var(--border-width), calc(100% - var(--border-width)) var(--border-width), calc(100% - var(--border-width)) calc(100% - var(--border-width)), var(--border-width) calc(100% - var(--border-width)));
    clip-path: polygon( var(--border-width) var(--border-width), calc(100% - var(--border-width)) var(--border-width), calc(100% - var(--border-width)) calc(100% - var(--border-width)), var(--border-width) calc(100% - var(--border-width)));
    /* Fix for Safari 10 */
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
}

.grid figure:nth-child(1) {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 66%, 0% 85%);
    clip-path: polygon(0 0, 100% 0, 100% 66%, 0% 85%);
}

.grid figure:nth-child(1) img {
    -webkit-clip-path: polygon( var(--border-width) var(--border-width), calc(100% - var(--border-width)) var(--border-width), calc(100% - var(--border-width)) calc(66% - var(--border-width)), var(--border-width) calc(85% - var(--border-width)));
    clip-path: polygon( var(--border-width) var(--border-width), calc(100% - var(--border-width)) var(--border-width), calc(100% - var(--border-width)) calc(66% - var(--border-width)), var(--border-width) calc(85% - var(--border-width)));
    /*min-height: 30.5vw;*/
}

.grid figure:nth-child(2) {
    grid-column: 2 / 4;
    grid-row: 1 / 3;
}

.grid figure:nth-child(3) {
    grid-column: 4 / 6;
    grid-row: 1 / 2;
}

.grid figure:nth-child(4) {
    grid-column: 1 / 2;
    grid-row: 2 / 4;
    -webkit-clip-path: polygon(0 22%, 100% 4px, 100% 100%, 0% 100%);
    clip-path: polygon(0 22%, 100% 4px, 100% 100%, 0% 100%);
}

.grid figure:nth-child(4) img {
    -webkit-clip-path: polygon( var(--border-width) calc(22% + var(--border-width)), calc(100% - var(--border-width)) 7px, calc(100% - var(--border-width)) calc(100% - var(--border-width)), var(--border-width) calc(100% - var(--border-width)));
    clip-path: polygon( var(--border-width) calc(22% + var(--border-width)), calc(100% - var(--border-width)) 7px, calc(100% - var(--border-width)) calc(100% - var(--border-width)), var(--border-width) calc(100% - var(--border-width)));
}

.grid figure:nth-child(5) {
    grid-column: 2 / 4;
    grid-row: 3 / 4;
}

.grid figure:nth-child(6) {
    grid-column: 4 / 6;
    grid-row: 2 / 4;
}

.grid figure:nth-child(7) {
    grid-column: 1 / 2;
    grid-row: 4 / 5;
}

.grid figure:nth-child(8) {
    grid-column: 2 / 3;
    grid-row: 4 / 5;
    -webkit-clip-path: polygon( 0 0, 100% 0, 88% 100%, 0% 100%);
    clip-path: polygon( 0 0, 100% 0, 88% 100%, 0% 100%);
    width: 115%;
    width: calc(100% + var(--gutter));
}

.grid figure:nth-child(8) img {
    -webkit-clip-path: polygon( var(--border-width) var(--border-width), calc(100% - var(--border-width)) var(--border-width), calc(88% - var(--border-width)) calc(100% - var(--border-width)), var(--border-width) calc(100% - var(--border-width)));
    clip-path: polygon( var(--border-width) var(--border-width), calc(100% - var(--border-width)) var(--border-width), calc(88% - var(--border-width)) calc(100% - var(--border-width)), var(--border-width) calc(100% - var(--border-width)));
}

.grid figure:nth-child(9) {
    grid-column: 3 / 5;
    grid-row: 4 / 5;
    -webkit-clip-path: polygon(12% 0, 100% 0, 100% 100%, 0% 100%);
    clip-path: polygon(12% 0, 100% 0, 100% 100%, 0% 100%);
}

.grid figure:nth-child(9) img {
    -webkit-clip-path: polygon( calc(12% + var(--border-width)) var(--border-width), calc(100% - var(--border-width)) var(--border-width), calc(100% - var(--border-width)) calc(100% - var(--border-width)), var(--border-width) calc(100% - var(--border-width)));
    clip-path: polygon( calc(12% + var(--border-width)) var(--border-width), calc(100% - var(--border-width)) var(--border-width), calc(100% - var(--border-width)) calc(100% - var(--border-width)), var(--border-width) calc(100% - var(--border-width)));
}


/* =======
  CAPTION
  ======= */

.grid figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 2;
}

.grid figure:nth-child(1) figcaption {
    bottom: 15%;
    height: 17%;
    text-align: left;
    padding-left: 5%;
}

.grid figcaption h3 {
    font-weight: 700;
    color: #fdfdfd;
    margin-left: 10px;
    font-size: calc(.5em + 1.7vw);
    line-height: 1;
}


/* Caption effect */

figure:hover figcaption span {
    -webkit-transform: none;
    transform: none;
}

figure:hover figcaption:before,
figure:hover figcaption:after {
    -webkit-transform: scaleY(1);
    transform: scaleY(1);
}

figcaption:before,
figcaption:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(140, 19, 18, 0.4);
    height: 150%;
    -webkit-transition: .3s;
    transition: .3s;
    -webkit-transform: scaleY(0);
    transform: scaleY(0);
    -webkit-transform-origin: bottom;
    transform-origin: bottom;
    z-index: -1;
}

figcaption:before {
    -webkit-clip-path: polygon(0% 0%, 100% 15%, 100% 100%, 0% 100%);
    clip-path: polygon(0% 0%, 100% 15%, 100% 100%, 0% 100%);
}

figcaption:after {
    height: 120%;
    background: rgba(140, 19, 18, 0.5);
    -webkit-clip-path: polygon(0% 15%, 100% 0%, 100% 100%, 0% 100%);
    clip-path: polygon(0% 15%, 100% 0%, 100% 100%, 0% 100%);
}

figcaption span {
    margin: 0;
    -webkit-transition: .3s transform;
    transition: .3s transform;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

figcaption>span {
    overflow: hidden;
    display: inline-block;
    -webkit-transform: translateY(100%);
    transform: translateY(100%);
}

figcaption>span span {
    -webkit-transform: translateY(-100%);
    transform: translateY(-100%);
    display: inline-block;
}


/* writing-mode doesn't rotate the copyright symbol */

.copyright:before {
    content: '\00a9';
    display: inline-block;
    -webkit-transform: rotate(90deg);
    transform: rotate(90deg);
}


/***********************************************************/


/*********************    MEDIA QUERY    *******************/


/***********************************************************/

@media (max-width: 800px) {
    .grid figure:nth-child(1) figcaption {
        padding-left: 0;
        height: 40px;
    }
}


/***********************************************************/


/*********************    MEDIA QUERY    *******************/


/***********************************************************/

@media (max-width: 600px) {
    .grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 200px;
        grid-auto-rows: 200px;
        margin-bottom: -5em;
    }
    .grid figure {
        grid-column: auto!important;
        grid-row: auto!important;
    }
    .grid figure {
        -webkit-clip-path: unset!important;
        clip-path: unset!important;
    }
    .grid figure:nth-child(2),
    .grid figure:nth-child(8),
    .grid figure:nth-child(9),
    .grid figure:nth-child(10) {
        grid-row: auto / span 2 !important;
        width: auto;
    }
}


/***********************************************************/


/*********************    MEDIA QUERY    *******************/


/***********************************************************/

@media (max-width: 420px) {
    .grid {
        grid-template-columns: 1fr;
    }
    .grid figure {
        grid-column-end: span 1!important;
        grid-row: auto!important;
    }
}


}