/* ═══════════════════════════════════════════════════════
   Ana M. Penaranda — Portfolio v2
   styles.css
   ═══════════════════════════════════════════════════════ */

/* ── BASE ── */
body {
  font-family: 'Inter', sans-serif;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 48px 48px;
}
.font-serif { font-family: 'Playfair Display', serif; }
::selection { background-color: rgba(245,158,11,0.3); color: #fde68a; }
html { scroll-behavior: smooth; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── GRADIENT TEXT ── */
.gradient-text {
  background: linear-gradient(135deg, #fbbf24, #f97316, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── ANIMATIONS ── */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 18px rgba(245,158,11,0.25), 0 4px 24px rgba(0,0,0,0.4); }
  50%      { box-shadow: 0 0 34px rgba(245,158,11,0.5), 0 4px 24px rgba(0,0,0,0.4); }
}
@keyframes glowPulse-ai {
  0%, 100% { box-shadow: 0 0 18px rgba(99,102,241,0.25), 0 4px 24px rgba(0,0,0,0.4); }
  50%      { box-shadow: 0 0 34px rgba(99,102,241,0.5), 0 4px 24px rgba(0,0,0,0.4); }
}

/* ── AI WIDGET HOVER LABEL ── */
.ai-fab-wrap .ai-label {
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.ai-fab-wrap:hover .ai-label {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251,191,36,0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(251,191,36,0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}
@keyframes float-delayed {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-1.5deg); }
}
@keyframes pulse-soft {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-delayed { animation: float-delayed 7s ease-in-out infinite 1s; }
.animate-pulse-soft { animation: pulse-soft 3s ease-in-out infinite; }
.status-dot { animation: pulse 2s ease-in-out infinite; }

/* ── NEON RAINBOW PROGRESS BAR ── */
.neon-progress {
  background: linear-gradient(90deg, #f97316, #eab308, #22c55e, #06b6d4, #6366f1, #a855f7, #ec4899);
  background-size: 200% 100%;
  animation: neonShift 3s linear infinite;
  box-shadow: 0 0 8px rgba(99,102,241,0.4), 0 0 16px rgba(168,85,247,0.2);
  transition: width 2s cubic-bezier(0.22,1,0.36,1);
}
@keyframes neonShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
body.light .neon-progress {
  box-shadow: 0 0 6px rgba(99,102,241,0.3), 0 0 12px rgba(168,85,247,0.15);
}

/* ── COUNTDOWN CARD ENHANCEMENTS ── */
.countdown-card {
  position: relative;
  transform-style: preserve-3d;
  perspective: 900px;
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1), box-shadow 0.5s ease, border-color 0.5s ease;
}
.countdown-card:hover {
  transform: rotateX(2deg) rotateY(-1.5deg) translateY(-4px);
  border-color: rgba(99,102,241,0.15);
  box-shadow: 0 20px 50px -15px rgba(99,102,241,0.12), 0 8px 24px -8px rgba(0,0,0,0.4);
}
.countdown-glow {
  background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.10), rgba(139,92,246,0.06) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 0.6s ease;
  border-radius: inherit;
  z-index: 0;
}
.countdown-card:hover .countdown-glow {
  opacity: 1;
}
/* Metallic shine sweep on hover */
.countdown-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  z-index: 1;
  pointer-events: none;
  transition: none;
}
.countdown-card:hover::before {
  animation: cardShineSweep 1.2s ease-out forwards;
}
@keyframes cardShineSweep {
  0% { left: -50%; }
  100% { left: 120%; }
}

/* Sparkle particles */
.countdown-sparkle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251,191,36,0.8), transparent);
  animation: sparkleFloat 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sparkleFloat {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
  20% { opacity: 1; transform: translateY(-8px) scale(1); }
  80% { opacity: 0.6; transform: translateY(-20px) scale(0.8); }
}

/* Flip card hover glow */
.flip-interactive {
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
  cursor: default;
}
.flip-interactive:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.4), 0 0 20px rgba(251,191,36,0.12), inset 0 1px 0 rgba(255,255,255,0.08);
  border-color: rgba(251,191,36,0.15);
  transform: translateY(-2px);
}
body.light .flip-interactive:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 0 16px rgba(180,83,9,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
  border-color: rgba(180,83,9,0.15);
}

/* Rotating tagline */
.countdown-tagline {
  animation: taglineFade 0.5s ease;
}
@keyframes taglineFade {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Milestone dots */
.milestone-dot {
  animation: milestonePulse 2.5s ease-in-out infinite;
}
@keyframes milestonePulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.4); }
}

