/* ========== Global Font Standardisation ========== */
html {
  font-size: 12px;
}

/* Ensures every element inherits 12px unless explicitly changed */
* {
  box-sizing: border-box;
  font-size: inherit;
}


/* ========== Body ========== */
body {
  margin: 20px;
  font-family: Helvetica, Arial, sans-serif;
  background: white;
  overflow-x: hidden;
}


/* ========== Toggles ========== */
.top-left,
.index {
  position: fixed;
  left: 10px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  z-index: 10;
  color: white;
  mix-blend-mode: difference;
  user-select: none;
}

#toggle-description {
  top: 10px;
}

.index {
  top: 130px;
}

.top-left:hover,
.index:hover {
  text-decoration: none;
}


/* ========== Description Menu ========== */
#menu2 {
  position: fixed;
  top: 35px;
  left: -10px;
  max-width: 400px;
  height: 0;
  padding: 0 40px;
  overflow: hidden;
  color: white;
  line-height: 1.3;
  mix-blend-mode: difference;
  user-select: none;
  transition: height 0.5s ease;
}

#menu2 .description a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 2px;
}

#menu2 .description a:hover {
  text-decoration: underline;
}


/* ========== Artwork Dropdown Menu ========== */
#menu {
  position: fixed;
  top: 155px;
  left: 30px;
  max-width: 25vw;
  height: 0;
  padding: 0;
  overflow: hidden;
  color: white;
  margin: 0 auto;
  mix-blend-mode: difference;
  user-select: none;
  transition: height 1s ease;
}

.menu-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

#menu button {
  all: unset;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
  text-underline-offset: 2px;
}

#menu button:hover {
  text-decoration: underline;
}



/* ========== Carousel ========== */
.carousel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow-x: auto;     
  overflow-y: hidden;   
  white-space: nowrap;  
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; 
  z-index: -1;
  background-color: black;
}





/* ========== Slides ========== */
.slides {
  display: flex;
  height: 100vh;
  will-change: transform, scroll-position;
}

.slide {
  flex: 0 0 auto;
  height: 100vh;
  position: relative;
    width: auto;
}


.slide img,
.slide video {
  height: 100vh;
  width: auto;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.slide.small {
  transform: scale(0.8);
  transform-origin: center;
}


/* ========== CV Link ========== */
.cv {
  color: black;
  margin-top: 30px;
  text-decoration: underline;
  text-underline-offset: 2px;
  user-select: none;
}

.cv:visited,
.cv:focus,
.cv:active {
  color: black;
  text-decoration: underline;
}

.cv:hover {
  text-decoration: none;
}


/* ========== Responsive ========== */

@media (max-width: 600px) {
  /* Keep carousel scrollable on touch devices */
  .carousel {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* Artwork menu is scrollable if needed */
  #menu {
    max-width: 95vw;
    left: 2.5vw;
    top: 150px;
    padding-bottom: 0px;
    overflow-y: auto;
  }

 #toggle-description {
    top: 20px;
   }

    #menu2 {
    top: 40px;
        left: -10vw;
           max-width: 95vw;
    
      }


  /* Hide the "descriptions" link on mobile */
  #menu2 .description a[href="works.html"] {
    display: none;
    margin-top: 200px;
  }

    .slide img,
  .slide video {
/* maintain aspect ratio */
 width: 100%; 
    display: block;
    margin: 0 auto;   /* center horizontally */

  }
  .slides {
    gap: 0;
    margin: 0;
    padding: 0;
  }

  .slide {
    margin: 0;
    padding: 0;
  }
}

