/* ----------------------------------------------------------- FONTS */

.fontPrimary {
    font-family: "scandia-line-web", monospace;
    font-weight: 700;
    font-style: normal;
    /* font-size: 300px !important; */
    color: #333;
  }
  
  .fontSecondary {
    font-family: "scandia-line-web", monospace;
    font-weight: 500;
    font-style: normal;
    /* font-size: 170px !important; */
    color: #333;
  }
  
  .fontTertiary {
    font-family: "scandia-line-web", monospace;
    font-weight: 500;
    font-style: normal;
    /* font-size: 100px !important; */
    color: #333;
  }
  
  .fontQuaternary {
    /* font-size: 70px !important; */
    font-family: "scandia-line-web", monospace;
    font-weight: 900;
    font-style: normal;
    /* font-size: 100px !important; */
    color: #333;
  }
  
  .fontQuinary {
    font-family: "scandia-line-web", monospace;
    font-variation-settings: "wght" 900;
    font-weight: 500;
    /* font-size: 40px !important; */
    /* -webkit-text-stroke: white 5px; */
    color: #333;
  }
  
  .fontSestaray {
    /* font-family: "asterisk-sans-variable", sans-serif; */
    font-family: "scandia-line-web", monospace;
  
    font-variation-settings: "wght" 900;
    font-size: 15px !important;
    /* -webkit-text-stroke: white 5px; */
    color: #333;
  }

  /* ------------------------------------------------------------LOADING  */
  #loadingScreenWrapper {
    display:flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    width: 100vw !important;
    height: 100vh !important;
  }

  #loadingScreen {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    align-self: center !important;

    width: 70vw !important;
  }

  #loadingText {
    color: white;
  }
  /*
  #progressBar {
    width: 100%;
    margin-top: 20px;;
    height: 20px;
    background: rgba(0, 0, 0, 0.85);

    border: 2px solid #fff;
    
    align-self: start;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
  }
  */
  #progressBar {
    width: 100%;
    margin-top: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid #fff;
    align-self: start;
    position: relative;
    overflow: hidden; /* Important for containing the gradient */
    padding: 2px;
  }

  #progressFill {
      height: 100%;
      width: 0%; /* Will be updated via JavaScript */
      background: linear-gradient(90deg, 
          #8a00c2 0%,
          #712290 50%,
          #8a00c2 100%
      );
      background-size: 200% 100%;
      animation: gradientMove 2s linear infinite;
      transition: width 0.3s ease;
  }

  #scanlines {
      position: absolute;
      inset: 0;
      pointer-events: none;
      background: repeating-linear-gradient(
          0deg,
          rgba(255, 255, 255, 0.1) 0px,
          rgba(255, 255, 255, 0.1) 1px,
          transparent 1px,
          transparent 2px
      );
  }

  @keyframes gradientMove {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
  }


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

  body {
    height: 100vh;
    overflow: hidden; /* Prevents body scrolling */
    background: #000;
  }

  
  html,
  body {
    margin: 0;
    padding: 0;
  }
  
  canvas {
    display: block;
  }
  
  /* ----------------------------------------------------------------------- P5 */
  #p5-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
  }

  /* ----------------------------------------------------------------- 3D Room */
  
  #roomContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
  }

  /* ----------------------------------------------------------------- InfoPopUp */

  .infoPopup {
    position: fixed;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 300px;
    display: none;
    z-index: 100;
}
  
  
  /* ---------------------------------------------- ABOUT + CONTACT*/
  #gallery-container-about {
    display: none;

  }
  #gallery-overlay-about {
    flex-direction: column !important;
    justify-content: center !important;
    
  }

  #about > *, #contact >* {
    /* border: 2px solid #0000ff; */
    display: flex;
    justify-content: center !important;
    align-items: center !important;
    flex-direction: column;
    position:relative;
    z-index: 2;
    /* width: 80%; */
  
    text-align: justify;
    border-radius: 4px;
    
  }
  
  #aboutContainer {
    /* style the about container that has two div children (img and text) so that they display beside each other when width allows and in a column when not */
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    /* justify-content: space-between; */
    align-items: center;
    justify-content: center;
    /* width: 100%; */

    
  
  }
  
  #aboutContent {
    /* padding: 20px; */
  
    /* width: 80%; */
    color: white;
    /* text-align: */
    
    /* font-size: 20pt; */
    /* font-weight: 900; */
    
  }
  
  #aboutImg {
    display: flex;
    justify-content: center;
    align-items: center;
  
    width: 100%;
    height: auto;
  }

  #aboutImg img {
    /* width:50% */
    margin-bottom: 0;
    
  }
  
  
  
  .text {
    text-align: center;
    
  
    /* margin: 20% ; */
  }

  #about .text-container-subtitle {
    color: white !important;
  }
  
  /* --------------------------------------------------CONTACT */

  #contact {
    width: 100%;
  }

  #contactContainer {
    display:flex;
    flex-direction:column;
    flex-wrap: wrap;
    /* justify-content: space-between; */
    /* align-items: center; */
    /* flex-grow:1; */
    /* width: 100%; */
  
    /* margin-bottom: 10%; */

    display: flex;
    /* flex-direction: row; */
    flex-wrap: wrap;
    /* justify-content: space-between; */
    align-items: center;
    justify-content: center;
    /* width: 100%; */
    padding: 1vw !important;
    
    
  }
  
  #contactContainer > * {
    /* border: 1px solid #fff; */
    
    
    text-align: center;
    /* width: 30%; */
    /* width: 20%; */
    flex-grow: 1;
    
  }
  
  #socials {
    
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      /* width: 30%; */
  }

  #email {
    color:#fff !important;
    text-align: center;
    margin-bottom: 2px;
  }
  
  #socials a {
    
      margin:5px !important;
      /* width: 50%; */
      height: auto;
      width: 70px;
      height: 70px;
  }
  /* ------------------------------------------------------------INFO POPUP */
  #infoPopup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1rem;
    overflow: hidden;
    z-index: 100;
  }

  /* ----------------------------------------------------------- WORK CARDS */
  .title {
    font-size: 8vw;
    text-align: center;

    padding:1vh 0;
    /* margin-bottom: -10px !important; */
    color:#f3f3f3;
  }
  
  div[id^="gallery-container-"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow-y: auto; /* Enables scrolling */
    z-index: 1; /* Puts content above background */

    display: flex;
    flex-direction: column;
    align-items: center;
    /* justify-content: center; */
  }
  
  #cards, #gallery-overlay-works, #gallery-overlay-music, div[id^="gallery-overlay-"] {
    width: 80%;
    display: flex;
    flex-direction: row;
    flex-wrap:wrap;
    align-items: center !important;
    justify-content: flex-start !important;
  
    height: auto;
  
  position:relative;
  z-index: 2;
  }

  
  .work-card{
    flex-grow: 1;
  
    margin: 2vw 0;
    /* padding: 2rem; */
    margin-left:1vw !important;
    margin-right:1vw !important;
    transition: transform 0.2s ease-in-out;
    
    /* Add a subtle pixelated border */
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    
    /* Sharper transitions to match the dithered look */
    transition: transform 0.15s steps(5);
  }
  
  .work-card:hover {
    transform: translateY(-4px);
  }
  
  .work-card-image {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  /* Make sure work-card-image maintains relative positioning for absolute text container */
  .work-card-image,
  .carousel-item {
      position: relative;
      width: 100%;
      height: 100%;
  }
  
  .work-card-image > * {
    object-fit: contain;
  }
  
  .work-card img {
      width: 100%;
      height: auto;
      border-radius: 4px;
      margin-bottom: 1rem;
  }
  
  .work-card video {
    width: 100%;
    height: auto;
    border-radius: 4px;
    /* margin-bottom: 1rem; */
  }
  
  .work-card-content h4 {
      margin: 0 0 1rem 0;
  }
  
  .work-card-content p {
      margin: 0 0 1rem 0;
      /* line-height: 0.1; */
  }
  
  /* .work-card-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
  } */
  
  /* .tag {
      padding: 0.25rem 0.75rem;
      background: #f0f0f0;
      border-radius: 999px;
      color: #333;
  } */
  
  .vids {
    object-fit: cover;
    
    margin-bottom: -6px;
    width: 100%;
  }
  
  .text-container {
    line-height: 1vh;
    box-sizing: border-box;

    position: absolute;

    top: 50%;
    
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100% !important;
    /* height: 100% !important; */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    padding: 0; /* Remove the padding that was causing size issues */
    background: rgba(0, 0, 0, 0.85);
    transition: all 0.15s steps(5);
  }


  /* Add scanlines to text container background */
  .text-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: -1; /* Place behind the text */
  }



