/* General Styles */
body { 
  background: #0f172a; 
  color: #e2e8f0; 
  font-family: 'Inter', sans-serif; 
}

/* Glass effect */
.glass { 
  background: rgba(255,255,255,0.05); 
  backdrop-filter: blur(8px); 
}

/* Floating animation */
.floating {
  animation: floaty 6s ease-in-out infinite;
  filter: drop-shadow(0 2px 5px rgba(14,165,233,0.3));
}

@keyframes floaty { 
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

/* Loader */
.loader { 
  position: fixed; 
  inset:0; 
  background:#0f172a; 
  display:flex; 
  justify-content:center; 
  align-items:center; 
  z-index:50; 
}

/* Card hover effects */
.card-hover { 
  transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.3s ease; 
  cursor:pointer; 
}
.card-hover:hover { 
  transform: translateY(-12px) rotate(-1deg) scale(1.04); 
  box-shadow:0 25px 45px rgba(2,6,23,0.4); 
  background:rgba(30,41,59,0.85); 
}

/* Buttons */
.btn-primary { 
  background: linear-gradient(135deg,#6366f1,#0ea5a4); 
  color:white; 
  font-weight:600; 
  border-radius:9999px; 
  padding:0.6rem 1.5rem; 
  transition: all 0.3s ease; 
}
.btn-primary:hover { 
  transform: scale(1.05); 
  filter: brightness(1.2); 
}

.btn-secondary { 
  background:#fff; 
  color:#6366f1; 
  font-weight:600; 
  border-radius:9999px; 
  padding:0.6rem 1.5rem; 
  transition: all 0.3s ease; 
}
.btn-secondary:hover { 
  transform: scale(1.05); 
  filter: brightness(0.9); 
}

/* Social icons */
.social-icon { 
  transition: all 0.3s ease; 
}
.social-icon:hover { 
  transform: translateY(-6px) scale(1.15); 
  color:#0ea5a4; 
}

/* Nav hover underline */
nav a { 
  position: relative; 
  transition: all 0.3s ease; 
}
nav a::after { 
  content: ''; 
  position: absolute; 
  left:0; 
  bottom:-3px; 
  width:0%; 
  height:2px; 
  background:#0ea5a4; 
  transition:0.4s; 
  border-radius:2px; 
}
nav a:hover::after { width:100%; }

/* ========== Portfolio Card Floating Border Animation ========== */
.card-unique {
  position: relative;
  transition: all 0.6s ease;
}
.card-unique:hover {
  transform: translateY(-10px) rotate(-0.5deg);
  box-shadow: 0 25px 40px rgba(0,0,0,0.4);
}
.card-unique::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #6366f1, #0ea5a4, #f43f5e);
  background-size: 300% 300%;
  border-radius: 1.5rem;
  z-index: 0;
  animation: borderFlow 6s ease infinite;
  opacity: 0;
  transition: opacity 0.5s;
}
.card-unique:hover::before {
  opacity: 1;
}
@keyframes borderFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ========== Portfolio Image Auto Animation ========== */
/* 3D Tilt */
.perspective { perspective: 800px; }
.tilt-inner { transform-style: preserve-3d; }
.portfolio-card:hover .tilt-inner { transform: rotateY(6deg) rotateX(4deg) scale(1.03); }

/*sky button*/
.btn-glow-sky {
  background: #0ea5e9; /* Sky Blue */
  color: white;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.6rem 1.5rem;
  box-shadow: 0 0 15px rgba(14,165,233,0.6);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: skyGlow 3s ease-in-out infinite;
}

.btn-glow-sky:hover {
  transform: scale(1.08);
  box-shadow: 0 0 25px rgba(14,165,233,0.8);
  filter: brightness(1.2);
}

@keyframes skyGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(14,165,233,0.6); }
  50% { box-shadow: 0 0 25px rgba(14,165,233,0.8); }
}

/* Glow Buttons */
.btn-animated, .btn-glow, .btn-glow-green {
  display: inline-block;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.6rem 1.4rem;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.btn-animated {
  background: linear-gradient(135deg,#6366f1,#0ea5a4,#f43f5e);
  background-size: 300% 300%;
  animation: gradientShift 4s ease infinite;
  color: white;
}

.btn-glow {
  background: linear-gradient(90deg,#4f46e5,#06b6d4);
  box-shadow: 0 0 20px rgba(79,70,229,0.6);
  color: white;
}
.btn-glow-green {
  background: linear-gradient(90deg,#22c55e,#16a34a);
  box-shadow: 0 0 20px rgba(34,197,94,0.6);
  color: white;
}
.btn-glow:hover, .btn-glow-green:hover, .btn-animated:hover {
  transform: scale(1.08);
  filter: brightness(1.2);
}

/* Modal Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.animate-fadeIn { animation: fadeIn 0.3s ease-out; }

/* Countdown Ring Animation */
.countdown-ring circle {
  transition: stroke-dashoffset 1s linear;
}

.btn-glow {
  background: linear-gradient(90deg,#4f46e5,#06b6d4);
  box-shadow: 0 0 15px rgba(79,70,229,0.5);
  color: white;
}
.btn-glow-green {
  background: linear-gradient(90deg,#22c55e,#15803d);
  box-shadow: 0 0 15px rgba(34,197,94,0.5);
  color: white;
}
.btn-glow:hover, .btn-glow-green:hover {
  transform: scale(1.08);
  filter: brightness(1.2);
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #6366f1, #0ea5a4);
  border-radius: 9999px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}

#detailsModal .bg-gray-900 {
  border: 1px solid rgba(99,102,241,0.3);
  box-shadow: 0 0 30px rgba(99,102,241,0.15);
}


.btn-animated::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-animated:hover::after {
  opacity: 1;
}
/* Overlay background on hover only, button always visible */
.portfolio-card .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.5s;
  border-radius: 1rem;
  pointer-events: none; /* prevents blocking clicks */
}

.portfolio-card:hover .overlay {
  opacity: 1;
}

/* Button always visible on top */
.portfolio-card .overlay button {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto; /* button clickable */
  opacity: 1; /* always visible */
  transition: transform 0.3s ease;
}

.portfolio-card .overlay button:hover {
  transform: translateX(-50%) scale(1.05);
}


