/*
Main colors: 
Background color: whitesmoke #F5F5F5
Primary button: Taupe gray #96858F
Font color: Black #000
Visited link and links: slate gray 
#6D7993—darker version that passes contrast #52576F
#96858F—darker version that passes contrast #5F535B

Future options:
Slate gray #6D7993
Cadet gray #9099A2
Timber wolf #D5D5D5

*/

* {
  box-sizing: border-box;
}

:root {
  --primary-color: #52576F;
  --secondary-color: #F5F5F5;
  --rust-gray-color: #f9f9fa;
  --lighter-background-color: #6C7593;
  --light-gray-color: #C2C4CD;
  --viewport-margin: 3%;
  --main-font-size: 17px;
  --contrast-font-color: #333333;

}
html, body {
    background-color: var(--primary-color);
    font-family: 'Source Serif Pro', serif;
    font-weight: 400;
    font-size: var(--main-font-size);
    line-height: 1.3;
    color: var(--secondary-color);
    min-height: 90%;
    margin-bottom: 100px;
}

h1, h2 {
    font-weight: 700;
    font-family: 'Oswald', sans-serif;
    line-height: 1.6;
    text-align: center;
}

h1 {
    font-size: 30px;
    font-style: oblique;
}

h2 {
    font-size: 24px;
    font-variant: small-caps;
}

/* header with logo and main nav*/

.page-header {
  display: flex;
  background-color: var(--lighter-background-color);
  border-bottom: 1px solid var(--secondary-color);
  width: 100%;
  max-width: 100%;
  background-size: cover;
  flex-wrap: wrap;
}

.page-header__item {
  flex: 0 1 200px;
}

.page-header__item:last-child {
  flex-grow: 1;
  text-align: right;
}

.navigation-list, .skills-list {
  list-style-type: none;
}

.navigation-list {
  margin-right: var(--viewport-margin);
}

.navigation-list li {
  display: inline-block;
  margin-left: 15px;
}

.page-header__item:first-child {
  width: 20%;
  height: 4%;
  padding: 1%;
}

.navigation-list__item:active {
  text-decoration: none;
}

/* hyperlinks */

a {
    size: var(--main-font-size);
    color: white;
}

a:hover, a:focus {
    text-decoration: none;
}

a:active {
    color: black;
    text-decoration: none;
}

/* buttons */

.button, .skills__button {
    border: none;
    display: inline-block;
    font-family: inherit;
    background-color: var(--light-gray-color);
    font-size: var(--main-font-size);
    color: var(--contrast-font-color);
    padding: 10px;
    text-decoration: none;
    border-radius: 3px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.3);
    margin: 10px;
    transition: opacity 0.2s;
    width: 200px;
    height: 40px;
    text-align: center;
}

button:hover, button:focus, .button:focus, .button:hover {
    cursor: pointer;
    opacity: 0.8;
    background-color: var(--rust-gray-color);
    transition: background-color 1s linear;
}

.button__secondary {
    background-color: var(--rust-gray-color);
    color: #fff;
  }

.button__secondary:hover, .button__secondary:focus {
  background-color: var(--light-gray-color);
  transition: background-color 1s linear;
}  

  /* home page profile */

  .main-profile {
    width: 100vw;
    height: 75vh;
    margin: auto;
    display: flex;
  }

  .profile {
    max-width: 800px;
    margin: auto;
    display: flex;
    width: 100%;
  }

  .profile__item h1 {
    text-align: left;
  }
  
  .profile__item {
    margin: 5%;
    align-items: center;
  }

  .profile__portrait {
    float: left;
    display: block;
    width: 400px;
    margin-right: 50px;
    border-radius: 50%;
  }

  .main-profile a {
    margin-left: 0;
  } 

  /* footer */

  .page-footer {
    clear: both;
    display: flex;
    flex-direction: column;
    text-align: center;
    background-color: var(--lighter-background-color);
    width: 100%;
    margin: 0;
    position: fixed;
    bottom: 0;
    border-top: 1px solid var(--secondary-color);
  }

  .social-media {
    display: flex;
    text-align: space-between;
    align-items: center;
    margin: 0 auto;
  }

  .img__icon {
    height: 2.5%;
    width: 2.5%;
    margin: 1px 2.5px 6px 2.5px;
  }

  .page-footer a {
    text-decoration: none;
  }

  /* about me page */

  .hometown_graphic {
    width: 15%;
    display: block;
    margin: 10px auto;
  }

  .skills, .skills-list {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .skills-list, .skills-list__item {
    padding: 0;
    margin: 0;
  }

  .skills__button {
    margin-top: 30px;
    margin-bottom: 40px;
  }

  /* about me animation */

  .cactus {
    width: 35%;
  }

  @keyframes color-change {
    from {
      fill: #a9ed55;
    }
    to {
      fill: #1458f7;
    }
  }

  #path3659, #path3971, #path3663, #path3657 {
    animation: 4s color-change infinite alternate linear;
  }

  /* contact form */

  .div__contact-form {
    padding: 40px 20px;
  }
  .div__contact-form, .div__contact-form a {
    color: var(--secondary-color);
  }
  .div__contact-form form {
    margin: 0 auto;
    max-width: 700px;
    text-align: left;
  }

  .div__contact-form input, textarea, .error-message {
    display: block;
    margin-top: 10px;
    margin-bottom: 10px;
    width: 100%;
  }

  .error-message {
    font-size: 16px;
    padding: 3px;
    background-color: red;
    width: 20%;
    padding-left: 7px;
  }

  form .button:last-of-type {
    display: block;
    margin: 20px auto;
  }

  .required {
    color: var(--rust-gray-color);
    font-weight: 800;
  }

  /* projects grid */

  .grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 20px;
    margin: var(--viewport-margin);
  }

  .grid__item {
    padding: 10px;
    border-radius: 5px;
    position: static;
    border: 3px solid var(--secondary-color);
  }

  .grid__item:hover {
    background-color: #424659;
    transition: background-color .5s linear;
  }

  .grid__item--img {
    width: 100%;
    display: block;
    margin: 0 auto;
    border-radius: 5px;
  }

  .grid__item--info {
    text-align: center;
  }

  .grid__item .button {
    display: block;
    margin: 30px auto;
    color: var(--contrast-font-color);
  }

  /* media queries for all screen sizes */

  @media all and (max-width: 500px) {
    .grid {
      grid-template-columns: 1fr;
      grid-gap: 10px;
    }
  }

  @media all and (min-width: 500px) and (max-width: 750px) {
    .grid {
      grid-template-columns: 1fr 1fr;
    }
  }

  @media all and (max-width: 750px) {
    .profile {
      flex-wrap: wrap;
      align-items: center;
    }

    .profile__item h1 {
      text-align: center;
    }
    
    .profile__item {
      margin: 0 auto;
      align-items: center;
    }

    .profile__item p {
      margin-left: 15px;
      margin-right: 15px;
      text-align: center;
    }
  
    .profile__portrait, .main-profile a {
      display: block;
      margin: 0 auto;
    }
  
    .profile__portrait {
      width: 60%;
    }
  }

  @media all and (max-width: 750) {
    .grid {
      grid-gap: 10px;
    }
    .grid__item:last-child {
      grid-column: auto / auto;
      grid-row: auto / auto;
    }
    h1 {
      font-size: 22px;
    }
  }