/* ── DEĞİŞKENLER (Renk Paleti) ── */
:root {
  --bg: #0a0a0a;
  --surface: #121212;
  --border: #2a2a2a;
  --text-main: #ededed;
  --text-muted: #888888;
  --accent: #ffffff;
  --highlight: #4a90e2;
  --code-bg: #0d1117;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 900px; margin: 0 auto; padding: 0 2rem; }

h1, h2, h3 { font-family: 'JetBrains Mono', monospace; font-weight: 600; }

a { color: var(--highlight); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; text-decoration: underline; }

/* ── NAVİGASYON ── */
header { padding: 4rem 0 2rem; border-bottom: 1px solid var(--border); margin-bottom: 3rem; }
.nav-wrapper { display: flex; justify-content: space-between; align-items: baseline; }
.logo { font-size: 1.2rem; font-weight: 700; color: var(--accent); text-decoration: none; font-family: 'JetBrains Mono', monospace; }
.logo:hover { text-decoration: none; opacity: 1; }
nav ul { list-style: none; display: flex; gap: 2rem; }
nav a { font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; color: var(--text-muted); }
nav a:hover { color: var(--accent); text-decoration: none; }
nav a.active { color: var(--accent); border-bottom: 1px solid var(--accent); padding-bottom: 2px; }

/* ── ANA SAYFA ── */
.hero { margin-bottom: 4rem; }
.hero h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: 1.5rem; color: var(--accent); }
.hero p { font-size: 1.1rem; color: var(--text-muted); max-width: 700px; margin-bottom: 2rem; }

.status-badge {
  display: inline-block; padding: 0.4rem 0.8rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 4px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--text-muted);
}
.status-badge span { color: #50fa7b; margin-right: 5px; }

.section-title {
  font-size: 1.2rem; margin-bottom: 1.5rem; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; display: inline-block;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 4rem; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  padding: 1.5rem; border-radius: 6px; transition: transform 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-2px); border-color: #444; }
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--accent); }
.card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
  background: var(--bg); border: 1px solid var(--border);
  padding: 0.2rem 0.5rem; border-radius: 3px; color: var(--text-muted);
}

/* ── ORTAK ── */
.page-title { font-family: 'JetBrains Mono', monospace; font-size: 2rem; color: var(--accent); margin-bottom: 2rem; }

/* ── MAKALELER LİSTESİ ── */
.article-list { display: flex; flex-direction: column; gap: 2rem; }
.article-item { border-bottom: 1px solid var(--border); padding-bottom: 2rem; transition: padding-left 0.2s; }
.article-item:hover { padding-left: 6px; }
.article-meta { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.article-title { font-size: 1.3rem; font-weight: 600; color: var(--accent); margin-bottom: 0.5rem; display: block; font-family: 'JetBrains Mono', monospace; }
.article-title:hover { text-decoration: none; color: var(--highlight); }
.article-excerpt { font-size: 1rem; color: var(--text-muted); }
.read-more { display: inline-block; margin-top: 0.7rem; font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--highlight); letter-spacing: 0.05em; }
.read-more:hover { text-decoration: none; opacity: 1; letter-spacing: 0.1em; }

