/* ============================================
   Lance Essner Portfolio — v4
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* === ONBOARDING SCREEN === */
.onboarding-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 10000; background: #111;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s ease;
}
.onboarding-overlay.hidden {
  opacity: 0; pointer-events: none;
}
.onboarding-overlay.removed {
  display: none;
}
.onboarding-tap {
  background: none; border: none; cursor: pointer;
  animation: onboardingWiggle 1.8s ease-in-out infinite;
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 2;
}
.onboarding-tap.fade-out {
  opacity: 0; transform: scale(0.8);
}
.onboarding-icon {
  width: 120px; height: 120px; object-fit: contain;
}
@keyframes onboardingWiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  10% { transform: rotate(-8deg) scale(1.05); }
  20% { transform: rotate(8deg) scale(1.05); }
  30% { transform: rotate(-5deg) scale(1.02); }
  40% { transform: rotate(5deg) scale(1.02); }
  50% { transform: rotate(0deg) scale(1); }
}
#onboardingCanvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 1;
}
/* Hide main content until onboarding is done */
body.onboarding-active .video-bg,
body.onboarding-active .nav,
body.onboarding-active .hero,
body.onboarding-active .about,
body.onboarding-active .work,
body.onboarding-active .logos-section,
body.onboarding-active .section,
body.onboarding-active .footer {
  opacity: 0;
}
body.onboarding-done .hero,
body.onboarding-done .video-bg {
  animation: heroFadeIn 1s ease forwards;
}

:root {
  --orange: #E8A45C;
  --orange-dark: #B87A28;
  --orange-tile: #C4842E;
  --orange-glow: rgba(232, 164, 92, 0.3);
  --charcoal: #2A2A2A;
  --text: #3D3A35;
  --text-light: #6B665D;
  --white: #FFFFFF;
  --glass: rgba(255, 252, 245, 0.65);
  --glass-strong: rgba(255, 252, 245, 0.75);
  --glass-border: rgba(200, 195, 185, 0.3);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 0.25s ease;
}

html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }

body {
  font-family: var(--serif);
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  background: #111;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
.banner-tagline img { max-width: none; height: 99px; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { position: relative; z-index: 2; padding: 120px 0; background: transparent; }
.orange { color: var(--orange); }

/* === PAGE TRANSITION === */
.page-transition {
  position: fixed; inset: 0; z-index: 9999;
  background: #111; opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
}
.page-transition.active { opacity: 1; pointer-events: all; }

/* === VIDEO BACKGROUND === */
.video-bg {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: calc(-1 * env(safe-area-inset-bottom, 60px));
  min-height: 100vh;
  z-index: 0; overflow: hidden;
}
.video-bg canvas { width: 100%; height: 100%; object-fit: cover; display: block; }

/* === GLASS PANEL (reusable) === */
.glass-panel {
  background: var(--glass-strong);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-radius: 20px; padding: 48px;
  box-shadow: var(--glass-shadow);
}

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--serif); font-weight: 500; font-size: 0.95rem;
  padding: 14px 32px; border-radius: 50px; cursor: pointer;
  transition: all var(--transition-fast); border: none; letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--orange); color: #111;
  box-shadow: 0 4px 16px var(--orange-glow);
}
.btn-primary:hover {
  background: var(--orange-dark); color: #111;
  box-shadow: 0 6px 24px rgba(232,164,92,0.4);
  transform: translateY(-2px);
}
.btn-primary svg { stroke: #111; }
.btn-outline {
  background: rgba(255,255,255,0.06); color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.15);
}
.btn-outline:hover {
  border-color: var(--orange); color: var(--orange);
  background: rgba(232,164,92,0.08); transform: translateY(-2px);
}
.btn-small {
  padding: 10px 22px; font-size: 0.85rem;
  background: var(--orange); color: #111; border-radius: 50px;
}

/* === NAVIGATION === */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px; transition: all var(--transition);
  opacity: 0; transform: translateY(-100%); pointer-events: none;
}
.nav.scrolled {
  opacity: 1; transform: translateY(0); pointer-events: all;
  background: linear-gradient(to right, rgba(255,255,255,0.08) 0%, rgba(255,252,245,0.45) 35%, var(--glass) 60%);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid var(--glass-border); padding: 14px 40px;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo-img { height: 28px; width: auto; filter: brightness(1); transition: opacity var(--transition-fast); object-fit: contain; }
.nav-logo-img:hover { opacity: 0.8; }
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a {
  font-family: var(--serif); font-size: 0.9rem; font-weight: 400; color: rgba(45,42,38,0.85);
  transition: color var(--transition-fast); position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1.5px; background: var(--orange-dark); transition: width var(--transition-fast);
}
.nav-links a:hover { color: var(--charcoal); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  background: var(--orange-dark) !important; color: var(--white) !important;
  padding: 10px 24px; border-radius: 50px; font-family: var(--serif); font-weight: 500 !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--orange-tile) !important; }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px; z-index: 1001;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--charcoal); transition: all var(--transition-fast); }

/* === HERO === */
.hero {
  position: relative; z-index: 2; height: 100vh; min-height: 600px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; overflow: hidden;
  padding: 0 24px;
}
.hero-content {
  position: relative; z-index: 2; text-align: center; color: var(--white);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; flex: 1;
  margin-top: auto; margin-bottom: auto; padding-top: 80px;
  transition: opacity 0.15s ease;
}
.hero-logo { margin-bottom: 6px; opacity: 0; animation: heroFadeIn 1.2s ease forwards 0.3s; }
.hero-logo-img {
  max-width: 440px; width: 100%; height: auto;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.5));
}
.hero-logo-fallback {
  font-family: var(--serif); font-size: clamp(3rem, 7vw, 5rem); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.1;
  text-shadow: 0 4px 40px rgba(0,0,0,0.4);
}
.hero-name {
  font-family: var(--serif); font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 24px;
  text-shadow: 0 4px 40px rgba(0,0,0,0.4); opacity: 0;
  animation: fadeSlideUp 1s ease forwards 0.3s;
}

