* { 
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
font-family: "IBM Plex Sans", sans-serif;
font-weight: 700;
font-variation-settings: "wdth" 75;
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
background: #f9f9f9;
}

/* TOP GALLERY (desktop + mobile) */
#gallery {
  flex: 8;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  background: #fff;
  padding: 1rem;
  align-items: center;
}
#gallery::-webkit-scrollbar { 
  height: 8px; 
}
#gallery::-webkit-scrollbar-thumb { 
  background: #aaa; border-radius: 4px; 
}
.artwork {
  flex: 0 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  background: #000;
  /* opacity: 0; */
  /* transition: opacity 0.8s ease-in; */
}
.artwork img {
  height: 100%;
  width: auto;
  object-fit: contain;
  display: block;
}

/* ABOUT PAGE */
  #biography {
    flex: 8;
    overflow-y: auto;
    padding: 4rem;
    background: #fff;
    font-size: 4vh;  
    line-height: 1.6;
    color: #111;
    font-weight: 400;
    opacity: 0;
    transition: opacity 1s ease;
  }
    #biography.loaded {
      opacity: 1;
    }

/* DESKTOP NAV */
#nav {
  flex: 2;
  display: flex;
  color: white;
  padding: 1rem;
  border-top: 4px solid #000;
  background: #f9f9f9;
}
#nav-left {
  flex: 1;
  display: flex;
  border-right: 1px solid rgba(0,0,0,0.2);
}
.logo {
  height: 100%;
  width: auto;
  display: block;
}
#nav-links {
  flex: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
}
#nav-links a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: left;
  color: #000;
  text-decoration: none;
  transition: background-color 0.5s ease;
  width: 100%;
  font-size: calc(20vh / 4);
  line-height: 1;
}
#nav-links a:hover {
  background-color: var(--hover-color, #555);
  color: white;
}

/* DESKTOP COLLECTION BUTTONS */
#nav-right {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.5rem;
  padding-left: 1rem;
  overflow-y: auto;
}
.collection-btn {
  background: #D9D9D9;
  border: none;
  color: white;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 1rem;
  font-weight: 700;
  font-variation-settings: "wdth" 75;
}
.collection-btn:hover {
  background-color: var(--hover-color, #666);
}
.active { background: #007bff !important; }

/* Hide mobile menu */
#mobile-menu {
  visibility: hidden;
  height: 0px;
}

/**************************************
MOBILE LAYOUT
**************************************/
@media (max-width: 900px) {

  #biography {
    padding: 2rem;
    font-size: 1.6rem;  
  }

  /* Remove desktop hover-colour behaviour */
  #nav-links a:hover,
  .collection-btn:hover {
    background-color: #D9D9D9 !important;
  }

  /* Move collection buttons to a horizontal bar */
  #nav-right {
    display: none; /* hides desktop location */
  }
  #mobile-collections {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #eee;
    border-bottom: 2px solid #000;
  }
  #mobile-collections .collection-btn {
    flex: 0 0 auto;
  }
  #mobile-collections .collection-btn.active {
    background: #007bff !important;
  }

  /* Bottom nav becomes logo + hamburger */
  #nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  #nav-left {
    flex: none;
    width: 50%;
    border: none;
  }
  #nav-links {
    display: none;
  }
  .logo {
    height: 100%;
    max-height: 100%;
  }
  #hamburger {
    width: 50%;
    text-align: right;
    font-size: 3rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #000;
  }

  /* Fullscreen mobile menu */
  #mobile-menu {
    position: fixed;
    inset: 0;
    background: #fff;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999;
    visibility: visible;
    height:auto;
  }
  #mobile-menu a {
    font-size: 3rem;
    margin: 1rem 0;
    color: #000;
    text-decoration: none;
  }
}
