:root {
  --primary-color: #007aff;
  --secondary-color: #34c759;
  --bg-color: #f5f5f7;
  --text-dark: #1d1d1f;
  --text-muted: #86868b;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0,0,0,0.02);
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-dark) !important;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image: linear-gradient(to right, rgba(0,0,0,0.08) 1px, transparent 1px), linear-gradient(to bottom, rgba(0,0,0,0.08) 1px, transparent 1px), 
    radial-gradient(circle at 15% 50%, rgba(0, 122, 255, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(52, 199, 89, 0.08), transparent 25%);
  background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%;
  background-attachment: fixed;
}

/* Glassmorphism Navbar */
.glass-nav {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: saturate(200%) blur(24px);
  -webkit-backdrop-filter: saturate(200%) blur(24px);
  border: 1px solid rgba(255,255,255,0.6);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255,255,255,1);
  transition: all 0.4s ease;
}

@media (min-width: 992px) {
  .glass-nav {
    top: 20px;
    border-radius: 100px;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0.2rem 1.5rem;
  }
}

.glass-nav:hover {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 15px 35px rgba(0, 122, 255, 0.1), inset 0 1px 0 rgba(255,255,255,1);
}

.navbar-brand span {
  transition: all 0.3s ease;
}

.nav-link {
  color: #4a4a4e !important;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  padding: 0.6rem 1.2rem !important;
  border-radius: 50px;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(120deg, rgba(0,122,255,0) 0%, rgba(0,122,255,0.1) 50%, rgba(0,122,255,0) 100%);
  transform: translateX(-100%);
  transition: all 0.5s ease;
  z-index: -1;
  border-radius: 50px;
}

.nav-link:hover {
  color: #007aff !important;
  background: rgba(0, 122, 255, 0.04);
  transform: translateY(-2px);
}

.nav-link:hover::before {
  transform: translateX(100%);
}

/* Hero Section */
.hero-section {
  padding: 8rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  color: #1d1d1f;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 2.5rem;
  max-width: 600px;
}

/* Cards & Overlays */
.project-card {
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: var(--card-shadow);
  background: #fff;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.project-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-img {
  transform: scale(1.05);
}

.project-overlay {
  padding: 1.5rem;
  background: #ffffff;
}

/* Tech / Contact Cards */
.tech-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease;
}

