/* Floating Elements & Custom Cursor Styles */

/* Custom cursor styles */
.cursor-follower {
  position: fixed;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: transparent;
  border: 2px solid var(--accent-color);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  opacity: 0.7;
  transition: width 0.3s, height 0.3s, opacity 0.3s, background-color 0.3s;
}

.cursor-follower.active {
  width: 65px;
  height: 65px;
  opacity: 0.3;
  background-color: var(--accent-color);
}

/* Floating elements */
.floating-element {
  position: absolute;
  z-index: 0;
  opacity: 0.4;
  animation: float 8s ease-in-out infinite;
}

.floating-element.circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--accent-color), transparent);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.floating-element.square {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-color), transparent);
  border: 2px solid rgba(255, 255, 255, 0.1);
  transform: rotate(45deg);
}

.floating-element.triangle {
  width: 0;
  height: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-bottom: 50px solid rgba(var(--accent-color-rgb, 67, 97, 238), 0.2);
}

.floating-element.cross {
  width: 40px;
  height: 40px;
  position: relative;
}

.floating-element.cross:before,
.floating-element.cross:after {
  content: '';
  position: absolute;
  background-color: rgba(var(--accent-color-rgb, 67, 97, 238), 0.3);
}

.floating-element.cross:before {
  width: 100%;
  height: 5px;
  top: 50%;
  transform: translateY(-50%);
}

.floating-element.cross:after {
  width: 5px;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
}

/* Animation for form input fields */
.form-group {
  position: relative;
  margin-bottom: 25px;
}

.form-control {
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  width: 100%;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.form-label {
  position: absolute;
  top: 15px;
  left: 15px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  pointer-events: none;
}

.form-group.focused .form-label {
  top: -10px;
  left: 10px;
  font-size: 0.8rem;
  padding: 0 5px;
  background: var(--bg-primary);
  color: var(--accent-color);
}

.form-control:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(var(--accent-color-rgb, 67, 97, 238), 0.15);
  outline: none;
}

.form-group.error .form-control {
  border-color: #ff4b4b;
}

.form-group.error .form-label {
  color: #ff4b4b;
}

/* Form loading and success animations */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  margin-right: 5px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Shake animation for form validation */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
  animation: shake 0.6s cubic-bezier(.36,.07,.19,.97) both;
}

/* Alert styles with animations */
.alert {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 15px 25px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.alert::before {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 10px;
  font-size: 1.2rem;
}

.alert-success {
  background-color: #10b981;
}

.alert-success::before {
  content: '\f00c';
}

.alert-error {
  background-color: #ef4444;
}

.alert-error::before {
  content: '\f071';
}

/* Theme transition effect */
.theme-transition {
  transition: background-color 0.7s ease, color 0.7s ease, border-color 0.7s ease, box-shadow 0.7s ease;
}

/* Button hover effects */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: -100%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
  transition: left 0.5s ease;
}

.btn:hover::after {
  left: 100%;
}

/* Extra animations for section titles */
.section-title span {
  display: inline-block;
}

.section-title.animated span {
  animation: titleWave 0.4s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes titleWave {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Make skill items interactive on hover */
.skill-item:hover .skill-progress {
  animation: progressPulse 1.5s ease infinite;
}

@keyframes progressPulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Skill counter styles */
.skill-counter {
  position: absolute;
  right: 0;
  top: -25px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-color);
}

/* 3D tilt effect for project cards */
.project-card.hovered {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Social media icons hover effects */
.social-links a {
  position: relative;
  overflow: hidden;
}

.social-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.social-links a:hover::before {
  transform: scale(1);
} 