/* Statement Fonts */
@font-face {
    font-family: "open-sauce-bold";
    src: url('../fonts/OpenSauceOne-Bold.ttf');
    font-style: normal;
}

@font-face {
    font-family: "open-sauce-light";
    src: url('../fonts/OpenSauceOne-Light.ttf');
    font-style: normal;
}

/* source: https://www.dafont.com/gentium.font?text=Home&l[]=10&l[]=1&back=theme */
@font-face {
    font-family: "gentium";
    src: url('../fonts/gentium-regular.TTF');
    font-style: normal;
}

/* Universal settings */
* {
    font-family: "open-sauce-light";
    font-size: 16px;
    color: #232321;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#wrapper {
    max-width: 1600px;
    min-height: 100vh;
    margin: 0 auto;
    /*main grid - px sizing*/
    display: grid;
    padding: 0 4%;
    grid-template-areas: 
        "banner"
        "navbar"
        "content"
        "footer";
    grid-template-columns: 1fr;
    grid-template-rows: 140px 55px minmax(500px, auto) minmax(250px, auto); 
    background-color: #f4f6fc;
    box-sizing: border-box;
}

body {
    background-color: #f4f6fc;
}

/* Selection-pseudo source: https://www.w3schools.com/cssref/sel_selection.php */
::selection {
  background-color: #b5d33f; 
  color: #5d3fd3;
}

/* Selects [h1-h3] pseudo code-reference: https://developer.mozilla.org/en-US/docs/Web/CSS/:is */
:is(h1,h2,h3,h4) {
    font-family: "gentium";
    color: #5d3fd3;
}

h1 {
    font-family: "gentium";
    font-size: 3em;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2%;
}

p, a{
    font-family: "open-sauce-light";
    font-size: 14px;
}

header {
    grid-area: banner;
    position: sticky;
    top: 0;                             /* Becomes sticky at the very top */
    width: 100%;
    background-color: #f4f6fc;
    padding: 2%;
    place-items:  center;
}

header a, header a img {
    display:block;
    text-align: center;
    height:100px;
    width:100px;
}

/* -------------------------------------------------------- navigation-bar ------------------------------------------------------------*/
/* ------- Flex-NavBar source: Pat's DLD class session 4 ------- */
nav{
	grid-area: navbar;
    position: sticky;
    z-index: 9999;
    top: 140px;                             /* The element becomes sticky when it touches the header */
    width: 100%;
    padding: 1% 0;
    width: 100%;
    background-color: #f4f6fc;
    box-shadow: 0 10px 6px -4px #b5d33f; /* green box shadow at the bottom */
}

nav ul{
	list-style: none;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	justify-content: space-around;
}

nav a{
	display: block;
    font-family: "gentium";
    font-weight: bold;
    font-size: 2rem;
	text-decoration: none;
    color: #5d3fd3;
}

nav a:hover{
	color: #b5d33f;
    transition: color 0.2s ease; 
    /*background: #b5d33f;*/
}

/* -------------------------------------------------------- homepage-main ------------------------------------------------------------*/
main#homepage {
    grid-area: content;
    min-height: 500px;
    text-align: left;
    margin: 2%;
    padding: 2%;
    background-image: url(../imgs/pattern03.png);
    background-repeat: repeat;
}

/* -------------------------------------------------------- skillspage-main ----------------------------------------------------------*/
main#skillspage {
    grid-area: content;
    padding: 2%;
    margin: 2%;
    background-image: url(../imgs/pattern03.png);
    background-repeat: repeat;
}

/* -------------------------------------------------------- projectspage-main ----------------------------------------------------------*/
main#projectspage {
    grid-area: content;
    padding: 2%;
    margin: 2%;
    background-image: url(../imgs/pattern03.png);
    background-repeat: repeat;
}

/* -------------------------------------------------------- freebiespage-main --------------------------------------------------------*/
main#freebiespage {
    grid-area: content;
    padding: 2%;
    margin: 2%;
    background-image: url(../imgs/pattern03.png);
    background-repeat: repeat;
}

