:root{ --ink:#0f172a; --muted:#64748b; --border:#e5e7eb; }
*{box-sizing:border-box}
body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:var(--ink);background:#fff}
.wrap{max-width:1000px;margin:24px auto;padding:0 16px}
.site-header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--border)}
.logo{font-weight:900;text-decoration:none;color:var(--ink)}
nav a{margin-left:12px;text-decoration:none;color:#0f172a;font-weight:700}
nav a.is-active{color:#be123c}

.search{width:100%;padding:12px 14px;border:1px solid var(--border);border-radius:12px;font-weight:700;margin:8px 0 16px}
.muted{color:var(--muted);font-weight:600}

.posts{list-style:none;margin:0;padding:0;display:grid;gap:16px}
.card{border:1px solid var(--border);border-radius:14px;overflow:hidden;background:#fff;display:flex;gap:14px}
.post .thumb{display:block;width:220px;min-height:140px;background:#f8fafc}
.post .thumb img{width:100%;height:100%;object-fit:cover;display:block}
.post .thumb .ph{width:100%;height:100%;background:#f1f5f9}
.post .content{padding:12px;display:grid;gap:6px}
.post .title{font-weight:900;font-size:18px;text-decoration:none;color:#0f172a}
.post .excerpt{margin:0;color:#0f172a}
.post .meta{color:#475569;font-size:13px}

.post-detail .hero img{width:100%;height:auto;display:block;border-radius:12px}
.post-detail .title{font-size:32px;margin:14px 0}
.post-detail .meta{color:#475569;margin-bottom:18px}
.post-detail .content{line-height:1.7}
.post-detail .content img{max-width:100%;border-radius:10px}
.back{display:inline-block;margin-top:18px;text-decoration:none;font-weight:800}
/* --- İçindekiler (TOC) mobil düzeltmesi --- */
/* Projede nasıl adlandırdıysanız: .toc / #toc / .post-toc hepsini hedefliyorum */
.toc, #toc, .post-toc { align-self: start; }

/* Başlıklara sabit header için kaydırma payı (TOC tıklayınca başlık üstten gizlenmesin) */
.post-body h1, .post-body h2, .post-body h3 { scroll-margin-top: 80px; }

/* Masaüstünde normal (sticky olabilir) */
@media (min-width: 901px){
  .toc, #toc, .post-toc { position: sticky; top: 84px; z-index: 1; }
}

/* Mobilde: sticky/fixed KAPAT, tam genişlikte üstte göster */
@media (max-width: 900px){
  .toc, #toc, .post-toc{
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    z-index: auto !important;
    margin: 0 0 12px 0;
  }
  /* İsteğe bağlı: içerik listesine maksimum yükseklik ve kaydırma verelim */
  .toc .toc-list, #toc .toc-list, .post-toc .toc-list{
    max-height: 50vh;
    overflow: auto;
  }
}

/* Opsiyonel: mobilde “İçindekiler”i aç/kapa yapılabilir kılmak için */
@media (max-width: 900px){
  .toc .toc-title, #toc .toc-title, .post-toc .toc-title{
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px; border:1px solid #e5e7eb; border-radius: 10px;
    background:#fff; font-weight: 800; cursor: pointer;
  }
  .toc[aria-expanded="false"] .toc-list,
  #toc[aria-expanded="false"] .toc-list,
  .post-toc[aria-expanded="false"] .toc-list{ display: none; }
}