/* ── AIRPORT FLIP COUNTDOWN ── */
.flip-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.flip-card {
  position: relative;
  width: 64px;
  height: 72px;
  border-radius: 8px;
  background: linear-gradient(180deg, #1c1917 0%, #1c1917 49.5%, rgba(255,255,255,0.04) 49.5%, rgba(255,255,255,0.04) 50.5%, #1c1917 50.5%, #0c0a09 100%);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  perspective: 400px;
}
.flip-card span {
  font-family: 'Inter', monospace;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fafaf9;
  text-shadow: 0 0 12px rgba(245,158,11,0.15);
  display: block;
}
.flip-card::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(0,0,0,0.5);
  z-index: 2;
}
.flip-card::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: calc(50% + 1px);
  height: 1px;
  background: rgba(255,255,255,0.03);
  z-index: 2;
}
.flip-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #78716c;
}
.flip-separator {
  font-size: 24px;
  font-weight: 700;
  color: #57534e;
  margin-top: -18px;
  animation: pulse-soft 2s ease-in-out infinite;
}
@keyframes flipDigit {
  0% { transform: rotateX(90deg); opacity: 0; }
  100% { transform: rotateX(0); opacity: 1; }
}
.flip-card.flipping span {
  animation: flipDigit 0.35s ease-out;
}
body.light .flip-card {
  background: linear-gradient(180deg, #f5f5f4 0%, #f5f5f4 49.5%, rgba(0,0,0,0.04) 49.5%, rgba(0,0,0,0.04) 50.5%, #e7e5e4 50.5%, #e7e5e4 100%);
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
}
body.light .flip-card span { color: #1c1917; text-shadow: none; }
body.light .flip-card::before { background: rgba(0,0,0,0.08); }
body.light .flip-card::after { background: rgba(255,255,255,0.5); }
body.light .flip-separator { color: #a8a29e; }
@media (max-width: 400px) {
  .flip-card { width: 52px; height: 60px; }
  .flip-card span { font-size: 22px; }
  .flip-separator { font-size: 18px; }
}

/* ── VIEW DETAILS METALLIC PILL ── */
.view-details-pill {
  background: linear-gradient(135deg, #d4d4d8, #e4e4e7 40%, #fafafa 50%, #d4d4d8 60%, #a1a1aa);
  color: #18181b;
  border: 1px solid rgba(255,255,255,0.3);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}
.view-details-pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  transition: left 0.6s ease;
}
.group:hover .view-details-pill::before {
  left: 120%;
}
.view-details-pill::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, transparent 50%);
  pointer-events: none;
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s cubic-bezier(0.22,1,0.36,1), transform 0.9s cubic-bezier(0.22,1,0.36,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.35s; }
.reveal-delay-4 { transition-delay: 0.5s; }
.reveal-delay-5 { transition-delay: 0.65s; }

/* ── HERO PARALLAX ── */
.parallax-layer { will-change: transform; transition: transform 0.1s linear; }

/* ── WORK CARDS (3D tilt on hover) ── */
.work-card {
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), box-shadow 0.4s cubic-bezier(0.22,1,0.36,1), border-color 0.4s ease;
  transform-style: preserve-3d;
  perspective: 800px;
}
.work-card:hover {
  transform: translateY(-6px) rotateX(2deg) rotateY(-1.5deg);
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.5), 0 0 40px -10px rgba(251,191,36,0.05);
}
.work-card:nth-child(2):hover {
  transform: translateY(-6px) rotateX(1.5deg) rotateY(1deg);
}
.work-card:nth-child(3):hover {
  transform: translateY(-6px) rotateX(2deg) rotateY(2deg);
}

/* ── PROGRESS BAR ── */
.progress-bar-fill { width: 0%; transition: width 2s cubic-bezier(0.22,1,0.36,1); }

