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

html,
body {
  width: 100%;
  height: 1000vh;
  font-family: "DM Sans", sans-serif;
  background: #000;
  color: #fff;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  mix-blend-mode: difference;
}

.nav-links {
  display: flex;
  gap: 2em;
}

footer {
  position: fixed;
  bottom: 0;
  width: 100vw;
  padding: 2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.slider-wrapper {
  position: fixed;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgb(0, 0, 0);
  background: radial-gradient(
    circle,
    rgba(0, 0, 0, 0) 75%,
    rgba(0, 0, 0, 0.5) 100%
  );
  z-index: 1;
}

.floating-stars {
  position: fixed !important;
  z-index: 10 !important;
}

/* Force cubes to the extreme left and right to avoid overlapping the central cards */
.cube-1 { left: 5% !important; bottom: 10% !important; top: auto !important; right: auto !important; }
.cube-3 { left: 8% !important; top: 10% !important; bottom: auto !important; right: auto !important; }
.cube-5 { left: 4% !important; top: 38% !important; bottom: auto !important; right: auto !important; }
.cube-7 { left: 10% !important; bottom: 35% !important; top: auto !important; right: auto !important; }

.cube-2 { right: 8% !important; bottom: 12% !important; top: auto !important; left: auto !important; }
.cube-4 { right: 10% !important; top: 40% !important; bottom: auto !important; left: auto !important; }
.cube-6 { right: 4% !important; bottom: 30% !important; top: auto !important; left: auto !important; }
.cube-8 { right: 5% !important; top: 15% !important; bottom: auto !important; left: auto !important; }

/* --- Mobile Specific Overhaul --- */
.mobile-work-gallery {
  display: none;
}

@media (max-width: 1000px) {
  /* Hide the 3D Canvas slider elements entirely on mobile */
  .slider-wrapper,
  .overlay {
    display: none !important;
  }

  /* Release the body lock so it can scroll naturally */
  html, body {
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    position: relative;
  }

  /* Mobile Gallery Container */
  .mobile-work-gallery {
    display: flex;
    flex-direction: column;
    padding: 100px 24px 60px 24px;
    width: 100%;
    min-height: 100vh;
    position: relative;
    z-index: 20; /* Above the stars background */
  }

  .mob-work-title {
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.05rem;
    text-transform: uppercase;
    margin-bottom: 3rem;
    text-align: center;
    color: #fff;
  }

  @font-face {
    font-family: "Betterlett";
    src: url("../betterlett/Betterlett.ttf") format("truetype");
  }

  .mob-work-title .accent {
    color: #FFD700;
    font-family: "Betterlett", sans-serif;
    text-transform: none;
    font-weight: normal;
    font-size: 4rem;
    display: block;
    margin-top: -10px;
  }

  .mob-work-item {
    margin-bottom: 3rem;
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .mob-work-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  }

  .mob-work-item h3 {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: #fff;
    text-align: left;
    text-transform: uppercase;
  }

  .mobile-hide-nav {
    display: none !important;
  }

  .back-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #FFD700;
    color: #000;
    padding: 10px 20px;
    border-radius: 25px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
  }

  .back-btn:active {
    transform: scale(0.95);
  }
}