/* Custom Inputs */
.custom-input {
  background: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  color: var(--text-dark) !important;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

.custom-input:focus {
  background: #ffffff !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1) !important;
}

.custom-input::placeholder {
  color: #a1a1a6;
}

/* Buttons */
.btn-primary {
  background: var(--primary-color);
  border: none;
  border-radius: 12px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.3);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #0066d6;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

.btn-outline-light {
  color: var(--text-dark);
  border: 1px solid rgba(0,0,0,0.1);
  background: transparent;
  border-radius: 12px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-light:hover {
  background: rgba(0,0,0,0.08);
  color: var(--text-dark);
}

/* Avatars */
.team-avatar {
  width: 120px; 
  height: 120px; 
  border-radius: 50%; 
  background: linear-gradient(135deg, #f5f5f7, #ffffff);
  border: 2px solid #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  transition: all 0.3s ease;
}

.team-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.team-avatar span {
  font-size: 2.2rem; 
  font-weight: 700; 
  background: linear-gradient(135deg, var(--primary-color), #00d2ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Gradients for Text */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), #00d2ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* Fancy Animated Button */
.btn-fancy {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2.5rem;
  font-weight: 600;
  color: #fff !important;
  background: linear-gradient(135deg, var(--primary-color), #00d2ff);
  border: none;
  border-radius: 12px;
  overflow: hidden;
  z-index: 1;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3);
  text-decoration: none;
}

.btn-fancy::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, #00d2ff, var(--primary-color));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.btn-fancy:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0, 122, 255, 0.4);
}

.btn-fancy:hover::before {
  opacity: 1;
}

.btn-fancy-outline {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2.5rem;
  font-weight: 600;
  color: var(--primary-color) !important;
  background: transparent;
  border: 2px solid var(--primary-color);
  border-radius: 12px;
  overflow: hidden;
  z-index: 1;
  transition: all 0.4s ease;
  text-decoration: none;
}

.btn-fancy-outline:hover {
  background: var(--primary-color);
  color: #fff !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 122, 255, 0.2);
}

/* Tech Stack & Utilities */
.tracking-wide {
  letter-spacing: 0.1em;
}

.grayscale-hover-off img {
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all 0.3s ease;
}

.grayscale-hover-off img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
}

/* Process Step Animation */
.process-step {
  transition: all 0.3s ease;
}
.process-step:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 122, 255, 0.2) !important;
  border-color: var(--primary-color) !important;
}

/* Mobile Polish */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem !important; /* Smaller on mobile */
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  /* Touch target size improvements */
  .btn, .nav-link {
    min-height: 44px; /* Apple minimum touch target height */
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .navbar-collapse {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 16px;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  }
  
  .nav-item {
    margin-bottom: 0.5rem;
  }
  
  .process-row .d-none.d-md-block {
    display: none !important; /* Ensure connecting line is hidden on mobile */
  }
}

/* Entry Animations */
@keyframes flipIn360 {
    0% {
        transform: perspective(1200px) rotateY(-360deg) translateY(-50%) translateX(-50%);
        opacity: 0;
    }
    100% {
        transform: perspective(1200px) rotateY(0deg) translateY(-50%) translateX(-50%);
        opacity: 1;
    }
}

.animate-flip-in {
    animation: flipIn360 1.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

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

.animate-fade-up {
    animation: fadeInUp 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    opacity: 0; /* Starts hidden */
}

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


/* Chase AI inspired effects */
.animate-blink {
    animation: blink 1s step-end infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.tilted-3d-container {
    perspective: 1000px;
}
.tilted-3d-card {
    transform: rotateX(6deg) rotateY(3deg);
    transform-origin: center center;
    transition: transform 0.5s ease;
    border-radius: 1rem;
    box-shadow: 0 20px 60px -15px rgba(0,0,0,0.2), 0 8px 25px -8px rgba(0,0,0,0.15);
}
.tilted-3d-card:hover {
    transform: rotateX(2deg) rotateY(1deg);
}

.tilted-3d-card-reverse {
    transform: rotateX(6deg) rotateY(-3deg);
    transform-origin: center center;
    transition: transform 0.5s ease;
    border-radius: 1rem;
    box-shadow: 0 25px 70px -15px rgba(0,0,0,0.25), 0 10px 30px -8px rgba(0,0,0,0.18);
}
.tilted-3d-card-reverse:hover {
    transform: rotateX(2deg) rotateY(-1deg);
}

.code-window {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 0.75rem;
    overflow: hidden;
}
.code-header {
    background: #F6F6F6;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.mac-btn {
    width: 12px; height: 12px; border-radius: 50%;
}
.mac-red { background: #FF5F57; }
.mac-yellow { background: #FEBC2E; }
.mac-green { background: #28C840; }

/* Timeline adjustments */
.timeline-line {
    position: absolute;
    left: 27px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, rgba(0,122,255,0.5), rgba(0,122,255,0.1), transparent);
}
@media (min-width: 768px) {
    .timeline-line {
        left: 50%;
        transform: translateX(-50%);
    }
}
.timeline-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid rgba(0,122,255,0.5);
    box-shadow: 0 0 8px rgba(0,122,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 19px;
    z-index: 10;
}
@media (min-width: 768px) {
    .timeline-dot {
        left: 50%;
        transform: translateX(-50%);
    }
}
.timeline-dot-inner {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-color);
}

/* Inward curve effect */
.inward-curve-3d {
    transform: perspective(1000px) rotateX(-5deg) rotateY(15deg) translateZ(-20px);
    transform-style: preserve-3d;
    box-shadow: inset 10px 0 20px rgba(0,0,0,0.05), 0 20px 40px -10px rgba(0,0,0,0.2);
}
.inward-curve-3d:hover {
    transform: perspective(1000px) rotateX(-2deg) rotateY(10deg) translateZ(-10px);
}

/* Dual 3D Composition */
.hero-3d-wrapper {
    perspective: 1500px;
    transform-style: preserve-3d;
}

.hero-code-panel {
    transform: rotateY(20deg) rotateX(5deg) translateZ(40px);
    box-shadow: -30px 30px 60px rgba(0,0,0,0.15), inset 0 0 0 1px rgba(0,0,0,0.05);
    transition: transform 0.6s ease;
}
.hero-code-panel:hover {
    transform: rotateY(10deg) rotateX(2deg) translateZ(60px);
}

.hero-image-panel {
    transform: rotateY(-20deg) rotateX(5deg) translateZ(-60px);
    box-shadow: 30px 30px 60px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(0,0,0,0.05);
    transition: transform 0.6s ease;
}
.hero-image-panel:hover {
    transform: rotateY(-10deg) rotateX(2deg) translateZ(-30px);
}

/* Custom 360 Flip & Vibrate Hover Effect for Tech Cards */
.tech-card-hover {
    transition: box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.tech-card-hover:hover {
    /* 
      1. flipForward: 0.6s sürecek, bittiğinde o halde (forwards) kalacak
      2. vibrateCard: 0.6s sonra başlayacak, 0.2s sürecek ve 15 kere tekrarlayacak (toplam 3s)
    */
    animation: 
        flipForward 0.6s ease-out forwards,
        vibrateCard 0.2s linear 0.6s 15;
    box-shadow: 0 25px 50px rgba(0, 122, 255, 0.2);
    z-index: 10;
}

@keyframes flipForward {
    0% { transform: perspective(1200px) rotateY(0deg) translateZ(0) scale(1); }
    100% { transform: perspective(1200px) rotateY(360deg) translateZ(40px) scale(1.05); }
}

@keyframes vibrateCard {
    0% { transform: perspective(1200px) rotateY(360deg) translateZ(40px) scale(1.05) translate(1px, 1px) rotate(0deg); }
    10% { transform: perspective(1200px) rotateY(360deg) translateZ(40px) scale(1.05) translate(-1px, -2px) rotate(-1deg); }
    20% { transform: perspective(1200px) rotateY(360deg) translateZ(40px) scale(1.05) translate(-3px, 0px) rotate(1deg); }
    30% { transform: perspective(1200px) rotateY(360deg) translateZ(40px) scale(1.05) translate(3px, 2px) rotate(0deg); }
    40% { transform: perspective(1200px) rotateY(360deg) translateZ(40px) scale(1.05) translate(1px, -1px) rotate(1deg); }
    50% { transform: perspective(1200px) rotateY(360deg) translateZ(40px) scale(1.05) translate(-1px, 2px) rotate(-1deg); }
    60% { transform: perspective(1200px) rotateY(360deg) translateZ(40px) scale(1.05) translate(-3px, 1px) rotate(0deg); }
    70% { transform: perspective(1200px) rotateY(360deg) translateZ(40px) scale(1.05) translate(3px, 1px) rotate(-1deg); }
    80% { transform: perspective(1200px) rotateY(360deg) translateZ(40px) scale(1.05) translate(-1px, -1px) rotate(1deg); }
    90% { transform: perspective(1200px) rotateY(360deg) translateZ(40px) scale(1.05) translate(1px, 2px) rotate(0deg); }
    100% { transform: perspective(1200px) rotateY(360deg) translateZ(40px) scale(1.05) translate(1px, -2px) rotate(-1deg); }
}

/* Unique Tech Stack Animation */
.tech-icon-item {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
    animation: levitate 3s ease-in-out infinite;
    cursor: pointer;
}

.tech-icon-item:hover {
    animation-play-state: paused;
    transform: scale(1.4) translateY(-10px) rotate(5deg) !important;
    filter: drop-shadow(0 15px 15px rgba(0,122,255,0.4)) brightness(1.2) !important;
}

/* Continuous staggered float */
@keyframes levitate {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

.tech-icon-item:nth-child(1) { animation-delay: 0.0s; }
.tech-icon-item:nth-child(2) { animation-delay: 0.2s; }
.tech-icon-item:nth-child(3) { animation-delay: 0.4s; }
.tech-icon-item:nth-child(4) { animation-delay: 0.6s; }
.tech-icon-item:nth-child(5) { animation-delay: 0.8s; }
.tech-icon-item:nth-child(6) { animation-delay: 1.0s; }
.tech-icon-item:nth-child(7) { animation-delay: 1.2s; }
.tech-icon-item:nth-child(8) { animation-delay: 1.4s; }
.tech-icon-item:nth-child(9) { animation-delay: 1.6s; }
.tech-icon-item:nth-child(10) { animation-delay: 1.8s; }

/* --- NEW UNIQUE ANIMATIONS --- */

/* 1. Neden ozdenTech - Sweep Glow & Pulse */
.why-card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
    overflow: hidden;
}

.why-card-hover::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(0,122,255,0) 0%, rgba(0,122,255,0.05) 50%, rgba(0,122,255,0) 100%);
    transition: all 0.6s ease;
    z-index: 0;
    pointer-events: none;
}

.why-card-hover:hover {
    transform: translateX(15px) translateY(-5px) !important;
    box-shadow: -15px 15px 30px rgba(0,0,0,0.08) !important;
    border-color: rgba(0,122,255,0.3) !important;
}

.why-card-hover:hover::before {
    left: 100%;
}

.why-card-hover:hover .bg-gradient {
    animation: iconPulse 1s infinite alternate;
}

@keyframes iconPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,122,255, 0.4); }
    100% { transform: scale(1.15); box-shadow: 0 0 20px 10px rgba(0,122,255, 0); }
}

