/* Creating variables */
:root {
  --darker:#36454f;
  --lighter:#ADD8E6;
  --border: 5px solid var(--lighter);
}

* {
  box-sizing: border-box;
}

/* General fonts */
body {
  margin: 0;
  padding: 0;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}

p {
  margin: 0;
}

a {
  text-decoration: none;
  margin: 0px;
}

/* Nav Bar and Title bar formatting (nested flexboxes) */
header {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content:space-between;
  align-items: center;
  padding: 3px 10px 3px 0px;
  background-color: var(--darker);
}

header h1 {
  width: 300px;
  display: flex;
  justify-content: right;
  color:var(--darker);
  font-size: 40px;
  background-color:var(--lighter);
  padding: 0px 15px 0px 15px;
}

header nav ul {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: right;
  align-items: center;
  list-style-type: none;
}

header nav ul li {
  margin: 0px 25px 0px 25px;
}

header nav ul li a {
  font-size: 28px;
  color: var(--lighter);
  border-bottom: 3px solid var(--lighter);
  padding: 3px;
}

/* Hero Banner (cover photo) formatting */

.hero-banner {
  /* Sets the background photo */
  background-image: url("../images/02-hero-bg.jpg");
  background-repeat:no-repeat;
  background-size:cover;
  height: 200px;
}

/* Shading for hero banner */
.hero-banner:before {
  content: "";
  display: block;
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(54,69,79,0.7);
}
  

.hero-banner div {
  position: relative;
  width: fit-content;
  padding: 10px 20px;
  top: -40%;
  right:-65%;
  background-color: var(--lighter);
  color: var(--darker);
  
}

/* Formatting for the main body (including all the about me, portfolio, etc. sections) - Flexbox */

.page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
}

.page-section {
  width: 100%;
  padding: 20px;
  display: flex;
  flex-direction: row;
  align-items: start;
  justify-content: left;
}

/* Formatting for all the subheadings (left hand side) */

.page-section h2 {
  width: 30%;
  text-align: right;
  font-size: 50px;
  color: var(--darker);
  padding-right: 10px;
}

/* Formatting for all the body content (right hand side) */

.contentbody {
  width: 70%;
  border-left: 4px solid var(--darker);
  padding: 5px 20px 5px 20px;
}

/* About Me body content formatting (flexbox) */
#about .contentbody{
  display: flex;
  flex-direction:row;
}

#about .contentbody img{
  width:200px;
  height:200px;
  margin-left: 10px;
  border: var(--border);
}

#about .contentbody div{
  width:auto;
  padding:0px 20px 0px 20px
}

/* My Portfolio body content formatting (grid) */
#portfolioGrid {
  margin: 0px;
  display: grid;
  grid-template-rows: 250px 250px 250px;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas:
  "project1 project1 project2"
  "project1 project1 project3"
  "project4 project4 project4";
}

#portfolioGrid .project {
  background-repeat: no-repeat;
  background-size: cover;
  margin: 8px;
  border: var(--border);
  cursor: pointer;
}

/* The overlay and hover effects */
#portfolioGrid div:before {
  content: "";
  display: block;
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(54,69,79,0.5);
  pointer-events:none;
}

#portfolioGrid div:hover:before {
  background-color:rgba(54,69,79,0.2);
  transition: background-color 0.5s ease-in-out;
}

/* Each individual project background */
#project1 {
  grid-area: project1;
  background-image: url("../images/Portfolio.png");
}

#project2 {
  grid-area: project2;
  background-image: url("../images/Horiseon.png");
}

#project3 {
  grid-area: project3;
  background-image: url("../images/02-portfolio-3.jpg");
}

#project4 {
  grid-area: project4;
  background-image: url("../images/02-portfolio-4.jpg");
}

/* Project label formatting */
.projectLabel {
  position:relative;
  display:block;
  width: fit-content;
  height: auto;
  padding: 5px 8px 5px 5px;
  bottom: 70px;
  z-index: 1;
  background-color: var(--lighter);
  color: var(--darker);
}

.projectLabel p {
  font-size: 12px;
}

/* Footer formatting (flexbox) */
#contact .contentbody ul {
  display: flex;
  flex-direction: row;
  list-style-type: none;
  align-items: center;
  justify-content: space-between;
  margin-right: 40px;
}

#contact .contentbody ul li {
  font-size: 18px;
  color: var(--darker);
  border-bottom: 3px solid var(--darker);
}

#contact .contentbody ul li a {
  color: var(--darker);
}

/* Viewport media queries */

@media only screen and (max-width: 950px) {

  header h1 {
    color: var(--lighter);
    background-color: var(--darker);
    justify-content: center;
  }
  
  header nav ul {
    display: none;
  }

  .hero-banner {
    height:120px;
  }

  .hero-banner div {
    position: absolute;
    width: fit-content;
    padding: 10px 20px;
    top: 100px;
    left: 20px;
    background-color: var(--lighter);
    color: var(--darker);
    z-index: 1;
  }

  .page-section {
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
  }

  /* Formatting for all the subheadings (left hand side) */

  .page-section h2 {
    width: 100%;
    text-align: center;
    font-size: 40px;
    color: var(--darker);
    padding-bottom: 10px;
  }

  /* Formatting for all the body content (right hand side) */

  .contentbody {
    width: 100%;
    border-top: 4px solid var(--darker);
    border-left: none;
    padding: 20px 5px 20px 5px;
  }

  /* About Me image resizing */

  #about .contentbody img{
    width:150px;
    height:150px;
  }
}

@media only screen and (max-width:600px) {
  #portfolioGrid {
    margin: 0px;
    display: grid;
    grid-template-rows: 250px 250px 250px 250px;
    grid-template-columns: 1fr;
    grid-template-areas:
    "project1"
    "project2" 
    "project3" 
    "project4";
  }

  .hideableFooters {
    display:none;
  }

  #about .contentbody div p {
    font-size: 14px;
  }
}