/* Rolodex */
.hero-rolodex { height: 56px; overflow: hidden; margin-bottom: 48px; opacity: 0; animation: fadeSlideUp 1s ease forwards 0.6s; width: 100%; max-width: 560px; }
.rolodex-track { position: relative; height: 56px; width: 100%; }
.rolodex-item {
  position: absolute; top: 0; left: 0; right: 0; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(1.4rem, 3vw, 2.2rem); color: rgba(255,255,255,1);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 4px 32px rgba(0,0,0,0.4); opacity: 0; transform: translateY(-22px);
  transition: opacity 1s ease-in-out, transform 1s ease-in-out; white-space: nowrap;
}
.rolodex-item.active { opacity: 1; transform: translateY(0); }
.rolodex-item.exit { opacity: 0; transform: translateY(22px); }
.rolodex-item[data-font="playfair"] { font-family: 'Playfair Display', serif; font-style: italic; }
.rolodex-item[data-font="bebas"] { font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.15em; text-transform: uppercase; }
.rolodex-item[data-font="caveat"] { font-family: 'Caveat', cursive; font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
.rolodex-item[data-font="cormorant"] { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-style: italic; }
.rolodex-item[data-font="space"] { font-family: 'Space Grotesk', sans-serif; font-weight: 500; letter-spacing: 0.05em; }
.rolodex-item[data-font="dm-serif"] { font-family: 'DM Serif Display', serif; }
.rolodex-item[data-font="baskerville"] { font-family: 'Libre Baskerville', serif; font-style: italic; }
.rolodex-item[data-font="code"] { font-family: 'Space Mono', monospace; font-size: clamp(1.2rem, 2.6vw, 1.9rem); letter-spacing: -0.02em; }
.rolodex-item[data-font="dancing"] { font-family: 'Dancing Script', cursive; font-weight: 700; font-size: clamp(1.9rem, 4vw, 3rem); }

/* Arrow CTA — Fixed bottom of viewport */
.hero-arrow {
  display: flex; align-items: center; justify-content: center;
  position: fixed; bottom: 40px; left: 50%; z-index: 200;
  transform: translateX(-50%);
  color: var(--white); opacity: 0; cursor: pointer;
  transition: color var(--transition-fast), opacity 0.4s ease, transform 0.3s ease;
  text-decoration: none;
  will-change: opacity, transform;
}
.hero-arrow:hover { color: var(--orange-dark); }
.arrow-icon { animation: arrowBounce 2s ease-in-out infinite; filter: drop-shadow(0 2px 10px rgba(0,0,0,0.45)); }
@keyframes arrowBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

/* === SECTION HEADERS === */
.section-header { text-align: center; margin-bottom: 64px; }
.section-title {
  font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600; color: var(--charcoal); margin-bottom: 12px;
}
.section-subtitle { font-size: 1.05rem; color: rgba(45,42,38,0.75); max-width: 600px; margin: 0 auto; }
.section-title-img {
  max-width: 280px; height: auto; margin: 0 auto;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.5));
}
.section-title-wrapper {
  text-align: center; margin-bottom: 40px;
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.section-title-wrapper.visible {
  opacity: 1; transform: translateY(0);
}

/* === HORIZONTAL CAROUSEL === */
.work { position: relative; z-index: 2; padding: 120px 0 80px; background: transparent; overflow: hidden; }
.wireframe-bg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; opacity: 1;
}
.work-header, .carousel-wrapper, .tarot-toggle-wrapper { position: relative; z-index: 1; }
.work-header { text-align: center; padding: 0 24px 16px; }
.work-header .section-title {
  color: var(--white); font-size: clamp(2.5rem, 5vw, 4rem);
  text-shadow: 0 4px 24px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.4);
}
.carousel-wrapper {
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; cursor: grab;
  mask-image: linear-gradient(to right, black 0%, black 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 0%, black 82%, transparent 100%);
}
.carousel-wrapper::-webkit-scrollbar { display: none; }
.carousel-wrapper:active { cursor: grabbing; }
.carousel-track { display: flex; gap: 28px; padding: 20px 80px 40px; width: max-content; }

