/* ==========================================================================
   FOLDFOLIO HERO & CLOSING FOLDABLE PHONE INTERACTION (LOCAL BUILD)
   - Clones https://foldfolio.framer.website/ aesthetic & 3D hinge mechanics
   - Zooms INTO fullscreen portfolio on unfold; zooms OUT & folds shut after About
   ========================================================================== */

:root {
  --ff-canvas: #F8F7F6;
  --ff-ink: #111111;
  --ff-muted: #192967;
  --ff-lock-bg: #F0F2F1;
  --ff-font-cond: 'Sofia Sans Extra Condensed', 'Big Shoulders Display', sans-serif;
  --ff-font-sans: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ff-font-mono: 'Geist Mono', ui-monospace, monospace;
  --ff-chassis-grad: linear-gradient(135deg, #F7F5F1 0%, #DCD9D3 32%, #A6A29B 72%, #6F6B65 100%);
  --ff-chassis-edge: #9A968F;
  --ff-scale: 1;
}

/* Chassis Metallic Finishes */
body[data-fold-finish="titanium"] {
  --ff-chassis-grad: linear-gradient(135deg, #F7F5F1 0%, #DCD9D3 32%, #A6A29B 72%, #6F6B65 100%);
  --ff-chassis-edge: #9A968F;
}
body[data-fold-finish="graphite"] {
  --ff-chassis-grad: linear-gradient(135deg, #6A6A6E 0%, #3E3E42 38%, #222225 76%, #141416 100%);
  --ff-chassis-edge: #35353A;
}
body[data-fold-finish="coral"] {
  --ff-chassis-grad: linear-gradient(135deg, #F2B5A5 0%, #D98E79 38%, #B86D58 76%, #824433 100%);
  --ff-chassis-edge: #B86D58;
}
body[data-fold-finish="sage"] {
  --ff-chassis-grad: linear-gradient(135deg, #D5DDD2 0%, #B1BEB0 38%, #859485 76%, #576357 100%);
  --ff-chassis-edge: #859485;
}

/* ==========================================================================
   FOLDFOLIO COLOR SCHEME & TYPOGRAPHY OVERRIDE ACROSS ENTIRE HOMEPAGE
   - Light: #F8F7F6 warm studio paper, #FFFFFF cards, #111111 obsidian ink
   - Dark:  #0B0B0B Foldfolio OLED black, #141416 cards, #F6F6F5 paper ink
   - Display: Sofia Sans Extra Condensed (800 / 900) | Body: Geist | Mono: Geist Mono
   ========================================================================== */
body.is-fold-mode,
body.is-fold-mode[data-theme="light"] {
  --bg-page: #F8F7F6;
  --bg-surface: #FFFFFF;
  --bg-elevated: #EFECE7;
  --bg-card: #FFFFFF;
  --text-primary: #111111;
  --text-secondary: #192967;
  --text-muted: #192967;
  --border-subtle: rgba(17, 17, 17, 0.08);
  --border-strong: rgba(17, 17, 17, 0.18);
  --accent: #1F3B9B;
  --accent-blue: #1F3B9B;
  --accent-saffron: #6E727A;
  --accent-coral: #555860;
  --accent-soft: rgba(31, 59, 155, 0.09);
  --nav-bg: rgba(255, 255, 255, 0.90);
  --nav-hover-pill: rgba(17, 17, 17, 0.07);
  --font-display: 'Sofia Sans Extra Condensed', 'Big Shoulders Display', sans-serif;
  --font-script: 'Sofia Sans Extra Condensed', 'Big Shoulders Display', sans-serif;
  --font-serif: 'Sofia Sans Extra Condensed', 'Big Shoulders Display', sans-serif;
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

body.is-fold-mode[data-theme="dark"] {
  --ff-canvas: #0B0B0B;
  --ff-ink: #F6F6F5;
  --ff-muted: #9DD2FF;
  --bg-page: #0B0B0B;
  --bg-surface: #141416;
  --bg-elevated: #1E1E22;
  --bg-card: #141416;
  --text-primary: #F6F6F5;
  --text-secondary: #C5D4E8;
  --text-muted: #9DD2FF;
  --border-subtle: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.22);
  --accent: #3186FF;
  --accent-blue: #3186FF;
  --accent-saffron: #9DD2FF;
  --accent-coral: #B8BCC4;
  --accent-soft: rgba(49, 134, 255, 0.14);
  --nav-bg: rgba(16, 16, 18, 0.90);
  --nav-hover-pill: rgba(255, 255, 255, 0.10);
}

/* Subtle atmospheric studio gradient for Light Mode background (matches dark mode depth, tuned for light theme) */
body.is-fold-mode[data-theme="light"],
body.is-fold-mode[data-theme="light"] .fold-runway,
body.is-fold-mode[data-theme="light"] .fold-sticky-stage,
body.is-fold-mode[data-theme="light"] .fold-portfolio-interior {
  background:
    radial-gradient(88% 52% at 50% 0%, rgba(31, 59, 155, 0.045) 0%, rgba(157, 210, 255, 0.03) 40%, transparent 74%),
    linear-gradient(180deg, #FBFAF8 0%, #F3F5F9 52%, #F8F7F6 100%);
}

/* Full dark mode coverage across Foldfolio hero, runways, backdrop typography, swatches, and interior */
body.is-fold-mode[data-theme="dark"] .fold-runway,
body.is-fold-mode[data-theme="dark"] .fold-sticky-stage {
  background: #0B0B0B;
}

body.is-fold-mode[data-theme="dark"] .fold-bg-word {
  color: #F6F6F5;
}

body.is-fold-mode[data-theme="dark"] .fold-wordmark {
  color: #F6F6F5;
}

body.is-fold-mode[data-theme="dark"] .fold-finish-pill {
  background: rgba(22, 22, 26, 0.88);
  border-color: rgba(255, 255, 255, 0.14);
}

body.is-fold-mode[data-theme="dark"] .fold-swatch.is-active {
  box-shadow: 0 0 0 2px #141416, 0 0 0 3.5px #FFFFFF;
}

body.is-fold-mode[data-theme="dark"] .fold-inside-left-panel {
  background: #0B0C0F;
}

body.is-fold-mode[data-theme="dark"] .fold-inside-name,
body.is-fold-mode[data-theme="dark"] .fold-inside-statusbar {
  color: #F6F6F5;
}

body.is-fold-mode[data-theme="dark"] .fold-inside-tagline,
body.is-fold-mode[data-theme="dark"] .fold-inside-kicker {
  color: #9DD2FF;
}

body.is-fold-mode[data-theme="dark"] .fold-cta-dark {
  background: #9DD2FF;
  color: #0B0B0B;
}

body.is-fold-mode[data-theme="dark"] .fold-cta-light {
  background: rgba(255, 255, 255, 0.12);
  color: #F6F6F5;
}

body.is-fold-mode[data-theme="dark"] .fold-floor-shadow {
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.25) 55%, transparent 80%);
}

/* Harmonize interactive accents with case study signature blue (#1F3B9B light / #3186FF dark) */
body[data-theme="light"] .theme-toggle-thumb {
  background: #111111;
}
body.is-fold-mode .leo-nav-cta {
  background: #192967;
  color: #FFFFFF;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}
body.is-fold-mode .leo-nav-cta:hover {
  background: #1F3B9B;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: none;
}
body.is-fold-mode .leo-nav-cta .slot-text-clone {
  color: #FFFFFF;
}
body.is-fold-mode[data-theme="dark"] .leo-nav-cta {
  background: #9DD2FF;
  color: #0B0B0B;
}
body.is-fold-mode[data-theme="dark"] .leo-nav-cta .slot-text-clone {
  color: #0B0B0B;
}
body.is-fold-mode[data-theme="dark"] .leo-nav-cta:hover {
  background: #3186FF;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: none;
}
body.is-fold-mode[data-theme="dark"] .leo-nav-cta:hover .slot-text-clone {
  color: #FFFFFF;
}

body.is-fold-mode .leo-h2 .text-muted,
body.is-fold-mode .leo-h2 .text-muted.is-blue {
  color: var(--text-muted) !important;
}

body.is-fold-mode .leo-work-metric {
  color: var(--accent);
}

body.is-fold-mode .bio-highlight.is-navy {
  background: rgba(17, 17, 17, 0.08);
  color: #111111;
}
body.is-fold-mode[data-theme="dark"] .bio-highlight.is-navy {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

/* Prototype Library CTA button: editorial black at rest -> signature blue on hover */
body.is-fold-mode[data-theme="light"] .proto-portal-cta {
  background: #111111;
  color: #FFFFFF;
  box-shadow: 0 12px 26px -8px rgba(17, 17, 17, 0.28);
  transition: background 0.24s ease, color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}
body.is-fold-mode[data-theme="light"] .proto-directory-portal:hover .proto-portal-cta,
body.is-fold-mode[data-theme="light"] .proto-portal-cta:hover {
  background: #192967;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: none;
}
body.is-fold-mode[data-theme="light"] .proto-portal-cta .slot-text-clone {
  color: #FFFFFF;
}
body.is-fold-mode[data-theme="dark"] .proto-portal-cta {
  background: #FFFFFF;
  color: #0B0B0B;
  box-shadow: 0 12px 26px -8px rgba(0, 0, 0, 0.45);
  transition: background 0.24s ease, color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}
body.is-fold-mode[data-theme="dark"] .proto-directory-portal:hover .proto-portal-cta,
body.is-fold-mode[data-theme="dark"] .proto-portal-cta:hover {
  background: #9DD2FF;
  color: #0B0B0B;
  transform: translateY(-2px);
  box-shadow: none;
}
body.is-fold-mode[data-theme="dark"] .proto-portal-cta .slot-text-clone {
  color: #0B0B0B;
}
/* Remove outer background container around Prototype Library card so it floats seamlessly on the page */
body.is-fold-mode .proto-directory-portal,
body.is-fold-mode[data-theme="light"] .proto-directory-portal,
body.is-fold-mode[data-theme="dark"] .proto-directory-portal {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
}
body.is-fold-mode .proto-directory-portal:hover,
body.is-fold-mode[data-theme="light"] .proto-directory-portal:hover,
body.is-fold-mode[data-theme="dark"] .proto-directory-portal:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}
body.is-fold-mode .proto-portal-content {
  padding-left: 0;
}

body.is-fold-mode .pulse-dot-core,
body.is-fold-mode .pulse-dot-ring {
  background: #2FCB68;
}

body.is-fold-mode .leo-h2 {
  font-family: var(--ff-font-cond);
  font-weight: 900;
  font-variation-settings: normal;
  font-size: clamp(52px, 6.2vw, 86px);
  line-height: 0.88;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

body.is-fold-mode .leo-h2 .text-muted {
  font-family: var(--ff-font-cond);
  font-weight: 900;
  font-variation-settings: normal;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

body.is-fold-mode .leo-section-label {
  font-family: var(--ff-font-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
}

body.is-fold-mode .leo-work-title {
  font-family: var(--ff-font-cond);
  font-weight: 900;
  font-variation-settings: normal;
  font-size: 32px;
  line-height: 0.96;
  letter-spacing: 0em;
  text-transform: uppercase;
}

body.is-fold-mode .leo-work-meta-line,
body.is-fold-mode .proto-portal-desc,
body.is-fold-mode .about-bio-copy p,
body.is-fold-mode .leo-nav-link,
body.is-fold-mode .leo-nav-cta {
  font-family: var(--ff-font-sans);
  font-variation-settings: normal;
}

body.is-fold-mode .leo-nav-clock,
body.is-fold-mode .work-card-chip,
body.is-fold-mode .proto-exp-now-badge {
  font-family: var(--ff-font-mono);
}

/* ==========================================================================
   EDGE-ANCHORING VIEWPORT DEVICE BEZEL
   - Tracks the expanding phone frame during zoom-in and sticks to browser edges
     the exact instant each border reaches the browser viewport walls!
   ========================================================================== */
.fold-viewport-bezel-frame {
  position: fixed;
  top: var(--bezel-top, 0px);
  right: var(--bezel-right, 0px);
  bottom: var(--bezel-bottom, 0px);
  left: var(--bezel-left, 0px);
  pointer-events: none;
  z-index: 94;
  opacity: 0;
  overflow: hidden;
  border-radius: var(--bezel-outer-r, 0px);
  border: 5px solid var(--ff-chassis-edge);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    0 0 0 200vmax var(--ff-canvas);
  will-change: top, right, bottom, left, opacity;
}

.fold-viewport-bezel-frame::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: var(--bezel-inner-r, 24px);
  box-shadow:
    0 0 0 80px #050505,
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.09);
  pointer-events: none;
}

body.is-fold-mode.is-inside-phone .fold-viewport-bezel-frame {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    0 0 0 200vmax var(--ff-canvas);
}

/* Keep previous floating top nav visible across the entire page */
body.is-fold-mode .leo-nav-wrapper {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  top: 22px;
  z-index: 98;
}

/* ==========================================================================
   RUNWAYS & STICKY STAGES
   ========================================================================== */
.fold-runway {
  position: relative;
  width: 100%;
  height: 270vh;
  z-index: 30;
  background: var(--ff-canvas);
}

.fold-runway.is-footer-runway {
  height: 210vh;
  z-index: 30;
}

.fold-sticky-stage {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  padding-top: 0;
  overflow: hidden;
  background: var(--ff-canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

/* Ambient Background Modes (Basic / Glow / Orbit) */
.fold-ambient-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.6s ease;
}

.fold-ambient-glow {
  position: absolute;
  inset: -15%;
  opacity: 0;
  transition: opacity 0.65s ease;
  background:
    radial-gradient(46% 42% at 28% 36%, rgba(49, 134, 255, 0.16) 0%, transparent 68%),
    radial-gradient(42% 44% at 74% 62%, rgba(226, 149, 120, 0.17) 0%, transparent 68%),
    radial-gradient(36% 36% at 52% 24%, rgba(168, 199, 250, 0.18) 0%, transparent 70%);
  filter: blur(28px);
}

.fold-ambient-orbit {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.65s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fold-orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(17, 17, 17, 0.08);
}
.fold-orbit-ring.r1 { width: 640px; height: 640px; animation: ffOrbitSpin 28s linear infinite; }
.fold-orbit-ring.r2 { width: 920px; height: 920px; border-style: dashed; border-color: rgba(17, 17, 17, 0.07); animation: ffOrbitSpin 44s linear infinite reverse; }
.fold-orbit-ring.r3 { width: 1220px; height: 1220px; border-color: rgba(17, 17, 17, 0.045); }
.fold-orbit-ring::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #111111;
  opacity: 0.35;
}

@keyframes ffOrbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

body[data-fold-bg="glow"] .fold-ambient-glow { opacity: 1; }
body[data-fold-bg="orbit"] .fold-ambient-orbit { opacity: 1; }

/* ==========================================================================
   STAGE CHROME (Wordmark, Ambient Pill, Finish Swatches)
   ========================================================================== */
.fold-chrome-top {
  position: absolute;
  top: 24px;
  left: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 40;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.fold-wordmark {
  pointer-events: auto;
  font-family: var(--ff-font-cond);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.01em;
  color: var(--ff-ink);
  text-decoration: none;
  text-transform: uppercase;
  line-height: 1;
}
.fold-wordmark sup {
  font-size: 11px;
  vertical-align: super;
  margin-left: 1px;
}

body.is-fold-mode[data-theme="light"] .leo-nav-logo-ring circle.ring-progress {
  stroke: url(#iyRingGradLight);
}
body.is-fold-mode[data-theme="dark"] .leo-nav-logo-ring circle.ring-progress {
  stroke: url(#iyRingGradDark);
  filter: drop-shadow(0 0 4px rgba(49, 134, 255, 0.55));
}

body.is-fold-mode .leo-nav,
body.case-study-body .leo-nav {
  overflow: hidden;
  padding: 5px;
}

.leo-nav-progress-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #192967 0%, #1F3B9B 100%);
  transform-origin: left center;
  transform: scaleX(0);
  pointer-events: none;
  z-index: 5;
  will-change: transform;
}

body[data-theme="dark"] .leo-nav-progress-bar {
  background: linear-gradient(90deg, #3186FF 0%, #9DD2FF 100%);
  box-shadow: 0 0 10px rgba(49, 134, 255, 0.55);
}

.leo-nav-monogram {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  padding: 7px 11px;
}

.leo-nav-home-icon {
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #192967;
  transition: color 0.2s ease, transform 0.2s ease;
}
.leo-nav-home-icon:hover {
  color: #1F3B9B;
}
body.case-study-body[data-theme="dark"] .leo-nav-home-icon {
  color: #9DD2FF;
}
body.case-study-body[data-theme="dark"] .leo-nav-home-icon:hover {
  color: #3186FF;
}
.leo-nav-home-icon svg {
  display: block;
}

.case-study-wordmark {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  z-index: 1001;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.case-study-wordmark svg {
  flex-shrink: 0;
  opacity: 0.85;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.case-study-wordmark:hover {
  color: var(--accent);
}
.case-study-wordmark:hover svg {
  opacity: 1;
  transform: translateY(-1px);
}
body.case-study-body[data-theme="dark"] .case-study-wordmark {
  color: #F6F6F5;
}
body.case-study-body[data-theme="dark"] .case-study-wordmark:hover {
  color: #9DD2FF;
}
@media (max-width: 760px) {
  .case-study-wordmark {
    left: 16px;
  }
}

.fold-bg-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
}

.fold-bg-btn {
  border: none;
  background: transparent;
  color: #444;
  font-family: var(--ff-font-sans);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.fold-bg-btn.is-active {
  background: #111111;
  color: #FFFFFF;
}

.fold-finish-pill {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(12px);
  transition: opacity 0.3s ease;
}

.fold-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.16);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fold-swatch:hover { transform: scale(1.14); }
.fold-swatch.is-active {
  box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 3.5px #111111;
}
.fold-swatch[data-finish="titanium"] { background: linear-gradient(135deg, #F7F5F1, #A6A29B); }
.fold-swatch[data-finish="graphite"] { background: linear-gradient(135deg, #5A5A60, #1B1B1D); }
.fold-swatch[data-finish="coral"] { background: linear-gradient(135deg, #F2B5A5, #B86D58); }
.fold-swatch[data-finish="sage"] { background: linear-gradient(135deg, #D5DDD2, #7E8E7E); }

/* ==========================================================================
   GIANT BACKDROP TYPOGRAPHY ("IAN" / "YEN")
   ========================================================================== */
.fold-backdrop-names {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
}

.fold-bg-word {
  position: absolute;
  font-family: var(--ff-font-cond);
  font-weight: 900;
  font-size: clamp(180px, 26vw, 370px);
  line-height: 0.78;
  letter-spacing: -0.01em;
  color: #111111;
  text-transform: uppercase;
  will-change: transform, opacity;
  white-space: nowrap;
}

.fold-bg-word.is-left {
  right: calc(50% + 235px * var(--ff-scale));
}

.fold-bg-word.is-right {
  left: calc(50% + 235px * var(--ff-scale));
}

/* ==========================================================================
   3D FOLDABLE DEVICE ASSEMBLY (1000 x 684 base)
   ========================================================================== */
.fold-device-viewport {
  position: relative;
  width: 1000px;
  height: 684px;
  transform-origin: center center;
  will-change: transform, opacity;
  z-index: 15;
  perspective: 2800px;
  transform-style: preserve-3d;
}

/* Floor Shadows */
.fold-floor-shadow {
  position: absolute;
  left: 50%;
  bottom: -24px;
  width: 900px;
  height: 36px;
  transform: translateX(-50%) scaleX(0.5);
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(17, 17, 17, 0.22) 0%, rgba(17, 17, 17, 0.06) 52%, transparent 78%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 1;
  will-change: transform, opacity;
}

/* Subtle Organic Hero Floating Motion (Device + IAN/YEN Typography + Floor Shadow) */
@keyframes ffDeviceFloat {
  0%, 100% {
    transform: translate3d(0, 0px, 0) rotateZ(0deg);
  }
  50% {
    transform: translate3d(0, -10px, 0) rotateZ(0.35deg);
  }
}

@keyframes ffWordFloatLeft {
  0%, 100% {
    transform: translate3d(0, 0px, 0);
  }
  50% {
    transform: translate3d(0, 7px, 0);
  }
}

@keyframes ffWordFloatRight {
  0%, 100% {
    transform: translate3d(0, 0px, 0);
  }
  50% {
    transform: translate3d(0, -7px, 0);
  }
}

@keyframes ffShadowBreath {
  0%, 100% {
    filter: blur(8px);
    opacity: 0.92;
  }
  50% {
    filter: blur(11px);
    opacity: 0.68;
  }
}

/* ==========================================================================
   STAGGERED HERO ON-LOAD CHOREOGRAPHY (Badgefolio-inspired sequenced entrance)
   ========================================================================== */
@keyframes ffEnterFadeDown {
  from {
    opacity: 0;
    transform: translate3d(0, -14px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes ffEnterDevice {
  from {
    opacity: 0;
    transform: translate3d(0, -48px, 0) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes ffEnterWordLeft {
  from {
    opacity: 0;
    transform: translate3d(42px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes ffEnterWordRight {
  from {
    opacity: 0;
    transform: translate3d(-42px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes ffEnterPortrait {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(1.03);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes ffEnterNotifPop {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes ffEnterFadeUp {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.fold-entrance-wrap {
  width: 1000px;
  height: 684px;
  transform-style: preserve-3d;
  animation: ffEnterDevice 0.78s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both;
}

#fold-hero-runway .fold-wordmark {
  animation: ffEnterFadeDown 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.04s both;
}

#fold-hero-runway .fold-lock-top {
  animation: ffEnterFadeDown 0.54s cubic-bezier(0.22, 1, 0.36, 1) 0.56s both;
}

#fold-hero-runway .fold-lock-portrait-full {
  animation: ffEnterPortrait 0.70s cubic-bezier(0.16, 1, 0.3, 1) 0.62s both;
}

#fold-hero-runway .fold-intro-glass {
  animation: ffEnterNotifPop 0.58s cubic-bezier(0.22, 1, 0.36, 1) 0.78s both;
}

#fold-hero-runway .fold-lock-actions {
  animation: ffEnterFadeUp 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.92s both;
}

.fold-float-device {
  width: 1000px;
  height: 684px;
  transform-style: preserve-3d;
  animation: ffDeviceFloat 5.6s ease-in-out 1.15s infinite;
  will-change: transform;
}
.fold-float-device.is-settled {
  animation: none;
  transform: translate3d(0, 0, 0);
}

.fold-bg-word-inner {
  display: inline-block;
  will-change: transform;
}

#fold-hero-runway .fold-bg-word.is-left .fold-bg-word-inner {
  animation:
    ffEnterWordLeft 0.68s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both,
    ffWordFloatLeft 6.4s ease-in-out 0.90s infinite;
}

#fold-hero-runway .fold-bg-word.is-right .fold-bg-word-inner {
  animation:
    ffEnterWordRight 0.68s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both,
    ffWordFloatRight 6.8s ease-in-out 0.98s infinite;
}

.fold-floor-shadow.is-floating-shadow {
  animation: ffShadowBreath 5.6s ease-in-out 1.15s infinite;
}

@media (prefers-reduced-motion: reduce) {
  .fold-entrance-wrap,
  #fold-hero-runway .fold-wordmark,
  #fold-hero-runway .fold-lock-top,
  #fold-hero-runway .fold-lock-portrait-full,
  #fold-hero-runway .fold-intro-glass,
  #fold-hero-runway .fold-lock-actions,
  #fold-hero-runway .fold-bg-word.is-left .fold-bg-word-inner,
  #fold-hero-runway .fold-bg-word.is-right .fold-bg-word-inner,
  .fold-float-device,
  .fold-floor-shadow.is-floating-shadow {
    animation: none !important;
  }
}

.fold-device-track {
  position: relative;
  width: 1000px;
  height: 684px;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Physical Side Buttons on Right Chassis Edge */
.fold-side-buttons {
  position: absolute;
  right: -3px;
  top: 148px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 2;
  pointer-events: none;
}
.fold-side-btn {
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--ff-chassis-edge);
}
.fold-side-btn.is-vol { height: 56px; }
.fold-side-btn.is-pwr { height: 34px; }

/* Shared Half-Chassis Styling */
.fold-half {
  position: absolute;
  top: 0;
  width: 500px;
  height: 684px;
  transform-style: preserve-3d;
  will-change: transform;
}

.fold-half.is-right {
  left: 500px;
  z-index: 2;
}

.fold-half.is-left {
  left: 0;
  transform-origin: 100% 50%;
  z-index: 4;
}

.fold-half.is-close-flap {
  left: 500px;
  transform-origin: 0% 50%;
  z-index: 6;
}

/* No thick physical bar — continuous foldable OLED glass meeting cleanly at the crease (matches foldfolio.framer.website) */
.fold-hinge-spine {
  display: none;
}

.fold-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: var(--ff-chassis-grad);
  padding: 4px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.72), inset 0 -1px 2px rgba(0, 0, 0, 0.25);
}

/* Corner rounding per half — keep spine corners straight during 3D fold to prevent hinge gap/clipping */
.fold-half.is-right .fold-face {
  border-radius: 0 46px 46px 0;
  padding-left: 0;
  transform: translateZ(0px);
}
.fold-half.is-right.is-closed-corners .fold-face {
  border-radius: 46px;
  padding-left: 4px;
}

.fold-half.is-left .fold-face.is-inside {
  border-radius: 46px 0 0 46px;
  padding-right: 0;
  transform: translateZ(1.5px);
}
.fold-half.is-left .fold-face.is-cover {
  transform: rotateY(180deg) translateZ(1.5px);
  border-radius: 0 46px 46px 0;
  padding: 4px 4px 4px 0;
}
.fold-half.is-left.is-closed-corners .fold-face.is-cover {
  border-radius: 46px;
  padding: 4px;
}

.fold-half.is-close-flap .fold-face.is-inside-back {
  border-radius: 0 46px 46px 0;
  padding-left: 0;
  transform: translateZ(1.5px);
}
.fold-half.is-close-flap .fold-face.is-dark-cover {
  transform: rotateY(180deg) translateZ(1.5px);
  border-radius: 46px;
  padding: 4px;
}

/* Inner Black Bezel */
.fold-bezel {
  position: relative;
  width: 100%;
  height: 100%;
  background: #050505;
  padding: 8px;
  overflow: hidden;
  transition: border-radius 0.22s ease;
}

.fold-half.is-right .fold-bezel {
  border-radius: 0 42px 42px 0;
  padding-left: 0;
}
.fold-half.is-right.is-closed-corners .fold-bezel {
  border-radius: 42px;
  padding-left: 8px;
}
.fold-half.is-left .fold-face.is-inside .fold-bezel {
  border-radius: 42px 0 0 42px;
  padding-right: 0;
}
.fold-half.is-left .fold-face.is-cover .fold-bezel {
  border-radius: 0 42px 42px 0;
  padding: 8px 8px 8px 0;
}
.fold-half.is-left.is-closed-corners .fold-face.is-cover .fold-bezel {
  border-radius: 42px;
  padding: 8px;
}
.fold-half.is-close-flap .fold-face.is-dark-cover .fold-bezel {
  border-radius: 42px;
  padding: 8px;
}
.fold-half.is-close-flap .fold-face.is-inside-back .fold-bezel {
  border-radius: 0 42px 42px 0;
  padding-left: 0;
}

/* Screen Viewport Inside Bezel */
.fold-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #FFFFFF;
  transition: border-radius 0.22s ease, background 0.35s ease;
}
body.is-fold-mode[data-theme="dark"] .fold-screen {
  background: #14161C;
}

.fold-half.is-right .fold-screen { border-radius: 0 34px 34px 0; }
.fold-half.is-right.is-closed-corners .fold-screen { border-radius: 34px; }
.fold-half.is-left .fold-face.is-inside .fold-screen { border-radius: 34px 0 0 34px; }
.fold-half.is-left .fold-face.is-cover .fold-screen { border-radius: 0 34px 34px 0; }
.fold-half.is-left.is-closed-corners .fold-face.is-cover .fold-screen { border-radius: 34px; }
.fold-half.is-close-flap .fold-face.is-inside-back .fold-screen { border-radius: 0 34px 34px 0; }
.fold-half.is-close-flap .fold-face.is-dark-cover .fold-screen { border-radius: 34px; }

/* Whisper-Subtle Foldable OLED Crease Shading (matches foldfolio.framer.website) */
.fold-half.is-left .fold-face.is-inside .fold-screen::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 18px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.045) 100%);
  pointer-events: none;
  z-index: 10;
}
.fold-half.is-right .fold-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 18px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.045) 0%, transparent 100%);
  pointer-events: none;
  z-index: 10;
}

/* ==========================================================================
   FRONT COVER LOCK SCREEN (HERO STATE)
   ========================================================================== */
.fold-lock-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #E8EEF8 0%, #F4F6FA 42%, #FAFBFD 76%, #E9EFF8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 26px 24px 20px;
  overflow: hidden;
  transition: background 0.35s ease;
}

/* Full-bleed backlit side-profile portrait — blends seamlessly into the lock-screen gradient via multiply */
.fold-lock-portrait-full {
  position: absolute;
  left: 0;
  right: 0;
  top: 92px;
  width: 100%;
  height: calc(100% - 92px);
  object-fit: cover;
  object-position: 50% 10%;
  mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 100%);
  z-index: 1;
  pointer-events: none;
}

.fold-lock-portrait-fade {
  display: none;
}

.fold-inside-right-panel.is-full-portrait {
  padding: 0;
  background: #F4F5F4;
  overflow: hidden;
}

.fold-inside-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 24%;
  display: block;
}

.fold-lock-avatar-wrap {
  position: relative;
  z-index: 3;
  width: 186px;
  height: 186px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(70% 70% at 50% 42%, #F6F7F6 0%, #E6E8E7 100%);
  box-shadow:
    0 18px 40px -14px rgba(17, 17, 17, 0.22),
    0 0 0 1px rgba(17, 17, 17, 0.08);
  flex-shrink: 0;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.fold-lock-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 24%;
  filter: grayscale(100%) contrast(1.06);
  display: block;
}

.fold-inside-right-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F0F2F1;
  transition: background 0.35s ease;
}

.fold-inside-right-panel.is-history-panel {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 20px;
  padding: 104px 38px 40px;
  background: #E4E8F0;
  border-left: none;
}

body.is-fold-mode[data-theme="dark"] .fold-inside-right-panel,
body.is-fold-mode[data-theme="dark"] .fold-inside-right-panel.is-history-panel {
  background: #12141A;
  border-left: none;
}

/* Theme-reactive Hero Lock Screen (Single continuous gradient behind multiply-blended portrait in BOTH themes) */
body.is-fold-mode[data-theme="dark"] .fold-lock-screen {
  background: linear-gradient(180deg, #475166 0%, #5C677E 46%, #3A4354 100%);
}
body.is-fold-mode[data-theme="dark"] .fold-lock-portrait-full {
  filter: contrast(1.06) brightness(1.04);
}
body.is-fold-mode[data-theme="dark"] .fold-lock-portrait-fade {
  display: none;
}
body.is-fold-mode[data-theme="dark"] .fold-lock-time {
  color: #F6F6F5;
}
body.is-fold-mode[data-theme="dark"] .fold-lock-sub {
  color: #9DD2FF;
}
body.is-fold-mode[data-theme="dark"] .fold-intro-glass {
  background: linear-gradient(
    180deg,
    rgba(22, 24, 30, 0.72) 0%,
    rgba(14, 15, 20, 0.62) 100%
  );
  border-color: rgba(255, 255, 255, 0.18);
  color: #F6F6F5;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    0 12px 28px -10px rgba(0, 0, 0, 0.55);
}
body.is-fold-mode[data-theme="dark"] .fold-intro-glass::before {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0.02) 45%,
    transparent 70%
  );
}
body.is-fold-mode[data-theme="dark"] .fold-intro-icon {
  background: #3186FF;
  color: #FFFFFF;
  box-shadow: none;
}
body.is-fold-mode[data-theme="dark"] .fold-unfold-pill,
body.is-fold-mode[data-theme="dark"] .fold-lock-icon-btn {
  background: rgba(22, 24, 30, 0.80);
  border-color: rgba(255, 255, 255, 0.20);
  color: #F6F6F5;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.55);
}
body.is-fold-mode[data-theme="dark"] .fold-unfold-pill:hover,
body.is-fold-mode[data-theme="dark"] .fold-lock-icon-btn:hover {
  background: #9DD2FF;
  border-color: #9DD2FF;
  color: #0B0B0B;
  box-shadow: none;
}
body.is-fold-mode[data-theme="dark"] .fold-lock-avatar-wrap {
  background: radial-gradient(70% 70% at 50% 42%, #242730 0%, #14161B 100%);
  box-shadow:
    0 20px 44px -14px rgba(0, 0, 0, 0.65),
    0 0 0 1.5px rgba(255, 255, 255, 0.14);
}
body.is-fold-mode[data-theme="dark"] .fold-inside-statusbar svg rect[stroke],
body.is-fold-mode[data-theme="dark"] .fold-inside-statusbar svg path[stroke] {
  stroke: #F6F6F5;
}
body.is-fold-mode[data-theme="dark"] .fold-inside-statusbar svg rect[fill] {
  fill: #F6F6F5;
}
body.is-fold-mode[data-theme="dark"] .fold-history-co-dates {
  color: #9DD2FF;
}

.fold-lock-top {
  position: relative;
  z-index: 3;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fold-lock-time {
  font-family: var(--ff-font-cond);
  font-weight: 800;
  font-size: 102px;
  line-height: 0.84;
  letter-spacing: -0.015em;
  color: #111111;
}

.fold-lock-sub {
  margin-top: 8px;
  font-family: var(--ff-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: #192967;
  letter-spacing: -0.005em;
}

.fold-lock-bottom {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Frosted iOS-Style Notification Banner (matches foldfolio.framer.website with high-contrast legibility) */
.fold-intro-glass {
  position: relative;
  overflow: hidden;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 20px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.54) 0%,
    rgba(248, 248, 248, 0.42) 100%
  );
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -1px 0 rgba(17, 17, 17, 0.04),
    0 10px 26px -10px rgba(0, 0, 0, 0.20),
    0 2px 6px -2px rgba(0, 0, 0, 0.06);
  font-family: var(--ff-font-sans);
  font-size: 12.5px;
  line-height: 1.38;
  font-weight: 500;
  color: #111111;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.45);
  text-align: left;
}

.fold-intro-icon {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1F3B9B;
  color: #FFFFFF;
  font-family: var(--ff-font-sans);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: none;
  box-shadow: none;
}

.fold-intro-text {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.fold-intro-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.24) 0%,
    rgba(255, 255, 255, 0.04) 45%,
    transparent 70%
  );
  pointer-events: none;
}

/* Opened Left Panel — Work History Team List */
.fold-history-groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 8px;
}

.fold-history-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fold-history-co {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.10);
}

body.is-fold-mode[data-theme="dark"] .fold-history-co {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.fold-history-co-name {
  font-family: var(--ff-font-cond);
  font-weight: 900;
  font-size: 28px;
  line-height: 0.9;
  text-transform: uppercase;
  color: #111111;
}

body.is-fold-mode[data-theme="dark"] .fold-history-co-name {
  color: #F6F6F5;
}

.fold-history-co-dates {
  font-family: var(--ff-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #192967;
}

.fold-history-teams {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.fold-history-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--ff-font-sans);
  font-size: 14px;
  font-weight: 500;
  color: #1F2226;
  line-height: 1.3;
}

body.is-fold-mode[data-theme="dark"] .fold-history-team {
  color: #E2E5EC;
}

.fold-current-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--ff-font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #146C2E;
  background: rgba(47, 203, 104, 0.14);
  padding: 2px 7px;
  border-radius: 999px;
}

.fold-current-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2FCB68;
}

body.is-fold-mode[data-theme="dark"] .fold-current-badge {
  color: #88E2AC;
  background: rgba(47, 203, 104, 0.18);
}

.fold-notif-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.16) 100%);
  backdrop-filter: blur(10px) saturate(185%);
  -webkit-backdrop-filter: blur(10px) saturate(185%);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    inset 0 -1px 0 rgba(255, 255, 255, 0.16),
    0 8px 22px -10px rgba(0, 0, 0, 0.16);
  text-decoration: none;
  color: #111111;
  transition: transform 0.2s ease, background 0.2s ease;
}
.fold-notif-card:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.48) 0%, rgba(255, 255, 255, 0.26) 100%);
}

.fold-notif-thumb {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  background: #111111;
  color: #FFFFFF;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fold-notif-thumb.is-alt {
  background: #2C2F34;
}

.fold-notif-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fold-notif-title {
  font-family: var(--ff-font-sans);
  font-size: 13px;
  font-weight: 600;
  color: #111111;
  line-height: 1.2;
}

.fold-notif-desc {
  font-family: var(--ff-font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: #192967;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fold-lock-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.fold-lock-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: #111111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.16);
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.fold-lock-icon-btn:hover {
  transform: translateY(-2px) scale(1.06);
  background: #192967;
  border-color: #192967;
  color: #FFFFFF;
  box-shadow: none;
}
body.is-fold-mode[data-theme="dark"] .fold-lock-icon-btn:hover {
  transform: translateY(-2px) scale(1.06);
  background: #9DD2FF;
  border-color: #9DD2FF;
  color: #0B0B0B;
  box-shadow: none;
}

.fold-unfold-pill {
  border: 1px solid rgba(255, 255, 255, 0.9);
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  color: #111111;
  font-family: var(--ff-font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.14);
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.fold-unfold-pill:hover {
  transform: translateY(-2px);
  background: #192967;
  border-color: #192967;
  color: #FFFFFF;
  box-shadow: none;
}
body.is-fold-mode[data-theme="dark"] .fold-unfold-pill:hover {
  transform: translateY(-2px);
  background: #9DD2FF;
  border-color: #9DD2FF;
  color: #0B0B0B;
  box-shadow: none;
}

.fold-projects-pill {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translate3d(-50%, 8px, 8px);
  z-index: 30;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.92);
  color: #111111;
  transition: opacity 0.26s cubic-bezier(0.22, 1, 0.36, 1), transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), background 0.22s ease, color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.fold-projects-pill.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(-50%, 0, 8px);
}
.fold-projects-pill.is-visible:hover {
  transform: translate3d(-50%, -2px, 8px);
  background: #192967;
  border-color: #192967;
  color: #FFFFFF;
  box-shadow: none;
}
body.is-fold-mode[data-theme="dark"] .fold-unfold-pill.fold-projects-pill {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  color: #F6F6F5;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.45);
}
body.is-fold-mode[data-theme="dark"] .fold-unfold-pill.fold-projects-pill.is-visible:hover {
  transform: translate3d(-50%, -2px, 8px);
  background: #9DD2FF;
  border-color: #9DD2FF;
  color: #0B0B0B;
  box-shadow: none;
}

/* ==========================================================================
   INSIDE OPENED SPREAD (LEFT & RIGHT HALVES OF 976x660 TABLET)
   ========================================================================== */
.fold-inside-statusbar {
  position: absolute;
  top: 16px;
  left: 22px;
  right: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--ff-font-sans);
  font-size: 12px;
  font-weight: 600;
  color: #111111;
  z-index: 12;
  pointer-events: none;
}
.fold-inside-statusbar [data-fold-clock] {
  color: inherit;
}

.fold-inside-left-panel {
  position: relative;
  width: 100%;
  height: 100%;
  background: #EEF0F4;
  padding: 68px 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.fold-inside-kicker {
  font-family: var(--ff-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #192967;
}

.fold-inside-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.fold-inside-name {
  font-family: var(--ff-font-cond);
  font-weight: 900;
  font-size: 112px;
  line-height: 0.84;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: #111111;
  margin: 0;
}

.fold-inside-name .fold-name-line {
  display: block;
  will-change: transform, color;
  animation: ffResumeTitleWaveLight 5.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.fold-inside-name .fold-name-line:nth-child(1) { animation-delay: 0s; }
.fold-inside-name .fold-name-line:nth-child(2) { animation-delay: 0.34s; }
.fold-inside-name .fold-name-line:nth-child(3) { animation-delay: 0.68s; }

body.is-fold-mode[data-theme="dark"] .fold-inside-name .fold-name-line {
  animation-name: ffResumeTitleWaveDark;
}

@keyframes ffResumeTitleWaveLight {
  0%, 100% {
    transform: translate3d(0, 0, 0);
    color: #111111;
  }
  16% {
    transform: translate3d(5px, -1.5px, 0);
    color: #1F3B9B;
  }
  34% {
    transform: translate3d(0, 0, 0);
    color: #111111;
  }
}

@keyframes ffResumeTitleWaveDark {
  0%, 100% {
    transform: translate3d(0, 0, 0);
    color: #F6F6F5;
  }
  16% {
    transform: translate3d(5px, -1.5px, 0);
    color: #9DD2FF;
  }
  34% {
    transform: translate3d(0, 0, 0);
    color: #F6F6F5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fold-inside-name .fold-name-line {
    animation: none;
  }
}

.fold-inside-tagline {
  font-family: var(--ff-font-sans);
  font-size: 15.5px;
  line-height: 1.48;
  color: #2C2F33;
  max-width: 340px;
  margin: 0;
}

.fold-inside-ctas {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.fold-cta-dark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #111111;
  color: #FFFFFF;
  font-family: var(--ff-font-sans);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}
.fold-cta-dark:hover {
  background: #192967;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: none;
}
body.is-fold-mode[data-theme="dark"] .fold-cta-dark:hover {
  background: #3186FF;
  color: #FFFFFF;
  box-shadow: none;
}

.fold-cta-light {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.07);
  color: #111111;
  font-family: var(--ff-font-sans);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

/* Closing cover CTA buttons (theme-reactive: light studio in light mode, dark obsidian in dark mode) */
.fold-call-bottom .fold-connect-btn-primary,
.fold-call-bottom .fold-connect-btn-secondary,
.fold-call-bottom .fold-connect-btn-tertiary {
  width: 100%;
  max-width: 340px;
  justify-content: center;
  gap: 9px;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.fold-call-bottom .fold-connect-btn-primary {
  background: #111111;
  color: #FFFFFF;
  padding: 15px 22px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid #111111;
}
.fold-call-bottom .fold-connect-btn-primary:hover {
  background: #192967;
  border-color: #192967;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: none;
}
.fold-call-bottom .fold-connect-btn-secondary {
  background: rgba(17, 17, 17, 0.08);
  color: #111111;
  padding: 14px 22px;
  font-size: 14px;
  border: 1px solid rgba(17, 17, 17, 0.14);
}
.fold-call-bottom .fold-connect-btn-tertiary {
  background: rgba(17, 17, 17, 0.05);
  color: #111111;
  padding: 14px 22px;
  font-size: 14px;
  border: 1px solid rgba(17, 17, 17, 0.10);
}
.fold-call-bottom .fold-connect-btn-secondary:hover,
.fold-call-bottom .fold-connect-btn-tertiary:hover {
  background: #192967;
  border-color: #192967;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: none;
}

body.is-fold-mode[data-theme="dark"] .fold-call-bottom .fold-connect-btn-primary {
  background: #FFFFFF;
  color: #111111;
  border-color: rgba(255, 255, 255, 0.9);
}
body.is-fold-mode[data-theme="dark"] .fold-call-bottom .fold-connect-btn-primary:hover {
  background: #9DD2FF;
  border-color: #9DD2FF;
  color: #0B0B0B;
  box-shadow: none;
}
body.is-fold-mode[data-theme="dark"] .fold-call-bottom .fold-connect-btn-secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.18);
}
body.is-fold-mode[data-theme="dark"] .fold-call-bottom .fold-connect-btn-tertiary {
  background: rgba(255, 255, 255, 0.10);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.14);
}
body.is-fold-mode[data-theme="dark"] .fold-call-bottom .fold-connect-btn-secondary:hover,
body.is-fold-mode[data-theme="dark"] .fold-call-bottom .fold-connect-btn-tertiary:hover {
  background: #9DD2FF;
  border-color: #9DD2FF;
  color: #0B0B0B;
  box-shadow: none;
}

.fold-inside-right-panel {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--ff-lock-bg);
  overflow: hidden;
}

.fold-inside-right-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  display: block;
}

/* Smooth White/Theme Portal Overlay During Zoom-In & Zoom-Out */
.fold-zoom-portal {
  position: absolute;
  inset: 0;
  background: var(--bg-page, #FFFFFF);
  opacity: 0;
  pointer-events: none;
  z-index: 35;
  will-change: opacity;
}

/* ==========================================================================
   CLOSING PHONE: DARK "INCOMING CALL" BACK COVER
   ========================================================================== */
/* During zoom-out (before 3D fold-shut), hide the footer 3D device's own border so ONLY the sticky browser bezel shrinks down — zero double border! */
#fold-footer-runway:not(.is-folding-shut) .fold-face,
#fold-footer-runway:not(.is-folding-shut) .fold-bezel {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

#fold-footer-runway:not(.is-folding-shut) .fold-screen {
  border-radius: 0;
}

.fold-closing-inside-left,
.fold-closing-inside-right {
  width: 100%;
  height: 100%;
  background: var(--bg-page, #F8F7F6);
  color: var(--text-primary, #111111);
  padding: 64px 38px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background 0.35s ease, color 0.35s ease;
}

.fold-closing-inside-right {
  background: var(--bg-page, #F8F7F6);
  border-left: none;
  justify-content: center;
}

/* Apply subtle device-screen tint only once the bezel has framed the device for the 3D fold */
.fold-runway.is-footer-runway.is-folding-shut .fold-closing-inside-left {
  background: #EEF0F4;
}
.fold-runway.is-footer-runway.is-folding-shut .fold-closing-inside-right {
  background: #E8EBF0;
}
body.is-fold-mode[data-theme="dark"] .fold-runway.is-footer-runway.is-folding-shut .fold-closing-inside-left {
  background: #16181E;
}
body.is-fold-mode[data-theme="dark"] .fold-runway.is-footer-runway.is-folding-shut .fold-closing-inside-right {
  background: #1A1D24;
}

.fold-closing-inside-title {
  font-family: var(--ff-font-cond);
  font-weight: 900;
  font-size: 84px;
  line-height: 0.88;
  text-transform: uppercase;
  margin: 0;
  color: var(--text-primary, #111111);
}

.fold-closing-inside-sub {
  font-family: var(--ff-font-sans);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-secondary, #4A4D52);
  margin: 0;
}

.fold-call-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: radial-gradient(85% 65% at 50% 18%, #F8FAFE 0%, #E6ECF6 100%);
  color: #111111;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 58px 28px 34px;
  text-align: center;
  transition: background 0.35s ease, color 0.35s ease;
}

body.is-fold-mode[data-theme="dark"] .fold-call-screen {
  background: radial-gradient(85% 65% at 50% 20%, #13151B 0%, #0E1014 100%);
  color: #FFFFFF;
}

.fold-call-name {
  font-family: var(--ff-font-cond);
  font-weight: 900;
  font-size: 84px;
  line-height: 0.88;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #1F3B9B;
  text-shadow: none;
  margin: 0;
  display: inline-block;
  transform: translateY(-8px) scale(1.07) rotate(1.5deg);
  animation: aiFrozenSubtleFloat 3.4s ease-in-out infinite;
  will-change: transform;
  transition: color 0.35s ease;
}

body.is-fold-mode[data-theme="dark"] .fold-call-name {
  color: #3186FF;
  text-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .fold-call-name {
    animation: none;
    transform: rotate(1.5deg);
  }
}

.fold-call-sub {
  margin-top: 12px;
  font-family: var(--ff-font-sans);
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.68);
}

.fold-call-avatar {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ff-lock-bg);
  box-shadow: 0 14px 34px -12px rgba(17, 17, 17, 0.25), 0 0 0 2px rgba(25, 41, 103, 0.14);
  flex-shrink: 0;
}

body.is-fold-mode[data-theme="dark"] .fold-call-avatar {
  box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.72), 0 0 0 2px rgba(157, 210, 255, 0.22);
}

.fold-call-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  display: block;
}

.fold-call-bottom {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.fold-slide-talk {
  position: relative;
  width: 100%;
  max-width: 390px;
  height: 64px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.86);
  font-family: var(--ff-font-sans);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.25s ease, transform 0.25s ease;
}
.fold-slide-talk:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.015);
}

.fold-slide-knob {
  position: absolute;
  left: 6px;
  top: 6px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #2FCB68;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(47, 203, 104, 0.4);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.fold-slide-talk:hover .fold-slide-knob {
  transform: translateX(12px);
}

.fold-call-email {
  font-family: var(--ff-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
}
.fold-call-email:hover {
  color: #FFFFFF;
}

.fold-call-links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--ff-font-sans);
  font-size: 12px;
  color: #192967;
}
.fold-call-links a {
  color: #192967;
  text-decoration: none;
  transition: color 0.2s ease;
}
.fold-call-links a:hover {
  color: #1F3B9B;
}
body.is-fold-mode[data-theme="dark"] .fold-call-links {
  color: rgba(255, 255, 255, 0.56);
}
body.is-fold-mode[data-theme="dark"] .fold-call-links a {
  color: rgba(255, 255, 255, 0.72);
}
body.is-fold-mode[data-theme="dark"] .fold-call-links a:hover {
  color: #3186FF;
}

