.macbook-container {
  height: 200vh;
  position: relative;
}

.macbook-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1500px;
}

.macbook {
  width: 75vw;
  max-width: 800px;
  aspect-ratio: 5/3;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-10deg);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.screen-part {
  width: 100%;
  height: 100%;
  position: absolute;
  transform-origin: bottom center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform;
  z-index: 2;
}

.screen-outer {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #2b2b2b, #080808);
  box-shadow: 0 0 20px 12px rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  position: relative;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.screen-inner {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  background: #000;
  border-radius: 6px;
  backface-visibility: hidden;
  transform: translateZ(0);
  overflow: hidden;
}

.screen-content {
  width: 100%;
  height: 100%;
  object-fit: cover;
  backface-visibility: hidden;
  transform: translateZ(0);
  opacity: 1;
}

.screen-content.visible {
  opacity: 1;
}

.camera {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, #80A5BA 0%, #435061 100%);
  border-radius: 50%;
  z-index: 10;
}

.base-bottom {
  width: 120%;
  height: 20px;
  position: absolute;
  bottom: -20px;
  left: -10%;
  background: linear-gradient(145deg, #c0c0c0, #a8a8a8);
  box-shadow: 0 0 20px 8px rgba(255, 255, 255, 0.15);
  border-radius: 0 0 12px 12px;
}

.screen-part {
  backface-visibility: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}

.macbook-sticky .project-subtitle{
  margin-top: 50px;
  margin-bottom: 0px;
  color: #2e517d;
  text-align: center;
  font-size: clamp(18px, 3vw, 50px);
  font-weight: 300;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.macbook-sticky .project-title {
  margin-top: 0px;
  margin-bottom: 10px;
  color: #2e517d;
  text-align: center;
  font-size: clamp(50px, 10vw, 100px);
  font-weight: 800;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.macbook-sticky .project-subtitle.visible, .macbook-sticky .project-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.macbook-sticky .more-button {
  background-color: #2e517d;
}

@media (max-width: 800px) {
  .screen-inner {
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
  }

  .base-bottom {
    height: 12px;
    bottom: -12px;
  }

  .camera {
    top: 3px;
    left: 50%;
    width: 3px;
    height: 3px;
  }
}

body.dark-mode .macbook-sticky .project-title, body.dark-mode .macbook-sticky .project-subtitle {
  color: #95b5de;
}

body.dark-mode .macbook-sticky .more-button {
  background-color: #95b5de;
  color: #1e2545;
}