/* Adjust text alignment and spacing within container */
.text-container .title,
.text-container .text {
  position: relative;
  z-index: 1;
  /* padding: 1rem; */
  /* padding-bottom: 1rem; */
  padding: 1vh;
  padding-left: 1rem;
  padding-right: 1rem;
  
  width: 100%;
  text-align: center;
  
}

.text-container-title, .text-container-subtitle {
  position: relative;
  z-index: 1;
  /* padding: 1rem; */
  /* padding-bottom: 1rem; */
  padding: 1vh;
  padding-left: 2rem;
  padding-right: 2rem;
  
  width: 100%;
  text-align: center;
}

.text-container-title {
  font-size: 4.944vw;
  line-height: 1;
  text-align: center;
      margin-top: 1rem;
      /* padding-bottom: 1rem; */
}

.text-container-subtitle {

  font-size: 3.056vw;
  line-height: 1;
  /* text-align: center; */
  margin-bottom: 1rem;
  text-align: justify;
  text-justify: distribute; /* Some browsers improve spacing with this */
}
  
  .text-container .fontQuaternary {
      line-height: 1;
      font-size: 4.94vw;
      text-align: center;
      margin-top: 1rem;
      padding-bottom: 1rem;
  }
  
  .text-container .fontQuinary {
      line-height: 1;
      font-size: 3.06vw;
      text-align: center;
      margin-bottom: 1rem;
  }

  /* ------------------------------------ CAROUSEL ----- */
  .work-card.row-type {
    width: 100%;
    aspect-ratio: 16/9;
    margin: 2vw 0;
    /* padding: 2rem; */
    margin-left: 1vw !important;
    margin-right: 1vw !important;
    border: 0px;

    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 4px;
  }
  
  .carousel-track {
    position: absolute;
    display: flex;
    gap: 2vw;
    height: 100%;
    width:100%;
    transition: transform 0.1s ease-out;
    z-index: 1;
  }
  
  .carousel-item {
    flex: 0 0 calc(33.333% - 2vw);
    min-width: calc(33.333% - 2vw);
    height: 100%;
    width:100% !important;
    border-radius: 4px;
    /* overflow: hidden; */
    /* display: flex; */
    aspect-ratio: 16/16 !important;
  }
  
  .carousel-item video,
  .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
  }
  
  .carousel-wrapper .text-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .carousel-wrapper .text-container.visible {
    visibility: visible;
    opacity: 0;
  }
  
  .work-card.row-type .carousel-item {
    position: relative;
      display: block !important;
      /* float: none !important; */
      aspect-ratio: 1/1 !important;  /* This makes it square */
      height: 100% !important;
      width: auto !important;  /* Let height determine width for square */
      margin-right: 1vw !important;
      border-radius: 4px;
      overflow: hidden;
  }
  
  /* Make sure our wrapper and track styles are specific enough */
  .work-card.row-type .carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 4px;
  }
  
  .work-card.row-type .carousel-track {
    position: absolute;
    display: flex;
    height: 100%;
    transition: transform 0.1s ease-out;
    z-index: 1;
  }
  
  /* Override any media element styles */
  .work-card.row-type .carousel-item video,
  .work-card.row-type .carousel-item img,
  .work-card.row-type .carousel-item .vids {
    position: relative;
    display: block !important;
    /* float: none !important; */
    aspect-ratio: 1/1 !important;  /* This makes it square */
    height: 100% !important;
    width: auto !important;  /* Let height determine width for square */
    /* margin-right: 2rem !important; */
    border-radius: 4px;
    /* overflow: hidden; */
  
  }

  .work-card.row-type .carousel-item {
    position: relative;
    display: block !important;
    float: none !important;
    /* Take the full height of the card and make width match for square */
    height: 100% !important;
    aspect-ratio: 1/1 !important;
    flex: 0 0 auto !important; /* Prevent flex from squishing */
    /* margin-right: 2rem !important; */
    border-radius: 4px;
    overflow: hidden;
  }
  
  .work-card.row-type .carousel-item video,
  .work-card.row-type .carousel-item img,
  .work-card.row-type .carousel-item .vids {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 4px;
    display: block !important;
  }
  
  .work-card.row-type .carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: auto;
    border-radius: 4px;
    /* scroll-behavior: smooth; */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
  }
  
  .work-card.row-type .carousel-wrapper::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
  }
  
  .work-card.row-type .carousel-track {
    display: flex;
    height: 100%;
    gap: 2vw;
  }
  
  .work-card.row-type .carousel-item {
    /* scroll-snap-align: center; */
    flex: 0 0 100%;
    height: 100%;
    aspect-ratio: 1/1;
  }
  

   /* ----------------------------------------------------------- GALLERY */

  /* --- change style */
  /* Modify the gallery container to have a more grainy/dithered look */
