/* ==========================================================================
   Pedro Pôrto Alves - Portfólio & Currículo Interativo
   Custom CSS, Microinteractions & Modern Dynamic Animations
   ========================================================================== */

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

:root {
  --primary-red: #E74C3C;
  --primary-red-hover: #D63031;
  --primary-red-light: #FDF2F2;
  --slate-dark: #0F172A;
  --slate-muted: #64748B;
  --emerald-accent: #10B981;
  --bg-offwhite: #F8FAFC;
}

/* Base Smooth Scrolling & Typography */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #0F172A;
  background-color: var(--bg-offwhite);
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

/* Prevent Cumulative Layout Shift (CLS) on Typewriter */
#typewriter {
  display: inline-block;
  min-height: 1.22em;
  vertical-align: bottom;
}

#typewriter:empty::before {
  content: '\00a0';
  visibility: hidden;
  display: inline-block;
}

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

::-webkit-scrollbar-track {
  background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Background Hero Pattern */
.hero-pattern {
  background-color: #F8FAFC;
  background-image: radial-gradient(#E2E8F0 1.2px, transparent 1.2px), radial-gradient(#E2E8F0 1.2px, #F8FAFC 1.2px);
  background-size: 48px 48px;
  background-position: 0 0, 24px 24px;
}

/* Glassmorphism effects */
.glass-nav {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.glass-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Button Shimmer / Light Sweep Effect */
.btn-shimmer {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  pointer-events: none;
  transition: none;
}

.btn-shimmer:hover::after {
  left: 140%;
  transition: left 0.75s ease-in-out;
}

/* Dynamic Interactive Buttons */
.btn-dynamic {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.btn-dynamic:hover {
  transform: translateY(-2px);
}

.btn-dynamic:active {
  transform: translateY(1px) scale(0.98);
}

/* Card Hover Lift & Glow */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.09);
  border-color: rgba(231, 76, 60, 0.3);
}

/* Floating Ambient Orbs */
@keyframes floatOrb1 {
  0%, 100% {
    transform: translate(0px, 0px) scale(1);
  }
  50% {
    transform: translate(25px, -20px) scale(1.08);
  }
}

@keyframes floatOrb2 {
  0%, 100% {
    transform: translate(0px, 0px) scale(1);
  }
  50% {
    transform: translate(-20px, 25px) scale(1.06);
  }
}

.orb-float-1 {
  animation: floatOrb1 9s ease-in-out infinite;
}

.orb-float-2 {
  animation: floatOrb2 11s ease-in-out infinite;
}

/* Pulsing Status Badges */
.emerald-pulse {
  animation: pulse-emerald 2s infinite;
}

@keyframes pulse-emerald {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Filter Tab Active Style */
.portfolio-tab.active {
  background-color: var(--primary-red);
  color: #FFFFFF;
  border-color: var(--primary-red);
  box-shadow: 0 4px 14px rgba(231, 76, 60, 0.35);
  transform: scale(1.03);
}

/* Reveal on Scroll Animations */
.reveal-fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-fade-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Mobile Burger Button & Drawer Micro-interactions
   ========================================================================== */
.mobile-burger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 0.75rem;
  background-color: transparent;
  color: #334155;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
  border: 1px solid transparent;
}

.mobile-burger-btn:hover {
  background-color: rgba(241, 245, 249, 0.9);
  color: var(--primary-red);
  border-color: rgba(226, 232, 240, 0.8);
}

.mobile-burger-btn.is-active {
  background-color: #FDF2F2;
  color: var(--primary-red);
  border-color: rgba(231, 76, 60, 0.2);
}

.burger-box {
  width: 22px;
  height: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-burger-btn.is-active .burger-box {
  transform: rotate(180deg);
}

.burger-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  border-radius: 9999px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.25s ease;
  transform-origin: center;
}

.mobile-burger-btn.is-active .bar-1 {
  transform: translateY(7px) rotate(45deg);
}

.mobile-burger-btn.is-active .bar-2 {
  opacity: 0;
  transform: scaleX(0.2);
}

.mobile-burger-btn.is-active .bar-3 {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer Smooth Slide & Height Grid Transition */
.mobile-menu-drawer {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows 0.38s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.38s ease;
  will-change: grid-template-rows, opacity;
}

.mobile-menu-drawer.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
}

.mobile-menu-inner {
  min-height: 0;
  transform: translateY(-8px);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-drawer.is-open .mobile-menu-inner {
  transform: translateY(0);
}

/* Hover and active animations on mobile nav links */
.mobile-nav-link {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.2s ease,
              color 0.2s ease;
}

.mobile-nav-link:hover {
  transform: translateX(4px);
}

.mobile-nav-link:active {
  transform: scale(0.98);
}

@media (min-width: 768px) {
  .mobile-menu-drawer {
    display: none !important;
  }
}

/* Print Styles for CV generation */
@media print {
  nav, footer, #contato, .no-print, #btn-whatsapp-floating, #btn-topo {
    display: none !important;
  }
  body {
    background-color: #FFFFFF !important;
    color: #000000 !important;
  }
  .print-page {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }
}
