html, body, nav, div, figure, figcaption {
    margin: 0;
    padding: 0;
}

figcaption {
    font-size: 100%;
}

html {
    box-sizing: border-box;
    --vh: 1vh;
}

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

html, body {
    overflow: hidden;
}

body {
  color: black;
  font-family: "Pretendard Variable", Pretendard, "Pretendard JP", BlinkMacSystemFont, -apple-system, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", Helvetica, Arial, sans-serif;
  background-color: #fafafa;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.nav {
  position: fixed;
  top: 0;
  padding-top: 17px;
  z-index: 1000;
}

.nav img {
  width: 20px;
  height: 20px;
}

#left {
  left: 0;
  padding-left: 20px;
}

#right {
  right: 0;
  padding-right: 20px;
  background: linear-gradient(
      90deg,
      #000000 20%, 
      #000000 30%, 
      #fafafa 40%, 
      #fafafa 50%, 
      #fafafa 60%, 
      #000000 70%, 
      #000000 80%
  );
  background-size: 400% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: highlightSweep 5s linear 1;
}

@keyframes highlightSweep {
  0% {
      background-position: -100% 50%;
  }
  100% {
      background-position: 100% 50%;
  }
}

#left img {
  transform: rotate(180deg);
}

.nav a img {
  filter: invert(0);
}

.nav a:hover {
  opacity:0.6;
  cursor: default;
}

.nav a:hover img {
  filter: invert(1);
  cursor: default;
}

.slideshow-container {
  position: relative;
  max-width: 95%;
  margin: 5vh auto;
  height: calc(var(--vh, 1vh) * 90);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide {
  display: none;
  width: 100%;
  height: calc(var(--vh, 1vh) * 85);
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.slide.active {
  display: flex;
}

.slide figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: auto;
}

.slide figure img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.slide figcaption {
  font-weight:400;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  width: 100%;
  min-height: 1.2em;
}

.slide figcaption:empty {
  visibility: hidden;
}

.slide.no-captions figcaption {
  min-height: 0;
  margin-top: 0;
  visibility: visible;
}

.slide.no-captions figcaption:empty {
  display: none;
}

figcaption span {
  font-weight: 500;
}

.slide-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 100;
}

.slide-nav.prev {
  left: 0;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26' fill='none' stroke='black' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpolyline points='15,17 7,12 15,7'%3E%3C/polyline%3E%3C/svg%3E"), auto;
}

.slide-nav.next {
  right: 0;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26' fill='none' stroke='black' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpolyline points='9,17 17,12 9,7'%3E%3C/polyline%3E%3C/svg%3E"), auto;
}

.slide-counter {
  position: fixed;
  z-index: 1000;
}

/*--------------- Media Queries ---------------*/

@media screen and (max-width: 780px) {
  #left {
    display: none;
  }
  
  #right {
    font-size: 0.8rem;
    letter-spacing: 0.03rem;
    position: fixed;    
    bottom: 1rem;       
    right: 1rem;       
    top: auto;          
    transform: none;     
    padding-right: 0;
    animation: highlightSweep 6s linear 0.5;
  }

  .slideshow-container {
    margin: 0 auto;
    height: calc(100dvh - 30px);
    overflow: hidden; 
  }
  
  .slide {
    flex-direction: column;
    justify-content: center;
  }

  .slide figure {
    padding-bottom:1.5em;
  }
  
  .slide figure img {
    max-height: 85dvh; 
    max-width: 90vw;
  }
  
  .slide figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.7rem;
    margin-top: 0;
    margin-bottom: 3vh;
  }

  .slide figcaption:empty {
    display: none;
  }

  .slide-counter {
    bottom: 1rem;
    left: 1rem;
    font-size: 0.8rem;
    letter-spacing: 0;
  }
}

@media screen and (max-width: 780px) and (orientation: landscape) {
  .nav img {
    width: 15px;
    height: 15px;
  }

  #left {
    display: block;
    padding-top: 17px;
    padding-left: 20px;
  }
  
  #right {
    font-size: 0.8rem;
    letter-spacing: 0.03rem;
    position: fixed;    
    top: 0;
    right: 0;
    bottom: auto;          
    transform: none;     
    padding-top: 17px;
    padding-right: 20px;
    animation: highlightSweep 6s linear 0.5;
  }

  .slideshow-container {
    margin: 5vh auto;
    height: calc(var(--vh, 1vh) * 88);
    max-width: 90%;
  }
  
  .slide {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
  }

  .slide figure {
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: auto;
  }
  
  .slide figure img {
    max-height: calc(var(--vh, 1vh) * 70);
    max-width: none;
  }
  
  .slide.s1 figure {
    max-width: 80%;
  }

  .slide.s2 figure {
    max-width: 45%;
    min-width: 200px;
  }

  .slide.s3 figure {
    max-width: 30%;
    min-width: 150px;
  }
  
  .slide figcaption {
    position: static;
    text-align: center;
    font-size: 0.7rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
    width: 100%;
    min-height: 1.2em;
  }

  .slide figcaption:empty {
    visibility: hidden;
  }

  .slide-counter {
    bottom: 17px;
    right: 20px;
    left: auto;
    font-size: 0.8rem;
    letter-spacing: 0;
  }
}

@media screen and (min-width: 781px) {
  .slideshow-container {
    max-width: 90%;
    height: calc(var(--vh, 1vh) * 85);
  }

  .slide figure img {
    max-height: calc(var(--vh, 1vh) * 85);
  }

  .slide.s1 figure {
    max-width: 80%;
  }

  .slide.s2 figure {
    max-width: 45%;
    min-width: 200px;
  }

  .slide.s3 figure {
    max-width: 30%;
    min-width: 150px;
  }

  .slide-counter {
    bottom: 17px;
    right: 20px;
  }
}

@media screen and (min-width: 781px) and (max-width: 1366px) {
  .nav img {
    width: 18px;
    height: 18px;
  }

  #right {
    font-size: 17px;
  }

  .slideshow-container {
    margin: 5.3vh auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .slide figure {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; 
    height: auto;
  }

  .slide figcaption {
    font-size: 0.6rem;
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
  }

  .slide-counter {
    font-size: 14px;
  }
}

@media screen and (min-width: 781px) and (max-width: 900px) {
  .slide {
    gap: 20px; 
  }

  .slide.s1 figure img{
    max-height: calc(var(--vh, 1vh) * 60); 
  }
  
  .slide.s3 figure {
    max-width: 28%; 
    min-width: 120px; 
  }
  
  .slide.s3 {
    flex-wrap: nowrap; 
  }
}


@media screen and (min-width: 1367px) and (max-width: 2999px) {
  .nav img {
    width: 20px;
    height: 20px;
  }

  #right {
    font-size: 20px;
  }

  .slideshow-container {
    margin: 7vh auto;
  }

  .slide figure img {
    max-height: calc(var(--vh, 1vh) * 85);
  }

  .slide-counter {
    font-size: 18px;
  }
}

@media screen and (min-width: 3000px) {
  .nav {
    padding-top: 50px;
  }

  #left {
    padding-left: 50px;
  }

  #right {
    font-size: 40px;
    padding-right: 50px;
  }

  .nav img {
    width: 40px;
    height: 40px;
  }

  .slideshow-container {
    margin: 8vh auto;
  }

  .slide {
    gap: 70px;
  }

  .slide figcaption {
    font-size: 1rem;
  }

  .slide-counter {
    font-size: 30px;
    padding-right: 50px;
    bottom: 50px;
  }
}