/* -------------------------------------------------------- contactpage-main ----------------------------------------------------------*/
main#contactpage {
    grid-area:content;
    width: 100%;
    margin: 2% auto;
    padding: 2%;
    background-image: url(../imgs/pattern03.png);
    background-repeat: repeat;
}

/* -------------------------------------------------------- homepage-contents ----------------------------------------------------------*/
main#homepage  h1{
    font-family: "gentium";
    margin-top: 2%;
    font-size: 6rem;
    text-align: left;
    padding-left: 2%;
}

main#homepage article {
    max-width: 100%;
    min-height: 500px;
    margin: 3% auto 5% auto;
    padding: 0 2% 0 2%;
    
}

main#homepage article h2 {
    font-family: "gentium";
    margin: 2% 3%;
    font-size: 3em;
}

main#homepage article p.about-me{
    max-width: 650px;
    font-size: 1.5rem;
    margin-bottom: 4%;
    display: inline-block;
    vertical-align: top;
    
}

main#homepage article p.about-me::first-letter{
    font-size: 2em;
    color:#b5d33f;
    font-family: Georgia;
}

main#homepage article img.square {
    width: 300px;
    height: 300px;
    margin: 2% 0 2% 15%;
}

main#homepage section a{
    font-size: 1.5rem;
    margin: 5% 2% 5% 0;
    display: inline-block;
}

main#homepage section a:hover{
    color: #5d3fd3;
    background: #b5d33f;
    height: 70px;
}

main#homepage article#artworks {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    text-align: left;
    align-items: flex-start;
    max-width: 100%;
    min-height: 500px;
    gap: 0.5%;
    margin-bottom: 10%;
}

article#artworks h2 {
    flex-basis: 100%;
    text-align: center;
}

article#artworks section {
    margin-bottom: 3%;
    padding: 1% 2%;
}


section.portrait {
    width: 350px;
    height: 474px;
    margin-bottom: 5%;
}

section.landscape {
    width: 474px;
    height: 350px;
    margin-bottom: 5%;
}

section.landscape img {
    width: 424px;
    height: 300px;
    border-radius: 3px;
    box-shadow: 0 0 15px 1px #b5d33f;
}

section.portrait img {
    width: 300px;
    height: 424px;
    border-radius: 3px;
    box-shadow: 0 0 15px 1px #b5d33f;
}

section.portrait img:hover, section.landscape img:hover {
    box-shadow: 0 0 15px 1px #5d3fd3;
    transition: box-shadow 0.5s ease; 
}

#artworks section h3 {
    font-size: 1.25em;
    margin-left: 2.5%;
    margin-top: 4%;
}

#more-projects {
    width: 100%;
    height: 500px;
}

#more-projects h2 {

    margin: 2%;
    text-align: center;
}

#more-projects p {
    text-align: center;
    display: block;
    margin: 3% auto;
    max-width: 500px;
    font-size: 1em;
}

.explore-button {
  display: block;
  font-family: "gentium";
  width: 200px;
  height: 50px;
  text-align: center;
  font-weight: 600;
  font-size: 1.2em;
  color: #5d3fd3;
  text-decoration: none;
  box-shadow: 0 0 50px 10px #5d3fd3;
  background-color: #f4f6fc;
  border-radius: 5px;
  margin: 5% auto;
  padding: 15px;
}

.explore-button:hover{
	box-shadow: 0 0 50px 10px #b5d33f;
    background-color: #f4f6fc;
    color:#b5d33f;
    transition: box-shadow 0.5s ease; 
}

/* -------------------------------------------------------- skillspage-contents --------------------------------------------------------*/
main#skillspage h1 {
    padding-top: 2%;
    text-align: center;
}
main#skillspage article{
    width: 100%;    /* padding and margin is included in this width */
    display:flex;
    flex-direction: row;
    flex-wrap: wrap;
    text-align: left;
    margin: 2% auto 4% auto;
    gap: 1%;
}

main#skillspage article h2 {
    flex-basis: 100%;
    font-size: 1.5em;
    margin-bottom: 2.5%;
    text-align: center;
}

main#skillspage article section {
    width: 325px;
    min-height: 450px;
    padding: 2%;
    margin: 4% auto;
    box-shadow: 0 0 15px 1px #b5d33f;
    background-color: #f4f6fc;
}

