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

@font-face {
  font-family: 'Apple Garamond';
  src: url('fonts/AppleGaramond.ttf') format('truetype');
}

  .bg {
  background-image: url("home/bg.png"); /* no need to escape space */
  background-attachment: fixed; /* key for parallax effect */
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 50%;
  z-index: -1; /* push behind everything */
}

  body {
    font-family: 'Apple Garamond' , serif;
background-color: #0052ff;
color: black;
text-align: center;
min-height: 100vh;
flex-direction: column;
margin: 0;
}

.works-section {
  position: relative;
  padding-top: 40px;
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

nav {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    z-index: 999;
  }

  nav a {
    text-decoration: none;
    color: white;
    font-size: 20px;
    font-weight: bold;
    padding: 8px 12px;
    transition: 0.3s;
  }

  nav a:hover {
    text-decoration: underline;
  }

  .logo-left, .logo-right {
    position: absolute;
    top: 0;
z-index: 9999; 
  }

    
  .logo-left img,
.logo-right img {
  display: inline-block;
  transition: transform 0.3s ease;
  pointer-events: all;
}

.logo-left img:hover,
.logo-right img:hover {
  transform: scale(1.1);
}

  .logo-left img {
      width: 210px;
      height: auto;  
  }

  .logo-right {
    right: 50px;
    top: 32px;
  }

  .logo-right img {
    width: 80px;
    height: auto;
  }


.carousel-grid {
  display: flex;
  flex-direction: row;
  margin-top: -80px;
  gap: 100px;
  overflow-x: hidden;
  padding: 40px 110px;
  max-width: 1400px;
  justify-content: center;
  margin-left: 50px;
}

.carousel-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 350px;
  gap: 50px;
}


.gallery {
  --d: 10s; 
display: grid;
  width: 220px;
}

.gallery > img {
  grid-area: 1/1;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 10px solid white;
  box-shadow: 0 0 4px black;
  background-color: white;
  animation: slide var(--d) infinite, z-order var(--d) infinite steps(1);
}

.gallery img:last-child {
  animation-name: slide, z-order-last; 
}

.gallery > img:nth-child(1) {
  animation-delay: 0s;
  z-index: 5;
}

.gallery > img:nth-child(2) {
  animation-delay: 2s;
  z-index: 4;
}

.gallery > img:nth-child(3) {
  animation-delay: 4s;
  z-index: 3;
}

.gallery > img:nth-child(4) {
  animation-delay: 6s;
  z-index: 2;
}

.gallery > img:nth-child(5) {
  animation-delay: 8s;
  z-index: 1;
}

@keyframes slide {
  0% {
    transform: translateX(0%) rotate(0deg);
    z-index: 5;
  }
  20% {
    transform: translateX(60%) rotate(20deg);
    z-index: 5;
  }
  21% {
    z-index: 1;
  }
  100% {
    transform: translateX(0%) rotate(0deg);
    z-index: 1;
  }
}

@keyframes z-order {
10%, 20% {
z-index: 1;
}
80% {
  z-index: 2;
}
}

@keyframes z-order-last {
  10%, 20% {
  z-index: 1;
  }
  90% {
    z-index: 2;
  }
  }

.carousel-title {
  margin: 0;
  padding-top: 10px;
}

.carousel-title a {
  font-size: 1.75rem;
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.carousel-title a:hover {
  color: rgb(217, 243, 99);
  text-decoration: underline;
}

  .footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    padding: 10px 0;
    font-size: 14px;
    color: blue;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1); /* optional for better visibility */
  }

  .title {
    justify-content: center;
      }

      .title-img {
        margin-top: 0px;
        margin-bottom: 25px;
        width: 700px;
        max-width: 80%;
      }
  

  @media (max-width: 768px) {

    html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    }

.bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100%;
  background-image: url("home/bg.png");
  background-repeat: repeat-y;
  background-size: 100% 1000px;
  z-index: -1;
}


nav {
gap: 20px;
}

nav a {
font-size: 20px;
margin-top: 100px;
}

.logo-left{
    width: 100px;
    top: -13px;
    left: -10px;

  }

.logo-right img {
width: 60px;
}
  

.title {
    margin-top: 0px;
    justify-content: center;
      
      }

        .carousel-grid {
flex-direction: column;
          gap: 75px;
          margin-top: -70px;
          margin-left: -75px;
          padding-bottom: 100px;
        }
      
        .gallery {
          margin-top: 20px;
          width: 60vw;
          height: auto;
        }
      
        .carousel-title {
          margin-top: 15px;
          font-size: 1.2rem;
        }
        
      }

      