/* ==========================================================================
   FULLSCREEN PORTFOLIO WRAPPER (INSIDE THE OPENED PHONE)
   ========================================================================== */
/* Harmonize "Let's build something good." card & buttons with Foldfolio palette */
body.is-fold-mode .leo-footer-heading {
  font-family: var(--ff-font-cond);
  font-weight: 900;
  font-variation-settings: normal;
  font-size: clamp(54px, 6.4vw, 88px);
  line-height: 0.88;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--text-primary);
}
body.is-fold-mode .leo-footer-heading .text-accent {
  font-family: var(--ff-font-cond);
  font-weight: 900;
  font-variation-settings: normal;
  text-transform: uppercase;
  color: var(--text-muted);
}
body.is-fold-mode .leo-magnetic-btn.is-secondary {
  background: #111111;
  color: #FFFFFF;
  border-color: transparent;
  font-family: var(--ff-font-sans);
}
body.is-fold-mode .leo-magnetic-btn.is-secondary:hover {
  background: #2A2C30;
  color: #FFFFFF;
}
body.is-fold-mode[data-theme="dark"] .leo-magnetic-btn.is-secondary {
  background: #FFFFFF;
  color: #0B0B0B;
}
body.is-fold-mode[data-theme="dark"] .leo-magnetic-btn.is-secondary:hover {
  background: #E2E4E8;
  color: #0B0B0B;
}
body.is-fold-mode .clientele-footer {
  background: transparent;
  padding-bottom: 36px;
}

