/* ============================================================
   SISTEM YAZILIM — Animations
   ============================================================ */

/* ── Keyframes ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-60px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-100px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.05); opacity: 0.8; }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50%       { box-shadow: 0 0 40px var(--accent-glow-strong); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes borderPulse {
  0%, 100% { border-color: var(--border); }
  50%       { border-color: var(--border-strong); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(100%) scale(0.9); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
@keyframes orbitSpin {
  from { transform: rotate(0deg) translateX(60px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(60px) rotate(-360deg); }
}
@keyframes typewriterCaret {
  0%, 100% { border-right-color: var(--accent-secondary); }
  50%       { border-right-color: transparent; }
}
@keyframes heroReveal {
  from { clip-path: inset(0 100% 0 0); opacity: 0; }
  to   { clip-path: inset(0 0% 0 0); opacity: 1; }
}
@keyframes ripple {
  0%   { transform: scale(0); opacity: 0.6; }
  100% { transform: scale(4); opacity: 0; }
}
@keyframes morphBg {
  0%   { border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%; }
  33%  { border-radius: 40% 60% 30% 70% / 60% 30% 70% 40%; }
  66%  { border-radius: 70% 30% 50% 50% / 40% 70% 30% 60%; }
  100% { border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%; }
}
@keyframes starTwinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50%       { opacity: 1; transform: scale(1.2); }
}
@keyframes neonPulse {
  0%, 100% {
    text-shadow: 0 0 10px var(--accent-glow), 0 0 20px var(--accent-glow), 0 0 40px var(--accent-glow);
  }
  50% {
    text-shadow: 0 0 20px var(--accent-glow-strong), 0 0 40px var(--accent-glow-strong), 0 0 80px var(--accent-glow-strong);
  }
}
@keyframes lineExpand {
  from { width: 0; }
  to   { width: 100%; }
}

/* ── Scroll-Triggered Animation Classes ── */
.aos-item {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.aos-item.slide-left   { transform: translateX(-80px); }
.aos-item.slide-right  { transform: translateX(80px); }
.aos-item.slide-up     { transform: translateY(60px); }
.aos-item.slide-down   { transform: translateY(-40px); }
.aos-item.zoom-in      { transform: scale(0.8); }
.aos-item.flip-in      { transform: rotateY(-90deg); }

.aos-item.animated {
  opacity: 1;
  transform: none;
}

/* ── Delay Classes ── */
.delay-100 { transition-delay: 0.1s !important; }
.delay-200 { transition-delay: 0.2s !important; }
.delay-300 { transition-delay: 0.3s !important; }
.delay-400 { transition-delay: 0.4s !important; }
.delay-500 { transition-delay: 0.5s !important; }
.delay-600 { transition-delay: 0.6s !important; }
.delay-700 { transition-delay: 0.7s !important; }
.delay-800 { transition-delay: 0.8s !important; }

/* ── Direct Animation Utilities ── */
.animate-fadeIn       { animation: fadeIn 0.6s ease forwards; }
.animate-fadeInUp     { animation: fadeInUp 0.7s ease forwards; }
.animate-fadeInDown   { animation: fadeInDown 0.7s ease forwards; }
.animate-fadeInLeft   { animation: fadeInLeft 0.7s ease forwards; }
.animate-fadeInRight  { animation: fadeInRight 0.7s ease forwards; }
.animate-scaleIn      { animation: scaleIn 0.5s var(--transition-spring) forwards; }
.animate-float        { animation: float 4s ease-in-out infinite; }
.animate-pulse        { animation: pulse 2s ease-in-out infinite; }
.animate-spin         { animation: spin 1s linear infinite; }
.animate-glow         { animation: glow 2s ease-in-out infinite; }
.animate-shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-card) 0%,
    var(--bg-tertiary) 50%,
    var(--bg-card) 100%
  );
  background-size: 200% auto;
  animation: shimmer 1.5s linear infinite;
}

/* ── Hover Micro-animations ── */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.hover-scale {
  transition: transform var(--transition-base);
}
.hover-scale:hover { transform: scale(1.04); }

.hover-glow {
  transition: box-shadow var(--transition-base);
}
.hover-glow:hover { box-shadow: 0 0 30px var(--accent-glow-strong); }

.hover-bright {
  transition: filter var(--transition-base);
}
.hover-bright:hover { filter: brightness(1.15); }

/* ── 3D Card Tilt ── */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.1s ease;
  transform-origin: center;
}
.tilt-card .tilt-content {
  transform: translateZ(20px);
  transition: transform 0.1s ease;
}

/* ── Magnetic Button ── */
.magnetic {
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

/* ── Ripple Effect ── */
.ripple-effect {
  position: relative;
  overflow: hidden;
}
.ripple-effect .ripple-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  animation: ripple 0.6s ease-out forwards;
  transform-origin: center;
}

/* ── Hero Gradient Blob ── */
.hero-blob {
  position: absolute;
  border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
  animation: morphBg 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
  opacity: 0.5;
}
.hero-blob-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  top: -200px;
  right: -100px;
}
.hero-blob-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(46,204,113,0.15) 0%, transparent 70%);
  bottom: -100px;
  left: -50px;
  animation-delay: -4s;
}
[data-theme="dark"] .hero-blob-1 {
  background: radial-gradient(circle, rgba(124,58,237,0.35) 0%, transparent 70%);
}
[data-theme="dark"] .hero-blob-2 {
  background: radial-gradient(circle, rgba(6,182,212,0.2) 0%, transparent 70%);
}

/* ── Stars (Dark mode) ── */
.star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  pointer-events: none;
}

/* ── Glowing Line ── */
.glow-line {
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
  box-shadow: 0 0 10px var(--accent-glow);
}
.glow-line-animated {
  height: 2px;
  background: var(--gradient-primary);
  width: 0;
  animation: lineExpand 1s ease 0.5s forwards;
}

/* ── Neon Text ── */
[data-theme="dark"] .neon-text {
  animation: neonPulse 3s ease-in-out infinite;
}

/* ── Skeleton Loading ── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 0%,
    var(--bg-secondary) 50%,
    var(--bg-tertiary) 100%
  );
  background-size: 200% auto;
  animation: shimmer 1.5s linear infinite;
  border-radius: var(--radius-sm);
}

/* ── Page Transitions ── */
.page-transition {
  animation: fadeIn 0.4s ease forwards;
}

/* ── Floating Elements ── */
.float-1 { animation: float 5s ease-in-out infinite; }
.float-2 { animation: float 6s ease-in-out infinite 1s; }
.float-3 { animation: float 4s ease-in-out infinite 2s; }
