/* Global rules */

@import url('https://fonts.googleapis.com/css2?family=Prata&family=Quicksand:wght@300..700&display=swapa');

@keyframes fade-in {
  from {background-color: rgba(255, 255, 255, 0);}
  to {background-color: rgba(255, 255, 255, 0.8);}
}


html {
    background-color: lightgray;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95em;
    line-height: 1.5em;
    background-image: url("../images/background.jpg");
    background-repeat: repeat;
    background-size: 2000px 1200px;
}

body{
    margin:0; /* removes gap at top of page */
    text-wrap: pretty;
}

::selection {
    color: #fff; 
    background: #403a48;
}

h1 {
    font-weight: normal;
    margin: auto;
    background: #fff;
    line-height: 2.5em;
    color: #3c3643;
}
/*
 The border radius on h1.page-header and main.wrapper provide the 
 curved corners that appear on the body area of the page
*/
.page-header{
    font-family: 'Prata',serif;
    -webkit-border-top-left-radius: 5px;
    -webkit-border-top-right-radius: 5px;
    -moz-border-radius-topleft: 5px;
    -moz-border-radius-topright: 5px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
 }
 

 main.wrapper {
    background-color: white;
    overflow: auto;
    -moz-border-radius-bottomleft: 5px;
    -moz-border-radius-bottomright: 5px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
 }
 
.portfolio {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

figure {
    display: grid;
    grid-template-columns: 1fr;
}

figure img{
    grid-column: 1;
    grid-row: 1;
    margin: auto;
    width: 50%;
    height: auto;
}

figure figcaption {
    margin: auto;
    grid-column: 1;
    grid-row: 1;
    display: none;
    max-width: 10em;
    height: auto;
    animation-name: fade-in;
    animation-duration: 0.5s;
    animation-fill-mode: forwards;
    box-sizing: border-box;
    padding: 0.3em;
}

figure:hover figcaption {
    display: grid;
}

p {
    margin: 1em; /* Top Right Bottom Left (TRBL) */
}

h2,h3 {
    font-weight: normal;
    margin-left: 1em;
    line-height: 1em;
}

a {
    color:#BE5637;
}

a:hover {
    color: whitesmoke;
    background-color: #938698;
}

footer {
    clear: both;
    text-align: center;
    padding: 1em;
}

/* Responsive rules */

/* DESKTOP */
@media all and (min-width:1200px) {
    main.wrapper {
        width: 80%;
        margin: auto;
    }
    
    h1 {
        width: 79%;
        padding-left: 1%;
    }
    
    picture.profile img {
        width: 50%;
        float: left;
        margin-right: 2em;
    }
    
}

/* TABLET */
@media all and (min-width:501px) and (max-width:1199px) {
    main.wrapper {
        width: 90%;
        margin: auto;
    }
    
    h1 {
        width: 89%;
        padding-left: 1%;
    }
    
    picture.profile img {
        width: 50%;
        float: right;
        margin-left: 1em;
    }

}

/* PHONE */
@media all and (max-width:500px) {
    main.wrapper {
        width: 100%;
    }
    
    h1 {
        width: 99%;
        padding-left: 1%;
    }
    
    picture.profile img {
        width: 100%;
    }
    
}
