/* ============================================================
   STYLE.CSS — QA Automation Engineer Portfolio
   ============================================================ */

/* ----- Base ----- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; transition: background-color 0.3s ease, color 0.3s ease; overflow-x: hidden; }

/* ----- Scrollbar ----- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #94A3B8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #64748B; }
::selection { background: #2563EB; color: white; }

/* ===== SLIDER ===== */
.hero-slider { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.hero-slider .slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1.2s cubic-bezier(0.16,1,0.3,1), transform 1.2s cubic-bezier(0.16,1,0.3,1);
  transform: scale(1.05);
}
.hero-slider .slide.active { opacity: 1; transform: scale(1); }
.hero-slider .slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slider .slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(15,23,42,0.85) 0%, rgba(15,23,42,0.65) 50%, rgba(15,23,42,0.8) 100%);
}
.dark .hero-slider .slide::after {
  background: linear-gradient(135deg, rgba(15,23,42,0.92) 0%, rgba(15,23,42,0.75) 50%, rgba(15,23,42,0.88) 100%);
}
.slider-dots {
  position: absolute; bottom: 120px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 5;
}
.slider-dots .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.25); border: 1.5px solid rgba(255,255,255,0.4);
  cursor: pointer; transition: all 0.3s ease;
}
.slider-dots .dot.active { background: #2563EB; border-color: #2563EB; transform: scale(1.3); }
.slider-dots .dot:hover { background: rgba(37,99,235,0.6); border-color: rgba(37,99,235,0.8); }

/* ===== WHATSAPP BUTTON ===== */
.whatsapp-btn {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25D366; color: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,0.35);
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  text-decoration: none;
}
.whatsapp-btn:hover {
  transform: scale(1.1); box-shadow: 0 8px 32px rgba(37,211,102,0.45);
}
.whatsapp-btn svg { width: 28px; height: 28px; }
.whatsapp-btn .pulse-ring {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(37,211,102,0.3);
  animation: whatsappPulse 2s ease-out infinite;
}
@keyframes whatsappPulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}
.whatsapp-tooltip {
  position: absolute; right: 70px; top: 50%; transform: translateY(-50%);
  background: #1E293B; color: white; padding: 8px 16px;
  border-radius: 10px; font-size: 13px; font-weight: 500;
  white-space: nowrap; opacity: 0; visibility: hidden;
  transition: all 0.3s ease; pointer-events: none;
}
.whatsapp-btn:hover .whatsapp-tooltip { opacity: 1; visibility: visible; }
.whatsapp-tooltip::after {
  content: ''; position: absolute; right: -6px; top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent; border-left-color: #1E293B;
}