main#skillspage article section:hover {
    box-shadow: 0 0 15px 1px #5d3fd3;
    transition: box-shadow 0.5s ease; 
}


main#skillspage section h3 {
    font-family: "gentium";
    font-size: 1.5em;
    text-align: center;
}

main#skillspage article section img {
    display: block;
    width: 200px;
    height: 200px;
    place-items: center;
    margin: 10% auto;
   
}

main#skillspage article section h4 {
    margin: 2% 0;
    font-size: 1.2em;
}

/* https://www.w3schools.com/cssref/pr_list-style-position.php */
main#skillspage section li {
    list-style: square inside;
    padding: 1% 0;
    font-size: 0.85em;
}

main#skillspage section p {
    padding: 4% 0;
    text-align: left;
}

/* -------------------------------------------------------- projectspage-contents ----------------------------------------------------------*/
main#projectspage h1{
    padding-top: 2%;
    text-align: center;
}

main#projectspage article {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1%;
    margin-bottom: 4%;
    width: 100%;
}

main#projectspage article h2 {
    font-family: "gentium";
    text-align: center;
    flex-basis: 100%;
    font-size: 1.5em;
    padding: 2% 0;
}

main#projectspage section {
    min-height: 338px;
    width: 600px;
    margin: 0 auto 4% auto;
    padding: 2%;
    box-shadow: 0 0 15px 5px #b5d33f;
    background-color: #f4f6fc;
}

main#projectspage section:hover {
    box-shadow: 0 0 15px 1px #5d3fd3;
    transition: box-shadow 0.5s ease; 
}

main#projectspage section h3{
    padding-bottom: 2%;
}

main#projectspage section img{
    width: 300px;
    height: 300px;
    margin-right: 4%;
    float: left;
}

main#projectspage section p{
    padding: 2% 0 2% 2%;
}

/* -------------------------------------------------------- freebiespage-contents --------------------------------------------------------*/

main#freebiespage h1 {
    margin: 2% 0;
    text-align: center;
}

article#download-products {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 2%;
    margin-bottom: 4%;
    width: 100%;
}

article#download-products h2 {
    flex-basis: 100%;
    font-size: 1.5em;
    text-align: center;

}

article#download-products section {
    min-height: 338px;
    width: 600px;
    padding: 2%;
    box-shadow: 0 0 15px 5px #b5d33f;
    background-color: #f4f6fc;
    margin: 2% auto;
}

article#download-products section:hover {
    box-shadow: 0 0 15px 1px #5d3fd3;
    transition: box-shadow 0.5s ease; 
}

article#download-products section img {
    width: 300px;
    height: 300px;
    display: block;
    float: left;
    margin-right: 4%;
}

article#download-products section p {
    padding: 2% 0 2% 2%;
}

article#download-products section a{
    margin: 3% 2% 2% 0;
}

/* -------------------------------------------------------- contactpage-contents ----------------------------------------------------------*/
/* ------- Form source: W3C Forms https://www.w3schools.com/css/css_form.asp ------- */

main#contactpage h1 {
    margin: 2% 0;
    text-align: center;
}

main#contactpage h2 {
    font-size: 1.5em;
    margin: 2% 0;
    text-align: center;
}

main#contactpage form {
    max-width: 600px;
    margin: 2% auto 1% auto;
    padding: 2%;	
}

main#contactpage form fieldset {
	display: flex;
	flex-direction: column;
    padding: 4%;
	width: 100%;
    min-width: 95%;
    padding: 4%;
    border: none;
    box-shadow: 0 0 15px 5px #b5d33f;
    background-color: #f4f6fc;
}

main#contactpage form fieldset legend{
    font-family: "gentium";
    font-weight: bold;
    color:#5d3fd3;
    background-color: #f4f6fc;
    box-shadow: 0 0 15px 5px #b5d33f;
    width: 200px;
    height: 45px;
    padding: 2% 4% 1% 4%;
    font-size: 1.4rem;
}

main#contactpage form fieldset p {
    margin: 1% 0;
}

