/* ==========================================================================
   GLOBAL RESET & COLOR TOKENS
   ========================================================================== */
:root {
  --color-bg: #EAEAEA; 
  --color-text-main: #000000;
  --color-text-dim: #111111;
  --color-border: rgba(0, 0, 0, 0.12);
  --color-accent: #8F1175; 
  --color-desat-pink: #C462B0; 
  --font-main: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100vw;
  background-color: var(--color-bg);
  color: var(--color-text-main);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==========================================================================
   PRECISION TRAILING CURSOR & WHITE SCROLL PILL
   ========================================================================== */
.cursor-container {
  position: fixed; top: 0; left: 0; width: 0; height: 0;
  pointer-events: none; z-index: 999999; will-change: transform;
}

.cursor-ring {
  position: absolute; top: 0; left: 0; width: 14px; height: 14px;
  background-color: #2B00FF; border: 1px solid transparent; border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), height 0.3s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.25s ease, border-color 0.25s ease;
}

.cursor-container.expanded .cursor-ring { 
  width: 42px; height: 42px; background-color: transparent !important; border-color: rgba(0, 0, 0, 0.8) !important; 
}

.cursor-pill {
  position: absolute; top: -14px; left: 24px; background-color: #FFFFFF;
  border: 1px solid #C5C5C5; color: #333333; padding: 6px 16px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  opacity: 0; filter: blur(8px); transform: scale(0.95);
  transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}

.cursor-container.show-pill .cursor-pill { opacity: 1; filter: blur(0px); transform: scale(1); }
.pill-text-wrapper { display: inline-flex; white-space: nowrap; will-change: opacity, filter, transform; }

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; height: 52px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 60px;
  background-color: var(--color-bg); 
  z-index: 999; border-bottom: none;
  transform: translateY(0%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.nav-hidden {
  transform: translateY(-100%);
}

.nav-border {
  position: absolute; bottom: 0; left: 60px; right: 60px; height: 1px;
  background-color: var(--color-border); 
}

.nav-logo { font-size: 15px; font-weight: 900; letter-spacing: -0.5px; text-transform: uppercase; }
.nav-links { display: flex; gap: 48px; }
.nav-links a { color: var(--color-text-main); font-size: 13px; font-weight: 500; text-transform: uppercase; }
.nav-links a.active-nav { font-weight: 800; }

.tumbler-link {
  --tumbler-ht: 16px; 
  display: inline-flex; overflow: hidden; height: var(--tumbler-ht); 
  line-height: var(--tumbler-ht); text-decoration: none; cursor: pointer;
}
.tumbler-link .char-slot { display: inline-block; position: relative; overflow: hidden; height: 100%; vertical-align: top; }
.tumbler-link .char-inner { display: flex; flex-direction: column; will-change: transform; }
.tumbler-link .char-inner span { display: block; height: var(--tumbler-ht); line-height: var(--tumbler-ht); }

/* ==========================================================================
   PROJECT SPLIT LAYOUT
   ========================================================================== */
.project-split { display: block; width: 100%; }

/* LEFT COLUMN - FIXED */
.split-left {
  position: fixed; top: 0; left: 0; width: 50%; height: 100vh;
  padding: 70px 40px 100px 40px; 
  background-color: var(--color-bg); z-index: 10;
  display: flex; flex-direction: column; overflow: hidden;
}

/* RIGHT COLUMN - SCROLLING */
.split-right { margin-left: 50%; width: 50%; padding-top: 52px; z-index: 200; position: relative; }

/* ==========================================================================
   ENTIRE SIDEBAR CONTENT SHIFT WRAPPER
   ========================================================================== */
.sidebar-content-wrapper {
  transform: translateY(0px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar-content-wrapper.shifted {
  transform: translateY(-40px);
}

.page-nav-row {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px;
}

.page-nav-btn {
  font-size: 12px; font-weight: 500; letter-spacing: 0.04em; 
  color: #888888; 
  text-decoration: none; transition: color 0.3s ease, opacity 0.4s ease;
  --tumbler-ht: 16px; height: 16px; line-height: 16px;
}
.page-nav-btn:hover { color: #000000; }

.hidden-nav-btn {
  opacity: 0; pointer-events: none;
}
.hidden-nav-btn.visible {
  opacity: 1; pointer-events: auto;
}

.title-main {
  font-size: 65px; font-weight: 900; letter-spacing: -4px; 
  text-transform: uppercase; line-height: 0.95; margin-bottom: 16px;
}

/* INLINE PROGRESS TRACK */
.inline-progress-track {
  width: 100%;
  height: 2px;
  background-color: rgba(0, 0, 0, 0.08); 
  margin: 12px 0 24px 0;
  overflow: hidden;
  position: relative;
}

.inline-progress-fill {
  width: 100%; height: 100%;
  background-color: var(--color-text-main); 
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

.reveal-wrapper { overflow: hidden; display: inline-block; width: 100%; }

.text-crossfade-container {
  position: relative; flex: 1; width: 100%; overflow: hidden;
}

.text-block {
  position: absolute; top: 0; left: 0; right: 0; width: 100%;
  padding-top: 10px; will-change: opacity, transform;
}

.desc-main {
  font-size: 20px; line-height: 1.38; color: var(--color-text-dim);
  font-weight: 400; font-style: normal; margin-bottom: 32px; letter-spacing: -0.4px;
}
.desc-secondary {
  font-size: 18px; line-height: 1.42; color: var(--color-text-dim);
  font-weight: 400; font-style: normal; letter-spacing: -0.3px;
}
.desc-secondary em { font-style: italic; font-weight: 400; }

.meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 28px; }
.meta-item, .awards-section, .meta-section { display: flex; flex-direction: column; gap: 6px; }

.meta-label { font-size: 14px; font-weight: 700; color: var(--color-accent); letter-spacing: -0.2px; }
.meta-value { font-size: 16px; font-weight: 400; font-style: normal; color: var(--color-text-dim); line-height: 1.3; letter-spacing: -0.3px; }

/* ANCHORED BOTTOM CLICK HERE LINK */
.bottom-cta-frame {
  position: absolute; bottom: 36px; left: 40px;
  display: flex; flex-direction: column; gap: 4px; z-index: 5;
}

.click-here-link {
  color: var(--color-text-main); font-size: 18px; font-weight: 600;
  text-decoration: none; 
  --tumbler-ht: 22px; height: 22px; line-height: 22px; width: fit-content;
}
.click-here-link .char-inner span { height: 22px; line-height: 22px; }

/* ==========================================================================
   KEY LEARNINGS SLIDING BLACK CARD (FULL 100VW SPAN)
   ========================================================================== */
.key-learnings-card {
  position: fixed; bottom: 0; left: 0; width: 100vw;
  background-color: #0d0d0d; color: #ffffff;
  padding: 36px 40px 40px 40px; z-index: 100;
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
}
.key-learnings-card.active { transform: translateY(0%); }

.card-content-wrap {
  max-width: 50%; 
  padding-right: 40px;
}

.card-title {
  font-size: 13px; font-weight: 700; letter-spacing: 0.05em;
  color: var(--color-desat-pink); 
  text-transform: uppercase; margin-bottom: 16px; display: block;
}
.card-list {
  list-style-type: disc; padding-left: 20px; display: flex; flex-direction: column; gap: 10px;
}
.card-list li {
  font-size: 15px; font-weight: 400; font-style: normal; line-height: 1.4; letter-spacing: -0.2px; color: #eaeaea;
}

/* ==========================================================================
   RIGHT IMAGES & MEDIA WRAPPERS
   ========================================================================== */
.image-wrapper {
  width: 100%; min-height: 100vh;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.img-scan-mask, .img-scan-mask-relative {
  overflow: hidden; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative;
}
.project-img { width: 100%; height: auto; object-fit: cover; display: block; }
.project-video-full { width: 100%; height: 100%; object-fit: cover; display: block; }

/* DYNAMIC SCROLL ENGINE UTILITIES */
.scroll-trigger-section {
  position: relative; width: 100%;
}
.pinned-image-wrapper {
  position: relative; width: 100%;
}

/* COVID EQUATION CARD */
.symbol-equation-card {
  position: absolute; top: 26%; left: 50%; transform: translateX(-50%);
  background: rgba(15, 10, 16, 0.30); backdrop-filter: blur(8px);
  border-radius: 12px; padding: 36px 60px; display: flex; flex-direction: column; align-items: center; gap: 26px;
  scale: 1.04; width: 90%; max-width: 520px; border: none;
}
.eq-title { font-size: 14px; font-weight: 700; letter-spacing: 0.1em; color: #ffffff; text-transform: uppercase; }
.eq-icons-row { display: flex; align-items: center; justify-content: center; gap: 32px; }
.eq-icon { width: 84px; height: 84px; object-fit: contain; }
.eq-operator { font-size: 32px; font-weight: 300; color: #ffffff; }
.eq-fade-item { opacity: 0; }

.video-embed-frame {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 82%; height: auto; aspect-ratio: 16 / 9;
  border-radius: 7px; overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}








































/* Hide mobile images on desktop */
.mobile-only-img {
  display: none;
}
/* ==========================================================================
   MOBILE & TABLET RESPONSIVE STACK (<= 900px)
   ========================================================================== */
@media (max-width: 900px) {
  /* Hide desktop right column and desktop-only elements */
  .desktop-only, 
  .desktop-only-cta, 
  .split-right { 
    display: none !important; 
  }

  html, body {
    overflow-x: hidden;
    overflow-y: auto !important;
    width: 100vw;
  }

 /* 1. MOBILE NAVBAR HAMBURGER */
.hamburger {
  display: flex !important;
  position: relative !important;

  flex-direction: column;
  justify-content: space-between;

  width: 28px;
  height: 18px;

  padding: 0;
  margin: 0;

  background: none;
  border: none;

  cursor: pointer;
  z-index: 10002 !important;
  pointer-events: auto !important;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 2px;
  background-color: #ffffff;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger → X */
.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}


/* MOBILE NAVBAR */
.navbar {
  padding: 0 24px !important;
  z-index: 10000 !important;
  pointer-events: auto;
}

.nav-border {
  left: 24px !important;
  right: 24px !important;
}


/* MOBILE NAVIGATION MENU */
.nav-links {
  position: fixed !important;
  top: 52px !important;
  left: 0 !important;
  right: auto !important;

  width: 100vw !important;
  height: calc(100vh - 52px) !important;

  background-color: #0b0b0b !important;

  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;

  transform: translateY(-100%) !important;
  opacity: 0;

  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease;

  border-bottom: 1px solid rgba(255,255,255,0.2);

  z-index: 10001 !important;
  pointer-events: auto !important;
}


/* OPEN MENU */
.nav-links.nav-active {
  transform: translateY(0) !important;
  opacity: 1 !important;
}


/* MENU LINKS */
.nav-links a {
  color: #ffffff !important;
  pointer-events: auto !important;
}


  /* 2. THICK BRIGHT PINK PROGRESS BAR (Stays when navbar hides) */
  .inline-progress-track {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 6px !important;
    margin: 0 !important;
    z-index: 9999 !important;
    background-color: rgba(0, 0, 0, 0.1) !important;
    display: block !important;
  }
  .inline-progress-fill {
    background-color: #FF1493 !important; /* Bright Pink */
    height: 100% !important;
    transform-origin: left center;
  }

  /* Reset layout to natural vertical flow */
  .project-split {
    display: flex;
    flex-direction: column;
    padding-top: 52px;
  }

  .split-left {
    position: relative !important;
    top: auto !important; left: auto !important;
    width: 100vw !important;
    height: auto !important;
    min-height: auto !important;
    padding: 0 !important;
    background-color: var(--color-bg);
  }

  .sidebar-content-wrapper, 
  .sidebar-content-wrapper.shifted {
    transform: none !important;
    height: auto !important;
    display: flex;
    flex-direction: column;
  }

  /* 3. CONSISTENT EQUAL TEXT PADDING EVERYWHERE */
  .page-nav-row,
  .title-main,
  .text-block,
  .bottom-cta-frame,
  .reveal-wrapper {
    padding-left: 24px !important;
    padding-right: 24px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .title-main { 
    font-size: clamp(26px, 7.5vw, 36px) !important; 
    white-space: nowrap !important; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    letter-spacing: -1.5px !important; 
    line-height: 1.2 !important; 
    margin-bottom: 24px !important; 
  }

  .text-crossfade-container {
    position: relative !important;
    height: auto !important;
    display: flex;
    flex-direction: column;
    overflow: visible !important;
  }
  
  .text-block {
    position: relative !important;
    opacity: 1 !important; visibility: visible !important; pointer-events: auto !important;
    transform: none !important; display: block !important;
    margin-top: 0 !important; margin-bottom: 32px !important; padding-top: 0 !important;
  }

  .meta-section { margin-top: 32px !important; margin-bottom: 0 !important; }

  /* 4. EDGE-TO-EDGE IMAGES & UNCROPPED VIDEOS */
  .mobile-only-img {
    display: block !important;
    width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 32px !important; 
    margin-top: 0 !important; 
    position: relative;
  }

  .mobile-only-img img,
  .mobile-only-img video {
    width: 100vw !important;
    height: auto !important;
    object-fit: contain !important; /* NO CROPPING */
    display: block;
  }

  /* Embedded absolute video container handling (e.g. Covid Screenrec) */
  .video-embed-frame {
    position: absolute !important;
    top: 50% !important; left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 85% !important;
    height: auto !important;
    aspect-ratio: auto !important;
  }
  .video-embed-frame video {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important; /* NO CROPPING */
  }

  /* ZERO GAP FOR CONSECUTIVE IMAGES */
  .mobile-only-img + .mobile-only-img {
    margin-top: -32px !important; 
  }

  /* 5. PERFECTED EQUATION ICONS (Like your reference image) */
  .symbol-equation-card,
  #symbolCardMobile {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 85% !important;
    max-width: none !important;
    padding: 24px !important;
    border-radius: 8px !important;
    background: rgba(35, 20, 30, 0.95) !important; /* Dark solid/translucent background */
    backdrop-filter: blur(8px) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .eq-icons-row {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1px ;
    width: 100% !important;
    scale: 0.7;
  }
  
  .eq-icon {
    width: clamp(35px, 10vw, 50px) !important; /* Keeps icons small and perfectly proportional */
    height: auto !important;
    object-fit: contain !important;
  }
  
  .eq-operator {
    font-size: clamp(20px, 6vw, 24px) !important;
    font-weight: 300 !important;
    color: #ffffff !important;
    line-height: 1 !important;
  }

  /* CTAs & Learnings */
  .bottom-cta-frame {
    position: relative !important;
    bottom: auto !important; left: auto !important;
    margin-top: 10px !important; margin-bottom: 60px !important;
  }

  .key-learnings-card { padding: 32px 24px !important; }
  .card-content-wrap { max-width: 100% !important; padding-right: 0 !important; }
}

/* Ensure progress fill always grows strictly left-to-right */
.sticky-progress-fill,
.inline-progress-fill {
  transform-origin: left center !important;
  -webkit-transform-origin: left center !important;
}




@media (max-width: 900px) {
      /* Force container to be a relative positioning anchor */
      .mobile-only-img .img-scan-mask-relative {
        position: relative !important;
        width: 100vw !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
      }

      /* Fix logodev video position & clear bottom offset */
      .mobile-only-img .logodev-embed {
        position: absolute !important;
        top: 80% !important;
        left: 50% !important;
        bottom: auto !important; /* Clear base bottom: 6% rule */
        right: auto !important;
        transform: translate(-50%, -50%) !important; /* Perfectly center both vertically & horizontally */
        width: 45% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        z-index: 10 !important;
      }

      /* Ensure the inner video fits the container */
      .logodev-embed video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
      }
    }


    /* Ensure mobile video container is completely hidden on desktop */
.mobile-video-frame {
  display: none;
}

/* ==========================================================================
   MOBILE MANUAL VIDEO MANAGEMENT (<= 900px)
   ========================================================================== */
@media (max-width: 900px) {
  /* Display the mobile frame container */
  .mobile-video-frame {
    display: block !important;
    position: relative !important;
    width: 100vw !important;
    margin-bottom: 32px !important;
  }

  /* 1. If it's a STANDALONE video (no background image) */
  .mobile-video-frame video.standalone-vid {
    width: 100vw !important;
    height: auto !important;
    object-fit: contain !important; /* Full frame visible, no crop */
    display: block !important;
  }

  /* 2. If it's an OVERLAY video (sitting on top of a background image) */
  .mobile-video-frame .video-overlay-wrap {
    position: absolute !important;
    top: 25% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important; /* Dead center alignment */
    width: 85% !important; /* Manually control size relative to background image */
    height: auto !important;
    z-index: 10 !important;
  }

  .mobile-video-frame .video-overlay-wrap video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; /* No cropping */
    display: block !important;
  }
}







/* Lock slider and video stack INSIDE the mobile background graphic */
@media (max-width: 900px) {
  /* 1. Force the parent image container to be the positioning anchor */
  .mobile-only-img .img-scan-mask-relative {
    position: relative !important;
    width: 100vw !important;
    overflow: hidden !important;
  }

  /* 2. Position the inner stack overlay precisely over the background artwork */
  .mobile-only-img .custom-stack-layout {
    position: absolute !important;
    top: 50% !important;
    right: 1% !important;      /* Moves it away from the right edge so it sits over the graphic */
    left: auto !important;
    transform: translateY(-50%) !important;
    width: 55% !important;     /* Restricts width so both items stay inside the background bounds */
    max-width: 240px !important;
    height: auto !important;
    margin: 0 !important;
    gap: 16px !important;      /* Tighter spacing between slider & video */
    z-index: 10 !important;
  }

  /* 3. Scale down slider & video to fit inside the stack */
  .mobile-only-img .image-comparison-slider,
  .mobile-only-img .mehboob-art-vid {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 !important;
    border-radius: 4px !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25) !important;
  }
}












/* ==========================================================================
   GLOBAL MOBILE FIXES FOR KEY LEARNINGS & BACK BUTTON (ALL PROJECTS)
   ========================================================================== */
@media (max-width: 900px) {

  /* 1. FIX CRAMMED [ BACK ] BUTTON WITH COMFORTABLE SPACING */
  .page-nav-row {
    margin-top: 25px !important;     /* Pushes [ BACK ] down away from top nav line */
    margin-bottom: 20px !important;
  }

  .page-nav-btn {
    font-size: 13px !important;
    letter-spacing: 0.05em !important;
  }

  /* 2. MAKE KEY LEARNINGS A NATURAL FLOW BLOCK AT THE BOTTOM (NOT FIXED) */
  .key-learnings-card {
    position: relative !important;   /* Cancels overlay popping; sits naturally at the end */
    bottom: auto !important;
    left: auto !important;
    transform: none !important;      /* Overrides GSAP translateY */
    opacity: 1 !important;
    width: 100vw !important;
    padding: 40px 24px 60px 24px !important;
    margin-top: -35px !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
  }

  .card-content-wrap {
    max-width: 100% !important;
    padding-right: 0 !important;
  }

  /* 3. SHOW [ BACK TO TOP ] ON KEY LEARNINGS FOR MOBILE ONLY */
  .key-learnings-card::after {
    content: "[ BACK TO TOP ]";
    display: inline-block;
    margin-top: 45px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: var(--color-desat-pink, #F4A6C8);
    cursor: pointer;
    text-transform: uppercase;
  }
}