﻿/* Custom CSS for effects that Tailwind can't handle */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

* {
  font-family: 'Poppins', sans-serif;
}

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

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #06b6d4, #0ea5e9);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #0ea5e9, #06b6d4);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Hide scrollbar for mobile sidebar */
#sidebar::-webkit-scrollbar {
  display: none;
}

/* Animation for reveal on scroll */
.reveal-on-scroll {
  opacity: 0;
  transition: all 0.8s ease-out;
}

.reveal-on-scroll.show {
  opacity: 1;
  transform: translateY(0);
}

/* Glassmorphism effect enhancement */
.glass-effect {
  background: rgba(30, 41, 59, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient text animation */
@keyframes gradient-shift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.gradient-text {
  background: linear-gradient(90deg, #06b6d4, #0ea5e9, #3b82f6, #06b6d4);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 3s ease infinite;
}

/* Floating animation for hero image */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

/* Glow effect on hover */
.glow-on-hover {
  transition: all 0.3s ease;
}

.glow-on-hover:hover {
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.6),
              0 0 40px rgba(6, 182, 212, 0.4),
              0 0 60px rgba(6, 182, 212, 0.2);
}

/* Skill card animation */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(6, 182, 212, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
  }
}

.skill-card {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Navbar blur effect on scroll */
.navbar-blur {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Custom button ripple effect */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
  width: 300px;
  height: 300px;
}

/* Gradient border animation */
@keyframes border-spin {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-border {
  position: relative;
  background: linear-gradient(90deg, #06b6d4, #0ea5e9, #3b82f6);
  background-size: 200% 200%;
  animation: border-spin 3s ease infinite;
  border-radius: 1rem;
  padding: 2px;
}

.gradient-border > * {
  background: #0f172a;
  border-radius: calc(1rem - 2px);
}

/* Mobile sidebar overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Enhanced hover effects */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-8px) scale(1.02);
}

/* Loading animation for images */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
  animation: shimmer 2s infinite;
  background: linear-gradient(
    to right,
    #1e293b 0%,
    #334155 20%,
    #1e293b 40%,
    #1e293b 100%
  );
  background-size: 1000px 100%;
}

/* Custom focus styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #06b6d4;
  outline-offset: 4px;
}

/* Navbar smooth hide/show transition */
header {
  transition: transform 0.3s ease-in-out;
  will-change: transform;
}

/* Responsive utilities */
@media (max-width: 768px) {
  .reveal-on-scroll {
    opacity: 1;
  }
}

/* Print styles */
@media print {
  header,
  .sidebar,
  #contact {
    display: none;
  }
}

/* Additional animations for new visual elements */

/* Rotating border animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Floating animation for decorative elements */
@keyframes float-slow {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
  }
  25% {
    transform: translateY(-10px) translateX(5px);
  }
  50% {
    transform: translateY(-20px) translateX(0px);
  }
  75% {
    transform: translateY(-10px) translateX(-5px);
  }
}

/* Pulse glow enhanced */
@keyframes pulse-glow-enhanced {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* Wave animation */
@keyframes wave {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Bounce slow */
@keyframes bounce-slow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

/* Scale pulse */
@keyframes scale-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Gradient animation for borders */
@keyframes gradient-rotate {
  0% {
    filter: hue-rotate(0deg);
  }
  100% {
    filter: hue-rotate(360deg);
  }
}

/* Flicker effect */
@keyframes flicker {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* Slide from sides */
@keyframes slide-left {
  from {
    transform: translateX(-100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-right {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Zoom in effect */
@keyframes zoom-in {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Apply animations to decorative elements */
svg {
  animation: float-slow 6s ease-in-out infinite;
}

/* Grid pattern subtle animation */
@keyframes grid-pulse {
  0%, 100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.4;
  }
}

/* Glowing orbs */
.glow-orb {
  animation: pulse-glow-enhanced 4s ease-in-out infinite;
}

/* Profile image border rotation */
.profile-border-rotate {
  animation: spin 10s linear infinite;
}

/* Tech icon bounce */
.tech-icon-bounce {
  animation: bounce-slow 3s ease-in-out infinite;
}

/* Decorative dots animation */
.decorative-dot {
  animation: wave 2s ease-in-out infinite;
}

/* Code snippet flicker */
.code-flicker {
  animation: flicker 3s ease-in-out infinite;
}

/* Hexagon pattern subtle movement */
#hexagons {
  animation: float-slow 20s ease-in-out infinite;
}