/* ── FOCUS RING ── */
.focus-ring { outline: none; }
.focus-ring:focus-visible { box-shadow: 0 0 0 2px #0c0a09, 0 0 0 4px rgba(251,191,36,0.5); }

/* ── AI PANEL ── */
#ai-chat-panel.open { display: flex !important; animation: slideUp 0.35s cubic-bezier(0.22,1,0.36,1) forwards; }

/* ── NAV SCROLL ── */
nav.scrolled { background-color: rgba(12,10,9,0.95) !important; box-shadow: 0 1px 0 rgba(255,255,255,0.05); }

/* ── SECTION DIVIDERS ── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06) 20%, rgba(255,255,255,0.06) 80%, transparent);
  max-width: 64rem;
  margin: 0 auto;
}

/* ── PHILOSOPHY VALUES ── */
.value-card {
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), border-color 0.4s ease, background 0.4s ease;
}
.value-card:hover {
  transform: translateY(-3px);
  border-color: rgba(251,191,36,0.2);
  background: rgba(255,255,255,0.04);
}
.value-number {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 3rem;
  line-height: 1;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════════════════════════
   LIGHT MODE
   ═══════════════════════════════════════════════════════ */
body.light {
  background-color: #f5f3ef !important;
  color: #1c1917 !important;
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}
body.light canvas { opacity: 0.18 !important; }
body.light nav { background-color: rgba(250,250,249,0.85) !important; border-color: rgba(0,0,0,0.08) !important; }
body.light nav.scrolled { background-color: rgba(250,250,249,0.97) !important; box-shadow: 0 1px 0 rgba(0,0,0,0.06) !important; }
body.light .text-white,
body.light .text-stone-100,
body.light .text-stone-200 { color: #0c0a09 !important; }
body.light .text-stone-300 { color: #292524 !important; }
body.light .text-stone-400,
body.light .text-stone-500 { color: #57534e !important; }
body.light .text-stone-600 { color: #78716c !important; }
body.light .text-white\/40,
body.light .text-white\/45,
body.light .text-white\/50,
body.light .text-white\/60,
body.light .text-white\/70 { color: #78716c !important; }
body.light .bg-stone-950,
body.light .bg-\[rgb\(12\,10\,9\)\] { background-color: #f5f3ef !important; }
body.light .bg-stone-950\/70 { background-color: rgba(250,250,249,0.85) !important; }
body.light .bg-\[\#111\] { background-color: #f5f5f4 !important; }
body.light .bg-white\/\[0\.02\],
body.light .bg-white\/\[0\.03\],
body.light .bg-white\/\[0\.04\],
body.light .bg-white\/\[0\.05\] { background-color: rgba(0,0,0,0.025) !important; }
body.light .bg-white\/\[0\.06\],
body.light .bg-white\/\[0\.08\] { background-color: rgba(0,0,0,0.04) !important; }
body.light .border-white\/\[0\.04\],
body.light .border-white\/\[0\.06\],
body.light .border-white\/\[0\.08\],
body.light .border-white\/10,
body.light .border-white\/20 { border-color: rgba(0,0,0,0.08) !important; }
body.light footer { background-color: #f5f3ef !important; }
body.light .dark-icon { display: none !important; }
body.light .light-icon { display: block !important; }
body.light .work-card:hover { box-shadow: 0 20px 40px -15px rgba(0,0,0,0.08), 0 0 40px -10px rgba(251,191,36,0.05); }
body.light .gradient-text { -webkit-text-fill-color: transparent; }
body.light .bg-gradient-to-br.from-amber-500\/20 { background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(249,115,22,0.06), #f5f3ef) !important; }
body.light .focus-ring:focus-visible { box-shadow: 0 0 0 2px #f5f3ef, 0 0 0 4px rgba(245,158,11,0.5); }
body.light ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); }
body.light ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }
body.light .section-divider { background: linear-gradient(90deg, transparent, rgba(0,0,0,0.06) 20%, rgba(0,0,0,0.06) 80%, transparent); }
body.light .value-number {
  background: linear-gradient(135deg, #d97706, #ea580c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── LIGHT MODE: ACCENT COLOR CONTRAST ── */
/* Amber accents — darken for light bg */
body.light .text-amber-400 { color: #b45309 !important; }
body.light .text-amber-400\/70 { color: rgba(180, 83, 9, 0.8) !important; }
body.light .text-amber-400\/80 { color: rgba(180, 83, 9, 0.85) !important; }
body.light .text-amber-500 { color: #92400e !important; }
body.light .bg-amber-500\/10,
body.light .bg-amber-500\/\[0\.08\] { background-color: rgba(180, 83, 9, 0.1) !important; }
body.light .border-amber-500\/20 { border-color: rgba(180, 83, 9, 0.2) !important; }
body.light .bg-amber-400\/60 { background-color: rgba(180, 83, 9, 0.6) !important; }
body.light .bg-amber-400\/30 { background-color: rgba(180, 83, 9, 0.25) !important; }

/* Indigo accents */
body.light .text-indigo-400 { color: #4338ca !important; }
body.light .bg-indigo-500\/10 { background-color: rgba(67, 56, 202, 0.1) !important; }
body.light .border-indigo-500\/20,
body.light .border-indigo-400\/20 { border-color: rgba(67, 56, 202, 0.2) !important; }

/* Violet accents */
body.light .text-violet-400 { color: #6d28d9 !important; }
body.light .bg-violet-500\/10 { background-color: rgba(109, 40, 217, 0.1) !important; }
body.light .border-violet-500\/20,
body.light .border-violet-400\/20 { border-color: rgba(109, 40, 217, 0.2) !important; }

/* Rose accents */
body.light .text-rose-400 { color: #be123c !important; }
body.light .bg-rose-500\/10 { background-color: rgba(190, 18, 60, 0.1) !important; }
body.light .border-rose-500\/20 { border-color: rgba(190, 18, 60, 0.2) !important; }

/* Cyan accents */
body.light .text-cyan-400 { color: #0e7490 !important; }
body.light .bg-cyan-500\/10 { background-color: rgba(14, 116, 144, 0.1) !important; }
body.light .border-cyan-500\/20,
body.light .border-cyan-400\/20 { border-color: rgba(14, 116, 144, 0.2) !important; }

/* Orange accents */
body.light .text-orange-400 { color: #c2410c !important; }
body.light .bg-orange-500\/10 { background-color: rgba(194, 65, 12, 0.1) !important; }
body.light .border-orange-500\/20 { border-color: rgba(194, 65, 12, 0.2) !important; }
body.light .bg-orange-400\/20 { background-color: rgba(194, 65, 12, 0.15) !important; }

/* Emerald accents */
body.light .text-emerald-400 { color: #047857 !important; }
body.light .bg-emerald-500\/10 { background-color: rgba(4, 120, 87, 0.1) !important; }
body.light .border-emerald-500\/20 { border-color: rgba(4, 120, 87, 0.2) !important; }
body.light .bg-emerald-400 { background-color: #047857 !important; }

/* Status dots */
body.light .bg-amber-400 { background-color: #b45309 !important; }

/* Gradient text — darker gradient for light mode */
body.light .gradient-text {
  background: linear-gradient(135deg, #b45309, #c2410c, #be123c) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* AI widget in light mode */
body.light .bg-gradient-to-br.from-indigo-500 { background: linear-gradient(135deg, #4338ca, #2563eb) !important; }
body.light .bg-gradient-to-r.from-indigo-500 { background: linear-gradient(90deg, #4338ca, #2563eb) !important; }
body.light .bg-indigo-600\/80 { background-color: rgba(67, 56, 202, 0.85) !important; }

/* Card thumbnail gradients — slightly stronger in light mode */
body.light .from-amber-500\/20 { --tw-gradient-from: rgba(180, 83, 9, 0.15) !important; }
body.light .from-indigo-500\/20 { --tw-gradient-from: rgba(67, 56, 202, 0.15) !important; }
body.light .from-violet-500\/20 { --tw-gradient-from: rgba(109, 40, 217, 0.15) !important; }
body.light .from-emerald-500\/20 { --tw-gradient-from: rgba(4, 120, 87, 0.15) !important; }

/* Nav link colors */
body.light a.text-stone-500 { color: #57534e !important; }
body.light a.text-stone-500:hover { color: #0c0a09 !important; }

/* Footer icon colors */
body.light .text-stone-600:hover { color: #0c0a09 !important; }

/* Progress bar shadow */
body.light .shadow-amber-500\/20 { box-shadow: 0 4px 14px -3px rgba(180, 83, 9, 0.15) !important; }

/* Hover states for discipline cards in light mode */
body.light .group:hover .group-hover\:text-amber-100 { color: #78350f !important; }
body.light .group:hover .group-hover\:text-indigo-100 { color: #312e81 !important; }
body.light .group:hover .group-hover\:text-rose-100 { color: #881337 !important; }
body.light .group:hover .group-hover\:text-cyan-100 { color: #164e63 !important; }
body.light .group:hover .group-hover\:text-orange-100 { color: #7c2d12 !important; }
body.light .group:hover .group-hover\:text-violet-100 { color: #4c1d95 !important; }
body.light .group:hover .group-hover\:text-emerald-100 { color: #064e3b !important; }

/* Countdown card in light mode */
body.light .countdown-glow {
  background: radial-gradient(ellipse at 50% 0%, rgba(67,56,202,0.06), rgba(109,40,217,0.04) 40%, transparent 70%);
}
body.light .countdown-card:hover {
  border-color: rgba(67,56,202,0.12);
  box-shadow: 0 20px 50px -15px rgba(67,56,202,0.08), 0 8px 24px -8px rgba(0,0,0,0.06);
}
body.light .milestone-dot { opacity: 0.7; }

/* Metallic pill in light mode — darker metallic */
body.light .view-details-pill {
  background: linear-gradient(135deg, #71717a, #a1a1aa 40%, #d4d4d8 50%, #a1a1aa 60%, #71717a);
  color: #fff;
  border-color: rgba(255,255,255,0.15);
}

.light-icon { display: none; }

/* ── 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;
  }
  .reveal { opacity: 1; transform: none; transition: none; }
  .work-card:hover, .work-card:nth-child(2):hover, .work-card:nth-child(3):hover { transform: none; }
  .progress-bar-fill { width: 72% !important; transition: none !important; }
  canvas { display: none !important; }
}
