/*
  OSCAR REGO PORTFOLIO 2026
  PROJECT DETAIL — SHARED STYLESHEET
  ────────────────────────────────────
  Applied to: orbit.html, sentinel.html, jsms.html

  Design system: cream background (#f0ece5), black typography (#0a0a0a),
  soft neutral borders — matching the homepage Selected Work section exactly.

  No orange accents. No dark backgrounds. Clean monochrome editorial.
*/

/* ─── DESIGN TOKENS ───────────────────────────────────────── */

:root {
  --pd-bg:          #F5F2EC;   /* Cream — matches .sw-section */
  --pd-bg-card:     #EDEAE4;   /* Slightly deeper cream for media containers */
  --pd-text:        #0a0a0a;   /* Primary black */
  --pd-muted:       rgba(10, 10, 10, 0.50); /* Muted text */
  --pd-faint:       rgba(10, 10, 10, 0.30); /* Counter / label */
  --pd-border:      rgba(10, 10, 10, 0.09); /* Soft borders */
  --pd-shadow:      rgba(0, 0, 0, 0.07);    /* Subtle shadows */
  --pd-ease:        cubic-bezier(0.16, 1, 0.3, 1);
  --pd-ease-std:    cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── PAGE BACKGROUND ─────────────────────────────────────── */

/*
  style.css sets: body { background-color: var(--bg-main) !important; }
  We need to override that. The detail pages have class="project-detail-page"
  on <html>, giving us higher specificity combined with !important.
*/
html.project-detail-page body,
html.project-detail-page {
  background-color: var(--pd-bg) !important;
}

/* ─── HERO SECTIONS ───────────────────────────────────────── */

/* Orbit */
.orbit-main-placeholder {
  background: #050505 !important;
}

.orbit-main-placeholder::after {
  background: linear-gradient(
    to top,
    #050505 0%,
    rgba(5, 5, 5, 0.9) 25%,
    rgba(5, 5, 5, 0.4) 55%,
    transparent 100%
  ) !important;
}

.orbit-title {
  color: #ffffff !important;
}

.orbit-meta {
  color: #d7ff3f !important;
}

.orbit-intro-text {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Sentinel */
.sentinel-main-placeholder {
  background: #050505 !important;
}

.sentinel-main-placeholder::after {
  background: linear-gradient(
    to top,
    #050505 0%,
    rgba(5, 5, 5, 0.9) 25%,
    rgba(5, 5, 5, 0.4) 55%,
    transparent 100%
  ) !important;
}

.sentinel-title {
  color: #ffffff !important;
}

.sentinel-meta {
  color: #d7ff3f !important;
}

.sentinel-intro-text {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* StudyGPT */
.studygpt-main-placeholder {
  background: #050505 !important;
}

.studygpt-main-placeholder::after {
  background: linear-gradient(
    to top,
    #050505 0%,
    rgba(5, 5, 5, 0.9) 25%,
    rgba(5, 5, 5, 0.4) 55%,
    transparent 100%
  ) !important;
}

.studygpt-title {
  color: #ffffff !important;
}

.studygpt-meta {
  color: #d7ff3f !important;
}

.studygpt-intro-text {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Issue Tracker */
.issuetracker-main-placeholder {
  background: #050505 !important;
}

.issuetracker-main-placeholder::after {
  background: linear-gradient(
    to top,
    #050505 0%,
    rgba(5, 5, 5, 0.9) 25%,
    rgba(5, 5, 5, 0.4) 55%,
    transparent 100%
  ) !important;
}

.issuetracker-title {
  color: #ffffff !important;
}

.issuetracker-meta {
  color: #d7ff3f !important;
}

.issuetracker-intro-text {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Mediarift */
.mediarift-main-placeholder {
  background: #050505 !important;
}

.mediarift-main-placeholder::after {
  background: linear-gradient(
    to top,
    #050505 0%,
    rgba(5, 5, 5, 0.9) 25%,
    rgba(5, 5, 5, 0.4) 55%,
    transparent 100%
  ) !important;
}

.mediarift-title {
  color: #ffffff !important;
}

.mediarift-meta {
  color: #d7ff3f !important;
}

.mediarift-intro-text {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* JSMS */
.jsms-main-placeholder {
  background: #050505 !important;
}

.jsms-main-placeholder::after {
  background: linear-gradient(
    to top,
    #050505 0%,
    rgba(5, 5, 5, 0.9) 25%,
    rgba(5, 5, 5, 0.4) 55%,
    transparent 100%
  ) !important;
}

.jsms-title {
  color: #ffffff !important;
}

.jsms-meta {
  color: #d7ff3f !important;
}

.jsms-intro-text {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* ─── CONTENT BLOCKS — shared typography overrides ──────── */

/* Dynamic text slot layouts (desktop scroll-driven panels) */
.pd-text-slot {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

.pd-text-slot h2,
.pd-text-slot p,
.pd-text-slot .section-counter {
  margin: 0 !important;
}

.pd-text-slot .section-counter {
  margin-bottom: -6px !important; /* Move counter up closer to the heading */
}

/* Section counter (e.g. "1 /") */
.section-counter,
.pd-text-slot .section-counter {
  color: var(--pd-faint) !important;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
}

/* h2 headings — remove orange, apply black */
.orbit-content-block h2,
.sentinel-content-block h2,
.jsms-content-block h2,
.studygpt-content-block h2,
.issuetracker-content-block h2,
.mediarift-content-block h2,
.pd-text-slot h2 {
  color: var(--pd-text) !important;
  font-family: 'Inter', 'AltmannGrotesk-Bold', sans-serif;
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Body paragraphs */
.orbit-content-block p,
.sentinel-content-block p,
.jsms-content-block p,
.studygpt-content-block p,
.issuetracker-content-block p,
.mediarift-content-block p,
.pd-text-slot p {
  color: var(--pd-muted) !important;
  font-family: 'Inter', 'AltmannGrotesk-Regular', sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

/* ─── CAROUSEL WRAPPERS ───────────────────────────────────── */

.orbit-carousel-wrapper,
.sentinel-carousel-wrapper,
.jsms-carousel-wrapper,
.studygpt-carousel-wrapper,
.issuetracker-carousel-wrapper,
.mediarift-carousel-wrapper,
.orbit-mobile-carousel-wrapper {
  background: var(--pd-bg-card) !important;
  border: 1px solid var(--pd-border) !important;
  box-shadow:
    0 4px 16px var(--pd-shadow),
    0 1px 4px rgba(0, 0, 0, 0.04) !important;
}

/* Remove dark vignette overlays on sentinel / jsms carousel wrappers */
.sentinel-carousel-wrapper::after,
.jsms-carousel-wrapper::after,
.studygpt-carousel-wrapper::after,
.issuetracker-carousel-wrapper::after,
.mediarift-carousel-wrapper::after {
  background: none !important;
}

/* ─── CAROUSEL NAV BUTTONS ────────────────────────────────── */

.carousel-nav {
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid var(--pd-border) !important;
  color: var(--pd-text) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.carousel-nav:hover {
  background: #ffffff !important;
  color: var(--pd-text) !important;
  filter: none !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14) !important;
  transform: scale(1.05) !important;
}

/* ─── DETAIL SECTIONS BACKGROUND ─────────────────────────── */

.orbit-details,
.sentinel-details,
.jsms-details,
.studygpt-details,
.issuetracker-details,
.mediarift-details {
  background: transparent;
}

.orbit-case-study,
.sentinel-case-study,
.jsms-case-study,
.studygpt-case-study,
.issuetracker-case-study,
.mediarift-case-study {
  background: var(--pd-bg);
}

/*
.floating-nav {
  background: rgba(10, 10, 10, 0.90) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.floating-nav a {
  color: rgba(255, 255, 255, 0.75) !important;
}

.floating-nav a:hover {
  color: #ffffff !important;
}
*/

/* ─── SCROLL REVEAL — base states ────────────────────────── */

/*
  Each .orbit-detail-row / .sentinel-detail-row / .jsms-detail-row
  starts invisible and animates in via IntersectionObserver in
  project-detail.js.

  Content block (left col): fade + 24px lift
  Image card   (right col): fade + 14px lift, 80ms after text
*/

@media (prefers-reduced-motion: no-preference) {

  .orbit-content-block,
  .sentinel-content-block,
  .jsms-content-block,
  .studygpt-content-block,
  .issuetracker-content-block,
  .mediarift-content-block {
    opacity: 0;
    filter: blur(12px);
    transform: translateX(-32px);
    transition:
      opacity 1.1s var(--pd-ease),
      filter 1.1s var(--pd-ease),
      transform 1.1s var(--pd-ease);
    will-change: opacity, filter, transform;
  }

  .orbit-sticky-card,
  .orbit-mobile-sticky-card,
  .sentinel-sticky-card,
  .jsms-sticky-card,
  .studygpt-sticky-card,
  .issuetracker-sticky-card,
  .mediarift-sticky-card {
    opacity: 0;
    filter: blur(12px);
    transform: translateX(-32px);
    transition:
      opacity 1.2s var(--pd-ease),
      filter 1.2s var(--pd-ease),
      transform 1.2s var(--pd-ease);
    will-change: opacity, filter, transform;
    /* Delay relative to content block */
    transition-delay: 0.1s;
  }

  /* Revealed states — added by project-detail.js */
  .orbit-content-block.pd-revealed,
  .sentinel-content-block.pd-revealed,
  .jsms-content-block.pd-revealed,
  .studygpt-content-block.pd-revealed,
  .issuetracker-content-block.pd-revealed,
  .mediarift-content-block.pd-revealed,
  .orbit-sticky-card.pd-revealed,
  .orbit-mobile-sticky-card.pd-revealed,
  .sentinel-sticky-card.pd-revealed,
  .jsms-sticky-card.pd-revealed,
  .studygpt-sticky-card.pd-revealed,
  .issuetracker-sticky-card.pd-revealed,
  .mediarift-sticky-card.pd-revealed {
    opacity: 1;
    filter: blur(0px);
    transform: translateX(0);
  }
}

/* Reduced-motion: instant reveal, no transforms */
@media (prefers-reduced-motion: reduce) {
  .orbit-content-block,
  .sentinel-content-block,
  .jsms-content-block,
  .studygpt-content-block,
  .issuetracker-content-block,
  .mediarift-content-block,
  .orbit-sticky-card,
  .orbit-mobile-sticky-card,
  .sentinel-sticky-card,
  .jsms-sticky-card,
  .studygpt-sticky-card,
  .issuetracker-sticky-card,
  .mediarift-sticky-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ─── FOOTER CONTAINER (detail pages use fetched footer.html) */

#footer-container {
  background: #0a0a0a;
}

/* ─── HERO VIDEO CONTROLS ─────────────────────────────── */

.video-control-btn {
  position: absolute;
  bottom: 32px;
  left: 32px;
  top: auto;
  z-index: 15;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: rgba(255, 255, 255, 0.95);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
  padding: 0;
  outline: none;
}

.video-control-btn:hover {
  transform: scale(1.08);
  filter: brightness(1.2) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.video-control-btn:active {
  transform: scale(0.92);
}

/* Icon Swap Styling */
.video-control-btn .control-icon-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-control-btn svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  fill: currentColor;
  stroke: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  will-change: opacity, transform;
  pointer-events: none;
}

/* States when paused */
.video-control-btn.paused .play-icon {
  opacity: 1;
  transform: scale(1);
}
.video-control-btn.paused .pause-icon {
  opacity: 0;
  transform: scale(0.85);
}

/* States when playing (not paused) */
.video-control-btn:not(.paused) .play-icon {
  opacity: 0;
  transform: scale(0.85);
}
.video-control-btn:not(.paused) .pause-icon {
  opacity: 1;
  transform: scale(1);
}

/* Opacity transitions for video fade */
.orbit-hero-video,
.orbit-hero-fallback {
  transition: opacity 0.4s ease;
  will-change: opacity;
}

/* Responsive adjustments to prevent overlap and resize controls */
@media (max-width: 900px) {
  .orbit-hero-content,
  .sentinel-hero-content,
  .jsms-hero-content,
  .studygpt-hero-content,
  .issuetracker-hero-content,
  .mediarift-hero-content {
    bottom: 110px !important;
  }
}

@media (max-width: 600px) {
  .video-control-btn {
    bottom: 24px;
    left: 24px;
    top: auto;
    width: 56px;
    height: 56px;
  }
  
  .orbit-hero-content,
  .sentinel-hero-content,
  .jsms-hero-content,
  .studygpt-hero-content,
  .issuetracker-hero-content,
  .mediarift-hero-content {
    bottom: 100px !important;
  }
}

/* Remove top strip blur effect from project detail pages */
html.project-detail-page body::before {
  content: none !important;
  display: none !important;
}

/* Orbit hero mode switcher & zoom transition */
.orbit-hero {
  background: #050505;
  overflow: hidden;
}

.orbit-main-placeholder {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              border-radius 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Zoom out only when mobile video is active */
.orbit-main-placeholder.mobile-active {
  transform: scale(1.95);
  
}

/* Zoom out the mobile video source content to see the device frame cleanly without cropping or black bars */
.orbit-main-placeholder.mobile-active {
  transform: scale(1);
  transform: scale(1.001);
  
}

@media (max-width: 900px) {
  .orbit-main-placeholder.mobile-active {
    transform: scale(1);
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 600px) {
  .orbit-main-placeholder.mobile-active {
    transform: scale(1);
    border-radius: 0;
    box-shadow: none;
  }
}

/* Video Mode Switcher in the Center of Video */
/* Video Mode Switcher at the bottom of the container */
.video-mode-toggle {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  padding: 6px;
  gap: 4px;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.video-mode-btn {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.55);
  background: transparent;
  border: none;
  border-radius: 100px;
  padding: 8px 20px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.15s ease;
  user-select: none;
  outline: none;
}

.video-mode-btn.active {
  background: #ffffff;
  color: #050505;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-mode-btn:hover:not(.active) {
  color: rgba(255, 255, 255, 0.85);
}

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

@media (max-width: 600px) {
  .video-mode-toggle {
    bottom: 24px;
  }
}

/* Hide toggle when video is paused */
.orbit-main-placeholder.video-paused .video-mode-toggle {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(0.92);
}

.orbit-hero-video.fading {
  opacity: 0 !important;
}


/* ═══════════════════════════════════════════════════════
   PROJECT IMAGE CURSOR
═══════════════════════════════════════════════════════ */

.pd-image-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #ffffff;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pd-image-cursor.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Hide default cursor on images */
.pd-cursor-active {
  cursor: none !important;
}

.pd-cursor-active * {
  cursor: none !important;
}


/* ═══════════════════════════════════════════════════════
   LIGHTBOX
═══════════════════════════════════════════════════════ */

.pd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.pd-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.pd-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pd-lightbox-content {
  position: relative;
  max-width: 85vw;
  max-height: 85vh;
  transform: scale(0.92);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: visible;
}

.pd-lightbox.active .pd-lightbox-content {
  transform: scale(1);
}

.pd-lightbox-img {
  display: block;
  max-width: 85vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.pd-lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  color: #0a0a0a;
  border: none;
  font-size: 20px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pd-lightbox-close:hover {
  transform: scale(1.1);
}

/* Lightbox navigation buttons */
.pd-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #0a0a0a;
  border: none;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: background 0.25s, transform 0.25s;
  z-index: 10;
}

.pd-lightbox-prev {
  left: -72px;
}

.pd-lightbox-next {
  right: -72px;
}

.pd-lightbox-nav:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.1);
}

.pd-lightbox-nav:active {
  transform: translateY(-50%) scale(0.95);
}

@media (max-width: 900px) {
  .pd-lightbox-prev {
    left: -60px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .pd-lightbox-next {
    right: -60px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

@media (max-width: 600px) {
  .pd-lightbox-img {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 8px;
  }

  .pd-lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
  }

  .pd-lightbox-prev {
    left: -52px;
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  .pd-lightbox-next {
    right: -52px;
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

