html, body {
  font-family: franklin-gothic, dnp-shuei-gothic-gin-std, sans-serif;
  font-weight: 400;
  font-style: normal;
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  z-index: 9999;
  background: transparent;
}

#logo {
  height: 24px;
  transition: filter 0.3s ease;
}

.email {
  font-size: 14px;
  position: fixed;
  top: 21px;
  right: 80px; 
  z-index: 10000;
  background: none;
  padding: 0;
  transition: color 0.3s ease;
}

.contact-links {
  position: fixed;
  top: 21px;
  right: 20px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-links .email {
  font-size: 14px;
  position: static;
}

.contact-links .instagram-link {
  font-size: 14px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-links .instagram-link:hover {
  text-decoration: underline;
}

.overlay {
  position: fixed;
  bottom: 20px;
  left: 20px;
  font-size: 14px;
  z-index: 10000;
  transition: color 0.3s ease;
}

.overlay.top-title {
  position: fixed;
  bottom: 46px !important;
  left: 20px;
  font-size: 14px;
  z-index: 10000;
  transition: color 0.3s ease;
  white-space: normal;
  line-height: 1.4;
  display: block;
  max-width: calc(100% - 60px); 
  box-sizing: border-box;
  word-break: break-word;
}

.nav-arrows {
  position: fixed;
  bottom: 15px !important;
  right: 20px;            
  font-size: 14px;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: flex-end; 
  transition: color 0.3s ease;
}

.arrow {
  cursor: pointer;
  margin: 0 4px;
}

.portfolio-container {
  position: relative;
  width: 100%;
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  z-index: 1;
}

.portfolio-slide {
  position: absolute;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center; 
  background-image: var(--bg-url);
  background-position: center;
  background-size: contain;
  background-repeat: repeat;
}

.portfolio-links {
  position: fixed;
  bottom: 22px; 
  left: 20px;
  display: flex;
  gap: 12px;
  z-index: 10000;
}

.portfolio-links .portfolio-btn {
  font-size: 14px;
  font-weight: 400;
  color: inherit; 
  transition: color 0.3s ease;
  position: relative;
  text-decoration: none; /* ? text-decoration ????? */
  padding-bottom: 2px;
}

.portfolio-links .portfolio-btn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;       /* ? ????2px???? */
  height: 1px;        /* ???? */
  width: 0%;
  background: currentColor;
  transition: width 180ms ease;
}

/* hover ? */
.portfolio-links .portfolio-btn:hover::after {
  width: 100%;
}

/* ?????? (active) */
.portfolio-links .portfolio-btn.active::after {
  width: 100%;
}

@media (max-width: 768px) {
  .portfolio-slide {
    background-repeat: repeat-y;
  }
}

@media (max-width: 768px) {
  .portfolio-slide {
    background-repeat: repeat-y; 
    background-size: contain;
  }
}


.portfolio-slide.active {
  display: flex;
}

.portfolio-slide img {
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  display: block;
}

.portfolio-slide video {
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain; 
  display: block;
}

body.theme-white .contact-links .email,
body.theme-white .contact-links .instagram-link,
body.theme-white .overlay.top-title,
body.theme-white .nav-arrows,
body.theme-white .portfolio-links .portfolio-btn { 
  color: white; 
}

body:not(.theme-white) .contact-links .email,
body:not(.theme-white) .contact-links .instagram-link,
body:not(.theme-white) .overlay.top-title,
body:not(.theme-white) .nav-arrows,
body:not(.theme-white) .portfolio-links .portfolio-btn { 
  color: black; 
}

@media (max-width: 768px) {
  #logo {
    transform-origin: left bottom;  
    transform: scale(0.7);          
  }
}

@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
  .portfolio-slide {
    background-repeat: repeat;  
    background-size: contain;      
  }
}

@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
  .portfolio-slide {
    background-repeat: repeat; 
    background-size: contain;
  }
}

@media (max-width: 850px) and (orientation: landscape) {
  .portfolio-slide {
    background-repeat: repeat; 
    background-size: auto 100%;  
  }
}