/* ── MAKALe DETAY ── */
.article-header { margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.article-header h1 { font-family: 'JetBrains Mono', monospace; font-size: 1.7rem; line-height: 1.3; color: var(--accent); margin-bottom: 1.2rem; }
.article-header .article-desc { font-size: 1.05rem; color: var(--text-muted); font-style: italic; border-left: 2px solid var(--highlight); padding-left: 1rem; }

.article-body { max-width: 700px; font-size: 1.05rem; line-height: 1.9; color: #d0d0d0; }
.article-body h2 { font-family: 'JetBrains Mono', monospace; font-size: 1.15rem; color: var(--accent); margin: 2.5rem 0 1rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border); }
.article-body h3 { font-family: 'JetBrains Mono', monospace; font-size: 0.95rem; color: #aaa; margin: 1.8rem 0 0.6rem; }
.article-body p { margin-bottom: 1.4rem; }
.article-body strong { color: var(--accent); font-weight: 600; }
.article-body em { color: #aaa; font-style: italic; }

.article-body blockquote {
  border-left: 2px solid var(--highlight); margin: 2rem 0;
  padding: 0.8rem 1.2rem; background: var(--surface);
  border-radius: 0 4px 4px 0; color: var(--text-muted); font-style: italic;
}
.article-body blockquote cite { display: block; margin-top: 0.5rem; font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: #555; font-style: normal; }

.article-body .note {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--highlight); padding: 1rem 1.2rem;
  border-radius: 0 4px 4px 0; margin: 1.5rem 0; font-size: 0.95rem; color: var(--text-muted);
}
.article-body .note strong { color: var(--highlight); }

.math-block {
  text-align: center; margin: 2rem 0; padding: 1.2rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; overflow-x: auto;
}

.article-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace; font-size: 0.85rem;
}
.article-nav a { color: var(--text-muted); }
.article-nav a:hover { color: var(--accent); text-decoration: none; }

/* ── LABORATUVAR ── */
.lab-module { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 2rem; margin-bottom: 3rem; }
.lab-module h2 { font-family: 'JetBrains Mono', monospace; color: var(--accent); font-size: 1.3rem; margin-bottom: 1rem; }
.lab-module p { color: var(--text-muted); margin-bottom: 1.5rem; }

.code-window { background: var(--code-bg); border: 1px solid #30363d; border-radius: 6px; overflow: hidden; margin-top: 1.5rem; }
.code-header { background: #161b22; padding: 0.5rem 1rem; border-bottom: 1px solid #30363d; font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: #8b949e; display: flex; justify-content: space-between; }
pre { padding: 1rem; overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: #c9d1d9; }
.kw { color: #ff7b72; }
.ty { color: #79c0ff; }
.st { color: #a5d6ff; }
.cm { color: #8b949e; font-style: italic; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border); padding: 2rem 0; margin-top: 4rem;
  font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--text-muted);
  display: flex; justify-content: space-between; align-items: center;
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent); text-decoration: none; }

/* ── SCROLL PROGRESS BAR ── */
.scroll-progress {
  position: fixed; top: 0; left: 0; width: 0%; height: 3px;
  background: linear-gradient(90deg, var(--highlight), #7bb8f5);
  z-index: 1000; transition: width 0.1s linear;
}

/* ── HOVER GELİŞTİRMELERİ ── */
a { transition: color 0.25s ease, opacity 0.25s ease; }

.card {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--highlight);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.08);
}

.tag {
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.tag:hover {
  background: var(--highlight);
  color: var(--bg);
  border-color: var(--highlight);
}

.status-badge {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.status-badge:hover {
  border-color: #50fa7b;
  box-shadow: 0 0 12px rgba(80, 250, 123, 0.1);
}

nav a { transition: color 0.25s ease; }

.article-item { transition: padding-left 0.3s ease, border-color 0.3s ease; }
.article-item:hover { border-bottom-color: var(--highlight); }

.read-more { transition: letter-spacing 0.3s ease, color 0.25s ease; }

.lab-module {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.lab-module:hover {
  border-color: #444;
  box-shadow: 0 4px 20px rgba(74, 144, 226, 0.06);
}

footer a { transition: color 0.25s ease; }

/* ── KEYBOARD FOCUS STİLLERİ ── */
a:focus-visible,
button:focus-visible,
.tag:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── FADE-IN ANİMASYON ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── BACK TO TOP BUTONU ── */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 42px; height: 42px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 50%; color: var(--text-muted);
  font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  z-index: 999;
  text-decoration: none;
}
.back-to-top.visible {
  opacity: 1; visibility: visible;
}
.back-to-top:hover {
  background: var(--highlight); border-color: var(--highlight);
  color: var(--bg); text-decoration: none;
}

/* ── OKUMA SÜRESİ ── */
.reading-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ── MOBİL ── */
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.7rem; }
  nav ul { gap: 1rem; }
  .article-header h1 { font-size: 1.3rem; }
  .article-nav { flex-direction: column; gap: 1rem; text-align: center; }
  .back-to-top { bottom: 1rem; right: 1rem; width: 38px; height: 38px; }
}
/* ── HAMBURGER MENÜ ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  z-index: 200;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.2s;
}
.hamburger:hover span { background: var(--accent); }

/* Açıkken X şekli */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobil nav overlay */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 150;
  backdrop-filter: blur(4px);
}
.nav-mobile-overlay.open { display: block; }

/* Mobil nav drawer */
nav ul.mobile-open {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: 0; right: 0;
  width: min(280px, 80vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 5rem 2rem 2rem;
  gap: 0.5rem;
  z-index: 160;
  animation: slideIn 0.25s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

nav ul.mobile-open li a {
  display: block;
  font-size: 1.1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
nav ul.mobile-open li a:hover { color: var(--accent); }
nav ul.mobile-open li a.active { color: var(--accent); }

@media (max-width: 640px) {
  .hamburger { display: flex; }
  nav ul:not(.mobile-open) { display: none; }
}
