/* ============================================================
   BLOG — style.css'ten sonra yüklenir, aynı değişkenleri kullanır.
   Kart bileşeni (.post-card / .post-grid) style.css içindedir.
============================================================ */
:root {
  --prose: #C6D3E2;
}
html[data-theme="light"] {
  --prose: #22344A;
}
html { scroll-padding-top: 96px; }

.blog-wrap {
  position: relative;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 32px;
}

/* --- Sayfa başlığı (liste + yazı) ------------------------ */
.blog-hero {
  position: relative;
  padding: 140px 0 64px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 85% 0%, rgba(255,92,10,.12) 0%, transparent 60%),
    linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
          mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
  pointer-events: none;
}
.blog-hero h1 {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(1.7rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--white);
  max-width: 920px;
}
.blog-hero h1 em { font-style: normal; color: var(--fire); }
.blog-lead {
  max-width: 680px;
  margin-top: 18px;
  color: var(--steel);
  font-size: 1.02rem;
  line-height: 1.8;
}
.blog-hero .post-card-cat { margin-bottom: 18px; display: inline-block; }

/* Breadcrumb */
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
  font-family: 'Syne Mono', monospace;
  font-size: .74rem;
  color: var(--muted);
}
.breadcrumb li + li::before {
  content: '›';
  margin-right: 6px;
  color: var(--fire);
}
.breadcrumb a { transition: color .2s; }
.breadcrumb a:hover { color: var(--fire); }
.breadcrumb [aria-current] { color: var(--steel); }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 24px;
  font-family: 'Syne Mono', monospace;
  font-size: .76rem;
  color: var(--muted);
}
.post-meta > * + *::before {
  content: '';
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--fire);
  margin-right: 10px;
  vertical-align: middle;
}

.post-cover {
  max-width: 960px;
  margin-top: 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-4);
}
.post-cover img { width: 100%; height: auto; }

/* Menüde aktif sayfa */
.nav-links > li > a[aria-current="page"] { color: var(--fire); }

/* --- Liste sayfası ---------------------------------------- */
.blog-list-section {
  padding: 56px 0 120px;
  background: var(--bg-2);
}
.blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}
.blog-filter button {
  font-family: 'Syne Mono', monospace;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--steel);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 8px 16px;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.blog-filter button:hover { color: var(--white); border-color: var(--steel); }
.blog-filter button[aria-pressed="true"] {
  color: #fff;
  background: var(--fire);
  border-color: var(--fire);
}
.post-card[hidden], .blog-empty[hidden] { display: none; }
.blog-empty {
  padding: 40px 0;
  color: var(--steel);
  font-size: .95rem;
}

/* --- Yazı sayfası ----------------------------------------- */
.post-main { background: var(--bg-2); }
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 64px;
  align-items: start;
  padding-top: 56px;
  padding-bottom: 72px;
}
.post-body { grid-column: 1; grid-row: 1; max-width: 780px; }
.post-aside {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* İçindekiler */
.toc {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 14px;
}
.toc-title {
  font-family: 'Syne Mono', monospace;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fire);
  margin-bottom: 10px;
}
.toc ol { list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc li + li { border-top: 1px dashed var(--border); }
.toc a {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  font-size: .86rem;
  line-height: 1.45;
  color: var(--steel);
  transition: color .2s;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: 'Syne Mono', monospace;
  font-size: .7rem;
  color: var(--muted);
  padding-top: 2px;
}
.toc a:hover, .toc a.is-active { color: var(--fire); }

.aside-cta {
  background: var(--fire-dim);
  border: 1px solid var(--border-fire);
  border-radius: var(--radius);
  padding: 22px;
}
.aside-cta p {
  color: var(--white);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.5;
  margin-bottom: 14px;
}
.aside-cta .btn-fire { width: 100%; justify-content: center; padding: 12px 18px; font-size: .85rem; }

/* Makale metni */
.prose {
  color: var(--prose);
  font-size: 1.05rem;
  line-height: 1.85;
}
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--white);
  margin-top: 2.4em;
}
.prose h2::before {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: var(--fire);
  margin-bottom: 16px;
}
.prose > h2:first-child { margin-top: 0; }
.prose h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--white);
  margin-top: 1.8em;
}
.prose h2 + p, .prose h3 + p { margin-top: .7em; }
.prose a {
  color: var(--fire);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { color: var(--white); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .5em; }
.prose li::marker { color: var(--fire); }
.prose figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.prose figcaption {
  margin-top: 10px;
  font-family: 'Syne Mono', monospace;
  font-size: .74rem;
  line-height: 1.6;
  color: var(--muted);
}
.prose figure { margin-top: 2em; margin-bottom: 2em; }

.post-note {
  border-left: 3px solid var(--fire);
  background: var(--fire-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  font-size: .98rem;
}

/* Tablo (karşılaştırma yazıları için) */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.6; }
.prose th, .prose td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.prose th {
  font-family: 'Syne Mono', monospace;
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--bg-3);
}
.prose tr:last-child td { border-bottom: none; }

/* SSS */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-3);
  transition: border-color .2s;
}
.prose .faq-item + .faq-item { margin-top: 10px; }
.faq-item[open] { border-color: var(--border-fire); }
.faq-item summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 18px 56px 18px 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Unbounded', sans-serif;
  font-size: 1.2rem;
  color: var(--fire);
  transition: transform .2s;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.prose .faq-item h3 { margin: 0; font-size: 1.02rem; line-height: 1.5; }
.faq-answer { padding: 0 20px 20px; font-size: .98rem; }
.faq-answer > * + * { margin-top: .8em; }

/* Teklif kutusu */
.post-cta {
  position: relative;
  overflow: hidden;
  margin-top: 56px;
  padding: 40px;
  border: 1px solid var(--border-fire);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 70% 120% at 0% 0%, rgba(255,92,10,.18) 0%, transparent 60%),
    var(--bg-3);
}
.post-cta .s-tag { margin-bottom: 14px; }
.post-cta-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--white);
  margin-bottom: 12px;
}
.post-cta p:not(.post-cta-title) { color: var(--steel); line-height: 1.75; max-width: 560px; }
.post-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 26px;
}
html[data-theme="light"] .post-cta {
  background:
    radial-gradient(ellipse 70% 120% at 0% 0%, rgba(217,71,0,.1) 0%, transparent 60%),
    var(--bg-3);
}

/* İlgili yazılar */
.related {
  padding: 72px 0 110px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.related-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 36px;
}
.related-title em { font-style: normal; color: var(--fire); }

/* 404 */
.notfound .blog-hero { border-bottom: none; padding-bottom: 110px; }
.notfound-code {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(4rem, 14vw, 9rem);
  font-weight: 900;
  line-height: 1;
  color: var(--fire);
  margin-bottom: 12px;
}
.notfound-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* --- Responsive ------------------------------------------- */
@media (max-width: 991px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 40px; }
  .post-aside { grid-column: 1; grid-row: 1; position: static; }
  .post-body { grid-row: 2; max-width: none; }
  .aside-cta { display: none; }
}
@media (max-width: 640px) {
  .blog-wrap { padding: 0 20px; }
  .blog-hero { padding: 112px 0 44px; }
  .post-cover { margin-top: 28px; border-radius: var(--radius); }
  .prose { font-size: 1rem; line-height: 1.8; }
  .post-cta { padding: 28px 22px; }
  .post-cta-actions .btn-fire, .post-cta-actions .btn-ghost { width: 100%; justify-content: center; }
  .blog-list-section { padding: 40px 0 80px; }
  .related { padding: 56px 0 80px; }
}
