@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");

body {
  background: white;
  color: #444;

  font-family: "Helvetica Neue", "Open Sans", Helvetica, sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.4rem;
}

.main-content {
  width: 80%;
  max-width: 1200px;
  margin: auto;
}

header {
  margin-top: 40px;
}

footer {
  margin-top: 80px;
  margin-bottom: 10px;
  text-align: center;
}

h1 {
  font-size: 3rem;
  line-height: 3rem;
}

h3 {
  font-size: 1.6rem;
  line-height: 1.7rem;
  min-height: 3.4rem;
}

p {
  margin-top: 40px;
  margin-bottom: 40px;
}

.animate-in {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease, transform 1s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-title {
  position: relative;
}

.main-title:before {
  content: ' ';
  position: absolute;
  top: 9px;
  width: 2rem;
  height: 2rem;
  background: url(small-pat.png);
  background-size: 2rem 2rem;
  opacity: 0.15;
  left: -2.5rem;
}

.email {
  border-radius: 30px;
  border: 1px solid #444;
  text-decoration: none;
  padding: 8px;
  padding-left: 14px;
  padding-right: 14px;
  min-width: 140px;
  text-align: center;
  color: #444;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  font-size: 1rem;
  line-height: 1rem;
  height: 1rem;

  transition: 100ms ease-in-out background, 200ms ease-in-out color;
}

.email:hover {
  background: #444;
  color: white;
}

/* grid */

.art-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.art-grid .item {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.art-grid .item .top {
  display: flex;
  align-items: flex-end;
}

.logo-small {
  display: inline-block;
  width: 40px;
  border-radius: 4px;
  margin-top: 10px;
}

.art-grid .item .middle {
  background-color: #ddd;
  margin: 0px;
  padding: 0px;
  top: 0px;
  left: 0px;
  position: relative;
  border: none;
  width: 100%;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 4px;
}

.art-grid .item .bottom {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.art-grid .item .bottom .thumbnail {
  position: relative;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  border-radius: 4px;
}

.art-grid .item .bottom .thumbnail:after,
.art-grid .item .middle:after {
  opacity: 0;
  content: '＋';
  font-size: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  transition: 150ms ease-in-out opacity;
  background: rgba(255, 255, 255, 0.5);
}

.art-grid .item .bottom .thumbnail:active { transform: scale(0.95); }
.art-grid .item .middle:active { transform: scale(0.975); }

.art-grid .item .bottom .thumbnail:hover:after,
.art-grid .item .middle:hover:after {
  opacity: 1;
}

.art-grid .item .bottom .thumbnail:after {
  content: '+';
}

/* gallery */

.gallery.transitioning {
  opacity: 0.1;
  transform: scale(0.9);
}

.gallery {
  position: fixed;
  height: 100%;
  width: 100%;
  top: 0px;
  background: rgba(255,255,255,0.9);

  transform: scale(1);
  transition: 300ms ease-in-out transform, 250ms ease-in-out opacity;
}

.gallery button.left,
.gallery button.right {
  position: absolute;
  left: 10px;
  top: 50%;
  height: 50px;
  width: 40px;
  margin-top: -25px;
}

.gallery button {
  border: none;
  background: rgba(0,0,0,0.08);
  border-radius: 4px;
  opacity: 0.8;
  cursor: pointer;
}

.gallery button svg {
  fill: #444;
}

.gallery button:hover {
  opacity: 1;
}

.gallery button {
  padding: 0px;
  padding-top: 3px;
}

.gallery button:active {
  background: #444;
}

.gallery button:active svg {
  fill: white;
}

.gallery button.close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 45px;
  height: 45px;
}

.gallery .top {
  flex: 1;
}

.gallery .content {
  position: absolute;
  left: 60px;
  width: calc(100% - 120px);
  display: flex;
  flex-direction: row;
  gap: 20px;
  height: 100%;
}

.gallery .content .left {
  flex: 1;
  align-items: center;
  display: flex;
}


.gallery .content .left h3 {
  margin-top: 30px;
  margin-bottom: 10px;
}

.gallery .content .left p {
  margin: 0px;
}

.gallery .content .right {
  flex: 2;
  width: 100%;
  padding-top: 20px;
  padding-bottom: 20px;
}

@keyframes placeHolderShimmer {
  0% {
    background-position: 0px 0;
  }
  100% {
    background-position: 100em 0;
  }
}

/* https://stackoverflow.com/questions/46578562 */
.c-animated-background {
  animation-duration: 4s;
  animation-fill-mode: forwards;
  animation-iteration-count: infinite;
  animation-name: placeHolderShimmer;
  animation-timing-function: linear;
  background: linear-gradient(to right, #dddddd 10%, #eeeeee 20%, #dddddd 30%, #eeeeee 40%, #dddddd 50%);
}

.gallery .content .right .img-holder {
  width: 100%;
  height: 100%;
  position: relative;
}

.gallery .content .right .main-img {
  position: relative;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  margin: auto;
  background-position: center;
  z-index: 1;
}

.gallery .content .right .loader {
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -100px;
  margin-top: -40px;
  width: 200px;
  height: 80px;
  border-radius: 10px;
}

.gallery button.right {
  left: auto;
  right: 10px;
}

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

  body {
    font-size: 0.8rem;
    line-height: 1rem;
  }

  .main-content {
    width: 90%;
  }

  h1 {
    font-size: 2.2rem;
  }

  h3 {
    font-size: 1.2rem;
    line-height: 1.4rem;
  }

  .main-title:before {
    display: none;
  }

  .art-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .gallery .content {
    flex-direction: column;
  }

  p {
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .gallery .content .right {
    flex: 6;
  }

  .email {
    min-width: 80px;
  }

  .gallery .content .right .loader {
    display: none;
  }
}