body.is-fold-mode .about-editorial-split {
  display: flex;
  align-items: center;
  gap: 40px;
}

.about-portrait-circle {
  width: 176px;
  height: 176px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: radial-gradient(70% 70% at 50% 35%, #EDF2FA 0%, #D9E2F2 100%);
  border: 1.5px solid rgba(31, 59, 155, 0.14);
  box-shadow: none;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

body.is-fold-mode[data-theme="dark"] .about-portrait-circle {
  background: radial-gradient(70% 70% at 50% 35%, #23304A 0%, #141926 100%);
  border-color: rgba(157, 210, 255, 0.22);
  box-shadow: 0 20px 44px -16px rgba(0, 0, 0, 0.65);
}

.about-portrait-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  display: block;
}

@media (max-width: 760px) {
  body.is-fold-mode .about-editorial-split {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .about-portrait-circle {
    width: 132px;
    height: 132px;
  }
}

.fold-portfolio-interior {
  position: relative;
  z-index: 32;
  margin-top: -45vh;
  background: var(--bg-page);
  padding: 84px 22px 24px;
  will-change: opacity;
}

@media (max-width: 760px) {
  .fold-runway {
    height: 230vh;
  }
  .fold-runway.is-footer-runway {
    height: 190vh;
  }
  .fold-chrome-top {
    top: 16px;
    left: 16px;
    right: 16px;
  }
  .fold-bg-word {
    font-size: 112px;
  }
  .fold-viewport-bezel-frame {
    border-width: 3px;
  }
  .fold-viewport-bezel-frame::after {
    inset: 5px;
    box-shadow:
      0 0 0 60px #050505,
      inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  }
  .fold-portfolio-interior {
    margin-top: -32vh;
    padding: 76px 14px 20px;
  }
}

/* ==========================================================================
   CASE STUDY LEAF PAGES & PASSWORD PROTECTION DIALOGS (FOLDFOLIO DESIGN SYSTEM)
   - Matches homepage: #F8F7F6 light / #0B0B0B dark, Sofia Sans Extra Condensed +
     Geist + Geist Mono, with tasteful pops of color preserved for accents
   ========================================================================== */
body.case-study-body,
body.case-study-body[data-theme="light"] {
  --bg-page: #F8F7F6;
  --bg-surface: #FFFFFF;
  --bg-elevated: #F1EFEA;
  --bg-card: #FFFFFF;
  --text-primary: #111111;
  --text-secondary: #192967;
  --text-muted: #192967;
  --border-subtle: rgba(17, 17, 17, 0.08);
  --border-strong: rgba(17, 17, 17, 0.18);
  --accent: #1F3B9B;
  --accent-blue: #1F3B9B;
  --accent-saffron: #146C2E;
  --accent-soft: rgba(31, 59, 155, 0.09);
  --nav-bg: rgba(255, 255, 255, 0.92);
  --nav-hover-pill: rgba(17, 17, 17, 0.07);
  --font-display: 'Sofia Sans Extra Condensed', 'Big Shoulders Display', sans-serif;
  --font-script: 'Sofia Sans Extra Condensed', 'Big Shoulders Display', sans-serif;
  --font-serif: 'Sofia Sans Extra Condensed', 'Big Shoulders Display', sans-serif;
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

body.case-study-body[data-theme="dark"] {
  --bg-page: #0B0B0B;
  --bg-surface: #141416;
  --bg-elevated: #1D1E22;
  --bg-card: #141416;
  --text-primary: #F6F6F5;
  --text-secondary: #C5D4E8;
  --text-muted: #9DD2FF;
  --border-subtle: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.22);
  --accent: #3186FF;
  --accent-blue: #3186FF;
  --accent-saffron: #2FCB68;
  --accent-soft: rgba(49, 134, 255, 0.14);
  --nav-bg: rgba(16, 16, 18, 0.92);
  --nav-hover-pill: rgba(255, 255, 255, 0.10);
}

body.case-study-body .case-section.alt-bg {
  background: #F1EFEA;
}
body.case-study-body[data-theme="dark"] .case-section.alt-bg {
  background: #101012;
}

/* Display Typography Across Leaf Pages */
body.case-study-body .case-title {
  font-family: var(--ff-font-cond);
  font-weight: 900;
  font-variation-settings: normal;
  font-size: clamp(54px, 7.2vw, 96px);
  line-height: 0.88;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

body.case-study-body .case-h2 {
  font-family: var(--ff-font-cond);
  font-weight: 900;
  font-variation-settings: normal;
  font-size: clamp(44px, 5.4vw, 72px);
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

body.case-study-body .case-h3,
body.case-study-body .case-h3-italic,
body.case-study-body .next-case-title {
  font-family: var(--ff-font-cond);
  font-weight: 800;
  font-variation-settings: normal;
  text-transform: uppercase;
  letter-spacing: 0em;
  line-height: 0.96;
}

body.case-study-body .case-h3-italic {
  font-size: clamp(32px, 3.6vw, 48px);
  color: var(--accent);
}

body.case-study-body .case-h4,
body.case-study-body .principle-title,
body.case-study-body .validation-step-title {
  font-family: var(--ff-font-sans);
  font-weight: 600;
  letter-spacing: -0.02em;
}

body.case-study-body .case-body,
body.case-study-body .case-subtitle,
body.case-study-body .case-list,
body.case-study-body .case-meta-value,
body.case-study-body .metric-label,
body.case-study-body .principle-desc,
body.case-study-body .validation-step-desc,
body.case-study-body .leo-nav-link,
body.case-study-body .leo-nav-cta {
  font-family: var(--ff-font-sans);
  font-variation-settings: normal;
}

body.case-study-body .case-eyebrow,
body.case-study-body .case-caption,
body.case-study-body .case-meta-label,
body.case-study-body .feature-tag,
body.case-study-body .next-case-eyebrow,
body.case-study-body .leo-nav-clock {
  font-family: var(--ff-font-mono);
}

body.case-study-body .metric-value,
body.case-study-body .feature-num,
body.case-study-body .principle-num {
  font-family: var(--ff-font-cond);
  font-weight: 900;
  font-variation-settings: normal;
}

/* Primary CTAs & Nav CTA match Foldfolio obsidian/white pill style */
body.case-study-body .leo-nav-cta,
body.case-study-body .btn.btn-primary {
  background: #111111;
  color: #FFFFFF;
  border-color: transparent;
}
body.case-study-body .leo-nav-cta:hover,
body.case-study-body .btn.btn-primary:hover {
  background: #2A2C30;
  color: #FFFFFF;
}
body.case-study-body[data-theme="dark"] .leo-nav-cta,
body.case-study-body[data-theme="dark"] .btn.btn-primary {
  background: #FFFFFF;
  color: #0B0B0B;
}
body.case-study-body[data-theme="dark"] .leo-nav-cta:hover,
body.case-study-body[data-theme="dark"] .btn.btn-primary:hover {
  background: #E2E4E8;
  color: #0B0B0B;
}

/* Next Case Study Card in Foldfolio Obsidian */
body.case-study-body .next-case-banner {
  background: transparent;
  border: none;
}

body.case-study-body .next-case-inner {
  background: #111111;
  color: #FFFFFF;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 28px;
  box-shadow: 0 20px 48px -18px rgba(17, 17, 17, 0.24);
}

body.case-study-body[data-theme="dark"] .next-case-inner {
  background: #141416;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 52px -18px rgba(0, 0, 0, 0.65);
}

body.case-study-body .next-case-eyebrow {
  color: rgba(255, 255, 255, 0.6);
}

body.case-study-body .next-case-title {
  color: #FFFFFF;
  font-size: clamp(44px, 5vw, 68px);
}

body.case-study-body .next-case-subtitle {
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--ff-font-sans);
}

body.case-study-body .next-case-inner .btn-light {
  background: #FFFFFF;
  color: #111111;
  font-family: var(--ff-font-sans);
  font-weight: 600;
}

body.case-study-body .next-case-inner .btn-light:hover {
  background: #E4E6EA;
  color: #111111;
}

/* ==========================================================================
   PASSWORD PROTECTION DIALOG (FOLDFOLIO EDITORIAL STYLE)
   ========================================================================== */
body.case-study-body .case-password-gate {
  background: rgba(248, 247, 246, 0.86);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}
body.case-study-body[data-theme="dark"] .case-password-gate {
  background: rgba(11, 11, 11, 0.86);
}

body.case-study-body .case-password-card {
  background: #FFFFFF;
  border: 1px solid rgba(17, 17, 17, 0.10);
  border-radius: 28px;
  box-shadow: 0 24px 64px -18px rgba(17, 17, 17, 0.18);
  font-family: var(--ff-font-sans);
}
body.case-study-body[data-theme="dark"] .case-password-card {
  background: #141416;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 68px -18px rgba(0, 0, 0, 0.72);
}

body.case-study-body .case-password-icon {
  background: #F4F3F0;
  color: #111111;
  border: 1px solid rgba(17, 17, 17, 0.08);
}
body.case-study-body[data-theme="dark"] .case-password-icon {
  background: #1E1F24;
  color: #F6F6F5;
  border-color: rgba(255, 255, 255, 0.12);
}

body.case-study-body .case-password-kicker {
  font-family: var(--ff-font-mono);
  letter-spacing: 0.09em;
  color: var(--accent);
}

body.case-study-body .case-password-title {
  font-family: var(--ff-font-cond);
  font-weight: 900;
  font-size: 52px;
  line-height: 0.9;
  letter-spacing: 0em;
  text-transform: uppercase;
  color: var(--text-primary);
}

body.case-study-body .case-password-desc,
body.case-study-body .case-password-help,
body.case-study-body .case-password-back {
  font-family: var(--ff-font-sans);
  color: var(--text-secondary);
}

body.case-study-body .case-password-input {
  font-family: var(--ff-font-sans);
  background: #F8F7F6;
  border: 1.5px solid rgba(17, 17, 17, 0.12);
  color: #111111;
  border-radius: 14px;
}
body.case-study-body .case-password-input:focus {
  border-color: #111111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}
body.case-study-body[data-theme="dark"] .case-password-input {
  background: #0B0B0B;
  border-color: rgba(255, 255, 255, 0.14);
  color: #F6F6F5;
}
body.case-study-body[data-theme="dark"] .case-password-input:focus {
  border-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.10);
}

body.case-study-body .case-password-submit {
  font-family: var(--ff-font-sans);
  font-weight: 600;
  background: #111111;
  color: #FFFFFF;
  border-radius: 999px;
}
body.case-study-body .case-password-submit:hover {
  background: #2A2C30;
}
body.case-study-body[data-theme="dark"] .case-password-submit {
  background: #FFFFFF;
  color: #0B0B0B;
}
body.case-study-body[data-theme="dark"] .case-password-submit:hover {
  background: #E2E4E8;
}

/* Center-align Expectation vs Reality phone mocks on desktop (ignoring left-side callout annotations) */
@media (min-width: 961px) {
  body.case-study-body .frameless-mock.is-expectation-reality {
    position: relative;
    left: -12.8%;
  }
}

/* Flowing Contact Data Chips in AI-in-Contacts Hero Diagram */
.aurora-chip-bg {
  fill: rgba(255, 255, 255, 0.94);
  stroke: rgba(31, 59, 155, 0.22);
  stroke-width: 1.25;
  filter: drop-shadow(0 4px 10px rgba(25, 41, 103, 0.14));
}
.aurora-chip-text {
  fill: #192967;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
body[data-theme="dark"] .aurora-chip-bg {
  fill: rgba(20, 24, 34, 0.92);
  stroke: rgba(157, 210, 255, 0.34);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
}
body[data-theme="dark"] .aurora-chip-text {
  fill: #E8F1FF;
}

/* Pure CSS keyframe motion along each ecosystem curve (universal Chrome/Safari/Firefox support) */
.aurora-data-chip {
  will-change: transform, opacity;
}
.aurora-data-chip.is-chip-lt { animation: chipFlowLT 4.6s cubic-bezier(0.35, 0, 0.25, 1) -0.4s infinite; }
.aurora-data-chip.is-chip-lm { animation: chipFlowLM 4.6s cubic-bezier(0.35, 0, 0.25, 1) -1.9s infinite; }
.aurora-data-chip.is-chip-lb { animation: chipFlowLB 4.6s cubic-bezier(0.35, 0, 0.25, 1) -3.4s infinite; }
.aurora-data-chip.is-chip-rt { animation: chipFlowRT 4.6s cubic-bezier(0.35, 0, 0.25, 1) -1.1s infinite; }
.aurora-data-chip.is-chip-rm { animation: chipFlowRM 4.6s cubic-bezier(0.35, 0, 0.25, 1) -2.6s infinite; }
.aurora-data-chip.is-chip-rb { animation: chipFlowRB 4.6s cubic-bezier(0.35, 0, 0.25, 1) -4.0s infinite; }

@keyframes chipFlowLT {
  0%   { transform: translate(230px, 102px) scale(0.84); opacity: 0; }
  16%  { transform: translate(285px, 114px) scale(1);    opacity: 1; }
  50%  { transform: translate(360px, 152px) scale(1);    opacity: 1; }
  78%  { transform: translate(432px, 194px) scale(0.96); opacity: 1; }
  96%  { transform: translate(478px, 208px) scale(0.76); opacity: 0; }
  100% { transform: translate(478px, 208px) scale(0.76); opacity: 0; }
}
@keyframes chipFlowLM {
  0%   { transform: translate(185px, 210px) scale(0.84); opacity: 0; }
  16%  { transform: translate(240px, 210px) scale(1);    opacity: 1; }
  50%  { transform: translate(335px, 210px) scale(1);    opacity: 1; }
  78%  { transform: translate(422px, 210px) scale(0.96); opacity: 1; }
  96%  { transform: translate(472px, 210px) scale(0.76); opacity: 0; }
  100% { transform: translate(472px, 210px) scale(0.76); opacity: 0; }
}
@keyframes chipFlowLB {
  0%   { transform: translate(230px, 318px) scale(0.84); opacity: 0; }
  16%  { transform: translate(285px, 306px) scale(1);    opacity: 1; }
  50%  { transform: translate(360px, 268px) scale(1);    opacity: 1; }
  78%  { transform: translate(432px, 226px) scale(0.96); opacity: 1; }
  96%  { transform: translate(478px, 212px) scale(0.76); opacity: 0; }
  100% { transform: translate(478px, 212px) scale(0.76); opacity: 0; }
}
@keyframes chipFlowRT {
  0%   { transform: translate(770px, 102px) scale(0.84); opacity: 0; }
  16%  { transform: translate(715px, 114px) scale(1);    opacity: 1; }
  50%  { transform: translate(640px, 152px) scale(1);    opacity: 1; }
  78%  { transform: translate(568px, 194px) scale(0.96); opacity: 1; }
  96%  { transform: translate(522px, 208px) scale(0.76); opacity: 0; }
  100% { transform: translate(522px, 208px) scale(0.76); opacity: 0; }
}
@keyframes chipFlowRM {
  0%   { transform: translate(815px, 210px) scale(0.84); opacity: 0; }
  16%  { transform: translate(760px, 210px) scale(1);    opacity: 1; }
  50%  { transform: translate(665px, 210px) scale(1);    opacity: 1; }
  78%  { transform: translate(578px, 210px) scale(0.96); opacity: 1; }
  96%  { transform: translate(528px, 210px) scale(0.76); opacity: 0; }
  100% { transform: translate(528px, 210px) scale(0.76); opacity: 0; }
}
@keyframes chipFlowRB {
  0%   { transform: translate(770px, 318px) scale(0.84); opacity: 0; }
  16%  { transform: translate(715px, 306px) scale(1);    opacity: 1; }
  50%  { transform: translate(640px, 268px) scale(1);    opacity: 1; }
  78%  { transform: translate(568px, 226px) scale(0.96); opacity: 1; }
  96%  { transform: translate(522px, 212px) scale(0.76); opacity: 0; }
  100% { transform: translate(522px, 212px) scale(0.76); opacity: 0; }
}

/* Centered bottom action stack in Resume spread (View Resume above Scroll to projects) */
.fold-projects-stack {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translate3d(-50%, 8px, 8px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s cubic-bezier(0.22, 1, 0.36, 1), transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.fold-projects-stack.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(-50%, 0, 8px);
}
.fold-projects-pill.is-in-stack {
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
.fold-projects-pill.is-in-stack:hover,
body.is-fold-mode[data-theme="dark"] .fold-unfold-pill.fold-projects-pill.is-in-stack:hover {
  transform: translateY(-2px);
}
body.is-fold-mode[data-theme="dark"] .fold-unfold-pill.fold-projects-pill.is-in-stack:hover {
  background: #9DD2FF;
  border-color: #9DD2FF;
  color: #0B0B0B;
  box-shadow: none;
}
.fold-projects-pill.is-in-stack:hover {
  background: #192967;
  border-color: #192967;
  color: #FFFFFF;
  box-shadow: none;
}

/* Remove center crease completely across all unfolded spreads in both light & dark themes */
.fold-half.is-left .fold-face.is-inside .fold-screen::after,
.fold-half.is-right .fold-screen::before,
.fold-half.is-close-flap .fold-face.is-inside-back .fold-screen::before,
body.is-fold-mode[data-theme="dark"] .fold-half.is-left .fold-face.is-inside .fold-screen::after,
body.is-fold-mode[data-theme="dark"] .fold-half.is-right .fold-screen::before,
body.is-fold-mode[data-theme="dark"] .fold-half.is-close-flap .fold-face.is-inside-back .fold-screen::before {
  display: none !important;
  background: none !important;
  border: none !important;
}

/* Horizontal divider line under About section matching other sections */
body.is-fold-mode #about {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 96px;
}

/* Remove vertical center divider/crease between the three words & Let's Build Something Good in BOTH themes */
#fold-footer-runway .fold-half.is-left .fold-face.is-inside .fold-screen::after,
#fold-footer-runway .fold-half.is-close-flap .fold-face.is-inside-back .fold-screen::before,
body.is-fold-mode[data-theme="dark"] #fold-footer-runway .fold-half.is-left .fold-face.is-inside .fold-screen::after,
body.is-fold-mode[data-theme="dark"] #fold-footer-runway .fold-half.is-close-flap .fold-face.is-inside-back .fold-screen::before {
  display: none;
  background: none;
  border: none;
}

/* Allow the Ship rocket to blast vertically out of the left panel while zoomed in */
#fold-footer-runway:not(.is-folding-shut) .fold-bezel,
#fold-footer-runway:not(.is-folding-shut) .fold-screen {
  overflow: visible;
}

/* Horizontal flat layout for PROTOTYPE. MEASURE. SHIP. + Rocket Launch interaction */
.fold-process-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 14px;
}
.fold-process-word {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: var(--ff-font-cond);
  font-weight: 900;
  font-size: 46px;
  line-height: 0.95;
  letter-spacing: 0em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.fold-process-word.is-ship-word {
  position: relative;
  padding-right: 4px;
}
.fold-process-word.is-ship-word .rocket-relaunch-btn {
  left: calc(100% + 6px);
  top: 50%;
}
#fold-footer-runway .hero-top-torch-flash {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 34vh;
  min-height: 240px;
  pointer-events: none;
  z-index: 60;
}

/* Centered horizontal PROTOTYPE. MEASURE. SHIP. across the full closing spread */
.fold-process-center-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate3d(0, 0, 8px);
  z-index: 25;
  pointer-events: auto;
}
.fold-process-center-overlay .fold-process-row {
  justify-content: center;
  gap: 22px;
}
.fold-process-center-overlay .fold-process-word {
  font-size: 54px;
  color: var(--text-primary);
  opacity: 0.28;
  transition: opacity 0.25s ease, color 0.25s ease;
}
body.is-fold-mode[data-theme="dark"] .fold-process-center-overlay .fold-process-word {
  color: #FFFFFF;
}

/* Fast left-to-right crisp white highlight sweep before early rocket liftoff (~1.2s) */
#process.is-rocket-launched .fold-process-word:nth-child(1) {
  animation: foldWordHighlightWhite 2.4s ease-out 0.05s 1 forwards;
}
#process.is-rocket-launched .fold-process-word:nth-child(2) {
  animation: foldWordHighlightWhite 2.4s ease-out 0.38s 1 forwards;
}
#process.is-rocket-launched .fold-process-word:nth-child(3) {
  animation: foldWordHighlightWhite 2.4s ease-out 0.72s 1 forwards;
}

