@import url("../font/stylesheet.css");
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-size: 1vw; /* Adjusts size relative to viewport width */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  height: 100vh;
  cursor: none !important;
  background-color: #000000;
}

body {
  width: 100%;
  font-family: "Neue Haas Grotesk Display Pro", sans-serif;
  color: #ffffff;
  font-weight: 400;
  animation: fadeInAnimation ease 0.5s;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
  overflow: auto;  
  overflow-x: hidden;
  z-index: 0;
}

a {
  cursor: none !important; /* Hide default cursor on links */
  color: #ffffff;
  text-decoration: none;
}

.custom-cursor {
  position: fixed;
  z-index: 10002; 
  width: 15px;
  height: 15px;
  background-color: #db3a3a;
  mix-blend-mode: difference;
  transform: translate(
    -50%,
    -50%
  ); /* Center cursor relative to mouse coordinates */
  transition: transform 0.1s ease-in-out, opacity 0.2s ease; /* Smooth cursor movement */
  pointer-events: none;
  opacity: 0;
}

iframe {
  cursor: auto !important;
}

.custom-cursor.pressed {
  transform: translate(-50%, -50%) scale(1.1);
  transition: transform 0.8s linear;
}

@keyframes fadeInAnimation {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

h1,
h2,
h3 {
  font-weight: 400;
  margin-bottom: 0;
}

h3 {
  font-size: 1.3rem;
}

::-webkit-scrollbar {
  display: none;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

a:visited {
  color: #ffffff;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #db3a3a;
  transition: all 0.3s ease-in-out;
}

li {
  display: grid;
}

video {
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
}

.footnote-ref {
  text-decoration: none;
  font-size: 0.5rem;
}

.footnote {
  font-size: 0.9em;
  margin-top: 10px;
  padding: 5px;
  border-left: 3px solid #ccc;
  padding-left: 10px;
}

.footnote-back {
  text-decoration: none;
  font-size: 0.9em;
  margin-left: 5px;
}

/* Visibility Classes */
.desktop {
  display: block;
}

@media only screen and (min-width: 769px) {
  .mobile {
    display: none !important;
  }
  .desktop {
    display: block;
    visibility: visible;
  }
}

/* --- Layout (Desktop Default) --- */
.header {
  display: flex;
  padding: 2% 2% 0% 2%;
  padding-top: 5vh;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 3; /* Ensure the header appears above other content */
  padding-bottom: 1%;
}

.footer {
  width: 100%;
  padding-bottom: 2%;
  padding-left: 2%;
  padding-right: 2%;
  left: 0;
  position: fixed;
  bottom: 0; 
  text-align: right;
  z-index: 5; 
  pointer-events: none; 
}

.footer:hover + .image-container {
  background-color: #db3a3a;
}

.grid {
  display: grid;
  grid-template-columns: 0.8fr 1.5fr 1fr 1fr;
  justify-content: right;
  width: 100%;
}

.main-content {
  display: flex;
  padding: 2%;
  padding-bottom: 2%;
  z-index: 1;
  flex-wrap: wrap;
}

.sub-header {
  display: flex;
  justify-content: right;
  align-items: right;
  padding: 0% 2% 0% 2%;
  padding-top: 2vh;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 5; /* Ensure the header appears above other content */
  font-weight: 400;
}

/* --- Components --- */
.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 50%;
  height: 94vh;
  z-index: 4;
  overflow: hidden;
  mix-blend-mode: difference;
  font-weight: 500;
  padding-bottom: 1%;
}

.sidebar-item {
  width: 100%; /* Adjust the width as needed */
  text-align: left; /* Center the text */
}

.sidebar-item a {
  text-decoration: none;
  color: #ffffff;
}

.sidebar-item a:hover {
  color: #db3a3a;
  transition: all 0.3s ease-in-out;
}

.project-year.highlight {
  color: #db3a3a;
  transition: all 0.3s ease-in-out;
  background-color: #ffffff; /* Highlight color */
}

.sequential-number {
  flex: 0 0 1.5rem;
  margin-right: 0.7rem;
  text-align: right;
}

#image-gallery {
  width: 70%; /* Remaining space beside the sidebar */
  right: -15vw;
  height: 100vh; /* Full height */
  display: flex;
  flex-direction: column;
  align-self: center;
  justify-content: center; /* Center the container horizontally */
  position: fixed;
  top: 0%;
  z-index: 1; /* Lower z-index to stay in the background */
  pointer-events: none; /* Allow scrolling through the image gallery */
}

