/* -------------------------------------------------------------
   PORTFÓLIO SÁVIO OLIVEIRA - CUSTOM STYLES & ANIMATIONS
   Otimizado para Mobile (Instagram Bio) & Desktop
   ------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 189, 248, 0.3);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-cyan: #38bdf8;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-violet: #8b5cf6;
  --accent-emerald: #10b981;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(59, 130, 246, 0.3);
  --text-primary: #0f172a;
  --text-secondary: #64748b;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  scroll-behavior: smooth;
}

code, pre, .font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #090d16;
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 9999px;
  border: 2px solid #090d16;
}

::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Background Animated Gradient Mesh */
.bg-mesh {
  background-image: 
    radial-gradient(at 15% 15%, rgba(56, 189, 248, 0.12) 0px, transparent 55%),
    radial-gradient(at 85% 20%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
    radial-gradient(at 50% 85%, rgba(139, 92, 246, 0.10) 0px, transparent 55%),
    radial-gradient(at 90% 80%, rgba(16, 185, 129, 0.08) 0px, transparent 50%);
}

/* Glassmorphism */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
}

.glass-nav {
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .glass-nav {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Glow & Borders */
.glow-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.glow-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 12px 30px -10px rgba(56, 189, 248, 0.2);
}

/* Pulse animation for Live status badge */
@keyframes statusPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.status-dot {
  animation: statusPulse 2s infinite cubic-bezier(0.45, 0, 0.55, 1);
}

/* Instagram Floating Button Ripple */
@keyframes pulseInstagram {
  0% { box-shadow: 0 0 0 0 rgba(225, 48, 108, 0.7); }
  70% { box-shadow: 0 0 0 14px rgba(225, 48, 108, 0); }
  100% { box-shadow: 0 0 0 0 rgba(225, 48, 108, 0); }
}

.btn-instagram-pulse {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  animation: pulseInstagram 2.2s infinite;
}

/* Modal animation */
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-content-animated {
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Link in Bio Quick Bar for Mobile */
.bio-action-btn {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.bio-action-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.bio-action-btn:active {
  transform: scale(0.97);
}

/* Toast alert */
#toastNotification {
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Badges and tag hover */
.tech-tag {
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.tech-tag:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.4);
}

/* -------------------------------------------------------------
   MOBILE SPECIFIC POLISH & PERFORMANCE
   ------------------------------------------------------------- */
/* No scrollbar utility for horizontal filter chips */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Smooth momentum scrolling on mobile devices */
.overflow-y-auto, .overflow-x-auto, #projectModal > div {
  -webkit-overflow-scrolling: touch;
}

/* iOS Safari: Prevent automatic zoom on input focus when font-size < 16px */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Support iPhone notch and Home bar Safe Areas */
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
}
