/********* GLOBAL *********/
html {
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  background-color: #DAC5BC;
  font-family: 'Nunito Sans',
  sans-serif;
  font-size: 1.05em;
  line-height: 1.20em;
}

.container {
  display: flex;
  flex-direction: column;
  width: 95%;
  margin: 0 auto;
}

header,
footer {
  background-color: #bd634f;
  padding: 2px 0;
}

h1,
h2,
#contact,
footer {
  text-align: center;
}

h1,
h2,
h3 {
  font-family: 'Permanent Marker',
    cursive;
}

a,
a:visited {
  color: black;
  font-weight: bold;
  text-decoration: none;
}

a:hover {
  color: rgb(53, 52, 52);
}

a:active {
  text-decoration: underline;
}

hr {
  width: 100%;
}


/********* HEADER *********/
header {
  display: flex;
  flex-direction: column;
  align-items: center;
}

nav {
  width: 95%;
}

nav ul {
  display: flex;
  padding-left: 0;
  list-style-type: none;
  justify-content: space-between;
}

nav ul li {
  font-size: 1rem;
}

nav ul li a:hover {
  background-color: #b4a39c;
}

#desktop-only {
  display:none;
}


/********* INTRO *********/
#intro {
  margin-top: 20px;
}

#intro img {
  max-width: 100%;
  margin: 0 auto;
  display: block;
}


/********* PROJECTS *********/
.project-item {
  margin: 10px 0;
  padding: 5px 20px;
}

.project-item:nth-of-type(even) {
  background-color: #bd634f;
}

.project-item p {
  line-height: 1.5rem;
}

.project-image img {
  width: 100%;
}

.project-links {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.project-links a {
  background-color: black;
  color: white;
  padding: .5em .75em;
  margin: 0 10px;
  text-decoration: none;
  border-radius: 5px;
  box-shadow: 2px 2px 2px gray;
}

.project-links a:hover {
  background-color: gray;
  color:black;
}

#projects h4 {
  margin: 0;
}

/********* CONTACT *********/
#contact h3 {
  text-align: left;
}

#contact {
    margin-bottom: 20px;
}

form {
  display: flex;
  flex-direction: column;
}

form,
form input,
form textarea {
  max-width: 100%;
}

label {
  margin-top: 20px;
  margin-bottom: 2px;
}

form textarea {
  height: 75px;
  padding-top: 10px;
  padding-left: 5px;
}

form textarea,
input[type=submit] {
  border-radius: 5px;
}

button {
  margin-top: 15px;
  background-color: black;
  color: white;
  padding: 10px 0;
}

button:hover {
  font-weight: bold;
  background-color: gray;
  color: black;
}

.contact-links {
  margin-top: 25px;
}

#contact h3 {
  text-align:center;
}


/********* DESKTOP STYLES *********/
@media all and (min-width: 850px) {
  .container {
    width: 75%;
    margin-top: 90px
  }

  .all-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 0 15px;
    position:fixed;
    top: 0;
    width: 100%;
  }

  header h1 {
    flex-shrink: 0;
  }

  #desktop-only {
    display: inline;
  }

  nav {
    width: auto;
  }

  nav ul {
    justify-content: end;
  }

  nav ul li {
    padding: 0 1em;
  }
  .project-item {
    width: 50%;
  }

  .project-item {
    display: flex;
    flex-direction: column;
  }

  .project-content {
    flex: 1 0 auto;
  }

  .project-image img {
    height: 100%;
  }

  /* Undo alternating background color on items for desktop */
  .project-item:nth-of-type(even) {
    background-color: inherit;
  }

  .project-item h3 {
    text-align: center;
  }

  .contact-items {
    display: flex;
  }

  form {
    flex: 2;
    margin-right: 20px;
  }

  .contact-links {
    flex: 1;
    margin-top: 0;
  }

  #contact h3 {
    text-align: left;
  }

}