/* ----- Grid pattern background ----- */
.bg-grid {
  background-image: linear-gradient(rgba(37,99,235,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(37,99,235,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
}
.dark .bg-grid {
  background-image: linear-gradient(rgba(37,99,235,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(37,99,235,0.08) 1px, transparent 1px);
}

/* Dot overlay */
.bg-dots {
  background-image: radial-gradient(circle, #2563EB 1px, transparent 1px);
  background-size: 24px 24px;
}
.dark .bg-dots { background-image: radial-gradient(circle, rgba(37,99,235,0.3) 1px, transparent 1px); }

/* ----- Reveal animations ----- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.reveal.revealed { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.reveal-left.revealed { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.reveal-right.revealed { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(0.92); transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.reveal-scale.revealed { opacity: 1; transform: scale(1); }

/* ----- Navbar ----- */
.navbar { transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease; }
.navbar.scrolled {
  background-color: rgba(248,250,252,0.88); backdrop-filter: blur(16px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.dark .navbar.scrolled { background-color: rgba(15,23,42,0.88); box-shadow: 0 1px 3px rgba(0,0,0,0.2); }

.nav-link { position: relative; }
.nav-link::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px; background: #2563EB; border-radius: 1px;
  transition: width 0.3s ease;
}
.nav-link.text-primary::after { width: 60%; }

/* ----- Terminal ----- */
.terminal {
  border: 1px solid rgba(16,185,129,0.2);
  box-shadow: 0 0 40px rgba(16,185,129,0.06), 0 8px 32px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.terminal:hover { box-shadow: 0 0 60px rgba(16,185,129,0.12), 0 16px 48px rgba(0,0,0,0.1); transform: translateY(-2px); }
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot:nth-child(1) { background: #EF4444; }
.terminal-dot:nth-child(2) { background: #EAB308; }
.terminal-dot:nth-child(3) { background: #10B981; }

/* ----- Filter buttons ----- */
.filter-btn { transition: all 0.25s ease; position: relative; }
.filter-btn.active { background: #2563EB; color: white; border-color: #2563EB; box-shadow: 0 4px 12px rgba(37,99,235,0.25); }
.filter-btn:not(.active):hover { border-color: #2563EB; color: #2563EB; }

/* ----- Project cards ----- */
.project-card {
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s cubic-bezier(0.16,1,0.3,1), opacity 0.4s ease;
}
.project-card:hover { transform: translateY(-8px); box-shadow: 0 24px 48px rgba(0,0,0,0.07); }
.dark .project-card:hover { box-shadow: 0 24px 48px rgba(0,0,0,0.3); }
.project-card.hidden-card { display: none; }

/* ----- Timeline ----- */
.timeline-line {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, #2563EB, #10B981, rgba(16,185,129,0.1));
  transform: translateX(-50%);
}
.timeline-dot {
  width: 18px; height: 18px; border-radius: 50%; background: #2563EB;
  border: 4px solid white; box-shadow: 0 0 0 3px #2563EB;
  position: absolute; left: 50%; transform: translateX(-50%); z-index: 2;
}
.dark .timeline-dot { border-color: #0F172A; }
.timeline-card { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.timeline-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.06); }
.dark .timeline-card:hover { box-shadow: 0 12px 32px rgba(0,0,0,0.25); }

/* ----- Badge pass ----- */
.badge-pass {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(16,185,129,0.08); color: #059669;
  padding: 3px 12px; border-radius: 999px; font-size: 0.7rem; font-weight: 600;
  border: 1px solid rgba(16,185,129,0.2); letter-spacing: 0.03em;
}
.dark .badge-pass { background: rgba(16,185,129,0.12); color: #34D399; }

/* ----- Skill tooltip ----- */
.skill-item { position: relative; }
.skill-item .skill-tip {
  visibility: hidden; opacity: 0; position: absolute; bottom: calc(100% + 10px);
  left: 50%; transform: translateX(-50%) translateY(4px);
  white-space: nowrap; z-index: 20; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.skill-item:hover .skill-tip { visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0); }
.skill-bar { height: 4px; background: rgba(37,99,235,0.12); border-radius: 2px; overflow: hidden; }
.skill-bar-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, #2563EB, #60A5FA); transition: width 0.6s ease; }

/* ----- Testimonial card ----- */
.testimonial-card {
  border-left: 3px solid #10B981;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.05); }
.dark .testimonial-card:hover { box-shadow: 0 12px 32px rgba(0,0,0,0.2); }

/* ----- Cert card ----- */
.cert-card {
  border-left: 3px solid #2563EB;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cert-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.05); }
.dark .cert-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.2); }

/* ----- Form ----- */
.form-input { transition: border-color 0.25s ease, box-shadow 0.25s ease; }
.form-input:focus { border-color: #2563EB; box-shadow: 0 0 0 4px rgba(37,99,235,0.1); outline: none; }
.form-input.error { border-color: #EF4444; box-shadow: 0 0 0 4px rgba(239,68,68,0.08); }

/* ----- Mobile menu ----- */
#mobile-menu {
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16,1,0.3,1), opacity 0.3s ease;
}
#mobile-menu.open { max-height: 480px; opacity: 1; }

/* ----- Theme toggle ----- */
#theme-toggle { transition: transform 0.3s ease; }
#theme-toggle:hover { transform: rotate(15deg) scale(1.1); }

/* ----- Toast ----- */
.toast {
  position: fixed; bottom: 100px; right: 28px; z-index: 100;
  padding: 16px 28px; background: #10B981; color: white;
  border-radius: 12px; font-weight: 600; font-size: 0.9rem;
  box-shadow: 0 8px 32px rgba(16,185,129,0.3);
  transform: translateY(120px); opacity: 0;
  transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ----- Utility ----- */
.text-gradient { background: linear-gradient(135deg, #2563EB, #10B981); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.glow { box-shadow: 0 0 60px rgba(37,99,235,0.08); }

/* ----- Focus ----- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid #2563EB; outline-offset: 2px; border-radius: 4px;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
  .timeline-line { left: 20px; }
  .timeline-dot { left: 20px; }
  .whatsapp-btn { width: 52px; height: 52px; bottom: 20px; right: 20px; }
  .whatsapp-btn svg { width: 24px; height: 24px; }
  .whatsapp-tooltip { display: none; }
  .toast { bottom: 80px; right: 20px; left: 20px; }
  .slider-dots { bottom: 100px; }
}
@media print { .navbar, #theme-toggle, .no-print, .whatsapp-btn, .toast { display: none !important; } }
