[data-theme="dark"] {
  --background: #262626;

  --main-text: #e1e1e1;
  --alternative-text: #bababa;

  --logo-filter: invert(0);
  --icon-filter: invert(1);
}
[data-theme="light"] {
  --background: #e1e1e1;

  --main-text: #262626;
  --alternative-text: #4f4f4f;

  --logo-filter: invert(1);
  --icon-filter: invert(0);
}
[lang="en"] :lang(zh-Hans) {
  display: none;
}
[lang="zh-Hans"] :lang(en) {
  display: none;
}
[data-theme="dark"] .light {
  display: none;
}
[data-theme="light"] .dark {
  display: none;
}



* {
  box-sizing: border-box;
  color: inherit;
  font-family: inherit;
  font-weight: 400;
  margin: 0;
  z-index: 0;
}



body {
  background: var(--background);
  color: var(--main-text);
  font-family: Roboto, sans-serif;
  line-height: 1.5;
}

h1 {
  font-size: x-large;
  margin: 10px;
}

section {
  margin: 20px;
}

p {
  margin: 10px;
}



/* https://css-tricks.com/adaptive-photo-layout-with-flexbox/ */
.wall {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

.wrap {
  flex-grow: 3;
  height: 40vh;
  margin: 10px;
  position: relative;
  transition: 0.2s ease;
}

.wrap.portrait {
  flex-grow: 1;
}

.photo {
  max-height: 100%;
  min-width: 100%;
  object-fit: cover;
  vertical-align: bottom;
}

.x-small .wrap {
  height: 20vh;
}

.small .wrap {
  height: 30vh;
}

.large .wrap {
  height: 70vh;
}

.x-large .wrap {
  height: auto;
  width: 100%;
}

.x-large .wrap .photo {
  width: 100%;
  min-width: 0;
}

.wrap span {
  background-color: var(--background);
  bottom: 0;
  left: 0;
  opacity:0;
  padding: 5px;
  position: absolute;
  right: 0;
  transition:all 0.2s ease-in-out;
  z-index: 2;
}

.wrap:hover span,
.touch .wrap span{
  opacity: 1;
}



.text {
  max-width: 1000px;
  margin: 20px auto;
}

.text h1 {
  font-size: 24px;
}


header {
  align-items: center;
  background: var(--background);
  display: flex;
  padding: 10px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.logo {
  filter: var(--logo-filter);
  height: 60px;
}

.spacer {
  flex-grow: 10;
}

.icon {
  background-size: cover;
  cursor: pointer;
  filter: var(--icon-filter);
  height: 32px;
  margin: 5px;
  width: 32px;
}

.icon.invert {
  filter: var(--logo-filter);
}

.icon:last-child {
  margin-right: 10px;
}

.info {
  background-image: url(/assets/info.png);
}

.dark-mode {
  background-image: url(/assets/dark.png);
}

.light-mode {
  background-image: url(/assets/light.png);
}

.en-lang {
  background-image: url(/assets/en.png);
}

.zh-lang {
  background-image: url(/assets/zh.png);
}

.zoom-in {
  background-image: url(/assets/zoom-in.png);
}

.zoom-out {
  background-image: url(/assets/zoom-out.png);
}



#info {
  margin-top: 20px;
}



@media only screen and (max-device-width:767px) {
  .wrap {
    height: auto;
    width: 100%;
  }

  .photo {
    width: 100%;
    min-width: 0;
  }


  .wrap span{
    opacity: 1;
  }



  .desktop {
    display: none;
  }



  section {
    margin: 10px;
  }
}
