/* theme toggle buttons */
#theme-toggle, #language-toggle {
  background-color: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

#theme-toggle .sun,
#theme-toggle .moon {
  display: none;
}

html[data-theme="light"] #theme-toggle .moon {
  display: inline;
}

html[data-theme="dark"] #theme-toggle .sun {
  display: inline;
}

a {
  cursor: pointer;
}

img {
  max-height: 400px !important;
}

.img-box {
  padding: 1% 4%;
  display: grid;
  gap: 3%;
  justify-items: center;
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Specify number of columns with additional classes */
.img-box.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.img-box.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.img-box.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}
.img-box.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

figure {
  margin: 0 !important;
}

figcaption {
  text-align: center;
  font-size: 0.9em;
  margin-top: 0.5em;
}

/* Language switching using data-language on <html> */
html[data-language^="en"] .zh { 
  display: none !important; 
}
html[data-language^="zh"] .en { 
  display: none !important; 
}

/* Mobile styles */
@media (max-width: 768px) {
  #nav li {
    margin-right: 0 !important;
    right: 0 !important;
  }

  #nav li a {
    margin-right: 0 !important;
  }
}