@import url(https://fonts.googleapis.com/css?family=Montserrat:700);
@import url(https://fonts.googleapis.com/css?family=Merriweather);
body {
  font-family: "Merriweather", serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Montserrat", sans-serif;
}

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

#main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  background: #f8f5f0;
}

.nav {
  display: flex;
    flex-flow: row wrap;
    justify-content: center;
    flex: 1 1 auto;
    padding: 5px 10px;
    background: #dcc6a8;
}

.nav-item {
  position: relative;
    padding: 0 30px;
    font-size: 1.2em;
    font-weight: 700;
    color: #795548;
    text-decoration: none;
    line-height: 1.5;
}
.nav-item:hover {
    color: #fff;
}
.nav-item.active {
  color: #fff;
  transition: all 350ms;
}
.nav-item.active:before {
  width: 100%;
}

.portfolio {
  display: flex;
  flex-flow: row wrap;
  padding: 0;
  margin: 0;
  list-style: none;
}

.project {
  position: relative;
  flex: 1 0 calc(100% - 20px);
  margin: 10px;
}
.project:hover .project-info {
  background: rgba(89, 89, 89, 0.7);
}
@media (min-width: 520px) {
  .project {
    flex: 0 0 calc((100% / 2) - 20px);
  }
}
@media (min-width: 860px) {
  .project {
    flex: 0 0 calc((100% / 2) - 20px);
  }
}

.project-image img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #bca480;
  padding: 5px;
}

.project-info {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: #f6f6f6;
  background: rgba(89, 89, 89, 0.8);
  opacity: 0;
  transition: all 350ms ease-in;
}
.project-info:hover {
  opacity: 1;
}
@media (max-width: 520px) {
  .project-info {
    opacity: .8;
  }
}

.project-info-title {
  margin: 0 0 30px;
  font-size: 16px;
  text-align: center;
  text-transform: uppercase;
}

.project-info-button {
  padding: .5em 1em;
  color: inherit;
  text-decoration: none;
  border: 1px solid #f6f6f6;
  border-radius: 3px;
  transition: all 350ms;
}
.project-info-button:hover {
  color: #595959;
  background: #f6f6f6;
  border-color: #f6f6f6;
}