/* Global and Element Styles and Rules */

:root {
    --first-color: #fbeaeb;
    --second-color: #2f3c7e;
}

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

body {
    background-color: var(--first-color);
    height: 100%;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

/* Header */

.header {
    padding: 20px;
    background-color: var(--second-color);
    color: var(--first-color);
}

.header h1 {
    display: inline-block;
    font-size: 48px;
    color: var(--first-color);
}

.header nav {
    padding-top: 15px;
    margin-right: 20px;
    float: right;
    font-size: 20px;
}

nav a:hover,
nav a:focus {
    color: orange;
}

.header nav ul li {
    display: inline-block;
    margin-left: 25px;
    color: var(--first-color);
}

header nav ul li a {
    margin: 0 20px;
    font-size: 24px;
    color: var(--first-color);
    text-decoration: none;
  }

/* Hero Image */

.hero {
    display: flex;
    height: 400px;
    width: 100%;
    margin-bottom: 25px;
    background-image: url("../images/coding-background.jpg");
    background-size: cover;
    background-position: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    position: relative;
}

.hero h3 {
    font-size: 28px;
    color: var(--first-color);
    margin-top: 370px;
    background-color: var(--second-color);
}

/* Professional Photo */

.professional-photo {
    position: absolute;
    margin: 0px 0px;
    height: 375px;
    border: 4px var(--second-color) solid;
}

/* Global Sections Classes */

.sections {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 20px 50px;
    width: 90%;
    align-items: center;
}

.flex-box {
    display: flex;
    justify-content: left;
}

.section-title {
    font-size: 35px;
    color: var(--second-color);
    margin: 0 0 0 80 px;
    width: 50%;
}

.box {
    flex: 2 10%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

/* About Me Section */

.about-me-border {
    border-right: 3px solid var(--second-color);
    height: 150px;
    flex: 2 1%;
}

.about-me-text {
    flex: 25;
}

.about-me-text p {
    color: var(--second-color);
    font-size: 16px;
    text-align: left;
    line-height: 30px;
    margin-left: 30px;
    width: 100%;
}

/* My Work Section */

.work-border {
    border-right: 3px solid var(--second-color);
    height: 450px;
    flex: 2 5%;
}

.work-container {
    flex: 80;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 15px;
    width: 80%;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(5, 10vw);
    grid-gap: 20px;
    margin-left: 20px;
}
    
.grid-item--1 {
    grid-column-start: 1;
    grid-column-end: 3;
    grid-row-start: 2;
    grid-row-end: 4;
    position: relative;
}
    
.grid-item--2 {
    grid-column-start: 3;
    grid-column-end: 4;
    grid-row-start: 2;
    grid-row-end: 3;
    position: relative;
}
    
.grid-item--3 {
    grid-column-start: 1;
    grid-column-end: 2;
    grid-row-start: 4;
    grid-row-end: 5;
    position: relative;
}
    
.grid-item--4 {
    grid-column-start: 3;
    grid-column-end: 4;
    grid-row-start: 3;
    grid-row-end: 4;
    position: relative;
}
    
.grid-item--5 {
    grid-column-start: 2;
    grid-column-end: 3;
    grid-row-start: 4;
    grid-row-end: 5;
    position: relative;
}

.grid-img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    border: solid 1px var(--second-color);  
}
  
figcaption {
    position: absolute;
    margin-left: 5px;
    margin-top: -7%;
    font-size: 12px;
    font-weight: bold;
    color: var(--second-color);
    border: solid 1px var(--second-color);
    background-color: var(--first-color);
}

/* Contact Me Section */

.contact-me-border {
    border-right: 3px solid var(--second-color);
    height: 100px;
    flex: 2 5%;
}

.contact-details {
    flex: 150;
}

.contact-details ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: left;
    list-style: none;
    margin-left: 15px;
    width: 100%;
}

.contact-details ul li a {
    margin: 0 20px;
    font-size: 18px;
    color: var(--second-color);
    text-decoration: none;
}

.contact-details a:hover,
.contact-details a:focus {
    color: orange
}

/*Footer Section*/

.footer {
    font-size: 16px;
    padding: 30px;
    clear: both;
    text-align: center;
    color: var(--second-color)
}

/* ids were used to help the UI scroll to corresponding section when navigation link was clicked*/
/* #about-me-section */
/* #work-section */
/* #contact-me-section */

/* Media Query */

@media screen and (max-width: 968px) {
    
    header {
      padding-bottom: 10px;
      justify-content: center;
      flex-direction: column;
      text-align: center;
      display: flex;
    }
  
    header h1 {
      width: 100%;
      text-align: center;
    }
  
    header nav ul {
      margin-top: 20px;
      min-width: 100%;
      justify-content: center;
      flex-direction: column;
      line-height: 1.5;
    }

    header nav ul li a {
      font-size: 16px;
      font-weight: bold;
      flex-direction: column;
      color: var(--first-color);
    }

    .hero {
      background-size: cover;
    }

    .professional-photo {
      height: 100px;
      width: 100px;
      top: 200px;
    }
    .hero h3 {      
      font-size: 10px;
      margin-top: 350px;
      }

    .about-me-text p{
        width: 85%;
      }

    .section-title {
      width: 100%;
      text-align: right;
      font-weight: bold;
    }

    .about-me-border {      
      height: 350px;     
    }

    .work-border {
    height: 280px;     
    }

    .container{
      width: 100%;
    }

    .contact-details ul {     
      width: 100%;
      justify-content: left;
      flex-direction: column;      
    }
    
    .contact-details ul li a {
        font-size: 18px;
        line-height: 2;  
        font-weight: bold;
    }

    .contact-me-border {
        height: 180px;
    }
      
    figcaption {
        margin-left: 5px;
        margin-top: -45%;
        font-size: 5px;
    }

  }