/* Portrait Cards — icon only, no screenshots */
.carousel-card {
  flex: 0 0 280px; width: 280px;
  background: rgba(255, 252, 245, 0.92);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(200, 195, 185, 0.45);
  border-radius: 20px; overflow: hidden;
  box-shadow: var(--glass-shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column;
}
.carousel-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
}
.card-image { display: none; } /* Screenshots removed — icon only */
.card-info { padding: 20px 24px; flex: 1; display: flex; flex-direction: column; position: relative; text-align: center; align-items: center; }
.card-icon {
  width: 65%; height: auto; border-radius: 0;
  background: none; display: flex;
  align-items: center; justify-content: center; margin: 0 auto 8px;
}
.card-icon svg { stroke: var(--orange-tile); width: 100%; height: auto; }
.card-icon img { width: 100%; height: auto; object-fit: contain; }
.card-category {
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--orange-tile); margin-bottom: 8px;
  text-align: center;
}
/* Hand-drawn arrow */
.card-info::after {
  content: '';
  position: absolute; bottom: 18px; right: 18px;
  width: 28px; height: 28px; opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%23c8842e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 22c8-2 14-4 22-2' /%3E%3Cpath d='M24 14c2 3 4 5 4 6s-2 5-4 8' /%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.carousel-card:hover .card-info::after {
  opacity: 0.8; transform: translateX(4px);
}
/* Locked cards */
.carousel-card.locked { cursor: default; opacity: 1; position: relative; }
.carousel-card.locked:hover { transform: none; box-shadow: var(--glass-shadow); }
.carousel-card.locked .card-info::after { display: none; }
/* Make card-info non-positioned so lock-badge & tooltip anchor to the card */
.carousel-card.locked .card-info { position: static; }
.locked-tooltip {
  position: absolute; bottom: 54px; right: 8px;
  z-index: 20; opacity: 0; visibility: hidden; pointer-events: none;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px; padding: 14px 18px;
  text-align: center; max-width: 200px; white-space: normal;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.locked-tooltip::after {
  content: ''; position: absolute; bottom: -8px; right: 22px;
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #fff;
}
.carousel-card.locked:hover .locked-tooltip,
.carousel-card.locked.active .locked-tooltip {
  opacity: 1; visibility: visible;
}
.tooltip-lock-icon {
  width: 22px; height: 22px; object-fit: contain;
  display: block; margin: 0 auto 8px;
}
.locked-tooltip p {
  font-family: var(--serif) !important; font-size: 0.8rem !important; color: #fff !important;
  line-height: 1.5 !important; margin: 0 !important; flex: none !important; text-align: center; color: rgba(45,42,38,0.85) !important;
}
.lock-badge {
  position: absolute; bottom: 18px; right: 18px;
  width: 28px; height: 28px; object-fit: contain;
  opacity: 0.6;
}
/* Icon wiggle on hover */
@keyframes iconWiggle {
  0% { transform: rotate(0deg); }
  20% { transform: rotate(-12deg); }
  40% { transform: rotate(10deg); }
  60% { transform: rotate(-6deg); }
  80% { transform: rotate(4deg); }
  100% { transform: rotate(0deg); }
}
.carousel-card:hover .card-icon img,
.carousel-card:hover .card-icon svg {
  animation: iconWiggle 0.5s ease;
}
.card-info h3 {
  font-family: var(--serif); font-size: 1.3rem; font-weight: 600;
  color: var(--charcoal); margin-bottom: 10px;
}
.card-info p {
  font-size: 0.88rem; color: rgba(45,42,38,0.88); line-height: 1.55;
  flex: 1; margin-bottom: 16px;
}
.card-date {
  font-size: 0.7rem; font-weight: 500; color: rgba(45,42,38,0.6);
  letter-spacing: 0.05em; text-transform: uppercase;
}

/* === DM FLOATING SOCIAL ICONS === */
.dm-floaters {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; z-index: 0; overflow: visible;
}
.dm-float {
  position: absolute; object-fit: contain;
  animation: dmFloat 4s ease-in-out infinite;
  opacity: 1 !important; pointer-events: auto; cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
}
.dm-float.behind { z-index: 0; opacity: 1; }
.dm-float.front { z-index: 5; opacity: 1; }
.dm-float:hover {
  animation: dmWiggle 0.4s ease;
  opacity: 1 !important; transform: scale(1.3);
}
@keyframes dmFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-10px) rotate(4deg); }
  50% { transform: translateY(-5px) rotate(-3deg); }
  75% { transform: translateY(-12px) rotate(3deg); }
}
@keyframes dmWiggle {
  0% { transform: scale(1.3) rotate(0deg); }
  20% { transform: scale(1.5) rotate(-18deg); }
  40% { transform: scale(1.3) rotate(14deg); }
  60% { transform: scale(1.5) rotate(-10deg); }
  80% { transform: scale(1.3) rotate(6deg); }
  100% { transform: scale(1.3) rotate(0deg); }
}
/* Pinned emoji on each testimonial card */
.bubble-emoji {
  position: absolute; top: -18px; right: -14px;
  width: 48px; height: 48px; object-fit: contain;
  z-index: 10; opacity: 1; pointer-events: none;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.2));
  transform: rotate(8deg);
}
/* Hearts burst on card click — firework style — BEHIND tiles */
.heart-burst {
  position: fixed; pointer-events: none; z-index: 1;
  object-fit: contain;
  animation: heartFirework var(--burst-duration, 1.4s) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes heartFirework {
  0% { transform: scale(0.3) translate(0, 0); opacity: 1; }
  20% { transform: scale(1.1) translate(var(--burst-x, 0), var(--burst-y, -30px)); opacity: 1; }
  60% { transform: scale(0.9) translate(calc(var(--burst-x, 0) * 1.3), calc(var(--burst-y, -60px) * 1.5)); opacity: 0.7; }
  100% { transform: scale(0.4) translate(calc(var(--burst-x, 0) * 1.5), calc(var(--burst-y, -100px) * 2.2)); opacity: 0; }
}

/* === TESTIMONIALS — HORIZONTAL CAROUSEL === */
.testimonials.section { padding: 80px 0; }
.testimonials .container { max-width: 100%; padding: 0; }
.testimonials-wrapper {
  position: relative; overflow: hidden; width: 100vw; margin-left: calc(-50vw + 50%);
}
.testimonials-wrapper::before, .testimonials-wrapper::after { display: none; }
.testimonials-track {
  display: flex; gap: 24px; padding: 20px 0;
  animation: testimonialScroll 40s linear infinite;
  width: max-content;
}
@keyframes testimonialScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.testimonials-track:hover { animation-play-state: paused; }
.speech-bubble { flex-shrink: 0; }
.bubble-content {
  background: var(--glass-strong);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 28px 32px 20px; box-shadow: var(--glass-shadow);
  height: 220px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: visible;
}
.bubble-content p {
  font-family: var(--serif); font-size: 0.95rem; font-style: normal;
  line-height: 1.65; color: rgba(45,42,38,0.85); position: relative; z-index: 1;
  flex: 1;
}
.bubble-footer {
  display: flex; align-items: center; gap: 10px; margin-top: 12px;
  position: relative; z-index: 1;
}
.bubble-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(200,132,46,0.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.bubble-avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.bubble-avatar svg { stroke: var(--orange-tile); }
.bubble-author {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 0.82rem; color: var(--orange-tile);
}
.bubble-author strong { color: var(--charcoal); line-height: 1.2; }
.bubble-author span { font-size: 0.75rem; color: var(--orange-tile); line-height: 1.2; }
.bubble-wide { width: 420px; }
.bubble-medium { width: 360px; }
.bubble-narrow { width: 300px; }

/* === ABOUT === */
.about-banner {
  position: relative; overflow: visible;
  margin: 0 -24px 48px; max-height: 360px;
}
.about-banner img { width: 100%; height: 360px; object-fit: cover; display: block; }
/* Banner edge fading removed */
.banner-tagline {
  position: absolute; top: calc(45% - 24px); left: 120px; transform: translateY(-50%);
  z-index: 10; pointer-events: none;
}
.banner-tagline-img {
  height: 130px !important; max-height: 130px !important; width: auto !important; max-width: none !important;
  object-fit: contain;
  overflow: visible;
}
.about-blocks {
  display: flex; flex-direction: column; align-items: center;
  gap: 48px; max-width: 860px; margin: 0 auto;
}
.about-block {
  max-width: 620px; width: 100%; text-align: left; padding: 32px 40px;
  align-self: center;
}
.about-block p { margin-bottom: 12px; color: rgba(45,42,38,0.88); font-size: 1rem; line-height: 1.7; text-align: left; }
.about-block p:last-child { margin-bottom: 0; }
.about-block strong { color: var(--orange-tile); }

/* Skills — Separate floating boxes */
.skills-floating {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-top: 32px;
  align-items: start;
}
.skill-box {
  padding: 20px 18px;
  animation: floatSkill 4s ease-in-out infinite;
  display: flex; flex-direction: column;
  min-height: 360px;
}
/* Desktop stagger — use position so it doesn't affect grid height or animation */
.skill-box:nth-child(odd)  { position: relative; top: 0; }
.skill-box:nth-child(even) { position: relative; top: 44px; }
.skill-box:nth-child(2) { animation-delay: 0.5s; }
.skill-box:nth-child(3) { animation-delay: 1s; }
.skill-box:nth-child(4) { animation-delay: 1.5s; }
@keyframes floatSkill {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.skill-icon {
  width: 100%; display: flex; justify-content: center; margin-bottom: 16px;
}
.skill-icon img {
  width: 60%; max-width: 140px; height: auto; object-fit: contain;
}
.skill-box h4 {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 600;
  color: var(--orange-tile); margin-bottom: 14px; text-align: center;
}
.skill-box ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; align-items: center; }
.skill-box li {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.85rem; color: rgba(45,42,38,0.88); padding: 3px 0;
  line-height: 1.3; text-align: center; justify-content: center;
}
.skill-box li svg { stroke: var(--orange-tile); opacity: 0.7; flex-shrink: 0; }

/* === RESUME === */
.resume-timeline {
  display: flex; flex-direction: column; gap: 20px;
  max-width: 800px; margin: 0 auto;
}
.resume-entry, .resume-education {
  padding: 28px 36px;
}
.resume-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 12px; gap: 16px;
}
.resume-entry h3, .resume-education h3 {
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600;
  color: var(--charcoal); margin-bottom: 4px;
}
.resume-company {
  font-size: 0.85rem; font-weight: 500; color: var(--orange-tile);
}
.resume-date {
  font-size: 0.75rem; font-weight: 500; color: rgba(45,42,38,0.6);
  white-space: nowrap; letter-spacing: 0.05em; text-transform: uppercase;
  padding-top: 4px;
}
.resume-entry, .resume-education { position: relative; overflow: hidden; }
.resume-entry p, .resume-education p {
  font-size: 0.92rem; color: rgba(45,42,38,0.88); line-height: 1.65;
  position: relative; z-index: 1;
}
.resume-header { position: relative; z-index: 1; }
.resume-watermark {
  position: absolute; bottom: -20px; right: -20px;
  width: 140px; height: 140px; object-fit: contain;
  opacity: 0.17; pointer-events: none; z-index: 0;
  transform: rotate(-15deg);
}

/* === CONTACT — Minimal === */
.contact-minimal {
  display: flex; justify-content: center; padding: 20px 0;
}
@keyframes rainbowShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.btn-chat {
  display: inline-flex; align-items: center; gap: 12px;
  background: linear-gradient(120deg,
    #f87c7c, #f4a86e, #f5d97a, #8de08a, #6abdf5, #9b8cf7, #d47cf5, #f87c7c);
  background-size: 300% 300%;
  animation: rainbowShift 5s ease infinite;
  color: #fff;
  font-family: var(--serif); font-weight: 700; font-size: 1.2rem;
  padding: 18px 44px; border-radius: 60px; cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  border: none;
  box-shadow: 0 6px 28px rgba(180,120,220,0.35), 0 2px 8px rgba(0,0,0,0.2);
  text-decoration: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
  filter: saturate(0.82) brightness(1.05);
}
.btn-chat svg { stroke: #fff; }
.btn-chat-avatar {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
}
.btn-chat:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 40px rgba(160,100,240,0.45), 0 4px 12px rgba(0,0,0,0.2);
  filter: saturate(1) brightness(1.08);
}

/* === FOOTER === */
.footer {
  position: relative; z-index: 2; padding: 24px 0 16px;
  text-align: center;
  background: linear-gradient(to right, rgba(255,255,255,0.08) 0%, rgba(255,252,245,0.6) 30%, rgba(255,252,245,0.65) 50%, rgba(255,252,245,0.6) 70%, rgba(255,255,255,0.08) 100%);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border-top: 1px solid var(--glass-border);
  border-radius: 0;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; position: relative; }
.footer-logo { display: flex; align-items: center; }
.footer-logo-img { height: 32px; width: auto; opacity: 0.7; }
.footer-socials { display: flex; gap: 20px; }
.footer-socials a {
  width: 40px; height: 40px; border-radius: 50%;
  background: transparent; border: none;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast);
}
.footer-socials a svg { stroke: var(--orange-dark); transition: stroke var(--transition-fast); }
.footer-socials a:hover {
  transform: translateY(-2px) scale(1.1);
}
.footer-socials a:hover svg { stroke: var(--orange-tile); }
.footer p { font-size: 0.8rem; color: rgba(45,42,38,0.65); }
@keyframes catBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  20% { transform: translateY(-10px) rotate(-6deg); }
  40% { transform: translateY(-4px) rotate(4deg); }
  60% { transform: translateY(-8px) rotate(-3deg); }
  80% { transform: translateY(-2px) rotate(2deg); }
}
.catbounce-btn {
  display: flex; align-items: center; justify-content: center;
  position: absolute; top: -36px; left: 50%; transform: translateX(-50%);
  background: none; border: none; padding: 0; cursor: pointer;
  z-index: 10;
}
.catbounce-btn img {
  width: 48px; height: 48px; object-fit: contain;
  animation: catBounce 2.4s ease-in-out infinite;
  border-radius: 12px;
}
.catbounce-btn:hover img { animation-duration: 0.8s; }
/* Cat bounce overlay */
.cat-bounce-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 9999; overflow: hidden;
}
.cat-bounce-overlay.active { pointer-events: auto; }
.bounce-cat {
  position: absolute; width: 100px; height: auto;
  pointer-events: none; z-index: 10000;
  will-change: transform;
}

