/* ========================================================================
   CUSTOM.CSS — Ek Yardımcı Stiller
   Developer Starter Theme
   ======================================================================== */

/* ========================================================================
   SCROLLBAR STİLLERİ (Webkit)
   ======================================================================== */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background-color: #c0c0c0;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #a0a0a0;
}

/* Firefox scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: #c0c0c0 #f1f1f1;
}

/* ========================================================================
   SEÇİM RENGİ (::selection)
   ======================================================================== */

::selection {
  background-color: rgba(233, 69, 96, 0.2);
  color: #1a1a2e;
}

::-moz-selection {
  background-color: rgba(233, 69, 96, 0.2);
  color: #1a1a2e;
}

/* ========================================================================
   EKRAN OKUYUCU (Screen Reader Only)
   ======================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only:focus {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  padding: 1rem 2rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background-color: #ffffff;
  color: #1a1a2e;
  z-index: 9999;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ========================================================================
   GÖRSEL YÜKLEME ANİMASYONU
   ======================================================================== */

.img-loading {
  position: relative;
  overflow: hidden;
  background-color: #f0f0f0;
}

.img-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

.img-loading.loaded::after {
  display: none;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Lazy load fade-in */
img[loading='lazy'] {
  opacity: 0;
  transition: opacity 0.4s ease;
}

img[loading='lazy'].loaded,
img.loaded {
  opacity: 1;
}

/* ========================================================================
   MİKRO ETKİLEŞİMLER
   ======================================================================== */

/* Buton basma efekti */
.btn:active {
  transform: scale(0.97);
}

/* Kart hafif döndürme efekti */
.project-card {
  will-change: transform;
}

/* Link altı çizgi animasyonu */
.animated-link {
  position: relative;
  display: inline-block;
}

.animated-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent, #e94560);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.animated-link:hover::after {
  width: 100%;
}

/* Focus visible — klavye navigasyonu */
:focus-visible {
  outline: 2px solid var(--accent, #e94560);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Focus for mouse users — gizle */
:focus:not(:focus-visible) {
  outline: none;
}

/* Tooltip yardımcı sınıfı */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 12px;
  background-color: #1a1a2e;
  color: #ffffff;
  font-size: 0.8rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 100;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ========================================================================
   YARDIMCI SINIFLAR (Utilities)
   ======================================================================== */

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.w-100 { width: 100%; }

/* ========================================================================
   OVERLAY — Mobil menü arka planı
   ======================================================================== */

.nav-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ========================================================================
   YAZDIR STİLLERİ (Print)
   ======================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  .site-header,
  .site-footer,
  .menu-toggle,
  .site-nav,
  .hero-shapes,
  .nav-overlay,
  .filter-buttons,
  .social-links,
  .btn {
    display: none !important;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .section {
    padding: 1.5rem 0;
    page-break-inside: avoid;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #666;
  }

  .project-card {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .project-overlay {
    display: none !important;
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }

  .projects-grid,
  .skills-grid,
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}