/* Inner 16:9 aspect ratio container */
.image-container {
  width: 100%; /* Full width of the gallery area */
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: center;
  overflow: hidden;
}

.image-container::before {
  content: "";
  display: block;
  padding-bottom: 56.25%; /* Fallback for 16:9 aspect ratio */
}

/* Media inside the gallery */
.image-container video,
.image-container img {
  position: absolute;
  max-width: 100%; /* Fit within the container horizontally */
  max-height: 100%; /* Fit within the container vertically */
  width: auto; /* Maintain aspect ratio */
  height: auto; /* Maintain aspect ratio */
}

#gallery-image img.active,
#gallery-image video.active {
  opacity: 1;
}

.work-content {
  width: 60%;
  display: flex;
  flex-direction: column;
  margin-top: 8vh;
  align-self: center;
  padding: 2%;
  padding-bottom: 8vh; /* Add padding to avoid overlap with the footer */
  min-height: 100vh; /* Ensure the main content takes up at least the full viewport height */
  position: absolute; /* Ensure the main content is positioned relative to the background */
  z-index: 2; /* Higher z-index to appear above the background */
  text-align: justify;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
}

.work-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  margin-bottom: 20px;
}

.header-left {
  text-align: left;
  flex: 1.2;
  align-items: flex-end;
}

.header-right {
  text-align: right;
  flex: 0.8;
}

.work-content h1 {
  font-weight: 500;
  font-size: 3.5rem;
}

.work-content h2 {  
  font-weight: 400;
  font-size: 1.6rem;
}

.work-content h3 {
  font-weight: 400;
  font-size: 1.3rem;
}

.work-content p {
  margin-bottom: 20px;
}

.work-content a {
  text-decoration: overline;
}

.work-content a:hover {
  text-decoration: underline;
}

.project-details {
  margin-bottom: 20px; 
}

.project-details a:hover {
  text-decoration: underline;
}

.main-media {
  display: flex;
  justify-content: center; /* Center the media horizontally */
  align-items: center; /* Center the media vertically */
  margin-bottom: 20px; /* Add some space between the main media and the project details */
  margin: auto;
  max-height: fit-content;
}

#main-media-container {
  display: block !important; /* Ensure it's displayed */
  width: 100%;
}

.main-media-credits {
  font-size: 1vw;
  color: #ffffff;
  margin-top: 5px;
  text-align: right;
  font-weight: 400;
}

.responsive-iframe-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

/* Style the iframe to fit the container */
.responsive-iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Responsive container for images and videos */
.responsive-media-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  background-color: #000;
}

.responsive-media-container img,
.responsive-media-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Responsive container for Spotify iframe */
.responsive-spotify-container {
  position: relative;
  width: 100%; /* Full width of the parent */
  padding-bottom: 56.25%; /* Maintain a 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.responsive-spotify-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  border: none; /* Remove border */
}

.project-gallery {
  display: block; /* Switch to block for column layout */
  column-count: 2; /* Masonry layout with 2 columns */
  column-gap: 40px;
  margin-top: 40px; /* Add some space between the sections */
  padding-bottom: 4%;
}

.gallery-item {
  width: 100%;
  height: auto;
  margin-bottom: 40px; /* Space between items vertically */
  break-inside: avoid; /* Prevent items from splitting across columns */
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.02);
}

/* Style for inner media */
.gallery-item img,
.gallery-item video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}

.google-drive-video {
  width: 100%;
  height: 100%;
  aspect-ratio: 16/9; /* Ensures a proper aspect ratio */
}

/* Modal styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  background-color: rgba(0,0,0,0.9);
  display: flex; /* Use Flexbox to center content */
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically */
  z-index: 100;
}

.modal-content {
  width: 80%;
  height: 100vh;
  margin: auto;
  display: flex; /* Use Flexbox to center content */
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically */
  background-color: #000000;
  padding: 30px;
  box-sizing: border-box; /* Include padding in width and height */
  position: relative;
  z-index: 0;
}

.modal-image,
.modal-video {
  max-width: 100%;
  max-height: 80%;
  width: auto;
  height: auto;
  padding-top: 5vw;
  padding-bottom: 5vw;
  z-index: 5;
}

