:root {
  --h2-size: 2.5em;
  --section-max-width: 130em;
  --image-border-radius: 1rem;
}


body {
  font-family: "Inter", "Helvetica", sans-serif;
  margin: 0;
  background-color: var(--main-bg-color);
  font-size: 16px;
  font-smoothing: antialiased;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: normal;
}

/* =============== HEADER ================= */
header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.3em;
  flex-basis: 50%;
  align-items: baseline;
  max-width: var(--section-max-width);
  box-sizing: border-box;
  margin: 0;
  padding: 1.5em;
  padding-top: 0.5em;
  padding-bottom: 3em;
  z-index: 1000;
  backdrop-filter: blur(4px);
  -webkit-mask: linear-gradient(0deg, transparent, black 50%);
   mask: linear-gradient(0deg, transparent, #000 50%);         /* Standard */
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  
  #logo {
    background-clip: text;
    animation-duration: 20s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    width: fit-content;
    height: 4.5em;
    transform: translateX(-4px);
    
    a {
      text-decoration: none;
    }
    
    h1 {
      font-family: "Helvetica", sans-serif;
      margin-top: 0;
      padding-top: 0;
      font-size: 4.65em;
      color: transparent;
      -webkit-text-stroke: 1px var(--main-text-color);
      text-transform: uppercase;
      font-weight: 200;
    }
  }

  nav {
    display: flex;
    list-style: none;
    justify-content: right;
    height: min-content;
    gap: 3em;
    
    a {
      color: var(--main-text-color);
      text-decoration: none;
      font-weight: 300;
      font-size: var(--h2-size);
      text-transform: uppercase;
      letter-spacing: 0.15ch;
      transition: all 500ms;
    }
    
    a.current {
      text-decoration: underline;
      text-underline-offset: 0.25em;
      color: var(--main-focus-color);
      cursor: default;
    }
    
    /* Fix for weird added empty anchor element.. */
    a:not(:has(:not(:empty))) {
      display: none;
    }
  }
}


/* Menü: Put Menu below, center everything */
@media only screen and (max-width: 1096px) {
   header {
     align-items: unset;
     #logo {
       width: 100%;
       text-align: center;
       font-size: 2.8vw;
       a {
         h1 {
           margin: 0;
           padding: 0;
         }
       }
     }
     nav {
       width: 100%;
       justify-content: center;
       padding-top: 0;
       margin-top: -0.2em;
       object-position: top;
     }
   }
}

/* Logo adjust Fontsize when too small to fit one line */
@media only screen and (max-width: 800px) {
  header {
     #logo {
       h1 {
         font-size: 8.5vw;
       }
     }
   }
}

/* Ensure h2 font is smaller when screen is really small */
@media only screen and (max-width: 600px) {
  body {
    font-size: 14px;
  }
  :root {
    --h2-size: 2.0em;
  }
  header {
     #logo {
       height: unset;
       h1 {
         font-size: 3.2em;
       }
     }
   }
}

/* Ensure h2 font is smaller when screen is really small */
@media only screen and (min-width: 2400px) {
  body {
    padding: 2em;
  }
}

@media only screen and (min-width: 2174px) {
  header {
    margin: auto;
    margin-top: 4em;
  }
}


@keyframes MOVE-BG {
   from {
     background-position-x: 0%;
   }
   to { 
     background-position-x: 100%;
   }
}





/* =============== WORKS ================= */
main {
  margin: 2em;
  margin-top: 10em;
}

main .work {
  width: 100%;
  cursor: pointer;
  max-width: var(--section-max-width);
  box-sizing: border-box;
  margin: auto;
  
  h2 {
    font-family: "Inter", "Helvetica", sans-serif;
    text-transform: uppercase;
    font-weight: 200;
    font-size: var(--h2-size);
    color: var(--main-text-color);
    margin-bottom: 0;
    padding-top: 0;
    margin-top: 0;
    letter-spacing: 0.1ch;
  }
  .images {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3em;
    flex-basis: 50%;
    
    img {
      width: 100%;
      height: auto;
      flex: 1 1 300px; 
    }
    img:first-of-type {
      border-bottom-left-radius: 1em;
      border-top-left-radius: 1em;
    }
    img:last-of-type {
      border-bottom-right-radius: 1em;
      border-top-right-radius: 1em;
    }
  }
}


/* =================== ABOUT =============== */

.bigtext {
  font-size: 1.1em;
  line-height: 1.75;
  max-width: 950px;
  margin: auto;
  padding-bottom: 4em;
  font-weight: 300;
  text-align: justify;
  letter-spacing: 0.1ch;
}