label {
    display: block;
    font-family: "gentium";
    font-size: 1.5em;
    font-weight: 600;
	padding: 2% 1% 1% 1%;
    color:#5d3fd3;
    width: 100%;
}

label span.tooltip {
	display: inline-block; 
    vertical-align: top;
	visibility: hidden;
    font-family: "open-sauce-light";
    font-size: 0.5em;
	width: 250px;
	padding: 0.5em;
    margin-left: 2%;
	font-weight: normal;
	text-align: left;
	color: white;
	background-color: #88A61B;
	
}

label:hover span.tooltip {
    visibility: visible;
}

input, select{
    width: 100%;
    height: 30px;
	border: none; /* no border */
    outline: none; /* no outline */
    border-bottom: 1px solid black; /* solid black bottom border */
    margin-top: 2%;
    background-color: transparent; 
}

input:focus, select:focus {
    border-bottom: 1px solid #88A61B; /* solid black bottom border */
    color:#5d3fd3;
}

input#email {
    margin-bottom: 4%;
}

label#policy {
	display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    font-family: "open-sauce-light";
    justify-items: left;
    gap: 2%;
    font-size: 0.75em;
}

label#policy input#terms {
    height: 12px;
	width: 12px;
    margin: 0.65%;
    padding: 0;
}


textarea {
	width: 100%;
    height: 200px;
    padding: 1%; 
    margin-top: 2%;
	resize: none;
	overflow: scroll;
	overflow-x: hidden;
    background-color: #f5f5f5;
}

#submit{
	font-family: "gentium";
    font-size:1em;
    margin: 2%;
	width: 125px;
	height: 30px;
	
    color:#5d3fd3;
	text-align:center;
	line-height:20px;
    box-shadow: 0 0 15px 1px #5d3fd3;
    background-color: #f4f6fc;
	font-weight:bold;
    border-radius: 5px;
    border: none;
}

#submit:hover {
    box-shadow: 0 0 15px 1px #b5d33f;
    transition: box-shadow 0.5s ease; 
    color: #b5d33f;
}

label.error {
    color:#5d3fd3;
    font-size: 1.15em;
}

.error {
	color: #D92525;
    font-size: 0.8rem;
    font-weight: 600;
}

span.error{
	padding-left: 0;
}

label.success {
    color:#5d3fd3;
    font-size: 1.15em;
}

.success {
	color: green;
    font-size: 0.8rem;
    font-weight: 600;
}

span.success{
	padding-left: 0;
}

main#contactpage article {
    
    max-width: 545px;
    margin: 2% auto;
    padding: 1% 2%;
    text-align: left;
    margin-bottom: 5%;
    
}

main#contactpage article h2 {
    font-size: 1.5em;
    text-align: left;
    margin-bottom: 4%;
}

iframe {
    width: 100%;
    box-shadow: 0 0 15px 5px #b5d33f;
}

/* -------------------------------------------------------- footer ---------------------------------------------------------------------*/
footer {
    grid-area: footer;
    display: grid;
    grid-template-columns: 1fr 2fr;
    box-shadow: 0 -10px 3px -4px #b5d33f;
    padding: 4% 2%;
}

footer h3 {
    margin-bottom: 1%;
}

footer p {
    color: #5d3fd3;
    margin-bottom: 1%;
}

footer a {
    color: #5d3fd3;
    display: block;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1%;
}

footer a:hover {
    color: #b5d33f;
}

footer section#contact {
    text-align: left;
    min-height: 200px;
    min-width: 200px;
}

footer section#contact h4{
    margin-top: 2%;
}

footer section#contact ul {
    list-style-type: none;
    list-style-position: inside;
}

footer section#copyright {
    text-align: right;
}

footer section#copyright img{
    width: 200px; 
    height: 33px;
    margin-bottom: 3%;
}

