/* Custom CSS for Portfolio */

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

* {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Cursor Trail */
#cursor-trail {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.8), transparent);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s;
}

body:hover #cursor-trail {
  opacity: 1;
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #06b6d4, #22d3ee, #67e8f9);
  z-index: 10000;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.8);
}

/* Particle Canvas */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}

/* Animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 1s ease-out;
}

.animate-fade-in-delay {
  animation: fade-in 1s ease-out 0.2s both;
}

.animate-fade-in-delay-2 {
  animation: fade-in 1s ease-out 0.4s both;
}

.animate-slide-up {
  animation: slide-up 1s ease-out;
}

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

.animated-gradient {
  background-size: 200% auto;
  animation: gradient-shift 3s ease infinite;
}

/* Typing Animation */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: #06b6d4;
  }
}

.typing-text {
  display: inline-block;
  overflow: hidden;
  border-right: 2px solid #06b6d4;
  white-space: nowrap;
  animation: typing 1.5s steps(10, end), blink 0.75s step-end infinite;
}

.typing-text-2 {
  display: inline-block;
  overflow: hidden;
  border-right: 2px solid #06b6d4;
  white-space: nowrap;
  animation: typing 2s steps(40, end) 0.5s both, blink 0.75s step-end infinite;
}

/* Typing Name Effect */
.typing-name {
  display: inline-block;
  border-right: 3px solid #06b6d4;
  white-space: nowrap;
  overflow: hidden;
  animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: #06b6d4;
  }
}

/* Reveal on Scroll */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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


/* Slow Pulse Animation */
@keyframes pulse-slow {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

.animate-pulse-slow {
  animation: pulse-slow 4s ease-in-out infinite;
}

/* Skill Cards */
.skill-card {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 1rem;
  padding: 2rem 1rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.skill-card:hover {
  transform: translateY(-8px) scale(1.05);
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow: 0 15px 40px rgba(6, 182, 212, 0.4);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(6, 182, 212, 0.1) 100%);
}

.skill-card:hover i {
  transform: scale(1.2) rotate(5deg);
  filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.8));
}

.skill-card i {
  transition: all 0.3s ease;
}

/* Modern Project Card */
.project-card-modern {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, rgba(0, 0, 0, 0.8) 100%);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 2rem;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card-modern::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 0;
}

.project-card-modern:hover {
  transform: translateY(-10px);
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow: 0 25px 70px rgba(6, 182, 212, 0.4);
}

.project-card-modern:hover::before {
  opacity: 1;
}

/* Project Image Container */
.project-image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0a0a 0%, #000 100%);
}

.image-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.project-image-main {
  width: 100%;
  height: 250px;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  object-fit: contain;
  object-position: center;
}

.project-card-modern:hover .project-image-main {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.4) 100%
  );
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.project-card-modern:hover .image-overlay {
  opacity: 1;
}

.neon-border {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(6, 182, 212, 0.1)) padding-box,
              linear-gradient(135deg, rgba(6, 182, 212, 0.6), rgba(6, 182, 212, 0.3)) border-box;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.project-card-modern:hover .neon-border {
  opacity: 1;
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.5), inset 0 0 30px rgba(6, 182, 212, 0.2);
}

.floating-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(6, 182, 212, 0.5);
  border-radius: 2rem;
  padding: 0.5rem 1rem;
  z-index: 10;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.project-info-modern {
  padding: 2.5rem;
  position: relative;
  z-index: 1;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.9));
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Modal Image Styles */
.modal-image-container {
  position: relative;
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  border: 2px solid rgba(6, 182, 212, 0.3);
}

.modal-image {
  width: 100%;
  height: 400px;
  display: block;
  object-fit: contain;
  object-position: center;
}

.modal-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
  pointer-events: none;
}

/* Social Links */
.social-link {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(6, 182, 212, 0.3);
  border-radius: 50%;
  color: rgba(6, 182, 212, 0.7);
  transition: all 0.3s ease;
}

.social-link:hover {
  border-color: rgba(6, 182, 212, 1);
  color: rgba(6, 182, 212, 1);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(6, 182, 212, 0.3);
}

/* Form Inputs */
input:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

/* Mobile Menu */
#mobile-menu {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .project-info-modern {
    padding: 1.5rem;
  }
  
  .floating-badge {
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }
  
  .project-image-main {
    height: 200px;
    object-fit: cover;
  }
}

/* Project card grid adjustments */
@media (min-width: 1024px) {
  .project-card-modern {
    min-height: 600px;
  }
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.5);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 182, 212, 0.7);
}

