/* ─── CSS Variables ─── */
:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 0 0% 3.9%;
  --muted: 0 0% 96.1%;
  --muted-foreground: 0 0% 45.1%;
  --accent: 0 0% 96.1%;
  --accent-foreground: 0 0% 9%;
  --border: 0 0% 89.8%;
  --input: 0 0% 89.8%;
}

.dark {
  --background: 0 0% 3.9%;
  --foreground: 0 0% 98%;
  --card: 0 0% 5.9%;
  --card-foreground: 0 0% 98%;
  --muted: 0 0% 14.9%;
  --muted-foreground: 0 0% 63.9%;
  --accent: 0 0% 14.9%;
  --accent-foreground: 0 0% 98%;
  --border: 0 0% 14.9%;
  --input: 0 0% 14.9%;
}

/* ─── Base ─── */
html { scroll-behavior: smooth; }
* { border-color: hsl(var(--border)); }
h1, h2, h3, h4, h5, h6 { font-family: 'Playfair Display', Georgia, serif; }
::selection { background: rgba(176, 128, 78, 0.2); }

/* ─── Noise Overlay ─── */
.noise-overlay::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.03;
  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)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}
.dark .noise-overlay::before { opacity: 0.05; }

/* ─── Nav Link Underline ─── */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  height: 2px;
  width: 0;
  background: #b0804e;
  transition: all 0.3s ease-in-out;
}
.nav-link:hover::after {
  left: 12px;
  width: calc(100% - 24px);
}

/* ─── Custom Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: hsl(var(--muted-foreground) / 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: hsl(var(--muted-foreground) / 0.5); }

/* ─── Reading Progress ─── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: #b0804e;
  z-index: 100;
  transition: width 0.1s ease;
}

/* ─── Typewriter Cursor ─── */
.typewriter-cursor {
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* ─── AOS Custom Easing ─── */
[data-aos] { transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1) !important; }

/* ─── Card Hover ─── */
.card-hover {
  transition: all 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(176, 128, 78, 0.1);
}
.dark .card-hover:hover {
  box-shadow: 0 20px 60px rgba(176, 128, 78, 0.05);
}

/* ─── Counter Animation ─── */
.counter { display: inline-block; }

/* ─── Stat Dividers ─── */
.stat-item:not(:last-child) {
  border-right: 1px solid hsl(var(--border) / 0.4);
}
@media (max-width: 767px) {
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(-n+2) { border-bottom: 1px solid hsl(var(--border) / 0.4); }
}

/* ─── Bounce Animation for "Önerilen" Badge ─── */
.bounce-badge {
  animation: badgeBounce 2.5s ease-in-out infinite;
}
@keyframes badgeBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}
