body,
html {
  height: 100%;
  margin: 0;
  font-size: 16px;
  font-family: sans-serif;
  font-weight: 400;
  line-height: 1.8em;
  color: #666;
}

.pimg1,
.pimg2,
.pimg3 {
  position: relative;
  opacity: 0.7;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  /* 
fixed = parallax
scroll = normal
*/
  background-attachment: fixed;
}

.pimg1 {
  background-image: url('../images/abstract.jpg');
  min-height: 100%;
}

.pimg2 {
  background-image: url('../images/porfolio_p.jpg');
  max-width: 100%;
  min-height: 400px;
}

.pimg3 {
  background-image: url('../images/porfolio_p2.jpg');
  max-width: 100%;
  min-height: 400px;
}

.section {
  text-align: center;
  padding: 50px 80px;
}

.section-light {
  background-color: #f4f4f4;
  color: #666;
}

.section-dark {
  background-color: #282e34;
  color: #ddd;
}

.section-dark a {
  text-decoration: none;
  color: #ddd;
}

.section-dark a:hover {
  color: #fff;
}

.section-dark2 {
  background-color: #282e34;
  color: #ddd;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.ptext {
  position: absolute;
  top: 50%;
  width: 100%;
  text-align: center;
  color: #000;
  font-size: 28px;
  letter-spacing: 8px;
  text-transform: uppercase;
}

.ptext .border {
  background-color: #111;
  color: #fff;
  padding: 20px;
}

.ptext .border.trans {
  background-color: transparent;
}

.fronttext {
  padding: 20px;
}

a {
  text-decoration: none;
  color: #fff;
}

a:hover {
  color: #282e34;
  cursor: pointer;
}

.res_link:hover {
  color: darkgray;
}

.card-h {
  text-align: center;
  flex-shrink: 0;
  flex-basis: 100%;
}

.card {
  width: 25%;
  margin: 20px;
  background-color: #ddd;
  color: #282e34;
  text-align: left;
  align-items: stretch;
}

.card2 {
  width: 25%;
  margin: 20px;
  background-color: #ddd;
  color: #282e34;
  text-align: center;
  align-items: stretch;
}

.card img {
  width: 100%;
}

.card h5 {
  font-size: 1.5em;
  padding: 0 20px;
  margin: 0 0 5px 0;
}

.card p {
  padding: 0 20px 20px 20px;
  margin: 0;
}

.card p a {
  color: #282e34;
}

.card p a:hover {
  color: #fff;
}

/* portfolio */
.container {
  display: flex;
  flex-wrap: wrap;
  background-color: #282e34;
}

.main-content {
  padding: 10%;
  flex: 1 1 80%;
  min-height: 100vh;
  background-color: #282e34;
}

.portfolio {
  display: grid;
  height: 100%;
  grid-template-rows: repeat(6, 1fr);
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 20px;
}

.portfolio-item {
  background: red;
  color: white;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
}

.portfolio-item.small {
  grid-row: span 1;
  grid-column: span 1;
}

.portfolio-item.medium {
  grid-row: span 2;
  grid-column: span 2;
}

.portfolio-item.large {
  grid-row: span 3;
  grid-column: span 3;
}

.portfolio-item.tall {
  grid-row: span 3;
  grid-column: span 2;
}

.portfolio-item.wide {
  grid-row: span 2;
  grid-column: span 3;
}

.portfolio-item.full {
  grid-row: span 12;
  grid-column: span 5;
}

/* advertisement images */
.adimages {
  margin-bottom: 50px;
}

/* modal */
/* Style the Image Used to Trigger the Modal */
#myImg {
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}

#myImg:hover {
  opacity: 0.7;
}

/* The Modal (background) */
.modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  /* Stay in place */
  z-index: 1;
  /* Sit on top */
  padding-top: 100px;
  /* Location of the box */
  left: 0;
  top: 0;
  width: 100%;
  /* Full width */
  height: 100%;
  /* Full height */
  overflow: auto;
  /* Enable scroll if needed */
  background-color: rgb(0, 0, 0);
  /* Fallback color */
  background-color: rgba(0, 0, 0, 0.7);
  /* Black w/ opacity */
}

/* Modal Content (Image) */
.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
}

/* Caption of Modal Image (Image Text) - Same Width as the Image */
#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 150px;
}

/* Add Animation - Zoom in the Modal */
.modal-content,
#caption {
  animation-name: zoom;
  animation-duration: 0.6s;
}

@keyframes zoom {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

/* The Close Button */
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* 100% Image Width on Smaller Screens
@media only screen and (max-width: 700px) {
  .modal-content {
    width: 100%;
  }
} */

/* end of portfolio */

@media (max-width: 1000px) {
  .pimg1,
  .pimg2,
  .pimg3 {
    background-attachment: scroll;
  }

  .ptext {
    position: absolute;
    top: 50%;
    width: 100%;
    text-align: center;
    color: #000;
    font-size: 28px;
    letter-spacing: 6px;
    text-transform: uppercase;
  }

  .card {
    width: 40%;
    margin: 15px;
    background-color: #ddd;
    color: #282e34;
    text-align: left;
    align-items: stretch;
  }
}

@media (max-width: 778px) {
  .pimg1,
  .pimg2,
  .pimg3 {
    background-attachment: scroll;
  }

  .ptext {
    position: absolute;
    top: 50%;
    width: 100%;
    text-align: center;
    color: #000;
    font-size: 17px;
    letter-spacing: 6px;
    text-transform: uppercase;
  }

  .card {
    width: 100%;
    margin: 10px;
    background-color: #ddd;
    color: #282e34;
    text-align: left;
    align-items: stretch;
  }

  .modal-content {
    width: 100%;
  }
}

@media (max-width: 500px) {
  .pimg1,
  .pimg2,
  .pimg3 {
    background-attachment: scroll;
  }

  .ptext {
    position: absolute;
    top: 50%;
    width: 100%;
    text-align: center;
    color: #000;
    font-size: 17px;
    letter-spacing: 4px;
    text-transform: uppercase;
  }

  .card {
    width: 100%;
    margin: 5px;
    background-color: #ddd;
    color: #282e34;
    text-align: left;
    align-items: stretch;
  }

  .adimages {
    width: 100%;
    height: auto;
    background-attachment: scroll;
  }
}