.split {
  display: flex;
  justify-content: center;
  gap: 1em;
  margin: auto;
  max-width: 950px;
  
  img {
    max-height: 480px;
    width: auto;
  }
  
  > div {
    font-size: 0.93em;
    line-height: 1.75;
    padding-top: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    
    .top {
      flex: 2;
      
      .insta, .email, .linkedin {
        padding-top: 0;
        margin-top: -0.4em;
        margin-bottom: 0.8em;
        font-size: 1.3em;
        font-weight: 300;
        letter-spacing: 0.1ch;
        display: flex;
        height: 1.5em;
        align-items: center;
        
        img {
          width: 1.5em;
          height: auto;
          padding: 0;
          margin: 0;
          padding-right: 0.3em;
          transform: translate(-0.2em, 0.5em);
        }
        
        a {
          color: var(--main-text-color);
          text-decoration: none;
          padding: 0;
          margin: 0;
        }
      }
    }
    
    .bottom {
      height: 1em;
      
      p {
        font-size: 0.93em;
        a {
          color: var(--main-text-color);
        }
        a:hover {
          color: var(--main-focus-color)
        }
      }
    }
    
    p:first-of-type {
      padding-top: 0;
      margin-top: -0.3em;
    }
    p {
      padding-bottom: 0em;
      text-align: justify;
      letter-spacing: 0.1ch;
    }
  }
}



.text {
  margin: auto;
  margin-top: 6em;
  max-width: 950px;
  font-size: 0.93em;
  line-height: 1.75;
  &.columned {
    columns: 2;
    gap: max(5vw, 4px);
  }
  
  h3 {
    font-size: 2rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.1ch;
  }
  
  h4 {
    font-weight: normal;
    font-size: 1.4em;
    text-transform: uppercase;
    font-weight: 300;
    margin-bottom: 0;
    letter-spacing: 0.1ch;
  }
  
  h5 {
    font-weight: normal;
    font-size: 1.1em;
    text-transform: uppercase;
    font-weight: 300;
    margin-bottom: 0.5em;
    letter-spacing: 0.1ch;
  }
  
  p:first-of-type {
    padding-top: 0;
    margin-top: -0.3em;
  }
  p, a {
    padding-bottom: 0em;
    text-align: justify;
    letter-spacing: 0.1ch;
  }
  
  a {
    color: var(--main-text-color);
  }
  
  a:hover {
    color: var(--main-focus-color);
  }
}

/* Logo adjust Fontsize when too small to fit one line */
@media only screen and (max-width: 600px) {
  .text {
    &.columned {
      columns: 1;
    }
  }
}


.exhibitions, .press, .teaching, .education, .teaching, .awards {
  max-width: 950px;
  margin: auto;
  margin-top: 6em;
  
  h3 {
    font-size: 2em;
    font-weight: 200;
    text-transform: uppercase;
    letter-spacing: 0.1ch;
  }
  table {
    font-size: 1.0em;
    padding: 0;
    font-weight: 300;
    letter-spacing: 0.1ch;
    border-collapse: collapse;
    td {
      padding: 0.25em 0.5em;
      a {
        text-decoration: none;
        color: var(--main-focus-color);
      }
    }
    td:first-of-type {
      width: 6.8em;
      text-align: left;
      padding-left: 0;
    }
    tr {
      border-bottom: 1px var(--main-text-color) solid;
    }
    tr:last-of-type {
      border-bottom: none;
    }
    td.alone {
      width: 100%;
    }
  }
}

.education {
  table {
    margin: 0;
    tr {
      display: block;
      td {
        width: 100% !important;
      }
    }
  }
}

.exhibitions table tr td:last-of-type {
  letter-spacing: 0.05ch;
}

section:last-of-type {
  margin-bottom: 16em;
}

/* ============== ERROR ================ */
body.template-error {
  section {
    max-width: 950px;
    width: fit-content;
    padding: 1em;
    margin: auto;
    margin-top: 6em;
    transform: rotate(-5deg);
    border: 1px solid var(--main-text-color);
    border-radius: 1em;
    h1 {
      font-size: 3em !important;
      text-transform: uppercase;
      font-family: "Inter", "Helvetica", sans-serif;
      font-variation-settings: "wght" 100;
      font-weight: 100;
      padding-top: 0;
      margin-top: 0;
      padding-bottom: 0;
      margin-bottom: 0;
      text-align: center;
    }
    p {
      font-family: "Inter", "Helvetica", sans-serif;
      font-weight: 300;
      padding-top: 0;
      margin-top: 0;
      text-align: center;
    }
  }
}

.missing-image {
  background-color: rgba(60, 60, 60, 0.2);
  display: flex;
  align-content: center;
  text-align: center;
  h3 {
    color: rgba(60, 60, 60, 0.3);
  }
}

/* ============== WORK ================ */

