:root {
  --bg-color: #0f1115;
  --surface-color: rgba(15, 17, 21, 0.75);
  --text-primary: #f0f2f5;
  --text-secondary: #a0a6b1;
  --accent-color: #6366f1;
  --accent-hover: #4f46e5;
  --glass-border: rgba(255, 255, 255, 0.1);
  --gradient-text: linear-gradient(135deg, #a78bfa 0%, #6366f1 100%);
  --background-overlay: rgba(15, 17, 21, 0.82);
  
  --font-main: 'Outfit', 'Inter', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Animated Background Layer */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(var(--background-overlay), var(--background-overlay)),
    url('assets/bg-network.png');
  background-size: cover;
  background-position: center;
  z-index: -2;
  pointer-events: none;
  filter: blur(1px);
  animation: bgFloat 80s infinite alternate ease-in-out;
}

/* Subtle gradient glow overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.1), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 1rem;
}

p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Layout Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Glassmorphism Header */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(15, 17, 21, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  height: 40px;
  border-radius: 8px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.nav-menu {
  display: flex;
  gap: 1.8rem;
  margin-right: 150px; /* Menüyü sağdan sola çekerek sağa açılma payı bıraktık */
}

.nav-link {
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-text);
  transition: width 0.3s ease;
}

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

/* Küçük masaüstü / Laptop düzenlemeleri */
@media (max-width: 1024px) {
  .nav-container {
    padding: 0 1rem;
  }
  
  .nav-menu {
    gap: 1.2rem;
    margin-right: 100px; /* Laptopta biraz daha az ama yine de pay bırakıyoruz */
  }
  
  .nav-link {
    font-size: 0.95rem;
  }
  
  .logo-text {
    font-size: 1.25rem;
  }
}


/* Dropdown Menu */
.has-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(15, 17, 21, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 0.5rem 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.has-dropdown:hover > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Nested Dropdowns (Fly-out) */
.dropdown-menu .has-dropdown > a::after {
  content: ' ›'; /* Ok yönü tekrar sağa çevrildi */
  float: right;
  margin-left: 10px;
  font-size: 1.2rem;
  line-height: 1;
}

.dropdown-menu .dropdown-menu {
  top: 0;
  left: 100%; /* Tekrar sağa açılacak şekilde güncellendi */
  right: auto;
  transform: translateX(10px);
  margin-top: -1px;
}

.dropdown-menu .has-dropdown:hover > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.dropdown-link {
  display: block;
  padding: 0.8rem 1.5rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  font-weight: 500;
}

.dropdown-link:hover, .dropdown-link.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  padding-left: 2rem;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding: 8rem 0 5rem;
  text-align: center;
}

.hero h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* Badges / Tags */
.badge-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.badge {
  background: var(--surface-color);
  border: 1px solid var(--glass-border);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-color);
  backdrop-filter: blur(4px);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.badge:hover {
  transform: translateY(-2px);
  border-color: var(--accent-color);
}

.badge-signature {
  font-family: 'Dancing Script', cursive;
  font-size: 1.8rem !important;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  border: none !important;
  background-color: transparent !important;
  transform: rotate(-2deg);
  display: inline-block;
  text-shadow: 0 0 15px rgba(167, 139, 250, 0.2);
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.name-signature {
  font-family: 'Dancing Script', cursive;
  font-size: 1.3em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding: 0 10px;
  text-shadow: 0 0 15px rgba(167, 139, 241, 0.2);
}

.hero-intro {
  font-size: 0.4em;
  font-weight: 400;
  color: var(--text-secondary);
  opacity: 0.7;
  vertical-align: middle;
  margin-right: 5px;
}

.badge-signature:hover, .name-signature:hover {
  transform: scale(1.05) rotate(0deg);
  filter: drop-shadow(0 0 12px rgba(167, 139, 250, 0.6));
}

/* Glass Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.glass-card {
  background: var(--surface-color);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* Standart kartlar için sade üst çizgi efekti */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-text);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: rgba(167, 139, 250, 0.3);
}

.glass-card:hover::before {
  opacity: 1;
}

