/* Example using Clash Display for headings and Inter for body */
@import url("https://api.fontshare.com/v2/css?f[]=clash-display@600,700&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Albert+Sans:wght@400;500;600;700&wdth@75&display=swap');
/* Hide scrollbar for all elements */
* {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
*::-webkit-scrollbar {
  display: none;
}

body {
  overflow-y: scroll;
  width: 100vw;
  position: relative;
  max-width: 100vw;
  overflow-x: hidden;
}

.scroll-container {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  overflow-y: scroll;
  overflow-x: hidden;
}

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

:root {
  --gutter: 32px;
  --columns: 12;
  --content-max-width: 2000px;
  --primary-color: #db5d02;
  --background-color: #f3ebe6;
  --cta-blue: #211cbb;
  --heading-font: "Clash Display", sans-serif;
  --body-font: "Albert Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--heading-font);
}

body,
p,
li,
a,
button,
input,
textarea {
  font-family: var(--body-font);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

body {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  max-width: 100vw;
  background-color: #f3ebe6; /* Match this with your projects section background */
  position: relative;
  color: #3e3e3e;
  font-size: clamp(0.5rem, 3.5vw, 1.5rem);
}

.grid-container {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}

@media (min-width: 2000px) {
  .grid-container {
    width: 60%;
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: repeat(12, 1fr);
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

.content-wrapper {
  grid-column: 1 / -1;
  padding: 4rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero {
  height: 100vh;
  width: 100%;
  background: url("images/Landingbg.png") center / cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6rem;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform; /* Optimize for animations */
}

.hero-content {
  max-width: 880px;
  grid-column: 1 / span 8;
}

.hero.hidden {
  transform: translateY(-100%);
}

.hero h1 {
  color: white;
  font-size: clamp(3rem, 8vw, 7rem);
  margin-bottom: 2rem;
}

.hero p {
  color: white;
  font-size: clamp(1rem, 2vw + 0.5rem, 1.4rem);
  line-height: 1.5;
  max-width: 750px;
  padding-left: 6rem;
  font-family: "Albert Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

.scroll-text {
  color: white;
  text-align: center;
  font-size: clamp(1rem, 2vw + 0.5rem, 0.8rem);
  font-family: "Albert Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

.smile-button {
  position: fixed;
  right: 2rem;
  top: 90%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100;
  transition: transform 0.3s ease;
  background-image: url("images/SmileIcon.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.smile-button:hover {
  transform: translateY(-50%) scale(1.1);
  background-image: url("images/SmileIconHover.png");
}

/* Updated styles for projects section and logo carousel */
.projects {
  background-color: #f3ebe6;
  position: absolute;
  top: 100vh;
  left: 0;
  width: 100%;
  z-index: 15;
  transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1), top 0.8s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform, top; /* Optimize for animations */
  overflow: hidden; /* Prevent horizontal scrollbar */
  padding-bottom: 2rem;
}

.logo-carousel {
  background-color: #f3ebe6;
  padding: 20px 0;
  position: relative;
  width: 100%;
  z-index: 14;
  transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1), top 0.8s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform, top; /* Optimize for animations */
  overflow: hidden; /* Prevent horizontal scrollbar */
}

.projects-content {
  position: relative;
  z-index: 20;
}

body.scrolled {
  overflow-y: auto;
}

body.scrolled .projects {
  position: relative;
  top: 0;
}

.projects.visible {
  opacity: 1;
  transform: translateY(0);
}

.projects h2 {
  color: #db5d02;
  font-size: 4rem;
  margin-bottom: 2rem;
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 2rem;
}

.project-grid {
  margin: 0 auto;
  display: grid;
  gap: 4rem;
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
}

.project-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: flex-end;
}

.project-item .project-image {
  order: -1;
  margin-bottom: -2rem;
}

.project-info h3 {
  color: #db5d02;
  margin-bottom: 1rem;
  margin-top: 2rem;
  font-size: clamp(2rem, 3.5vw, 4rem);
}

.project-image {
  width: 80%;
  height: auto;
  border-radius: 8px;
  margin-bottom: auto;
}

.project-button {
  background-color: transparent;
  color: #db5d02;
  border: 2px solid #db5d02;
  border-radius: 50px;
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  align-self: flex-start;
}

.project-button:hover {
  background-color: #db5d02;
  color: white;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(219, 93, 2, 0.95);
  display: none;
  flex-direction: column;
  align-items: center;
  z-index: 1000;
  overflow-y: auto;
  padding-top: 2rem;
}

.overlay.active {
  display: flex !important;
}

.close-button {
  position: absolute;
  right: 1rem;
  top: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.cta-section {
  background: var(--cta-blue);
  color: white;
  text-align: center;
  font-size: clamp(3rem, 8vw, 7rem);
  position: relative;
  transform: translateZ(0); /* Force GPU acceleration */
  z-index: 1; /* Make sure it's below projects but above hero */
  visibility: visible; /* Allow toggling visibility */
}

.cta-button {
  background: #211cbb;
  color: white;
  border: 2px solid white;
  padding: 1rem 4rem;
  border-radius: 9rem;
  font-size: 2rem;
  cursor: pointer;
  margin-top: 3rem;
  margin-bottom: 3rem;
  font-family: var(--body-font);
}

.copyright {
  position: absolute;
  bottom: 1rem;
  left: var(--gutter);
  padding: 0;
  color: white;
  font-size: 1.08rem;
}

.bio-popup {
  background: #f3ebe6;
  padding: 2rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 800px;
  position: relative;
  margin-bottom: 2rem;
}

body.modal-open {
  overflow: hidden;
}

.bio-content {
  position: relative;
  background-color: #f3ebe6;
  border-radius: 24px;
  width: 90%;
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 40px;
  height: auto;
  overflow: visible;
}

.bio-profile-image {
  position: absolute;
  top: -34px;
  left: 48px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid #f3ebe6;
}

.bio-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  cursor: pointer;
  color: #db5d02;
  font-size: 69px;
  padding: 12px;
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.bio-title {
  color: #db5d02;
  font-size: 32px;
  margin: 40px 0 32px;
  padding-left: 32px;
  padding-right: 32px;
}

.bio-section {
  margin-bottom: 40px;
  padding-bottom: 40px;
  padding-left: 32px;
  padding-right: 32px;
  border-bottom: 2px dotted #db5d02;
}

.bio-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.bio-section-title {
  font-size: 16px;
  color: #5a5a5a;
  margin-bottom: 8px;
  font-family: var(--body-font);
}

.bio-section-subtitle {
  font-style: italic;
  color: #666;
  margin-bottom: 16px;
  font-family: var(--body-font);
}

.bio-text {
  line-height: 1.6;
  color: #5a5a5a;
  margin-bottom: 16px;
  font-family: var(--body-font);
}

.bio-content::-webkit-scrollbar {
  width: 8px;
}

.bio-content::-webkit-scrollbar-track {
  background: #f3ebe6;
}

.bio-content::-webkit-scrollbar-thumb {
  background: #db5d02;
  border-radius: 4px;
}

/* Logo carousel styles */
.logo-track {
  display: flex;
  animation: scroll 30s linear infinite;
  width: max-content; /* Ensure all logos fit */
  transform: translateZ(0); /* Force GPU acceleration */
  padding: 3rem;
}

.logo-slide {
  flex: 0 0 auto;
  margin: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-slide img {
  height: 50px; /* Adjust as needed */
  width: auto;
  object-fit: contain;
  max-width: 100%;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%); /* Only move half way for seamless loop */
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  :root {
    --gutter: 16px;
  }

  .grid-container {
    padding-left: 1rem;
    padding-right: 1rem;
    gap: var(--gutter);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .hero-content {
    width: 100%;
    padding: 0;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    word-wrap: break-word;
    padding-left: 0; /* Remove padding on mobile */
  }

  .hero p {
    font-size: clamp(1rem, 4vw, 1.2rem);
    padding-left: 0; /* Remove padding on mobile */
    width: 100%;
  }

  .project-item {
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
  }

  .project-info h3 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .project-image {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .bio-popup {
    width: 95%;
    margin: 1rem;
    padding: 1rem;
  }

  .cta-section {
    padding: 2rem var(--gutter);
  }

  .cta-button {
    padding: 0.8rem 2rem;
    font-size: 1.5rem;
    font-family: var(--body-font), -apple-system, BlinkMacSystemFont, sans-serif;
  }

  .logo-slide img {
    height: 40px; /* Smaller on mobile */
  }
}

/* Extra small screens */
@media (max-width: 360px) {
  .hero h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
  }

  .hero p {
    font-size: 1rem;
  }

  .project-button {
    width: 100%;
    text-align: center;
  }
}

/* Update the transition property for smoother animations */
.hero,
.logo-carousel,
.projects {
  transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1), top 0.8s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.8s
    cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform, top, opacity;
  backface-visibility: hidden; /* Prevent flickering during animations */
  -webkit-backface-visibility: hidden;
}

