:root {
  --darknavyblue: #0d1a2d;
  --lightblue: #d6e2f0;
}

/* General Settings */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

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

p {
  margin: 0;
}

/* Header Section */
/* Main Header Settings - justifying content so header title appears on left, nav appears on right without using float */
.header {
  background-color: var(--darknavyblue);
  height: 100px;
  display: flex;
  justify-content: space-between;
}

.selfie {
  object-fit: contain;
  position: absolute;
  left: 0.4%;
  top: 3.2%;
  width: 40px;
  border-radius: 10px;
}

/* Header Title */
.header h1 {
  color: var(--darknavyblue);
  background-color: var(--lightblue);
  padding: 0 15px 0 60px;
  font-size: 48px;
  margin-top: 15px;
  margin-bottom: 15px;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

/* Main Navigation */
.navigation {
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-size: 25px;
  margin-right: 80px;
}

/* Navigation List - nesting display flex, adding spacing between the list items */
.navlinks {
  list-style-type: none;
  display: flex;
  justify-content: space-around;
}

/* Navigation List Items */
.navlinks li {
  padding: 0px 10px;
  margin: 0 10px;
  border-bottom: var(--lightblue) 3px solid;
}

/* Navigation Links */
.navigation ul li a {
  text-decoration: none;
  color: var(--lightblue);
}

/* Banner Area Settings */
/* Banner placeholder - displaying as flex, ensuring banner title is displayed on rhs utilising justify-content and bottom utilising align-items */
.hero-banner {
  background-image: url("../images/02-hero-bg.jpg");
  background-size: cover;
  background-position: 20%;
  background-attachment: fixed;
  height: 200px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

/* Banner Title */
.banner-title {
  margin-right: 80px;
  margin-bottom: 20px;
}

/* Banner H2 element */
.banner-title h2 {
  text-align: center;
  padding: 5px 10px;
  color: #31343d;
  background-color: var(--lightblue);
  font-size: 36px;
  border-radius: 10px;
}

/* Category Grid CSS */
/* Grid Container for Main body*/
.main-container {
  display: grid;
  grid-template-columns: 12% 44% 44%;
  grid-template-rows: 14% 22% 18% 18% 10%;
  background-color: white;
  padding: 10px;
  gap: 10px;
  margin: 5%;
}

/* Common settings for lhs row headings */
.left-column {
  position: relative;
  font-size: 30px;
  padding-right: 10px;
  border-right: solid 4px var(--darknavyblue);
  text-align: right;
}

/* Common settings for each rhs grid item */
.proj-item {
  position: relative;
  margin-left: 30px;
  font-size: 30px;
  border-radius: 25px;
}

/* About Me row settings */
/* Sets aboutme grid item location */
#aboutme {
  grid-row-start: 1;
  grid-row-end: 2;
  grid-column-start: 1;
  grid-column-end: 2;
  margin-bottom: 50px;
}

/* Sets bio grid item location */
#bio {
  grid-row-start: 1;
  grid-row-end: 2;
  grid-column-start: 2;
  grid-column-end: 4;
  margin-bottom: 0 60px 50px 0;
}

/* Work row detailing projects showcased */
/* Sets work grid item location */
#work {
  grid-row-start: 2;
  grid-row-end: 5;
  grid-column-start: 1;
  grid-column-end: 2;
}

/* Grid Location + styling for Horiseon code refactor project */
#main-project {
  grid-row-start: 2;
  grid-row-end: 3;
  grid-column-start: 2;
  grid-column-end: 4;
  border: solid 4px var(--darknavyblue);
  margin-right: 60px;
  background-color: var(--lightblue);
}

/* Grid Location + styling for QR Component project */
#second-project {
  grid-row-start: 3;
  grid-row-end: 4;
  grid-column-start: 2;
  grid-column-end: 3;
  border: solid 4px var(--darknavyblue);
  background-color: var(--lightblue);
}

/* Grid Location + styling for NFT Card Component project */
#third-project {
  grid-row-start: 3;
  grid-row-end: 4;
  grid-column-start: 3;
  grid-column-end: 4;
  border: solid 4px var(--darknavyblue);
  margin-right: 60px;
  margin-left: 0;
  background-color: var(--lightblue);
}

/* Grid Location + styling for yet to be developed 4th project */
#fourth-project {
  grid-row-start: 4;
  grid-row-end: 5;
  grid-column-start: 2;
  grid-column-end: 3;
  border: solid 4px var(--darknavyblue);
  background-color: var(--lightblue);
}

