body {
  background-color: var(--bg-color);
  line-height: 1.8rem;
  vertical-align: middle;
}

.portfolio-header {
  padding: 13rem 1rem 2rem 1rem;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
  position: relative;
  background-color: var(--gray1);
}

.portfolio-header h1 {
  color: var(--gray4);
  font-weight: 800;
  text-align: start;
  font-family: "Neusa Sans", sans-serif;
  font-size: 6rem;
}

.portfolio-header a {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%,0);
}

.portfolio-filters {
  padding: 2rem 0 2rem 0;
  width: 100%;
  display: flex;
  justify-content: start;
  align-items: center;
  flex-wrap: nowrap;
}
.portfolio-filters-selector {
  flex: 1 0 auto;
  text-align: left;
  cursor: pointer;
}
.portfolio-filters-selector h3 {
  position: relative;
  width: fit-content;
  font-weight: bold;
  border-right: 10px solid transparent;
}
.portfolio-filters-selector .selected {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background-color: var(--gray3);
  opacity: 0;
  z-index: -1;
  transition: all .3s ease-out;
}

.portfolio-projects {
  padding: 1rem 0 5rem 0;
  width: 100%;
  min-height: 800px;
  display: flex;
  justify-content: stretch;
  flex-wrap: wrap;
}

.portfolio-project {

  /*
  force card aspect ratio

  flex: 0 1 25%;
  max-width: 25%;
  */

  flex: 1 1 25%;
  max-width:50%;
  transition: all 500ms ease-in-out;
  height: 0;
  padding-top: 35%;
  position: relative;
  overflow: hidden;
}
.portfolio-project-card {
  box-sizing: border-box;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* border: 3px solid transparent; */
  margin: 3px;
  overflow: hidden;
  transition: all 200ms ease-out;
}
.portfolio-project-card:hover {
  transform: scale(1.01);
}
.portfolio-project-card:link,
.portfolio-project-card:visited,
.portfolio-project-card:hover,
.portfolio-project-card:active {
  text-decoration: none;
}
.portfolio-project-card img {
  object-fit: cover;
  min-width: 100%;
  min-height: 100%;
  width: 100%;
  height: 100%;
}
.portfolio-project-title {
  pointer-events: none;
  padding: 10px;
  box-sizing: border-box;
  text-transform: uppercase;
  font-size: 1.5rem;
  line-height: 1.6rem;
  font-weight: 700;
  width: 100%;
  max-width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  color: var(--bg-color);
  background: rgba(0, 0, 0, .3);
  margin: 3px;
}

@media screen and (max-width: 768px) {

  .portfolio-header{
    padding: 10rem 1rem 0 1rem;
  }

  .portfolio-header h1{
    font-size: 6rem;
    line-height: 6rem;
  }

  .portfolio-filters {
    width: 80%;
    margin: 0 auto 0;
  }
  .portfolio-filters h3 {
    font-size: 1.2rem;
  }
  .portfolio-filters .selected {
    width: 3rem;
    height: 3rem;
  }

  .portfolio-projects {
    flex-wrap: nowrap;
    flex-direction: column;
  }

  .portfolio-project {
    
    flex: 1 1 25%;
    max-width:100%;
    width: 100%;
    padding-top: 150%;
    margin-bottom: 1rem;
  }

  .portfolio-project-card {
    
    /*border: 5px solid transparent;*/
    padding-inline: 0.5rem;
    border-bottom: 4.5rem solid transparent;
    margin:0;
  }

  .portfolio-project-title {
    background: none;
    font-family: "Neusa Sans";
    color: var(--gray1);
    bottom: unset;
    top: calc(100% - 4.5rem);
    font-size: 2rem;
  }

  .portfolio-filters {
    flex-wrap: wrap;
    row-gap: 20px;
  }
  .portfolio-filters-selector {
    flex: 1 1 auto;
  }
}

