* {
  box-sizing: border-box;
  padding: 0px;
  margin: 0;
}

/* These are the main variable of the main colours used to style the text and backgrounds of the page */
:root {
  --lightCol: white;
  --darkCol: grey;
}

body {
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  line-height: 1.5;
 
}

a{
  color: var(--lightCol);
}

h1, h3, h4, h5 {
  color: var(--darkCol)
}

header {
  width: 100%;
  background-color: rgb(96, 96, 109);
  margin: 0;
}

/* This is the styling of the Navigation links in the header */

ul {
  list-style: none;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0;
  height: 3em;
  padding: 0
}


ul li {
  padding-right: 18px;
  font-weight: bold;
  text-underline-offset: 5px;
}

li:first-child { /*I set the logo/name of the site as an element of the nav if I will decide to turn it into a link too, this line of code makes sure that it sits on the right, so it divides it from the other links */
margin-right: auto;
margin-left: 10px;
}

/*This defines the banner with the gif animation between the header nav and the main content of the article, speficically, the About Me section */
.heroBanner {
  display: flex;
  justify-content:last baseline;
  grid-area: heroBanner;
  height: 250px;
  width: 100%;
  margin-bottom: 25px;
  background-image: url("images/coding-background-2.gif");
  background-size: 100%;
  background-position: center;
}

h1 {
  color: rgb(247, 241, 241);
}

/*This styles the cool motto on the gif banner, I added a transparent background color that fades on the right */

#heroTitle {
  display: flex;
  color: rgb(248, 247, 252);
  flex-shrink: 0;
  font-size:20px;
  margin-top: 180px;
  margin-left: 800px;
  margin-bottom: 25px;
  background-color: rgb(62, 62, 110);
  opacity: .7;
  background: linear-gradient(to right, rgba(62, 62, 110), rgba(255, 122, 89,0));
  text-justify: center;
}


/*This styles the about me section, I set the first big container and styled the article title, picture and bio with the relative ids*/
.aboutSection {
  display: flex;
  flex-wrap: wrap;
  height: 200px;
  width: 100%;
  margin-bottom: 40px;
}

#aboutArticle {
  border-left-style: solid; 
  border-left-style: solid;
  width: 50%;
  margin-left: 20px;
  color: var(--darkCol)
}

#aboutArticle img {
 float: left;
 width: 100px;
 flex: wrap;
 justify-items: flex-start;
 display: inline;
 align-self: center;
 margin-left: 20px;
 margin-right: 20px;
 margin-bottom: 10px;
 
}

#aboutTitle{
  text-align:end;
  color: var(--darkCol);
margin-left: 165px;


}

#aboutText {
  flex-shrink: 0;
  color: var(--darkCol);
  font-size: 20px;
  font-style: italic;
  width: 1000px;
  margin-left: 30px;
  padding-right: 50px;
}

/* This is the style for the working section, each element is styled with the relative tag */

.workSection {
  display: flex;
  flex-wrap: wrap;
  height: 400px;
  color: var(--darkCol);
}


#workTitle {
  flex-shrink: 0;
  align-items: end;
  width: 20%;
  text-align: end;
  color: var(--darkCol);
  width: 20%;
}

/* The project class sits on the right side of the work title, and incorporates all the projects */
.projects { 
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  border-left-style: solid;
  width: 70%;
  align-items: start;
  margin-left: 20px;
  margin-bottom: 10px;
  
}

/*This is the project 1, or main project, the one with the biggest picture that sits on top of the other projects. The dimensions are different, bigger than the others */
#project1 {
  object-fit: contain;
  height: 320px;
  width: 900px;
  background-image: url(images/02-portfolio-1.jpg);
  background-size: cover;
  position: relative;
  margin-left: 100px;
   
}
/* the following code sets the overlay color and opacity on the project background image */

#project1::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); 
  opacity: 1;
  transition: opacity 0.3s ease; /* This adds a transition for smooth visibility change */
  pointer-events: none; /* Ensures the overlay doesn't interfere with mouse events */
}

#project1:hover::before {
  opacity: 0; /* When hovering, the overlay becomes transparent */
}

/* these label ids include the Project name and short description */
#label {
  position: absolute;
  bottom: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 20px;
  opacity: 0.8;
}

/*The following style the tag's name link and the short descritpion */

#label a,
#label p {
  color: rgb(241, 239, 239);
  text-decoration: none;
  margin-left: 20px;
  margin-right: 50px;
  display: block;
}

/*This styles the background color of the label for project 1 */
#project1 #label {
  background-color: rgb(89, 89, 97);
  padding: 0;
}

/*Project 2, 3, 4, 5, have all the same dimensions and labels setup, changes only the position and some margins padding to style them properly */

#project2 {
  height: 120px;
  width: 414px;
  background-image: url(images/02-portfolio-2.jpg);
  background-size: cover;
  object-fit: contain;
  position: relative;
  background-size: 100%;
  margin-top: 10px;
  margin-left: 100px;
}


 #project2::before {
  content: "";
  position: absolute;
  width: 414px;
  height: 120px;
  background-color: rgba(0, 0, 0, 0.5); 
  opacity: 1;
  transition: opacity 0.3s ease; /* This adds a transition for smooth visibility change */
  pointer-events: none; /* This ensures the overlay doesn't interfere with mouse events */
 }

 #project2:hover::before {
  opacity: 0; /* When hovering, the overlay becomes transparent */
 }