/* === FOREST MUTE BUTTON === */
@keyframes bird-wiggle {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(-12deg); }
  30%  { transform: rotate(11deg); }
  45%  { transform: rotate(-9deg); }
  60%  { transform: rotate(7deg); }
  75%  { transform: rotate(-4deg); }
  90%  { transform: rotate(2deg); }
  100% { transform: rotate(0deg); }
}
.forest-mute-btn {
  position: fixed; bottom: 12px; left: 12px; z-index: 999;
  width: 52px; height: 52px;
  background: none; border: none; box-shadow: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.forest-mute-btn:hover img {
  animation: bird-wiggle 0.55s ease forwards;
}
.forest-mute-btn img { width: 44px; height: 44px; object-fit: contain; display: block; filter: drop-shadow(0 3px 8px rgba(0,0,0,0.35)); }
.bird-tooltip {
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  font-family: var(--serif); font-size: 0.72rem; font-weight: 600;
  color: var(--charcoal); background: rgba(255,252,240,0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 4px 10px; border-radius: 6px; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  pointer-events: none; opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.bird-tooltip::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: rgba(255,252,240,0.85);
}
/* Show Kill when bird is alive (not muted) */
.forest-mute-btn[data-muted="false"]:hover .bird-tooltip--kill {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
/* Show Resurrect when bird is dead (muted) */
.forest-mute-btn[data-muted="true"]:hover .bird-tooltip--resurrect {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* === BIRD CINEMATIC FLYTHROUGH === */
.bird-cinematic {
  position: fixed; left: 50%; z-index: 9999;
  pointer-events: none; width: 80px; height: auto;
  will-change: transform;
}
@keyframes birdFall {
  from { transform: translate(-50%, 0); }
  to   { transform: translate(-50%, calc(100vh + 160px)); }
}
@keyframes birdRise {
  from { transform: translate(-50%, 0); }
  to   { transform: translate(-50%, calc(-100vh - 160px)); }
}

/* === FLOATING BACK BUTTON (case study pages) === */
.floating-back {
  position: fixed; bottom: 28px; left: 28px; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(120deg, #f87c7c, #f4a86e, #f5d97a, #8de08a, #6abdf5, #9b8cf7, #d47cf5, #f87c7c);
  background-size: 300% 300%;
  animation: rainbowShift 5s ease infinite;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 28px rgba(180,120,220,0.35), 0 2px 8px rgba(0,0,0,0.2);
  transition: all var(--transition-fast); cursor: pointer;
  text-decoration: none;
  filter: saturate(0.82) brightness(1.05);
}
.floating-back svg { stroke: #fff; }
.floating-back:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 12px 40px rgba(160,100,240,0.45), 0 4px 12px rgba(0,0,0,0.2);
  filter: saturate(1) brightness(1.08);
}

/* === NEXT CASE STUDY BUTTON === */
.floating-next {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s ease;
}
.floating-next--visible {
  opacity: 1; pointer-events: all;
}
.floating-next img {
  width: 44px; height: 44px; object-fit: contain; display: block;
}
.floating-next:hover img {
  animation: bird-wiggle 0.55s ease forwards;
}
.floating-next--wiggling img {
  animation: bird-wiggle 0.8s ease-in-out infinite;
}
.next-tooltip {
  position: absolute; bottom: calc(100% + 8px); right: 0;
  transform: translateY(4px);
  font-family: var(--serif); font-size: 0.72rem; font-weight: 600;
  color: var(--charcoal); background: rgba(255,252,240,0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 4px 10px; border-radius: 6px; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  pointer-events: none; opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.next-tooltip::after {
  content: ''; position: absolute; top: 100%; right: 10px;
  border: 5px solid transparent; border-top-color: rgba(255,252,240,0.85);
}
.floating-next:hover .next-tooltip {
  opacity: 1; transform: translateY(0);
}

/* === RESUME DOWNLOAD BUTTON === */
.resume-download-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 36px; border-radius: 100px;
  background: linear-gradient(120deg, #f87c7c, #f4a86e, #f5d97a, #8de08a, #6abdf5, #9b8cf7, #d47cf5, #f87c7c);
  background-size: 300% 300%;
  animation: rainbowShift 5s ease infinite;
  color: #fff; font-family: var(--serif); font-size: 1.05rem; font-weight: 700;
  letter-spacing: 0.02em; text-decoration: none;
  box-shadow: 0 6px 28px rgba(180,120,220,0.35), 0 2px 8px rgba(0,0,0,0.15);
  filter: saturate(0.85) brightness(1.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.resume-download-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 40px rgba(160,100,240,0.45), 0 4px 12px rgba(0,0,0,0.2);
  filter: saturate(1) brightness(1.08);
}
.resume-download-btn svg { flex-shrink: 0; }

/* === SCROLL ANIMATIONS === */
.animate-in {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  transition-delay: var(--delay, 0s);
}
.animate-in.visible { opacity: 1; transform: translateY(0); }

@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes heroFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* === ARTSY ICONS ON ABOUT BLOCKS === */
.about-block { position: relative; overflow: visible; }

.artsy-icon-link {
  position: absolute; z-index: 3; display: block;
  width: 80px; height: 80px; text-decoration: none;
  animation: artsy-float 3.5s ease-in-out infinite;
}
.artsy-icon-link img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.18));
  transform: rotate(var(--base-rot, 0deg));
  transition: filter 0.25s ease, transform 0.25s ease;
}
.artsy-icon-link:hover img {
  filter: drop-shadow(0 6px 22px rgba(0,0,0,0.28)) drop-shadow(0 0 14px rgba(255,200,80,0.55));
  transform: rotate(var(--base-rot, 0deg)) scale(1.18);
}
.icon-tooltip {
  position: absolute; bottom: -28px; left: 50%; transform: translateX(-50%);
  font-family: var(--serif); font-size: 0.72rem; font-weight: 600;
  color: var(--charcoal); background: rgba(255,252,240,0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 4px 12px; border-radius: 20px; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.artsy-icon-link:hover .icon-tooltip,
.catbounce-btn:hover .icon-tooltip {
  opacity: 1;
}
.artsy-icon--wiggle {
  animation: artsy-float 3.5s ease-in-out infinite;
}
@keyframes artsy-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}
@media (max-width: 768px) {
  .artsy-icon-link { width: 60px; height: 60px; }
}
@keyframes wiggle {
  0% { transform: rotate(0deg); }
  20% { transform: rotate(-12deg); }
  40% { transform: rotate(10deg); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(6deg); }
  100% { transform: rotate(0deg); }
}

/* === CLIENT LOGOS CAROUSEL === */
.logos-section {
  position: relative; z-index: 2;
  padding: 24px 0 20px; background: transparent;
  margin-top: 0;
}
.logos-label {
  font-family: var(--serif); font-size: 1rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: none;
  color: rgba(255,252,240,1); text-align: center;
  margin: 0 0 14px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.45);
}
.logos-wrapper {
  position: relative; width: 100%; overflow: hidden;
  /* translateZ(0) forces GPU layer — fixes iOS Safari bug where
     overflow:hidden + -webkit-mask-image + animated child = blank content */
  transform: translateZ(0); -webkit-transform: translateZ(0);
  mask-image: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
}
.logos-track {
  display: flex; align-items: center; gap: 72px;
  animation: scrollLogos 35s linear infinite;
  width: max-content;
  will-change: transform; transform: translateZ(0);
}
.logo-item {
  height: 48px; width: auto; opacity: 1;
  filter: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
}
.logo-item:hover { opacity: 1; transform: scale(1.1); }
@keyframes scrollLogos {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* === PAPER AIRPLANE ANIMATION === */
.chat-btn-wrapper { position: relative; display: inline-block; z-index: 9999; }
.btn-chat { position: relative; z-index: 10000; }
.planes-container {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 9997; overflow: hidden;
  display: none;
}
.planes-container.active { display: block; }
.plane {
  position: absolute; width: 40px; height: 40px; object-fit: contain;
  opacity: 0; pointer-events: none;
}
.plane.flying {
  opacity: 1;
  animation-duration: 5s;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  will-change: transform, opacity;
}
/* 8 flight paths — start big behind button, shrink as they fly */
@keyframes flightPath0 {
  0% { transform: translate(0, 0) rotate(-50deg) scale(1.8); opacity: 0; }
  1% { opacity: 1; }
  10% { transform: translate(90px, -180px) rotate(-48deg) scale(1.6); }
  20% { transform: translate(190px, -290px) rotate(-40deg) scale(1.4); }
  30% { transform: translate(310px, -310px) rotate(-25deg) scale(1.2); }
  40% { transform: translate(430px, -260px) rotate(-5deg) scale(1.05); }
  50% { transform: translate(540px, -150px) rotate(15deg) scale(0.9); }
  60% { transform: translate(640px, 10px) rotate(30deg) scale(0.78); }
  70% { transform: translate(730px, 200px) rotate(42deg) scale(0.65); }
  80% { transform: translate(810px, 400px) rotate(52deg) scale(0.52); }
  90% { transform: translate(880px, 610px) rotate(58deg) scale(0.4); }
  100% { transform: translate(950px, 830px) rotate(62deg) scale(0.3); }
}
@keyframes flightPath1 {
  0% { transform: translate(0, 0) rotate(230deg) scale(1.8); opacity: 0; }
  1% { opacity: 1; }
  10% { transform: translate(-100px, -190px) rotate(232deg) scale(1.6); }
  20% { transform: translate(-210px, -300px) rotate(226deg) scale(1.4); }
  30% { transform: translate(-340px, -320px) rotate(210deg) scale(1.2); }
  40% { transform: translate(-460px, -270px) rotate(192deg) scale(1.05); }
  50% { transform: translate(-570px, -160px) rotate(172deg) scale(0.9); }
  60% { transform: translate(-670px, 0px) rotate(155deg) scale(0.78); }
  70% { transform: translate(-760px, 190px) rotate(140deg) scale(0.65); }
  80% { transform: translate(-840px, 390px) rotate(130deg) scale(0.52); }
  90% { transform: translate(-910px, 600px) rotate(122deg) scale(0.4); }
  100% { transform: translate(-980px, 820px) rotate(118deg) scale(0.3); }
}
@keyframes flightPath2 {
  0% { transform: translate(0, 0) rotate(-60deg) scale(1.8); opacity: 0; }
  1% { opacity: 1; }
  10% { transform: translate(70px, -200px) rotate(-58deg) scale(1.6); }
  20% { transform: translate(150px, -330px) rotate(-52deg) scale(1.4); }
  30% { transform: translate(250px, -370px) rotate(-35deg) scale(1.2); }
  40% { transform: translate(360px, -330px) rotate(-15deg) scale(1.05); }
  50% { transform: translate(460px, -230px) rotate(8deg) scale(0.9); }
  60% { transform: translate(550px, -80px) rotate(25deg) scale(0.78); }
  70% { transform: translate(630px, 110px) rotate(38deg) scale(0.65); }
  80% { transform: translate(700px, 310px) rotate(48deg) scale(0.52); }
  90% { transform: translate(760px, 520px) rotate(55deg) scale(0.4); }
  100% { transform: translate(830px, 750px) rotate(60deg) scale(0.3); }
}
@keyframes flightPath3 {
  0% { transform: translate(0, 0) rotate(240deg) scale(1.8); opacity: 0; }
  1% { opacity: 1; }
  10% { transform: translate(-80px, -210px) rotate(242deg) scale(1.6); }
  20% { transform: translate(-170px, -340px) rotate(236deg) scale(1.4); }
  30% { transform: translate(-280px, -380px) rotate(218deg) scale(1.2); }
  40% { transform: translate(-390px, -340px) rotate(200deg) scale(1.05); }
  50% { transform: translate(-490px, -240px) rotate(180deg) scale(0.9); }
  60% { transform: translate(-580px, -90px) rotate(162deg) scale(0.78); }
  70% { transform: translate(-660px, 100px) rotate(148deg) scale(0.65); }
  80% { transform: translate(-730px, 300px) rotate(136deg) scale(0.52); }
  90% { transform: translate(-790px, 510px) rotate(126deg) scale(0.4); }
  100% { transform: translate(-860px, 740px) rotate(120deg) scale(0.3); }
}
@keyframes flightPath4 {
  0% { transform: translate(0, 0) rotate(-42deg) scale(1.8); opacity: 0; }
  1% { opacity: 1; }
  10% { transform: translate(110px, -160px) rotate(-40deg) scale(1.6); }
  20% { transform: translate(230px, -260px) rotate(-34deg) scale(1.4); }
  30% { transform: translate(360px, -280px) rotate(-18deg) scale(1.2); }
  40% { transform: translate(490px, -230px) rotate(0deg) scale(1.05); }
  50% { transform: translate(600px, -120px) rotate(18deg) scale(0.9); }
  60% { transform: translate(700px, 40px) rotate(32deg) scale(0.78); }
  70% { transform: translate(790px, 230px) rotate(44deg) scale(0.65); }
  80% { transform: translate(870px, 430px) rotate(54deg) scale(0.52); }
  90% { transform: translate(940px, 640px) rotate(60deg) scale(0.4); }
  100% { transform: translate(1010px, 870px) rotate(65deg) scale(0.3); }
}
@keyframes flightPath5 {
  0% { transform: translate(0, 0) rotate(222deg) scale(1.8); opacity: 0; }
  1% { opacity: 1; }
  10% { transform: translate(-120px, -170px) rotate(224deg) scale(1.6); }
  20% { transform: translate(-250px, -270px) rotate(218deg) scale(1.4); }
  30% { transform: translate(-390px, -290px) rotate(202deg) scale(1.2); }
  40% { transform: translate(-520px, -240px) rotate(185deg) scale(1.05); }
  50% { transform: translate(-630px, -130px) rotate(168deg) scale(0.9); }
  60% { transform: translate(-730px, 30px) rotate(152deg) scale(0.78); }
  70% { transform: translate(-820px, 220px) rotate(138deg) scale(0.65); }
  80% { transform: translate(-900px, 420px) rotate(128deg) scale(0.52); }
  90% { transform: translate(-970px, 630px) rotate(120deg) scale(0.4); }
  100% { transform: translate(-1040px, 860px) rotate(115deg) scale(0.3); }
}
@keyframes flightPath6 {
  0% { transform: translate(0, 0) rotate(-55deg) scale(1.8); opacity: 0; }
  1% { opacity: 1; }
  10% { transform: translate(80px, -190px) rotate(-53deg) scale(1.6); }
  20% { transform: translate(170px, -310px) rotate(-48deg) scale(1.4); }
  30% { transform: translate(275px, -350px) rotate(-30deg) scale(1.2); }
  40% { transform: translate(385px, -310px) rotate(-10deg) scale(1.05); }
  50% { transform: translate(485px, -210px) rotate(12deg) scale(0.9); }
  60% { transform: translate(575px, -60px) rotate(28deg) scale(0.78); }
  70% { transform: translate(660px, 130px) rotate(40deg) scale(0.65); }
  80% { transform: translate(735px, 330px) rotate(50deg) scale(0.52); }
  90% { transform: translate(800px, 540px) rotate(56deg) scale(0.4); }
  100% { transform: translate(870px, 770px) rotate(60deg) scale(0.3); }
}
@keyframes flightPath7 {
  0% { transform: translate(0, 0) rotate(235deg) scale(1.8); opacity: 0; }
  1% { opacity: 1; }
  10% { transform: translate(-90px, -200px) rotate(237deg) scale(1.6); }
  20% { transform: translate(-190px, -320px) rotate(232deg) scale(1.4); }
  30% { transform: translate(-305px, -360px) rotate(215deg) scale(1.2); }
  40% { transform: translate(-415px, -320px) rotate(196deg) scale(1.05); }
  50% { transform: translate(-520px, -220px) rotate(176deg) scale(0.9); }
  60% { transform: translate(-610px, -70px) rotate(158deg) scale(0.78); }
  70% { transform: translate(-695px, 120px) rotate(144deg) scale(0.65); }
  80% { transform: translate(-770px, 320px) rotate(132deg) scale(0.52); }
  90% { transform: translate(-835px, 530px) rotate(124deg) scale(0.4); }
  100% { transform: translate(-900px, 760px) rotate(118deg) scale(0.3); }
}

/* === CASE STUDY PAGE STYLES === */
.case-study-hero {
  padding: 140px 24px 60px; text-align: center;
  background: transparent;
}
.case-study-hero .container {
  max-width: 800px; margin: 0 auto;
}
.case-study-hero .tile-category { display: block; margin-bottom: 8px; }
.tile-category {
  font-family: var(--serif); font-size: 0.8rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: rgba(255,255,255,0.92);
}
.case-study-hero h1 {
  font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700; color: #fff; margin-bottom: 20px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3), 0 1px 3px rgba(0,0,0,0.2);
}
.case-study-details {
  background: var(--glass-strong);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 28px 36px; max-width: 700px; margin: 0 auto;
}
.case-study-hero p { font-size: 1rem; color: rgba(45,42,38,0.88); max-width: 700px; margin: 0 auto; text-align: left; line-height: 1.6; }
.case-study-meta { display: flex; justify-content: center; gap: 36px; margin-top: 20px; flex-wrap: wrap; }
.meta-item { text-align: center; }
.meta-item h4 { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(45,42,38,0.65); margin-bottom: 4px; }
.meta-item p { font-size: 0.95rem; color: var(--charcoal); text-align: center; }
/* === USERS SECTION === */
.cs-users {
  padding: 20px 32px 0; max-width: 1100px; margin: 0 auto;
}
@media (max-width: 768px) {
  .cs-users { padding: 12px 16px 0; }
}
.cs-users-label {
  display: block; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,252,240,1); margin-bottom: 14px;
  text-align: center;
}
.cs-user-pills {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}
.cs-user-pill {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--serif); font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.01em; text-transform: none;
  color: var(--charcoal);
  background: rgba(255,252,240,0.6);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  padding: 6px 16px 6px 6px; border-radius: 100px;
}
.cs-user-pill img {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.cs-user-pill:nth-child(1) { animation: pillFloat 4s ease-in-out infinite; }
.cs-user-pill:nth-child(2) { animation: pillFloat 4s ease-in-out infinite 0.6s; }
.cs-user-pill:nth-child(3) { animation: pillFloat 4s ease-in-out infinite 1.2s; }
.cs-user-pill:nth-child(4) { animation: pillFloat 4s ease-in-out infinite 1.8s; }
.cs-user-pill:nth-child(5) { animation: pillFloat 4s ease-in-out infinite 2.4s; }
@keyframes pillFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Screenshot crawler banner — two-row staggered */
.screenshot-crawler {
  width: 100vw; margin-left: calc(-50vw + 50%);
  overflow: hidden; padding: 20px 0; position: relative;
}
.crawler-rows {
  display: flex; flex-direction: column; gap: 0; margin-top: -40px;
  width: max-content;
}
.crawler-track {
  display: flex; width: max-content;
  animation: crawlScreenshots 40s linear infinite;
  will-change: transform; transform: translateZ(0);
}
.crawler-track.row-bottom {
  margin-top: -80px;
  margin-left: 140px;
  animation-direction: reverse;
  animation-duration: 45s;
}
.crawler-track img {
  height: 180px; width: auto; border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.12);
  flex-shrink: 0; object-fit: cover;
  margin-right: 28px;
}
.crawler-track img:nth-child(20) { transform: translateY(55px) rotate(2deg); }
@keyframes crawlScreenshots {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes floatScreenshot {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.case-study-gallery { padding: 0 0 120px; }
.gallery-grid { display: grid; grid-template-columns: 1fr; gap: 32px; max-width: 1000px; margin: 0 auto; }
.gallery-item {
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 14px 40px rgba(0,0,0,0.3);
  transition: transform var(--transition);
}
.gallery-item:hover { transform: translateY(-4px); }
.gallery-item img { width: 100%; height: auto; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  /* testimonials carousel is full-width, no grid change needed */
  .skills-floating { grid-template-columns: repeat(2, 1fr); }
  .carousel-card { flex: 0 0 260px; width: 260px; }
}
@media (max-width: 768px) {
  .nav { padding: 16px 24px; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 0; left: -100%; width: 100%; height: 100vh;
    flex-direction: column; justify-content: center; align-items: center;
    background: rgba(255, 252, 245, 0.92);
    backdrop-filter: blur(28px) saturate(1.6);
    -webkit-backdrop-filter: blur(28px) saturate(1.6);
    gap: 36px; transition: left 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    border: none; box-shadow: none;
  }
  .nav-links.open { left: 0; }
  .nav-links a { color: var(--charcoal) !important; font-size: 1.5rem; font-weight: 400; letter-spacing: 0.01em; }
  .nav-links a:hover { color: var(--charcoal) !important; }
  .nav-links a::after { background: var(--orange-dark); }
  .nav-toggle.open span { background: var(--charcoal); }
  .nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
  .section { padding: 80px 0; }
  /* testimonials carousel handles mobile */
  .skills-floating { grid-template-columns: 1fr; width: 260px; max-width: 88vw; margin: 20px auto 0; row-gap: 0; }
  .skill-box { padding: 16px; width: 210px; min-height: 380px; position: relative; top: 0; }
  .skill-box:nth-child(odd)  { top: 0; justify-self: center; margin-left: -44px; }
  .skill-box:nth-child(even) { top: 0; justify-self: center; margin-left: 44px; }
  .skill-box:not(:first-child) { margin-top: -24px; }
  .skill-box:nth-child(1) { z-index: 1; }
  .skill-box:nth-child(2) { z-index: 2; }
  .skill-box:nth-child(3) { z-index: 3; }
  .skill-box:nth-child(4) { z-index: 4; }
  .skill-box li { justify-content: center; }
  .skill-box ul { text-align: center; }
  .contact-links { flex-direction: column; align-items: center; }
  .hero-rolodex { height: 36px; }
  .rolodex-track { height: 36px; }
  .rolodex-item { height: 36px; }
  .carousel-card { flex: 0 0 72vw; width: 72vw; max-width: 300px; min-height: 480px; }
  .carousel-track { padding: 20px 0 40px 20px; gap: 16px; }
  .work { padding: 24px 0 60px; overflow: visible; }
  .wireframe-bg { overflow: hidden; }
  .carousel-wrapper { overflow-x: auto; overflow-y: hidden; }
  .work .section-title-wrapper { margin-bottom: 8px; }
  .glass-panel { padding: 32px 24px; }
  .about-blocks { padding: 0 24px; gap: 32px; align-items: center; }
  .about-block { max-width: 100%; width: 100%; padding: 28px 24px; align-self: center; margin: 0 auto; text-align: left; }
  .about-block p { text-align: left; }
  .bubble-wide { width: min(420px, 90vw); }
  .bubble-medium { width: min(360px, 82vw); }
  .bubble-narrow { width: min(300px, 76vw); }
  .catbounce-btn { top: -48px; }
  /* Case study splits — body copy left, meta centered on mobile */
  .case-study-details { padding: 24px 20px; text-align: left; }
  .case-study-hero p { text-align: left; }
  .case-study-meta { flex-direction: column; gap: 16px; align-items: center; }
  .meta-item { text-align: center; width: 100%; }
  .meta-item p { text-align: center !important; }
  .cs-users { text-align: center; }
  .cs-split-img--single { margin: 4px auto 4px; max-width: 92vw; }
  .cs-split-img:not(.cs-split-img--single) { max-width: 100%; margin: 4px 0; }
  .cs-split-img--single .cs-img-item { border-radius: 10px; overflow: hidden; }
  .resume-header { flex-direction: column; gap: 4px; }
  .resume-date { padding-top: 0; }
  .banner-tagline { left: 4px; top: 6px; transform: none; }
  .banner-tagline img { height: 60px; }
  .banner-tagline-img { height: 72px !important; max-height: 72px !important; }
  .about-banner { margin: 0 -24px 32px; }
  .about-banner img { height: 240px; }
  .hero-logo-img { max-width: 280px; }
  .hero-arrow { bottom: 28px; }
  /* Screenshot crawler — tighter on mobile */
  .screenshot-crawler { padding: 12px 0; }
  .crawler-track img { height: 120px; margin-right: 16px; }
  .crawler-track.row-bottom { margin-top: -50px; margin-left: 24px; }
  /* Case study hero — full-bleed crawler */
  .case-study-hero { padding: 120px 16px 40px; overflow-x: hidden; }
  .case-study-hero .container { max-width: 100%; overflow: visible; }
  .screenshot-crawler { width: calc(100% + 32px); margin-left: -16px; overflow: hidden; }
  /* Logos — ensure animation runs on iOS */
  .logos-track { will-change: transform; }
  /* Chat button — center on mobile */
  .contact-minimal { flex-direction: column; align-items: center; }
  .chat-btn-wrapper { display: flex; justify-content: center; width: 100%; }
}

/* === TAROT MODE === */
.tarot-toggle-wrapper {
  display: flex; align-items: center; justify-content: center;
  margin: 24px auto 8px;
}
.tarot-crystal-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer; padding: 0;
  user-select: none; transition: transform 0.2s ease;
}
.tarot-crystal-btn:hover { transform: scale(1.06); }
.tarot-crystal-btn {
  position: relative;
}
.tarot-crystal-img-wrap {
  width: 72px; height: 72px; position: relative; margin: 0 auto 8px;
}
.tarot-crystal-img {
  width: 72px; height: 72px; object-fit: contain;
  transition: opacity 0.35s ease, transform 0.35s ease;
  position: absolute; top: 0; left: 0;
}
.tarot-crystal-off { opacity: 1; }
.tarot-crystal-on  { opacity: 0; filter: drop-shadow(0 0 16px rgba(144,64,204,0.9)) drop-shadow(0 0 32px rgba(144,64,204,0.5)); }
.tarot-crystal-btn.active .tarot-crystal-off { opacity: 0; }
.tarot-crystal-btn.active .tarot-crystal-on  { opacity: 1; transform: scale(1.08); }
.tarot-tooltip {
  position: absolute; top: -36px; left: 50%; transform: translateX(-50%) translateY(4px);
  font-family: var(--serif); font-size: 0.72rem; font-weight: 600;
  color: var(--charcoal); background: rgba(255,252,240,0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 3px 10px; border-radius: 20px; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.tarot-crystal-btn:hover .tarot-tooltip {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* Card flip */
.carousel-card { perspective: 1000px; }
.card-flip-inner {
  position: relative; width: 100%; flex: 1;
  display: flex; flex-direction: column;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.card-front {
  position: relative; z-index: 2; flex: 1;
  display: flex; flex-direction: column;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.card-back, .card-character {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 20px; overflow: hidden;
  align-items: center; justify-content: center;
  background: #1a1333;
}
.card-back { display: flex; }
.card-character { display: none; }
.card-back {
  transform: rotateY(180deg); z-index: 1;
}
.card-back img, .card-character img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 20px;
}

/* === CASE STUDY NAV === */
.cs-nav {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 780px; margin: 0 auto; padding: 0 32px 48px;
}
.cs-nav a {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 0.95rem; font-weight: 600;
  color: rgba(255,252,240,0.7); text-decoration: none;
  transition: color var(--transition-fast);
}
.cs-nav a:hover { color: rgba(255,252,240,1); }
.cs-nav a svg { stroke: currentColor; transition: transform var(--transition-fast); }
.cs-nav a:first-child:hover svg { transform: translateX(-4px); }
.cs-nav a:last-child:hover svg { transform: translateX(4px); }
.cs-nav-spacer { flex: 1; }
@media (max-width: 768px) {
  .cs-nav { padding: 0 16px 32px; }
  .cs-nav a { font-size: 0.85rem; }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .crawler-track { animation: none !important; }
  .testimonials-track { animation: none !important; }
}
}

/* === FOCUS VISIBLE === */
a:focus-visible,
button:focus-visible,
.carousel-card:focus-visible,
.cs-user-pill:focus-visible,
.role-toggle-btn:focus-visible,
.catbounce-btn:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}
.nav-links a:focus-visible { outline-offset: 6px; }