@keyframes foldWordHighlightWhite {
  0%   { opacity: 0.28; transform: scale(1); text-shadow: none; }
  12%  { opacity: 1;    transform: scale(1.06); text-shadow: 0 0 22px rgba(255, 255, 255, 0.55); }
  28%  { opacity: 1;    transform: scale(1);    text-shadow: 0 0 8px rgba(255, 255, 255, 0.20); }
  100% { opacity: 1;    transform: scale(1);    text-shadow: none; }
}
body.is-fold-mode[data-theme="light"] #process.is-rocket-launched .fold-process-word:nth-child(1) {
  animation: foldWordHighlightLight 2.4s ease-out 0.05s 1 forwards;
}
body.is-fold-mode[data-theme="light"] #process.is-rocket-launched .fold-process-word:nth-child(2) {
  animation: foldWordHighlightLight 2.4s ease-out 0.38s 1 forwards;
}
body.is-fold-mode[data-theme="light"] #process.is-rocket-launched .fold-process-word:nth-child(3) {
  animation: foldWordHighlightLight 2.4s ease-out 0.72s 1 forwards;
}
@keyframes foldWordHighlightLight {
  0%   { opacity: 0.28; transform: scale(1); }
  12%  { opacity: 1;    transform: scale(1.06); }
  28%  { opacity: 1;    transform: scale(1); }
  100% { opacity: 1;    transform: scale(1); }
}

/* Speed up rocket launch & smoke by ~1.5s so liftoff happens right after SHIP. lights up */
#process.is-rocket-launched .ship-launch-smoke,
#process.is-rocket-launched .ship-rocket-launch,
#process.is-rocket-launched .rocket-side-booster-left,
#process.is-rocket-launched .rocket-side-booster-right {
  animation-duration: 2.3s;
}

/* Guarantee rocket stage is crisp, well-spaced, and never clipped inside the centered overlay */
.fold-process-center-overlay .ship-rocket-stage {
  left: calc(100% + 42px);
  z-index: 80;
}
.fold-process-center-overlay .ship-rocket-launch {
  width: 49px;
  height: 92px;
  top: -68px;
}
.fold-process-center-overlay .ship-launch-smoke {
  width: 82px;
  height: 31px;
  top: -15px;
}
.fold-process-center-overlay .rocket-relaunch-btn {
  width: 36px;
  height: 36px;
  left: calc(100% + 10px);
}