/* Glow Effects */
.glow-cyan {
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

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

/* Enhanced Navigation Links */
.nav-link {
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #06b6d4, #22d3ee);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.text-cyan-400::after {
  width: 100%;
}

/* Enhanced Button Styles */
a[href^="#"]:not(.nav-link) {
  position: relative;
  overflow: hidden;
}

a[href^="#"]:not(.nav-link)::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

a[href^="#"]:not(.nav-link):hover::before {
  width: 300px;
  height: 300px;
}

/* Loading Screen */
#loading-screen {
  transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Logo Animation */
.logo-container {
  animation: logoFloat 2s ease-in-out infinite;
}

.loading-logo {
  height: 80px;
  width: auto;
  filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.6));
  animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes logoPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* Enhanced Spinner */
.loading-spinner {
  width: 60px;
  height: 60px;
  position: relative;
  margin: 0 auto;
}

.loading-spinner::before,
.loading-spinner::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 4px solid transparent;
}

.loading-spinner::before {
  width: 60px;
  height: 60px;
  border-top-color: #06b6d4;
  border-right-color: #06b6d4;
  animation: spin 1s linear infinite;
}

.loading-spinner::after {
  width: 40px;
  height: 40px;
  top: 10px;
  left: 10px;
  border-bottom-color: #22d3ee;
  border-left-color: #22d3ee;
  animation: spinReverse 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes spinReverse {
  to {
    transform: rotate(-360deg);
  }
}

/* Loading Text Animation */
.loading-text-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.loading-text {
  animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {
  0%, 100% {
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
  }
  50% {
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.8), 0 0 30px rgba(6, 182, 212, 0.6);
  }
}

.loading-dots {
  display: inline-flex;
  gap: 4px;
}

.dot {
  font-size: 2rem;
  color: #06b6d4;
  animation: dotBounce 1.4s ease-in-out infinite;
}

.dot-1 {
  animation-delay: 0s;
}

.dot-2 {
  animation-delay: 0.2s;
}

.dot-3 {
  animation-delay: 0.4s;
}

@keyframes dotBounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  40% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Progress Bar */
.loading-progress-bar {
  width: 200px;
  height: 4px;
  background: rgba(6, 182, 212, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
  position: relative;
}

.loading-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #22d3ee, #67e8f9);
  border-radius: 2px;
  width: 0%;
  animation: progressFill 1s ease-out forwards;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.8);
}

@keyframes progressFill {
  to {
    width: 100%;
  }
}

/* Floating Shapes */
.floating-shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(139, 92, 246, 0.3));
  filter: blur(40px);
  animation: float 6s ease-in-out infinite;
}

.shape-1 {
  width: 200px;
  height: 200px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 15%;
  animation-delay: 1s;
}

.shape-3 {
  width: 180px;
  height: 180px;
  bottom: 20%;
  left: 20%;
  animation-delay: 2s;
}

.shape-4 {
  width: 120px;
  height: 120px;
  top: 30%;
  right: 30%;
  animation-delay: 1.5s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.5;
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
    opacity: 0.7;
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
    opacity: 0.6;
  }
}

/* Back to Top Button */
#back-to-top {
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  transform: translateY(-5px) scale(1.1);
}

/* Service Cards */
.service-card {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, rgba(0, 0, 0, 0.8) 100%);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 1.5rem;
  padding: 2.5rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 0;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 20px 40px rgba(6, 182, 212, 0.3);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(6, 182, 212, 0.1) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(6, 182, 212, 0.3);
  transition: all 0.4s;
  position: relative;
  z-index: 1;
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.4);
}

.service-card h3,
.service-card p {
  position: relative;
  z-index: 1;
}

/* Animated Statistics */
.stat-item {
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: scale(1.1);
}

.stat-item .text-3xl {
  transition: all 0.3s ease;
}

/* Seasonal Snow Effect */
#snow-container {
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 9999;
}

.snowflake {
  position: absolute;
  top: -12px;
  background-image: url("images/yourflake.png");
  background-size: contain;
  background-repeat: no-repeat;
  border-radius: 9999px;
  animation: snow-fall 12s linear infinite;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.45));
}

@keyframes snow-fall {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  50% {
    transform: translate3d(var(--sway, 15px), 50vh, 0) rotate(180deg);
  }
  100% {
    transform: translate3d(calc(var(--sway, 15px) * -1), 110vh, 0) rotate(360deg);
    opacity: 0;
  }
}
