html,
body {
  position: relative;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: "peridot-pe-variable", sans-serif;
  font-variation-settings: "wght" 350, "wdth" 87, "ital" 0;
}

.project-entry,
body,
html {
  scrollbar-width: none;
}

.project-entry::-webkit-scrollbar,
body::-webkit-scrollbar,
html::-webkit-scrollbar {
  display: none;
}

.project-entry-gallery {
  display: flex;
  justify-content: flex-start;
  gap: 0vw; /* 1vw margin between  images */
  width: auto;
  height: calc(100vh - 4rem);
  margin-top: 2.2rem;
  margin-bottom: 0rem;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
  overflow-x: auto;
  overflow-y: hidden;
  transform: scale(1);
  scrollbar-width: none;
  z-index: 0;
  min-height: calc(92% - 1%);
    transition: 0.5s;
}

.textView .project-entry-gallery {
  height: calc(85vh - 4rem);
}

body{
  overflow: hidden !important;
  height: 100vh;

}

.textView {
  height: auto;
}

.project-entry-gallery::-webkit-scrollbar {
  display: none;
}

#title {
  position: relative;
  z-index: 999 !important;
  font-size: 1.2rem;
  margin-left: 0rem;
  text-transform: capitalize;
}

#year {
  font-size: 1.2rem;
  margin-left: 0.5rem;
  margin-bottom: 0;
  margin-top: 0;
  height: 100%;
}

#project-content {
  padding-top: 0.6rem;
  margin-bottom: 0.6rem;
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(540px, 1fr));
  height: 100%;
  z-index: -1;
  align-items: start;
  opacity: 1;
  justify-content: flex-start;
  transition: opacity 1.5s;
}

.meta {
  margin-top: 0rem;
  margin-left: 1rem;
  margin-right: 1rem;
  height: 100%;
  max-width: 28rem;
  font-size: 1rem;
  transition: 0.35s;
  display: flex;
  flex-direction: column;
  justify-content: first baseline; /* Push links to the bottom */
}

.links {
  margin-top: auto; /* Ensure links are at the bottom */
  padding-bottom: 0.5rem;
}

.links a {
  text-decoration: underline;
}

.links a:hover {
  font-style: italic;
}

.meta ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-text {
  max-width: 36rem;
  padding-right: 1rem;
  padding-left: 1rem;
  transition: 0.35s;
  padding-bottom: 0rem;
}

.links a {
  margin-right: 1rem;
  font-size: 1rem;
}

a {
  color: black;
}

.project-text {
  font-size: 1rem;
}

.project-text p:first-of-type {
  margin-top: 0;
}

.meta p:first-of-type {
  margin-top: 0;
}

/* Ensure images fill the row with the same height, maintaining aspect ratio */
.project-entry img {
  width: auto;
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out,
    filter 0.8s ease;
  height: 100%;
  opacity: 0;
  transform: translateY(-20vw) scale(0.1);
  filter: blur(50px);
}

.project-entry iframe {
  width: auto;
  min-width: 80vw;
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out,
    filter 0.8s ease;
  height: 100%;
  opacity: 0;
  transform: translateY(20vw) scale(0);
  filter: blur(20px);
  pointer-events: none;
}

.video-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 10;
}

.project-entry-gallery figure.visible img {
  opacity: 1;
  transform: translateY(0vw) scale(1);
  filter: blur(0px);
}

.project-entry-gallery figure.visible iframe {
  opacity: 1;
  transform: translateY(0vw);
  filter: blur(0px);
}

figure {
  padding: 0;
  margin: 0.0rem;
  margin-bottom: 0rem;
  transform: scale(1);
  transition: 0.6s ease-in-out;
  height: 100%;
  padding-right: 1rem;
}

/* Blur all other galleries except the hovered one */
.project-entry-gallery.blur {
  filter: blur(5px);
}

nav {
  position: fixed;
  top: 0rem;
  padding-top: 0.3rem;
  padding-bottom: 0.7rem;
  left: 0rem;
  padding-left: 1rem;
  width: 100vw;
  height: auto;
  z-index: 2;
  height: 1.5rem;
  text-align: left;
  user-select: none;
  background-color: white;
  box-shadow: 1px 1px 10px white;
}

nav a {
  font-size: 1.2rem;
  margin-right: 1rem;
  text-shadow: white 1px 1px 40px;
  cursor: pointer;
  text-decoration: none;
  color: black;
}

#close {
  position: absolute;
  right: 0.4rem;
  top: 0.2rem;
  z-index: 1000;
  font-size: 1.8rem;
  transform: rotate(45deg);
  line-height: 100%;
  user-select: none;
  font-family: "peridot-pe-variable", sans-serif;
  font-variation-settings: "wght" 210, "wdth" 100, "ital" 0;
  background-color: transparent; /* Prevent colored background on click */
}

a,button  {
  -webkit-tap-highlight-color: transparent;
}

a:active, button:active {
  background: transparent;
}

a:focus, button:focus {
  outline: none;
}


#aboutcontact {
  position: fixed;
  top: 0.5rem;
  right: 1rem;
}

#header {
  position: fixed;
  top: 0.5rem;
  font-size: 2.3rem;
  padding-top: 0;
  padding-left: 0rem;
  width: 100vw;
  height: auto;
  font-weight: 400;
  z-index: 2;
}

#header a {
  padding: 0;
  margin: 0;
  color: black;
  text-decoration: none;
}

/* Default: show desktop, hide mobile */
.meta-mobile,
.content-mobile {
  display: none;
}

img {
  pointer-events: none;
  user-select: none;
}

@media (max-width: 1080px) {
  .project-text {
    margin-bottom: 2rem;
  }

  .meta {
    margin-bottom: 1rem;
  }

  .links {
    position: absolute;
    bottom: 0rem;
    padding-bottom: 1rem;
  }
}

@media (max-width: 768px) {
  .meta-desktop,
  .content-desktop {
    display: none;
  }
  .meta-mobile,
  .content-mobile {
    display: block;
  }

  body {
    overflow: auto !important;
  }

  .project-entry-gallery {
    height: 100%;
    margin-top: 3rem;
    padding-left: 0;
    flex-direction: column;
  }

  .project-entry iframe {
    transform: translateY(0vw) translateX(20vw);
    width: calc(100vw - 2rem);
    object-fit: cover;
    height: auto;
    min-height: 30vh;
        margin-left: 1rem;
  }

  .project-entry img {
    transform: translateY(0vw) translateX(-20vw);
    width: calc(100vw - 2rem);
    object-fit: cover;
        margin-left: 1rem;
  }

  figure.visible img,
  figure.visible iframe {
    transform: translateY(0) translateX(0);
  }

  #project-content { 
    display: grid !important;
    grid-template-columns: 1fr;
  }

  figure {
    margin: 0rem;
    padding-right: 0;
    margin-bottom: 0.7rem;
  }
}
