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

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

/* section {
            scroll-snap-align: start;
        } */

body {
  font-family: "Inter", sans-serif;
  transition: all 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

.gradient-text {
  background: linear-gradient(90deg, #0ea5e9, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gradient-bg {
  background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -38px;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
  border: 3px solid white;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.2);
}

.timeline-item::after {
  content: "";
  position: absolute;
  left: -31px;
  top: 24px;
  width: 2px;
  height: calc(100% - 24px);
  background: #e5e7eb;
}

.dark .timeline-item::after {
  background: #374151;
}

.timeline-item:last-child::after {
  display: none;
}

.nav-link {
  position: relative;
  transition: all 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 3px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(90deg, #0ea5e9, #8b5cf6);
  transition: width 0.3s ease;
  border-radius: 3px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.hero-pattern {
  background-image: radial-gradient(
    rgba(14, 165, 233, 0.1) 1px,
    transparent 1px
  );
  background-size: 20px 20px;
}

.dark .hero-pattern {
  background-image: radial-gradient(
    rgba(14, 165, 233, 0.05) 1px,
    transparent 1px
  );
}

.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.scroll-top.active {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top:hover {
  box-shadow: 0 10px 20px -5px rgba(14, 165, 233, 0.5);
  transform: translateY(-3px);
}

.theme-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #e5e7eb;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dark .theme-toggle {
  background: #4b5563;
}

.theme-toggle-handle {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark .theme-toggle-handle {
  transform: translateX(20px);
  background: #111828;
}

.portfolio-item {
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-radius: 0.75rem;
  overflow: hidden;
  position: relative;
  height: 320px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.portfolio-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0) 60%
  );
  transition: all 0.3s ease;
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.portfolio-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  transition: all 0.3s ease;
  z-index: 2;
  color: white;
  transform: translateY(20px);
  opacity: 0;
}

.portfolio-item:hover .portfolio-content {
  transform: translateY(0);
  opacity: 1;
}

.portfolio-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.about-item,
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-item:hover,
.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.dark .about-item:hover,
.dark .card-hover:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.skill-tag {
  transition: all 0.2s ease;
  font-size: 0.75rem;
  font-weight: 500;
}

.skill-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tool-tag {
  transition: all 0.2s ease;
  font-size: 0.75rem;
  font-weight: 500;
}

.section-divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, #0ea5e9, #8b5cf6);
  margin: 0 auto;
  border-radius: 2px;
}

.contact-input {
  transition: all 0.3s ease;
  border-width: 1px;
}

.contact-input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.dark .contact-input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

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

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

.section-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.section-fade.active {
  opacity: 1;
  transform: translateY(0);
}

.glow {
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.5);
}

.dark .glow {
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

.btn-hover {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-hover::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: all 0.5s ease;
}

.btn-hover:hover::before {
  left: 100%;
}

.social-icon {
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: translateY(-3px) scale(1.1);
}

/* AI Section Loading Spinner */
.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 2s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

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

.skill-badge:hover {
  transform: translateY(-5px);
  filter: brightness(1.1);
}

/* Custom CSS for animations and effects */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.delay-1 {
  animation-delay: 0.2s;
}
.delay-2 {
  animation-delay: 0.4s;
}
.delay-3 {
  animation-delay: 0.6s;
}
.delay-4 {
  animation-delay: 0.8s;
}

.gradient-text {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #3b82f6;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.active-nav::after {
  width: 100%;
}

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