/* 2. Olan Projelerimiz - Cybernetic Scanner */
.project-card {
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.project-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 4px;
    background: rgba(0, 122, 255, 0.8);
    box-shadow: 0 0 15px 5px rgba(0, 122, 255, 0.5);
    transform: rotate(25deg) translateY(-300px);
    z-index: 10;
    pointer-events: none;
    opacity: 0;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 122, 255, 0.15);
    border-color: rgba(0, 122, 255, 0.3);
}

.project-card:hover::after {
    opacity: 1;
    animation: scannerBeam 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes scannerBeam {
    0% { transform: rotate(25deg) translateY(-300px); }
    100% { transform: rotate(25deg) translateY(700px); }
}

.project-card:hover .project-img {
    transform: scale(1.12);
    filter: contrast(1.1) brightness(0.9);
}

/* 3. Aktif Kullanıcı (Stats) - 3D Parallax Layers */
.stat-card-3d {
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.6s ease;
}

.stat-card-3d > * {
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), text-shadow 0.6s ease;
}

.stat-card-3d:hover {
    transform: rotateX(15deg) rotateY(-15deg) translateY(-10px) !important;
    box-shadow: 20px 20px 40px rgba(0, 122, 255, 0.15) !important;
    border-color: rgba(0,122,255,0.3) !important;
}

/* Icon pops out immensely */
.stat-card-3d:hover .stat-icon-3d {
    transform: translateZ(80px) scale(1.2);
    text-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* Number pops out moderately */
.stat-card-3d:hover .stat-num-3d {
    transform: translateZ(50px);
    text-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Text pops out slightly */
.stat-card-3d:hover .stat-text-3d {
    transform: translateZ(30px);
}

/* Idle Animations for Stats Icons */
@keyframes idleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes idleRock {
    0%, 100% { transform: rotate(-5deg) translateY(0); }
    50% { transform: rotate(5deg) translateY(-3px); }
}

@keyframes idlePulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(255,193,7,0.2)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 10px rgba(255,193,7,0.8)); }
}

.idle-anim-people {
    display: inline-block;
    animation: idleBounce 3s ease-in-out infinite;
}

.idle-anim-rocket {
    display: inline-block;
    animation: idleRock 2.5s ease-in-out infinite;
}

.idle-anim-server {
    display: inline-block;
    animation: idlePulse 2s ease-in-out infinite;
}
