/* 🌍 Global Styles */
body {
  margin: 0;
  overflow: hidden;
}

img {
  pointer-events: none;
  user-drag: none;
  -webkit-user-drag: none;
}

/* 🧭 Navigation */
nav {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10;
}

/* 🖼️ Canvas Container */
#canvas {
  position: relative;
  width: 200vw;
  height: 200vh;
  transition: transform 1.6s cubic-bezier(0.25, 1, 0.5, 1);
  background-image: url('assets/SaruPortfoliobackground.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
   perspective: 1200px;
  perspective-origin: center center;
  transform-style: preserve-3d;
  overflow: visible;
}

/* 📄 Page Sections */
.page {
  position: absolute;
  width: 100vw;
  height: 100vh;
  padding: 2rem;
  box-sizing: border-box;
  color: white;
  font-size: 2rem;
}

/* 📍 Section Positions */
#home {
  top: 0;
  left: 0;
}

#about {
  top: 0;
  left: 100vw;
}

#projects {
  top: 100vh;
  left: 100vw;
}

/* 🪟 Draggable Windows */
.draggable-window {
  position: absolute;
  max-width: 100%;
  height: auto;
  background: transparent;
  border: none;
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.4));
  z-index: 100;
  transition: left 0.3s ease-out, top 0.3s ease-out; /* ✅ Removed transform */
  will-change: transform; /* ✅ Helps smooth animation */
}

.window-content {
  padding: 0;
}

.window-image {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

/* 📱 Responsive Tweaks */
@media (max-width: 500px) {
  .draggable-window {
    width: 90vw;
    font-size: 0.8rem;
  }

  .window-header {
    font-size: 0.85rem;
  }

  .window-content {
    font-size: 0.8rem;
  }
}

/* 🎯 Image Wrapper (optional scale effect) */
.image-wrapper {
  transform: scale(1);
  /* transition: transform 0.2s ease; */
}

/* 🎬 Throw-In Animation */
@keyframes throwIn {
  0% {
    transform: translate(var(--start-x), var(--start-y)) rotate(var(--initial-rotation));
  }
  60% {
    transform: translate(20px, -10px) rotate(calc(var(--initial-rotation) * -0.3));
  }
  80% {
    transform: translate(-10px, 5px) rotate(calc(var(--initial-rotation) * 0.1));
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

.draggable-window.throw-in {
  animation: throwIn 0.8s ease-out;
}

.draggable-window.has-thrown {
  animation: none !important;
}