/* --- SADECE ANA SAYFA KARTLARI İÇİN LED TARAMA EFEKTİ --- */
.feature-card {
  padding: 2.5rem 2rem;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 0;
  width: 100%;
  height: 10%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(99, 102, 241, 0.5),
    rgba(167, 139, 250, 0.8),
    rgba(99, 102, 241, 0.5),
    transparent
  );
  z-index: -2;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.feature-card::after {
  content: '';
  position: absolute;
  top: -30%;
  left: 0;
  width: 100%;
  height: 15%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(99, 102, 241, 0.4),
    rgba(167, 139, 250, 0.6),
    transparent
  );
  z-index: -2;
  opacity: 0;
  filter: blur(25px);
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
  border-color: rgba(167, 139, 250, 0.5);
}

.feature-card:hover::before,
.feature-card:hover::after {
  opacity: 1;
  animation: ledScan 3s ease-in-out infinite;
}

.glass-card h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient-text);
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--surface-color);
  border-color: var(--accent-color);
}

/* Footer */
footer {
  margin-top: 5rem;
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

/* Page Section */
.page-section {
  padding: 4rem 0;
}

.section-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 1rem;
}

.section-header h2 {
  font-size: 2.5rem;
}

/* Content Blocks */
.content-block {
  margin-bottom: 2rem;
}
.content-block pre {
  background: #1e1e2e;
  padding: 1.25rem;
  padding-top: 2.8rem; /* Buton için üstten alan açıyoruz */
  border-radius: 12px;
  overflow-x: auto;
  border: 1px solid var(--glass-border);
  color: #cdd6f4;
  margin-bottom: 1.5rem;
  position: relative; /* Buton konumlandırma için kritik */
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}

/* Kopyalama Butonu Stilleri */
.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 5px;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--accent-color);
  transform: translateY(-1px);
}

.copy-btn:active {
  transform: translateY(0);
}

.copy-btn.success {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  color: #fff;
}

.content-block code {
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .nav-menu {
    display: none; /* In an actual implementation, toggle this via JS */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(15, 17, 21, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 2rem;
    border-bottom: 1px solid var(--glass-border);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .dropdown-menu {
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding-left: 1rem;
    display: none;
  }

  .has-dropdown:hover > .dropdown-menu,
  .has-dropdown:active > .dropdown-menu {
    display: flex;
  }
  
  /* Nested menu adjustments for mobile */
  .dropdown-menu .dropdown-menu {
    border-left: 1px solid rgba(255,255,255,0.1);
    margin-left: 0.5rem;
  }

  .mobile-toggle {
    display: block;
  }
}

/* Daha küçük laptoplar veya büyük tabletler için ek güvenlik (max-width 1100px altı) */
@media (min-width: 769px) and (max-width: 1100px) {
  .nav-menu {
    gap: 1rem;
  }
  .nav-link {
    font-size: 0.9rem;
  }
}


/* CV & Timeline Styles */
.cv-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-top: 2rem;
}

@media (max-width: 900px) {
  .cv-grid { grid-template-columns: 1fr; }
}

.cv-section-title {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.5rem;
}

.timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--glass-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1.5rem - 6px);
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-color);
}
/* --- Başa Dön Butonu --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--surface-color);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.back-to-top:hover svg {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
  }
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 0.3rem;
  display: block;
}

.timeline-title { font-size: 1.2rem; font-weight: 700; }
.timeline-subtitle { font-size: 0.95rem; color: var(--text-secondary); font-style: italic; margin-bottom: 0.8rem; }
.timeline-content { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }
.timeline-content ul { margin-left: 1rem; }

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  font-size: 0.8rem;
  border: 1px solid var(--glass-border);
}

/* Print Styles */
/* Animations */
@keyframes ledScan {
  0% { top: -20%; }
  50% { top: 100%; }
  100% { top: -20%; }
}

@keyframes bgFloat {
  0% { transform: scale(1.02) translate(0, 0); }
  50% { transform: scale(1.03) translate(-0.5%, -0.5%); }
  100% { transform: scale(1.02) translate(0.2%, 0.2%); }
}

@media print {
  .navbar, .btn, .download-container, footer { display: none !important; }
  body { background: white !important; color: black !important; }
  .container { width: 100% !important; max-width: none !important; padding: 0 !important; }
  .glass-card { border: 1px solid #eee !important; background: white !important; box-shadow: none !important; color: black !important; padding: 1.5rem !important; }
  .cv-section-title, .timeline-title, h1, h2, h3 { color: black !important; }
  .text-gradient, .name-signature, .badge-signature { 
    background: none !important; 
    -webkit-text-fill-color: black !important; 
    color: black !important;
    text-shadow: none !important;
  }
}