.media-credits {
  position: absolute;
  align-items: right;
  bottom: 4vw;
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
  font-weight: 500;
  font-size: 0.9rem;
  z-index: 5;
  pointer-events: none;
  text-decoration: overline;
}

.work-content a:visited,
.work-content a:hover,
.media-credits a:visited,
.media-credits a:hover,
.media-credits a:focus {
  text-decoration: overline;
}

.modal-focus {
  text-decoration: overline;
}

/* Make markdown images clickable */
.clickable-image {
  cursor: pointer;
  transition: transform 0.1s ease-in-out;
}

.clickable-image:hover {
  transform: scale(1.04);
}

.close {
  position: fixed;
  bottom: 7vh;
  right: 2%;
  z-index: 5;
  color: #ffffff;
  z-index: 5;
  text-decoration: underline;
}

.close:hover,
.close:focus {
  color: #ffffff;
  cursor: none !important;
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0);
  color: rgb(255, 255, 255);
  border: none;
  font-size: 30px;
  padding: 5vw;
  cursor: none;
  z-index: 4;
}


.arrow:hover,
.arrow:focus {
  color: #ffffff;
  cursor: none !important;
}

.arrow.left {
  left: -150px;
}

.arrow.right {
  right: -150px;
}

#next-project-container {
  font-size: 1.2rem;
  color: #000000;
  margin-bottom: 10px;
}

#about-content {
  width: 35%;
  margin-top: 10vw;
  margin-left: 5%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: justify;
  box-sizing: border-box;
  align-self: center;
}

#about-content a, 
#about-content a:visited {
  color: #db3a3a;
}

#about-content a:hover,
#about-content a:focus {
  text-decoration: underline;
}

.side-image {
  margin-left: 10%;
  margin-top: 10vh;
  display: flex;
  align-items: center; /* Center the image vertically within the side-image container */
  justify-content: center; /* Center the image horizontally within the side-image container */
}

.portrait {
  width: 80%;
  max-width: 30vw; /* Adjust the size as needed */
  margin: auto;
  display: block;
}

#preview-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40vw;
  height: 50vh;
  z-index: 9999;
  border: 1px solid #333;
  display: none;
  background-color: #000;
  pointer-events: none;
}

#preview-popup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.info-content {
  position: absolute;
  padding-top: 20vh;
  padding-left: 20%;
  width: 100%;
  z-index: -1;
}

.modal-image,
.modal-video {
  max-width: 70%;
  max-height: 100%;
}

#next-project-container {
  font-size: 2.1vh;
  margin-bottom: 10px;
  color: #ffffff;
}

#press,
#calendar {
  width: 65%;
  margin-top: 5vh;
  margin-left: 15%;
  text-align: justify;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding-bottom: 5vh;
}

#press a,
#calendar a {
  color: #db3a3a;
  text-decoration: none;
}

#press a:hover,
#calendar a:hover {
  text-decoration: underline;
}

#calendar h3,
#press h3 {
  font-size: 1.5rem;
  text-transform: uppercase;
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #ffffff;
  padding-bottom: 0.5rem;
  font-weight: 400;
  scroll-margin-top: 15vh;
}

#calendar h4,
#press h4 {
  font-size: 1rem;
  text-transform: uppercase;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

#calendar ul,
#press ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#calendar li,
#press li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #333;
  display: flex;
  gap: 2rem;
}

#calendar .date,
#press .date {
  min-width: 24ch;
  flex-shrink: 0;
  color: #db3a3a;
}

#calendar .event,
#press .event {
  flex: 1;
}

/* --- Landing Page --- */
.landing-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 10;
}

.landing-logo {
  position: fixed;
  top: 5vh;
  left: 2%;
  height: 3vh;
  width: auto;
  z-index: 10001;
}

.landing-text {
  font-size: 1.5rem;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 5vh;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.enter-link {
  font-size: 1.8vw;
  color: #ffffff;
  text-decoration: none;
  border: none;
  padding: 20px;
  transition: color 0.3s ease, transform 0.3s ease;
  position: absolute;
  bottom: 2vh;
}

.enter-link:hover {
  background-color: transparent;
  color: #db3a3a;
  transform: translateY(10px);
}

.landing-video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.landing-video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.landing-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

#landing-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  background-color: #000;
  transition: transform 1s ease-in-out;
}

#landing-overlay.slide-out {
  transform: translateY(-100%);
}

