:root {
  /* Ana Renkler (Tech Modern) */
  --color-primary: #38bdf8;
  --color-primary-rgb: 56, 189, 248;
  --color-accent: #f472b6;
  
  /* Nötr Renkler */
  --color-bg: #0f172a;
  --color-bg-rgb: 15, 23, 42;
  --color-surface: rgba(30, 41, 59, 0.7);
  --color-text-primary: #f8fafc;
  --color-text-secondary: #94a3b8;
  --color-border: rgba(148, 163, 184, 0.15);

  /* Spacing Sistemi (8px grid) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --space-5xl: 128px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadow Sistemi */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.4);
  --shadow-primary: 0 8px 24px rgba(var(--color-primary-rgb), 0.25);

  /* Tipografi */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Easing */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Noise Overlay */
.grain-overlay::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw + 1rem, 5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 4vw + 0.5rem, 3.5rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.5rem, 2.5vw, 2.5rem); letter-spacing: -0.01em; }

p { font-size: clamp(1rem, 1vw + 0.5rem, 1.125rem); color: var(--color-text-secondary); }

/* Layout System */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: 120px 0;
  position: relative;
  z-index: 1;
}

.grid {
  display: grid;
  gap: var(--space-xl);
  perspective: 1200px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-asymmetric { grid-template-columns: 1.5fr 1fr; }

/* Gradient Mesh (Hero) */
.hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(244, 114, 182, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(56, 189, 248, 0.05) 0%, transparent 50%),
    var(--color-bg);
}

/* Components */
.nav {
  position: fixed;
  top: 0; width: 100%;
  z-index: 100;
  padding: var(--space-md) 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(var(--color-bg-rgb), 0.7);
  border-bottom: 1px solid var(--color-border);
}

.nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  gap: var(--space-xl);
  align-items: center;
}

.nav-links a {
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-bg);
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s var(--ease-out-expo);
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(var(--color-primary-rgb), 0.4);
  background: #fff;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-text-primary);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all 0.4s var(--ease-out-expo);
  backdrop-filter: blur(8px);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--color-primary-rgb), 0.3);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(var(--color-primary-rgb), 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  color: var(--color-primary);
}

/* Badges for Technologies */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.badge:hover {
  background: rgba(var(--color-primary-rgb), 0.15);
  border-color: rgba(var(--color-primary-rgb), 0.5);
  transform: translateY(-2px);
}

/* Reference Marquee 3D */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 20px 0;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  perspective: 1000px;
}

.marquee-track {
  display: flex;
  width: calc(250px * 12); /* Based on card width + gap * total items */
  gap: 30px;
  animation: scrollMarquee 20s linear infinite;
  transform-style: preserve-3d;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes scrollMarquee {
  0% { transform: translateX(0) rotateX(15deg); }
  100% { transform: translateX(calc(-250px * 6 - 180px)) rotateX(15deg); } /* Move half the track (6 items * width + gap) */
}

.reference-card {
  width: 220px;
  flex-shrink: 0;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--color-border);
  padding: 24px;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: all 0.4s var(--ease-out-expo);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  transform: translateZ(0) scale(1);
}

.reference-card:hover {
  color: var(--color-text-primary);
  border-color: var(--color-primary);
  background: rgba(30, 41, 59, 0.8);
  transform: translateZ(50px) scale(1.1);
  box-shadow: 0 15px 30px rgba(0,0,0,0.5);
  z-index: 10;
}

/* 3D Orbit Visual */
.hero-visual {
  margin: 0 auto;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
  transform-style: preserve-3d;
}

.ring-1 {
  width: 320px;
  height: 320px;
  border-top-color: var(--color-primary);
  border-right-color: rgba(56, 189, 248, 0.2);
  animation: spin3D_1 10s linear infinite;
}

.ring-2 {
  width: 380px;
  height: 380px;
  border-bottom-color: var(--color-accent);
  border-left-color: rgba(244, 114, 182, 0.2);
  animation: spin3D_2 14s linear infinite reverse;
}

.ring-3 {
  width: 440px;
  height: 440px;
  border-top-color: rgba(255, 255, 255, 0.4);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  animation: spin3D_3 18s linear infinite;
}

@keyframes spin3D_1 {
  0% { transform: rotateX(70deg) rotateY(20deg) rotateZ(0deg); }
  100% { transform: rotateX(70deg) rotateY(20deg) rotateZ(360deg); }
}

@keyframes spin3D_2 {
  0% { transform: rotateX(40deg) rotateY(-40deg) rotateZ(0deg); }
  100% { transform: rotateX(40deg) rotateY(-40deg) rotateZ(360deg); }
}

@keyframes spin3D_3 {
  0% { transform: rotateX(80deg) rotateY(10deg) rotateZ(0deg); }
  100% { transform: rotateX(80deg) rotateY(10deg) rotateZ(360deg); }
}

@keyframes floatBox {
  0% { transform: translateY(0) rotate(5deg) scale(1); }
  50% { transform: translateY(-20px) rotate(-5deg) scale(1.05); }
  100% { transform: translateY(0) rotate(5deg) scale(1); }
}

@keyframes pulseGlow {
  0% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
  100% { transform: scale(0.8); opacity: 0.5; }
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes fadeInUp3D {
  0% { 
    opacity: 0; 
    transform: translateY(80px) translateZ(-150px) rotateX(25deg); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(0) translateZ(0) rotateX(0deg); 
  }
}

.animate-on-scroll {
  opacity: 0;
  transform-origin: top center;
  animation-fill-mode: forwards;
  will-change: transform, opacity;
}

.is-visible {
  animation: fadeInUp3D 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Utilities */
.relative { position: relative; }
.text-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-center { text-align: center; }
.text-sm { font-size: 0.9rem; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-lg { margin-bottom: var(--space-lg); }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-md { gap: var(--space-md); }

/* Responsive */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-asymmetric {
    grid-template-columns: 1fr;
  }
  
  .section { padding: 60px 0; }
  
  .hero-content h1 { font-size: 2.5rem; }
  
  /* Mobile Menu Setup */
  .hamburger {
    display: block;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1000;
  }
  
  .hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--color-text-primary);
    border-radius: 2px;
  }
  
  .hamburger.active .bar:nth-child(2) { opacity: 0; }
  .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .nav-links {
    position: fixed;
    left: -100%;
    top: 70px;
    gap: 0;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.95);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.5);
    padding: 2rem 0;
    z-index: 999;
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .nav-links a {
    margin: 16px 0;
    font-size: 1.2rem;
  }

  /* Scale down 3D rings so they fit mobile */
  .hero-visual {
    transform: scale(0.65);
    margin-top: -30px;
    margin-bottom: -50px;
  }
  
  /* Marquee Track Adjustment */
  .marquee-track {
    gap: 15px;
  }
}

/* Hide Hamburger on Desktop */
@media (min-width: 769px) {
  .hamburger {
    display: none;
  }
}
