html {
  scroll-behavior: smooth;
}
body.no-scroll {
  overflow: hidden;
}

.navbar {
  padding-block: var(--space-sm);
  background: var(--color-bg);
}
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-sm);
}
.logo {
  width: 36px;
  height: 36px;
}

.nav-links {
  display: flex;
  gap: var(--space-md);
}
.nav-links a {
  font-size: var(--font-sm);
  color: var(--color-subtle);
  position: relative;
}
.nav-links a:hover {
  color: var(--color-text);
}
.nav-links a.active {
  color: var(--color-text);
  font-weight: 400;
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
}

/* Video Section */
.experiments {
  padding-top: var(--space-lg);
  background: var(--color-bg);
  text-align: center;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.experiments .section-title {
  font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.contact {
  padding: var(--section-padding-desktop) 0;
  background: var(--color-bg);
  text-align: center;
  opacity: 0; /* for scroll animation */
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.contact.animate {
  opacity: 1;
  transform: translateY(0);
}

.contact-title {
  font-size: var(--font-lg);
  margin-bottom: var(--space-sm);
}

.contact-subtitle {
  font-size: var(--font-md);
  color: var(--color-subtle);
  margin-bottom: var(--space-lg);
}

.contact-icons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

.contact-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, background 0.3s ease;
}

.contact-icons img {
  width: 20px;
  height: 20px;
}

/* Back to Top Button */
#backToTop {
  position: fixed;
  bottom: 4rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  z-index: 1000;
}

#backToTop i {
  width: 20px;
  height: 20px;
  color: var(--color-text);
}

#backToTop:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* Visible state */
#backToTop.show {
  opacity: 1;
  visibility: visible;
}

/* Responsive */
@media (max-width: 1024px) {
  .section-intro,
  .section-title {
    text-align: center;
  }
}
.experiments.animate {
  opacity: 1;
  transform: translateY(0);
}

.experiment-grid {
   display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: var(--space-lg);
}

.experiment-card {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
}

.experiment-card video {
  width: 100%;
  max-width: 360px;
  height: 400px;
  object-fit: cover;
  border-radius: 12px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 200px;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.experiment-card p {
  font-size: var(--font-sm);
  color: var(--color-subtle);
}

/* Closing line */
.experiments-quote p {
  display: inline-block;
  background: rgba(255, 255, 255, 0.05);
  padding: var(--space-sm) var(--space-lg);
  border-radius: 8px;
  font-size: var(--font-md);
  font-style: italic;
  color: var(--color-text);
}
experiments-quote2 {
  display: flex;
  justify-content: center;
  text-align: center;
  align-items: center;
}

.nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 6px;
  padding: var(--space-xs);
  cursor: pointer;
}
.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.09);
}
.nav-toggle svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
}

/* Mobile nav dropdown */
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: var(--space-xs);
  position: absolute;
  top: 100%;
  right: 2rem;
  z-index: 9999;
  min-width: 150px;
  background: transparent;
  padding: 0;
}

.nav-mobile.active {
  display: flex;
}

/* Links inside mobile dropdown */
.nav-mobile a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-sm);
  border-radius: 6px;
  background: #333;
  color: #fff;
  text-decoration: none;
  font-size: var(--font-sm);
  transition: background 0.3s ease;
  min-width: 120px;
}

.nav-mobile a:hover {
  background: rgba(255, 255, 255, 0.09);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 900;
}

/* Show overlay */
.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.navbar {
  position: relative;
  z-index: 1000;
}

.nav-mobile {
  z-index: 1001;
}

@media (max-width: 1024px) {
  .experiments {
    padding: var(--section-padding-tablet) 0;
  }

  .experiment-grid {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
  }

  
}

@media (max-width: 480px) {
  .experiments {
    padding: var(--section-padding-mobile) 0;
  }

  .experiment-grid {
      display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
  }

  .experiment-card video {
    width: 100%;
    max-width: 300px;
    height: 300px;
    margin: 0 auto;
  }

  .experiments-quote p {
    font-size: var(--font-sm);
    padding: var(--space-xs) var(--space-md);
  }
}
