/* Laysout the colour theme for the page */
:root {
 --maintheme-color: #290012;
 --secondarytheme-color: #985534;
 --thirdtheme-color: #f6f7eb;
}

/* Universal selectprs */
* {
  box-sizing: border-box;
}
  
/* Body Selectors */
body {
  width: 100%;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;

}

  /* Header selectors, including text and image */
  header {
    display: flex;
    flex-direction: column;
    background-color: var(--maintheme-color);
    height: 150px;
    margin: 0;
  }

  header h1 {
    color: var(--thirdtheme-color);
    padding: 1%;
    margin: 0;
  }

  header .container  {
    background-image: url("../images/my-photo-spain.png");
    border-radius: 50%;
    height: 8rem;
    width: 8rem;
    position: absolute;
    left: 90%;
    top: 2%;
    margin: 0 -17%;
  }  

  /* Navigation selectors */
  nav {
    background-color: var(--secondarytheme-color);
    height: 30%
  }
  nav ul {
    color: var(--maintheme-color);
    text-align: right;
    margin: 0;
  }

  nav ul li {
    display: inline-block;
    color: var(--thirdtheme-color);
    font-weight: 700;
    text-transform: lowercase;
    padding: 1%;
  }

  nav a {
    text-decoration: none;
    color: var(--maintheme-color);
  }

  nav a:visited {
    text-decoration: underline;
    color: var(--maintheme-color);
  }

  /* Banner image selectors */
  .hero-image {
    background-image: url("../images/SpainLove.png");
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 30rem;
    margin-bottom: 1%;
  }

  /* Main section selectors */
  main section.projects {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;    
    background-color: var(--thirdtheme-color);
    margin: 1% 2%;
    border: 10px solid #487063;
    color: var(--maintheme-color);
  }

  /* Set the rules for title */
  main h2 {
    flex: 0 0 100%;
    justify-content: center;
    text-align: center;
    text-decoration: underline var(--secondarytheme-color);
    font-weight: bold;
    padding-bottom: .25%;
  }

  /*Sets the rules for all h3 in main */
  main h3 {
    background-color: var(--thirdtheme-color);
    color: var(--maintheme-color);
    width: fit-content;
    height: 2.5rem;
    position: relative;
    justify-content: left;
    top: 0.25rem;
    left: 1rem;
    border-radius: 10rem;
    padding: 2%;
  }

  main h3:hover {
    box-shadow: inset 0 0 10px var(--secondarytheme-color);
  }

  main div p {
    text-align: center;
    color: var(--maintheme-color);
  }

  main a:visited {
    text-decoration: underline;
    color: var(--secondarytheme-color);
  }

  /* Sets the first project image as bigger than the rest. Seperated from the other cards. */
  
  #first-project {
    background-image: url("../images/digital-marketing-meeting.jpg");
    height: 30rem;
    width: 60%;
    border-radius: 10%;
    margin: 2%;
  }

  #first-project:hover {
    box-shadow: inset 0 0 20px #fff;
  }

  /* Selectors of all other project cards */
  .project-card {
    height: 20rem;
    width: 23%;
    border-radius: 10%;
    margin: 1% 7%;
  }

  .project-card:hover {
    box-shadow: inset 0 0 10px #fff;
  }

  /* Sources for all project card images */
  #second-project {
    background-image: url("../images/music-fwends.jpg");
  }

  #third-project {
    background-image: url("../images/spain_dog.jpg");
  }

  #fourth-project {
    background-image: url("../images/obi.jpg");
  }

  #fifth-project {
    background-image: url("../images/Sook.jpg");
  }

  /* Selectors for about me and resume elements */
  aside {
    display: flex;
  }

  aside section {
      width: 50%;
      background-color: var(--thirdtheme-color);
      padding: 20px;
      border: 10px solid #487063;
      margin: 1% 2%;
    }

  aside h2 {
    width: 100%;
    text-align: center;
    color: var(--maintheme-color);
    text-decoration: underline solid var(--secondarytheme-color);
  }

  aside p {
    text-align: center;
  }

  aside a:visited {
    text-decoration: underline;
    color: var(--secondarytheme-color);
  }
  
  /* Selectors for footer and contact me elements */
  footer {
    background-color: var(--maintheme-color);
    height: 12rem;
    border-top: 10px solid var(--secondarytheme-color);
    margin: 1rem 0 0 0;
  }

  footer h2 {
    color: var(--thirdtheme-color);
    text-align: center;
    font-weight: bolder;
    padding-top: 1%;
    margin: 0;
  }

  footer ul {
    text-align: center;
    list-style: none;
    margin: 0% 2% 2% 0;
  }

  footer ul li {
    display: inline-block;
    color: var(--secondarytheme-color);
    font-weight: 700;
    padding-bottom: 1%;
  }

  footer a {
    text-decoration: none;
    color: var(--secondarytheme-color);
  }

  footer a:visited {
    text-decoration: underline;
    color: var(--secondarytheme-color);
  }

/*Selectors for different aspect ratios */

@media screen and (max-width: 992px) {
  body { 
    max-width: 100%;
   }

  .project-card {
    width: 35%;
  }
}

@media screen and (max-width: 768px) {
  body {
    max-width: 96%;
  }

  .project-card {
    width: 45%;
  }

  #first-project {
    width: 90%;
  }
}


@media screen and (max-width: 567px) {
  aside section {
    justify-content: flex-start;
    width: 100%;
  }

  .project-card {
    width: 45%;
  }

  #first-project {
    width: 90%;
  }

}
