:root {
  /* default theme */
  --theme-color-base: #000;
  /* banner */
  --carousel-height: 100px;
  /* font */
  --font-base: 20px;
  --line-height-base: 24px;
  --font-caption: 16px;
  --line-height-caption: 20px;
  --font-text: clamp(1.25rem, 0.5rem + 2vw, 2.25rem);
  --line-height-text: calc(clamp(1.25rem, 0.5rem + 2vw, 2.25rem) * 1.25);
}

* {
  box-sizing: border-box;
}

/* general */

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: Helvetica, Arial, sans-serif;
  letter-spacing: 0.02em; 
  margin: 16px;
  font-size: var(--font-base);
  line-height: var(--line-height-base);
}

.page-text main,
.page-about main {
  font-size: var(--font-text);
  line-height: var(--line-height-text);
}

main a {
  color: var(--theme-color-secondary);
}

main ul {
  list-style: none;
  text-indent: -1em;
  padding: 0 0 0 1em;
}

main ul li p {
  margin: 0;
}

* {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text; 
  user-select: text;
}

::-moz-selection,
::-webkit-selection,
::selection {
  background: var(--theme-color-primary);
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--theme-color-secondary);
  text-decoration: underline;
}

.print {
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  font-size: var(--font-base);
  padding: 0;
  margin: 0;
}

.print,
.download {
  color: var(--theme-color-secondary);
}

.active {
  text-decoration: underline;
}

/* page */

.page-home {
  overflow: hidden;
}

/* header */

h1 {
  visibility: hidden;
  position: absolute;
  width: 0;
  height: 0;
}

/* navigation */

.page-home nav {
  position: sticky;
  top: var(--carousel-height);
  z-index: 99;
}

.page-home .languages {
  z-index: 9;
  position: fixed;
  top: var(--carousel-height);
  right: 16px;
}

nav {
  position: sticky;
  top: 16px;
  margin-top: var(--carousel-height);
  display: flex;
  justify-content: space-between;
}

.navigation {
  display: flex;
  gap: 16px;
}

.languages {
  z-index: 9999;
  display: flex;
  gap: 8px;
}

/* carousel */

.carousel {
  will-change: transform;
  z-index: 1;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: var(--carousel-height);
  overflow-x: scroll;
  overflow-y: hidden;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.carousel::-webkit-scrollbar {
  display: none; /* Chrome and Safari */
}

.carousel .scroll {
  display: flex;
  width: 100%;
  height: 100%;
}

.carousel .scroll .space {
  overflow: hidden;
}

.carousel .scroll .space:first-child {
  padding-left: 50vw;
  position: relative;
}

.carousel .scroll .space:last-child {
  padding-right: 50vw;
  position: relative;
}

.carousel .space .placeholders {
  display: flex;
  position: absolute;
  /* opacity: 0.5; */
  height: 100%;
}

.carousel .space .placeholders .thumbnail img {
  opacity: 0.5;
}

.carousel .space:first-child .placeholders {
  right: 0%;
  flex-direction: row-reverse;
}

.carousel .space:last-child .placeholders {
  left: 0%;
}

.carousel .space .thumbnail {
  width: fit-content;
}

.carousel .scroll .thumbnail {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 8px;
  height: 100%;
}

.carousel .thumbnail img {
  outline-width: 2px;
  outline-style: solid;
  outline-color: rgba(0, 0, 0, 0);
  transition: outline-color 250ms;
  cursor: pointer;
}

.carousel .thumbnail img.landscape {
  height: 65%;
  width: auto;
}

.carousel .thumbnail img.portrait {
  height: 100%;
  width: auto;
}

.carousel .thumbnail.selected img {
  outline-color: var(--theme-color-secondary);
}

.carousel .space .thumbnail.selected img {
  outline-color: rgba(0, 0, 0, 0);
}

/* details */

.details {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100svh;
  z-index: -1;
  overflow: hidden;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.details::-webkit-scrollbar {
  display: none; /* Chrome and Safari */
}

.details .scroll {
  display: flex;
  width: 100%;
  height: 100%;
}

.details .project {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100svh;
  flex: 1 0 auto;
}

.details .project.margin {
  padding-top: var(--carousel-height);
}

.details .project .image {
  flex: 1;
  position: relative;
}

.details .project .image svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 100%;
  width: 100%;
  z-index: -1;
}

.details .project .image svg rect {
  height: 100%;
  width: 100%;
  fill: var(--theme-color-primary);
}

.details .project .image img {
  position: absolute;
  height: 100%;
  width: 100%;
  object-fit: contain;
}

/* caption */

.details .project .caption {
  font-size: var(--font-caption);
  text-align: center;
  padding: 16px;
  width: 100%;
  position: absolute;
  bottom: 0;
}

.details .project.margin .caption {
  position: unset;
  bottom: 0;
  left: 0;
  transform: unset;
}

/* .details .project .caption .materials .material:not(:last-child)::after {
  content: ',';
} */

.details .project .caption .materials .material:not(:first-child) {
  text-transform: lowercase;
}

.details .project.selected {
  opacity: 1;
  z-index: 9;
}

/* page text */

h2 {
  font-size: inherit;
  font-weight: inherit;
}

.page-text ol, .page-text ul {
  list-style: none;
  padding: 0;
  font-size: var(--font-caption);
  line-height: var(--line-height-caption);
}

.page-text ol li, .page-text ul li {
  margin-top: 0.5em;
}

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

  :root {
    /* --font-base: 18px;
    --line-height-base: 22px; */
    --font-text: 18px;
    --line-height-text: 22px;
  }

  /* general */

  main {
    font-size: var(--font-text);
    line-height: var(--line-height-text);
  }

  /* navigation */

  nav {
    position: inherit;
    margin-top: 0;
  }

  .navigation {
    margin-top: 0;
    flex-direction: column;
    gap: 8px;
  }

  .page-home .languages, .languages {
    position: fixed;
    right: 16px;
    top: 16px;
  }
  
  /* page */

  .page-home {
    overflow: unset;
    margin: 0;
  }
  
  /* toggle */

  .details-top .details {
    z-index: 9;
    opacity: 1;
  }
  
  .details-top .carousel {
    opacity: 0.5;
  }

  /* carousel */

  .carousel {
    position: relative;
    height: auto;
    width: 100%;
    overflow-y: unset;
    overflow-x: unset;
    z-index: 9;
  }

  .carousel .scroll {
    width: 128px;
    height: unset;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
  }

  .carousel .scroll .space:first-child {
    padding-left: 0;
    padding-top: 50vh;
  }

  .carousel .scroll .space:last-child {
    padding-right: 0;
    padding-bottom: 50vh;
  }

  .carousel .space .placeholders {
    flex-direction: column;
    width: 100%;
  }

  .carousel .scroll .space:first-child .placeholders {
    flex-direction: column-reverse;
  }
  
  .carousel .space:first-child .placeholders {
    bottom: 0%;
  }
  
  .carousel .space:last-child .placeholders {
    top: 0%;
  }  

  .carousel .scroll .thumbnail {
    padding: 8px 24px;
    width: 100%;

    display: flex;
    justify-content: center;
    align-items: center;

    position: relative;
  }

  .carousel .scroll .thumbnail img.landscape {
    height: auto;
    width: 100%;
  }

  .carousel .scroll .thumbnail img.portrait {
    height: auto;
    width: 65%;
  }

  /* details */

  .details {
    opacity: 0.5;
    pointer-events: none;
  }
}

@media print {
  /* All your print styles go here */
  header, nav, .print {
    display: none !important;
  }
}