/* Grid Location + styling for yet to be developed 5th project */
#fifth-project {
  grid-row-start: 4;
  grid-row-end: 5;
  grid-column-start: 3;
  grid-column-end: 4;
  border: solid 4px var(--darknavyblue);
  margin-right: 60px;
  margin-left: 0;
  background-color: var(--lightblue);
}

/* Styling for project items */
.proj-img {
  max-height: 100%;
  max-width: 100%;
  opacity: 0.8;
  margin: auto;
  display: grid;
}

/* Ensuring when hovering over the project that opacity disappears */
.proj-img:hover {
  opacity: 1;
}

/* Styling for project titles */
.img-title {
  position: absolute;
  bottom: 20px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px;
  z-index: 1;
  font-size: 20px;
}

/* Ensuring when hovering over the project title that opacity disappears */
.img-title:hover {
  background-color: rgba(0, 0, 0, 1);
}

/* Contact Me row settings */
/* Sets contactme grid item location */
#contactme {
  grid-row-start: 5;
  grid-row-end: 6;
  grid-column-start: 1;
  grid-column-end: 2;
  margin-top: 40px;
}

/* Sets details container location and style */
#details {
  grid-row-start: 5;
  grid-row-end: 6;
  grid-column-start: 2;
  grid-column-end: 4;
  display: flex;
  flex-direction: row;
  background-color: var(--darknavyblue);
  border-radius: 25px;
  margin-right: 60px;
  justify-content: center;
  align-items: center;
}

/* Utilising flex on contact details to make more responsive */
.contact-details {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.contact-items {
  padding: 0 5% 0 15%;
}

.contact-details a {
  text-decoration: none;
  color: white;
  padding-bottom: 5px;
  border-bottom: solid 3px white;
}

/* Media Breakpoint Section */
/* Media Breakpoint for screens 1580px or less */
@media only screen and (max-width: 1580px) {
  .left-column {
    display: flex;
    flex-wrap: wrap;
    font-size: 20px;
    text-align: left;
  }

  .proj-item {
    font-size: 25px;
  }

  .proj-item-first-col {
    font-size: 20px;
  }
}

/* Media Breakpoint for screens 1200px or less */
@media only screen and (max-width: 1200px) {
  .header h1 {
    font-size: 24px;
    display: flex;
    align-items: center;
  }

  .navlinks li {
    border-bottom: none;
    background-color: var(--darknavyblue);
    width: auto;
  }

  .left-column {
    border-right: none;
  }

  #bio {
    font-size: 22px;
  }
}

/* Media Breakpoint for screens 900px or less */
@media only screen and (max-width: 900px) {
  .header h1 {
    font-size: 20px;
  }

  .navlinks {
    padding-top: 20px;
    padding-right: 60px;
    padding-bottom: 20px;
    grid-gap: 10px;
  }

  .navlinks li {
    border-bottom: none;
    background-color: var(--darknavyblue);
    font-size: 18px;
  }

  #bio {
    font-size: 18px;
  }

  .proj-item {
    border-radius: 0;
  }

  .img-title {
    font-size: 16px;
  }

  .contact-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15%;
    font-size: 20px;
  }

  .contact-details a {
    border-bottom: none;
  }
}

/* Media Breakpoint for screens 768px or less */
@media only screen and (max-width: 768px) {
  .navlinks {
    flex-direction: column;
    padding: 0;
    grid-gap: 0;
  }

  .navlinks li {
    font-size: 16px;
  }

  .banner-title h2,
  .img-title h2 {
    font-size: 20px;
  }

  #aboutme,
  #work,
  #contactme {
    border-right: none;
    text-align: center;
    font-size: 16px;
  }

  #bio {
    font-size: 14px;
    margin-bottom: 30%;
  }

  .contact-details {
    font-size: 16px;
  }

  #details {
    text-align: center;
  }
}

/* Media Breakpoint for screens 480px or less */
@media only screen and (max-width: 480px) {
  .header h1 {
    text-align: center;
    font-size: 18px;
  }

  .main-container {
    display: inline;
  }

  #aboutme,
  #work,
  #contactme {
    border-right: none;
    text-align: center;
    margin: 50px 20px 30px 20px;
  }

  #bio,
  #main-project,
  #second-project,
  #third-project,
  #fourth-project,
  #fifth-project {
    margin: 15px 20px 0 20px;
  }

  .proj-item {
    margin: 0 20px;
  }

  .proj-img {
    height: 175px !important;
    display: block;
  }
}