/* --- Mobile Responsive Overrides --- */
@media (max-width: 768px) {
  .desktop { display: none !important; }
  .mobile { display: block; visibility: visible; }

  body {
    font-size: 2.3vh; /* Adjusts size relative to viewport width */
  }

  .main-content {
    flex-direction: column;
    display: block;
    height: auto;
    z-index: 1;
  }

  .project-details {
    width: 100%; /* Full width for small screens */
  }

  .project-gallery {
    width: 100%; /* Full width for small screens */
    column-count: 1; /* Single column on mobile */
  }

  .header {
    position: fixed;
    background-color: #000000;
    flex-direction: row;
    flex-wrap: wrap;
    height: auto;
    padding-bottom: 10px;
    z-index: 5;
  }

  .header .row.title {
    width: 100%;
    flex: 0 0 100% !important;
  }

  .header .row,
  .header .column {
    width: auto;
    margin-top: 0;
  }

  .sidebar {
    padding-top: 35vh;
    width: 100%;
    height: auto;
    overflow: visible;
  }

  #image-gallery {
    display: none; /* Hide hover gallery on mobile */
  }

  .footer {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 5;
  }

  .work-content {
    width: 90%;
    margin: auto;
    padding-top: 15vh;
    padding-bottom: 80px; /* Extra padding for footer */
  }

  .work-header {
    display: flex;
  }

  .responsive-iframe-container {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
  }

  .header-left {
    text-align: left;
    flex: 1;
    align-items: flex-start;
  }

  .header-right {
    text-align: right;
    flex: 0.5;
  }

  .work-content h1 {
    font-weight: bold;
    font-size: 2.8vh;
  }

  .work-content h2 {
    font-size: 1.8vh;
  }

  .work-content h3,
  #calendar h3 {
    font-size: 1.8vh;
  }

  .modal {
    background-color: #000000;
  }

  .modal-content {  
    width: 100%;
    height: 100%;
    padding: 0px;
    margin: 0;
  }

  .modal-image,
  .modal-video {
  max-width: 97%;
  max-height: 70%;
  }

  .main-media-credits {
    font-size: 1.8vh;
    text-decoration: none;
  }

  .work-content a{
    text-decoration: none;
  }

  .main-media {
    max-width: 50vh;
    height: auto; 
    position: relative;
    margin: auto;
  }

  .media-credits {
    font-size: 2vh;
    bottom: 10vh;
    font-weight: 400;
  }
  
  .close {
    bottom: 4vh;
  }

  .responsive-iframe-container {  
    align-items: center;
  }

  #about-content {
    width: 90%;
    margin: auto;
    text-align: justify;
    margin-top: 10%;
    margin-bottom: 10vh;
  }

  #press,
  #calendar {
    width: 90%;
    margin: auto;
    margin-top: 5vh;
    margin-bottom: 1vh;
    padding: 0%;
  }

  #press {
    padding-bottom: 10vh;
  }

  #calendar li,
  #press li {
    flex-direction: column;
    gap: 0.2rem;
  }

  #calendar h3,
  #press h3 {
  font-size: 2.8vh;
  text-transform: uppercase;
  margin-top: 2.8vh;
  margin-bottom: 1rem;
  border-bottom: 1px solid #ffffff;
  padding-bottom: 0.5rem;
  font-weight: 400;
  }

  #calendar h4,
  #press h4 {
    font-size: 1.8vh;
    text-transform: uppercase;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 400;
  }

  #calendar .date,
  #press .date {
    min-width: auto;
  }

  .event {
    text-align: left;
  }
  
  .portrait {
    width: 100%;
    max-width: 50vw; /* Adjust the size as needed */
    margin: 0 0 0 0;
    padding: 0 0 0 0;
  }

  .side-image {
    margin-top: 10vh;
    margin-left: 0;
  }

  .info-content {
    position: absolute;
    padding-top: 25vh;
    padding-left: 2%;
    z-index: -1;
  }

  a:hover,
  a:focus {
    color: #ffffff;
  }

  .sidebar-item .project-year.highlight {
    background-color: black;
  }

  g {
    font-size: 1.4vh;
  }

  .custom-cursor {
    display: none; 
  } 
  
  /* Landing Page Mobile */
  .landing-logo {
    width: auto;
    height: 3vh;
  }
  .landing-text {
    font-size: 2.3vh;
    font-weight: 400;
    padding: 5vh;
  }
  .enter-link {
    position: relative;
    top: 10vh;
    font-weight: 400;
    font-size: 2.8vh;
  }
}