section.images {
  margin: auto;
  max-width: 1448px;
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  
  div.images {
    position: relative;
    max-width:100%;
    width: 100%;
    height: auto;
    display: flex;
    gap: 4px;
    img, .vimeo-video {
      width: 100%;
      object-fit: contain;
      height: fit-content;
    }
    .vimeo-video {
      overflow: hidden;
      position: relative;
      video {
        object-fit: cover;
      }
    }
    img.width-964, .vimeo-video.width-964 {
      flex: 2;
      width: 964px;
      height: auto;
    }
    img.width-480, .vimeo-video.width-480 {
      flex: 1;
      width: 480px;
      height: auto;
    }
  }
  .style-1 {
    img.width-480, .vimeo-video.width-480 {
      width: 100% !important;
      object-fit: cover;
    }
  }
  .style-2, .style-3 {
    img.width-480, .vimeo-video.width-480 {
      width: 100% !important;
      object-fit: cover;
    }
    img.width-964, .vimeo-video.width-964 {
      width: 100% !important;
      object-fit: cover;
    }
  }
  &.first-image-section {
     .first{
       border-top-left-radius: var(--image-border-radius);
     }
     .last{
       border-top-right-radius: var(--image-border-radius);
     }
    }
  &.last-image-section {
     .first{
       border-bottom-left-radius: var(--image-border-radius);
     }
     .last{
       border-bottom-right-radius: var(--image-border-radius);
     }
  }
}



/* Images section followed by other section */
section.images:not(.last-image-section & .first-image-section) {
  margin-bottom: 4px;
}

section:last-of-type {
  margin-bottom: 10em;
}



/* ===================== WORKS ===================== */
.template-works {
  section.images {
    opacity: 1;
    transition: all 1s ease;
    padding-bottom: 6em;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    h3 {
      z-index: 1000;
      font-weight: normal;
      text-transform: uppercase;
      letter-spacing: 1ch;
      word-spacing: 0.25ch;
      font-weight: 300;
      transition: all 1s ease;
      margin-bottom: 0.2em;
      margin-left: 0.7em;
    }
    
    div.images {
      img {
        transition: all 1s ease;
      }
      .first {
        border-top-left-radius: var(--image-border-radius);
        border-bottom-left-radius: var(--image-border-radius);
      }
      .last {
        border-top-right-radius: var(--image-border-radius);
        border-bottom-right-radius: var(--image-border-radius);
      }
    }
  }
  section.images:hover {
    img {
      opacity: 0.8;
      transition: all 1s ease;
    }
    cursor: pointer;
  }
  section.images:hover .images:after {
    content: ">";
    position: absolute;
    right: 0.1em;
    top: 0;
    bottom: 0;
    z-index: 1000;
    font-size: 5em;
    display: flex;
    text-align: center;
    align-items: center;
    color: white;
  }
}

/* Break images if screen to narrow */
@media only screen and (max-width: 1096px) {
  section.images {
    div.images {
      flex-direction: column;
      img {
        flex: 1;
        border-radius: unset;
      }
      .first {
        border-radius: unset;
      }
      .last {
        border-radius: unset;
      }
      img.width-480 {
        flex: 1;
        width: 100% !important;
        height: unset !important;
      }
      img.width-964 {
        flex: 1;
        width: 100% !important;
        height: unset !important;
      }
    }
    &.first-image-section img:first-of-type {
      border-radius: unset;
      border-top-left-radius: var(--image-border-radius);
      border-top-right-radius: var(--image-border-radius);
    }
    &.last-image-section .last {
      border-radius: unset;
      border-bottom-left-radius: var(--image-border-radius) !important;;
      border-bottom-right-radius: var(--image-border-radius) !important;;
    }
  }
  .template-works {
    section.images {
      h3 {
        letter-spacing: 0.7ch;
      }
      img {
        
        &.first {
          border-radius: unset !important;
          border-top-left-radius: var(--image-border-radius) !important;
          border-top-right-radius: var(--image-border-radius) !important;
        }
        
        &.last {
          border-radius: unset !important;
          border-bottom-left-radius: var(--image-border-radius) !important;
          border-bottom-right-radius: var(--image-border-radius) !important;
        }
      }
    }
    
    main {
      margin-top: 3em;
    }
  }
  
  .split {
    flex-direction: column;
    .about-portrait {
      width: auto;
      object-fit: cover;
      object-position: right middle;
    }
  }
  .split > div {
    flex-direction: column-reverse;
    padding-top: 0;
    margin-top: -0.5em;
    .bottom {
      height: 5em;
      p {
      word-spacing: 0;
      letter-spacing: 0;
        text-align: right;
      }
    }
    .top {
      margin: auto;
    }
  }
  

}


section.title {
  margin: auto;
  max-width:  950px;
  h2.work-title {
   font-size: 2em;
   font-weight: 300;
   text-transform: uppercase;
   letter-spacing: 0.1ch;
  }
}


.collapsible tr.is-hidden { display: none; }
.collapsible-toggle { 
  margin-top: .5rem; 
  cursor: pointer;
  background: none;
  border: none;
  color: var(--main-focus-color);
  padding: 0.8em;
  margin: 0;
  margin-left: -4em;
  font-size: 1.0em;
  font-weight: 300;
  font-family: "Inter", "Helvetica", sans-serif;
  width: 100%;
}


/* Animate newly revealed rows */
.collapsible tr.revealing {
  opacity: 0;
  transform: translateY(6px);
}

.collapsible tr.revealing.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 1020ms ease, transform 2620ms ease;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .collapsible tr.revealing.is-visible {
    transition: none;
  }
}