#gallery-container-works , #gallery-container-music, div[id^="gallery-container-"] {
    /* Keep your existing positioning */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    z-index: 1;
    
    /* Add a dark, slightly transparent background */
    /* background-color: rgba(17, 17, 17, 0.85); */
     /* Matches your scene background color */
    
    /* Add a noise texture using a repeating pattern */
    /* background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAUVBMVEWFhYWDg4N3d3dtbW17e3t1dXWBgYGHh4d5eXlzc3OLi4ubm5uVlZWPj4+NjY19fX2JiYl/f39ra2uRkZGZmZlpaWmXl5dvb29xcXGTk5NnZ2c8TV1mAAAAG3RSTlNAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAvEOwtAAAFVklEQVR4XpWWB67c2BUFb3g557T/hRo9/WUMZHlgr4Bg8Z4qQgQJlHI4A8SzFVrapvmTF9O7dmYRFZ60Y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g5TdVhlCafZvpskfncCfx8pOhJzd76bJWeYFnFciwcYfubRc12Ip/ppIhA1/mSZ/RxjFDrJC5xifFjJpY2Xl5zXdguFqYyTR1zSp1Y9p+tktDYYSNflcxI0iyO4TPBdlRcpeqjK/piF5bklq77VSEaA+z8qmJTFzIWiitbnzR794USKBUaT0NTEsVjZqLaFVqJoPN9ODG70IPbfBHKK+/q/AWR0tJzYHRULOa4MP+W/HfGadZUbfw177G7j/OGbIs8TahLyynl4X4RinF793Oz+BU0saXtUHrVBFT/DnA3ctNPoGbs4hRIjTok8i+algT1lTHi4SxFvONKNrgQFAq2/gFnWMXgwffgYMJpiKYkmW3tTg3ZQ9Jq+f8XN+A5eeUKHWvJWJ2sgJ1Sop+wwhqFVijqWaJhwtD8MNlSBeWNNWTa5Z5kPZw5+LbVT99wqTdx29lMUH4OIG/D86ruKEauBjvH5xy6um/Sfj7ei6UUVk4AIl3MyD4MSSTOFgSwsH/QJWaQ5as7ZcmgBZkzjjU1UrQ74ci1gWBCSGHtuV1H2mhSnO3Wp/3fEV5a+4wz//6qy8JxjZsmxxy5+4w9CDNJY09T072iKG0EnOS0arEYgXqYnXcYHwjTtUNAcMelOd4xpkoqiTYICWFq0JSiPfPDQdnt+4/wuqcXY47QILbgAAAABJRU5ErkJggg=="); */
    filter: contrast(100%) brightness(100%);
}



/* Add a subtle scan line effect */
#gallery-container-works::after, #gallery-container-music::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
}
  

/* Add border to carousel items */
.carousel-item video,
.carousel-item img,
.carousel-item ,
.work-card img,
.work-card video,
.vids {
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) !important;
    box-sizing: border-box;
}

/* Remove the global scanline effect */
#gallery-container-works::after, #gallery-container-music::after {
    display: none;
}

#gallery-overlay-music {
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:space-around  !important; 
    
  
  flex-wrap: wrap;
  max-width:70%;
}

#gallery-overlay-music > * {
  margin: 2rem 0;
    /* padding: 2rem; */
    /* margin-left: 5vw !important; */
    /* margin-right: 5vw !important; */
    
    /* Add a subtle pixelated border */
    /* border: 1px solid rgba(255, 255, 255, 0.2); */
    /* background: rgba(0, 0, 0, 0.3); */
    border-radius: 0px !important;
}

#gallery-overlay-music > .work-card {
    /* a little smaller than before */
    max-width: 35% !important;
    /* margin:0px !important; */
    /* flex-grow: 1; */
}

/* --------------------------------------------------------------- ABOUT  */