#project3 {
  object-fit: contain;
  height: 120px;
  width: 414px;
  background-image: url(images/02-run-buddy.jpg);
  background-size: cover;
  object-fit: contain;
  position: relative;
  margin-top: 10px;
  }

  #project3::before {
    content: "";
    position: absolute;
    width: 414px;
    height: 120px;
    background-color: rgba(0, 0, 0, 0.5); 
    opacity: 1;
    transition: opacity 0.3s ease; 
    pointer-events: none; 
  }
  
  #project3:hover::before {
    opacity: 0; 
  }

#project4 {
  object-fit: contain;
  height: 120px;
  width: 414px;
  background-image: url(images/02-portfolio-3.jpg);
  background-size: cover;
  object-fit: contain;
  position: relative;
  margin-top: 10px;
  margin-left: 100px;
  }

  #project4::before {
    content: "";
    position: absolute;
    width: 414px;
    height: 120px;
    background-color: rgba(0, 0, 0, 0.5); 
    opacity: 1;
    transition: opacity 0.3s ease; 
    pointer-events: none; 
  }
  
  #project4:hover::before {
    opacity: 0; 
  }


#project5 {
  object-fit: contain;
  height: 120px;
  width: 414px;
  background-image: url(images/02-portfolio-4.jpg);
  background-size: cover;
  object-fit: contain;
  position: relative;
  background-size: 100%;
  margin-top: 10px;
  }

  #project5::before {
    content: "";
    position: absolute;
    width: 414px;
    height: 120px;
    background-color: rgba(0, 0, 0, 0.5); 
    opacity: 1;
    transition: opacity 0.3s ease; 
    pointer-events: none; 
  }
  
  #project5:hover::before {
    opacity: 0; 
  }

/*These style the contact section, its title and the relative links*/
.contactSection {
  color: var(--darkCol);
  display: flex;
  flex-wrap: wrap;
  height: 75px;
  justify-content: space-around;
  align-items: center;
  align-content: center;
  margin-top: 200px;
}

.contactSection a {
  color: var(--darkCol); 
}


#contactList {
  display: flex;
  justify-content: space-between;
  border-left-style: solid;
  width: 70%;
  flex-grow: 2;
  margin-left: 20px;
}

#contactTitle {
flex-shrink: 0;
align-items: end;
width: 20%;
text-align: end;

}

#phoneNum {
 margin-left: 20px;
}

#emailAdd {
  margin-left: 20px;
}

#gitHub {
  margin-left: 20px;
}

#webSite {
  margin-left: 20px;
}

/*This is the mobile view CSS style, I decided to put the various elements into a column, but still leaving the titles of each section on the left side of the screen. All the projects will sit in a column one on top of the others, yet respecting their order. Project 1, like in the desktop view, is bigger than the others */

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

  h1 {
    font-size: 15px;
  } 

#heroTitle {
  display: center;
  color: var(--lightCol);
  font-size:15px;
  margin-top: 180px;
  margin-left: 100px;
  margin-bottom: 25px;
  background-color: rgb(62, 62, 110);
  opacity: .7;
  background: linear-gradient(to right, rgba(62, 62, 110), rgba(255, 122, 89,0));
  text-justify: center;
}

.aboutSection {
  height: 500px;
  margin-bottom: 70px;
}


#aboutArticle {
  
  border-left-style: solid;
  width: 50%;
 margin-left: 0;
  
}

#aboutArticle img {
 width: 70px;
}

#aboutTitle{
   
    border-spacing: 10px;
   margin: 15px;

    
  }

#aboutText {
  color: var(--darkCol);
  font-size: 20px;
  width: 330px;
  margin-left: 30px;
  padding-right: 50px;
}

  .workSection {
    flex-direction: column;
    align-items: center;
  }

  
  #project1 {
    object-fit: contain;
    height: 320px;
    width: 320px;
    margin-left: 17px;
    background-size: cover;
    position: relative;
      
    
  }
  #project2 {
    height: 120px;
    width: 414px;
    margin-left: 17px;
    margin-top: 10px;
    background-size: cover;
    }

    #project2::before {
     width: 318px;
    }

  #project3 {
    height: 120px;
    width: 414px;
    margin-left: 17px;
    margin-top: 10px;
    background-size: cover;
  }

  #project3::before {
    width: 318px;
  }

  #project4 {
    
    height: 120px;
    width: 414px;

    margin-left: 17px;
    margin-top: 10px;
    background-size: cover;
    }
    #project4::before {
      
      width: 318px;
          
    }
    #project5 {
    
      height: 120px;
      width: 414px;
  
      margin-left: 17px;
      margin-top: 10px;
      background-size: cover;
      }

      #project5::before {
      
        width: 318px;
            
      }

  .contactSection {
    
    color: var(--darkCol);
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    height: 75px;
    justify-content: space-around;
    align-items: center;
    align-content: center;
    margin-top: 500px;
    margin-bottom: 30px;
  }

  #contactTitle {
    flex-shrink: 0;
    align-items: center;
    text-align: end;
    }

  #contactList {
    display: flex;
    font-size: 12px;
    justify-content: space-between;
    border-left-style: solid;
    margin-left: 20px;
  }

}