/* -------------------------------------------------------- @media start  ------------------------------------------------------------------*/
/* ------------------------------------------------- For small phones to tablets -----------------------------------------------------------*/
@media screen and (max-width: 845px){
    #wrapper {
        grid-template-rows: 140px minmax(55px,auto) minmax(500px, auto) minmax(250px, auto); 
    }

    header {
        position: static;
        top: auto;
        display: block;
        padding: 2%;
        margin: 2% auto;
    }

    nav{
        position: static;
        top: auto;                         /* The element becomes sticky when it touches the header */
        background-color: #f4f6fc;
        box-shadow: 0 10px 6px -4px #b5d33f; /* green box shadow at the bottom */
        margin-bottom: 5%;
    }

    nav ul{
        flex-direction: column;
        flex-wrap: wrap;
        align-items: center;
	    padding-bottom: 2%;
    }
/* -------------------------------------------------------- #homepage content  -------------------------------------------------------------*/
    main#homepage  h1{
        margin-top: 2%;
        font-size: 4rem;
    }
    
    main#homepage article h2 {
        font-size: 1.75em;
        margin: 5% 0;
    }

    main#homepage article p.about-me{
        margin-bottom: 1%;
        display: inline-block;
        vertical-align: top;
        font-size: 1em;
    }

    main#homepage article img.square {
        display: block;
        margin: 15% auto 20% auto;
        width: 150px;
        height: 150px;
    }

    article#artworks {
        flex-direction: column;
    }

    article#artworks h2{
        text-align: center;
    }


    article#artworks section{
        padding: 8%;
    }

    section.portrait{
        width: 303px;
        height: 440px;
        
    }

    section.landscape{
        width: 303px;
        height: 267px;
    }

    section.portrait img {
        width: 250px;
        height: 350px;
        margin-bottom: 2%;
    }

    section.landscape img {
        width: 250px;
        height: 177px;
        margin-bottom: 2%;
    }

    article#artworks section h3 {
        font-size: 1.2em;
        margin-left: 2.5%;
        margin-bottom: 10%;
    }

    article#more-projects {
        width: 100%;
        min-height: 500px;
        margin: 10% auto;
    }

    article#more-projects h2 {
        margin: 20%;
    }

    article#more-projects p {
        text-align: center;
        max-width: 500px;
        font-size: 0.8em;
        margin-bottom: 10%;
    }

    .explore-button {
        width: 100px;
        height: 40px;
        font-size: 1em;
        padding: 10px;
    }

/* -------------------------------------------------------- #skillspage content  ----------------------------------------------------------*/
    main#skillspage article h2 {
        margin-bottom: 5%;
    }

    main#skillspage article{
        margin: 2% auto 15% auto;
    }

    main#skillspage article section {
        padding: 5% 10%;
        margin-bottom: 10%;
    }
    
/* -------------------------------------------------------- #projectspage content  ----------------------------------------------------------*/
    main#projectspage article h2 {
        padding: 2% 0 4% 0;
    }

    main#projectspage section {
        width: 350px;
        min-height: 500px;
        margin: 2% auto 15% auto;
        padding: 4%;
    }

    main#projectspage section img{
        margin-bottom: 4%;
        width: 300px;
        height: 300px;
        float: none;
    }

    main#projectspage section h3{
        padding-bottom: 2%;
    }

    main#projectspage section p{
        padding: 2% 0;
    }

/* -------------------------------------------------------- #freebiespage content  ----------------------------------------------------------*/
    article#download-products section {
        min-height: 500px;
        width: 350px;
        margin: 2% auto 15% auto;
        padding: 4.5%;
    }

    article#download-products section img {
        margin-bottom: 4%;
        float: none;
    }

    article#download-products section h3 {
        padding-bottom: 2%;
    }

    article#download-products section p {
        padding: 2% 0;
    }

    article#download-products section a{
        margin: 3% 2% 2% 0;
    }

/* -------------------------------------------------------- footer ---------------------------------------------------------------------*/
    footer {
        grid-area: footer;
        display: grid;
        grid-template-areas:
            "navlinks"
            "banner";
        grid-template-rows: 2fr 1fr;
        grid-template-columns: 1fr;
    }

    footer a {
        text-decoration: none;
    }


    footer section#contact {
        text-align: center;
        min-height: 200px;
        min-width: 200px;
        padding: 2%;
    }

    footer section#copyright {
        text-align: center;
        margin-top: 5%;
    }
}