/* ==========================================================================
   ZIFT STUDIO — BLOG v2 (Liste · Detay · Okuma Deneyimi · Kod Blokları)
   style.css token'larının üzerine kuruludur: --bg, --text, --accent, --radius-*,
   --shadow-*, body[data-theme="dark"]. Yeni renk/ölçü icat etmez.
   Tüm sınıflar "zb-" önekiyle izole edilmiştir.
   ========================================================================== */

:root {
  --zb-read-width: 70ch;
  --zb-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --zb-glass: rgba(255, 255, 255, 0.72);
  --zb-glass-border: rgba(15, 23, 42, 0.08);
  --zb-code-bg: #0b1220;
  --zb-code-head: #0f172a;
  --zb-code-border: rgba(148, 163, 184, 0.16);
}

/* display:flex/grid tanımlı bileşenlerde de [hidden] her zaman gizlesin */
[hidden] { display: none !important; }

body[data-theme="dark"] {
  --zb-glass: rgba(17, 24, 39, 0.72);
  --zb-glass-border: rgba(255, 255, 255, 0.08);
  --zb-code-bg: #070b14;
  --zb-code-head: #0b1220;
}

/* --------------------------------------------------------------------------
   1. KATEGORİ ROZETİ (renk tek değişkenden: --c)
   -------------------------------------------------------------------------- */
.zb-badge {
  --c: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-pill);
  color: color-mix(in srgb, var(--c) 82%, #000);
  background: color-mix(in srgb, var(--c) 10%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--c) 24%, transparent);
  white-space: nowrap;
}

body[data-theme="dark"] .zb-badge {
  color: color-mix(in srgb, var(--c) 55%, #fff);
  background: color-mix(in srgb, var(--c) 16%, var(--card-bg));
  border-color: color-mix(in srgb, var(--c) 35%, transparent);
}

.zb-badge-float {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--card-bg) 82%, transparent);
}

/* --------------------------------------------------------------------------
   2. BLOG LİSTE SAYFASI
   -------------------------------------------------------------------------- */
.zb-page {
  width: 100%; /* .page-wrapper flex column: auto margin içerik genişliğine büzmesin */
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 5.5rem 1.5rem 6rem;
}

.zb-page-head {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2.25rem;
  max-width: 780px;
}

.zb-page-head .section-title { margin-bottom: 0; }

.zb-page-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Araç çubuğu: arama + filtreler (sticky glass) */
.zb-toolbar {
  position: sticky;
  top: calc(var(--header-height) + 0.5rem);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.85rem;
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  background: var(--zb-glass);
  border: 1px solid var(--zb-glass-border);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow-sm);
}

.zb-toolbar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.zb-search {
  position: relative;
  flex: 0 1 300px;
  min-width: 0;
}

.zb-search svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.zb-search input {
  width: 100%;
  font: inherit;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.6rem 2.2rem 0.6rem 2.3rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.zb-search input::placeholder { color: var(--text-muted); }

.zb-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.zb-search kbd {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  background: var(--bg-soft);
}

.zb-chips {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
  padding: 2px;
  mask-image: linear-gradient(90deg, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
}

.zb-chips::-webkit-scrollbar { display: none; }

.zb-chip {
  --c: var(--text);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s var(--zb-ease), color 0.2s var(--zb-ease), border-color 0.2s var(--zb-ease), transform 0.2s var(--zb-ease);
}

.zb-chip:hover {
  color: var(--text);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

.zb-chip:focus-visible,
.zb-tag-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.zb-chip[aria-pressed="true"] {
  color: var(--text-inverse);
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.zb-chip-count {
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 1.4rem;
  text-align: center;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.zb-chip[aria-pressed="true"] .zb-chip-count {
  background: color-mix(in srgb, var(--text-inverse) 18%, transparent);
  color: var(--text-inverse);
}

.zb-tags-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.zb-tags-row[hidden] { display: none; }

.zb-tag-chip {
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 0.22rem 0.65rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.zb-tag-chip:hover { color: var(--accent); border-color: var(--accent); }

.zb-tag-chip[aria-pressed="true"] {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
}

.zb-result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -0.75rem 0 1.25rem;
  scroll-margin-top: calc(var(--header-height) + 9rem);
  font-size: 0.82rem;
  color: var(--text-muted);
  min-height: 1.5rem;
}

.zb-clear-btn {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0;
}

.zb-clear-btn:hover { text-decoration: underline; }

/* Öne çıkan yazı (bento hero) */
.zb-featured {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  min-height: 380px;
  margin-bottom: 2.5rem;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card-bg);
  box-shadow: var(--shadow-md);
  isolation: isolate;
  transition: transform 0.35s var(--zb-ease), box-shadow 0.35s var(--zb-ease), border-color 0.35s var(--zb-ease);
}

.zb-featured:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--text-muted);
}

.zb-featured-media {
  position: relative;
  overflow: hidden;
  background: var(--bg-subtle);
}

.zb-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--zb-ease);
}

.zb-featured:hover .zb-featured-media img { transform: scale(1.035); }

.zb-featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 2.5rem;
}

.zb-featured-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.zb-featured-flag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.zb-featured-title {
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.03em;
  color: var(--text);
}

.zb-featured-title a { color: inherit; }

.zb-featured-excerpt {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.zb-featured .zb-card-meta { margin: 0; }

/* Kart ızgarası */
.zb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
}

.zb-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: transform 0.3s var(--zb-ease), box-shadow 0.3s var(--zb-ease), border-color 0.3s var(--zb-ease);
}

.zb-card:hover {
  transform: translateY(-4px);
  border-color: var(--text-muted);
  box-shadow: var(--shadow-lg);
}

.zb-card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.zb-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-subtle);
}

.zb-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--zb-ease);
}

.zb-card:hover .zb-card-media img { transform: scale(1.045); }

.zb-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.6rem;
  padding: 1.35rem 1.4rem 1.3rem;
}

.zb-card-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}

.zb-card-title {
  font-size: 1.1rem;
  font-weight: 750;
  line-height: 1.38;
  letter-spacing: -0.02em;
  color: var(--text);
}

.zb-card-title a {
  color: inherit;
  transition: color 0.2s ease;
}

.zb-card:hover .zb-card-title a { color: var(--accent); }

/* Tüm kart tıklanabilir, ama tek bir erişilebilir link */
.zb-stretched::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.zb-stretched:focus-visible { outline: none; }

.zb-card-excerpt {
  font-size: 0.88rem;
  line-height: 1.62;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.zb-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-light);
}

.zb-card-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  min-width: 0;
}

.zb-card-tags span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.zb-card-read {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  transition: gap 0.2s ease, color 0.2s ease;
}

.zb-card:hover .zb-card-read { gap: 0.6rem; color: var(--accent); }

/* Filtreleme animasyonu (View Transitions desteklenmiyorsa) */
.zb-anim-in {
  animation: zbCardIn 0.45s var(--zb-ease) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

@keyframes zbCardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

::view-transition-group(*) {
  animation-duration: 0.38s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* İskelet (yükleniyor) kartları */
.zb-skeleton {
  pointer-events: none;
}

.zb-skeleton .zb-card-media,
.zb-skel-line {
  background: linear-gradient(90deg, var(--bg-subtle) 0%, var(--bg-soft) 50%, var(--bg-subtle) 100%);
  background-size: 200% 100%;
  animation: zbShimmer 1.4s ease-in-out infinite;
}

.zb-skel-line {
  height: 0.8rem;
  border-radius: 6px;
}

@keyframes zbShimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* Boş / hata durumu */
.zb-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-soft);
  color: var(--text-secondary);
}

.zb-state-icon { font-size: 2rem; margin-bottom: 0.75rem; }

.zb-state h3 {
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.zb-state p { font-size: 0.9rem; margin-bottom: 1.25rem; }

.zb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--zb-ease), border-color 0.2s ease, background-color 0.2s ease;
}

.zb-btn:hover { transform: translateY(-1px); border-color: var(--text-muted); }

.zb-btn-primary {
  background: var(--primary);
  color: var(--text-inverse);
  border-color: var(--primary);
}

.zb-btn-primary:hover { background: var(--primary-hover); }

/* --------------------------------------------------------------------------
   3. BLOG DETAY SAYFASI
   -------------------------------------------------------------------------- */
.zb-detail {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

.zb-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.zb-breadcrumb a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.zb-breadcrumb a:hover { color: var(--accent); }

.zb-breadcrumb [aria-current] {
  color: var(--text);
  max-width: 40ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zb-preview-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent);
  background: color-mix(in srgb, var(--warning) 10%, var(--card-bg));
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
}

.zb-hero {
  max-width: 860px;
  margin: 0 auto 2rem;
  text-align: center;
}

.zb-hero-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.zb-hero-title {
  font-size: clamp(1.85rem, 4.2vw, 3rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.035em;
  color: var(--text);
  text-wrap: balance;
}

.zb-hero-lead {
  margin: 1.25rem auto 0;
  max-width: 68ch;
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.7;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.zb-byline {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.75rem;
  padding: 0.5rem 1rem 0.5rem 0.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--zb-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.zb-byline img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.zb-byline strong { color: var(--text); font-weight: 700; }

.zb-byline-sep { opacity: 0.5; }

.zb-cover {
  max-width: 1100px;
  margin: 0 auto 3rem;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  box-shadow: var(--shadow-md);
  aspect-ratio: 16 / 8;
}

.zb-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.zb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 3.5rem;
  justify-content: center;
  align-items: start;
}

.zb-layout.no-toc { grid-template-columns: minmax(0, var(--zb-read-width)); }

.zb-main { min-width: 0; max-width: var(--zb-read-width); justify-self: end; width: 100%; }
.zb-layout.no-toc .zb-main { justify-self: center; }

/* İçindekiler (TOC) */
.zb-toc {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  max-height: calc(100vh - var(--header-height) - 3rem);
  overflow-y: auto;
  padding: 1.1rem 1.1rem 1.1rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--zb-glass-border);
  background: var(--zb-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.82rem;
}

.zb-toc-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.zb-toc-list {
  list-style: none;
  display: grid;
  gap: 0.15rem;
  border-left: 1px solid var(--border);
}

.zb-toc-list a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 0.3rem 0 0.3rem 0.85rem;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--text-secondary);
  line-height: 1.4;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.zb-toc-list .zb-toc-l3 a { padding-left: 1.6rem; font-size: 0.78rem; }

.zb-toc-list a:hover { color: var(--text); }

.zb-toc-list a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 700;
}

.zb-toc-mobile {
  display: none;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
}

.zb-toc-mobile summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
}

.zb-toc-mobile summary::after { content: "▾"; color: var(--text-muted); transition: transform 0.2s ease; }
.zb-toc-mobile[open] summary::after { transform: rotate(180deg); }
.zb-toc-mobile .zb-toc-list { margin: 0 1rem 1rem; }

/* --------------------------------------------------------------------------
   4. OKUMA ALANI — .zb-prose (detay sayfası + admin önizlemesi)
   -------------------------------------------------------------------------- */
.zb-prose {
  font-size: 1.0625rem;
  line-height: 1.82;
  color: var(--text-secondary);
  overflow-wrap: break-word;
  font-feature-settings: "kern", "liga";
}

@media (min-width: 1024px) {
  .zb-prose { font-size: 1.09rem; }
}

.zb-prose > * + * { margin-top: 1.35em; }

.zb-prose h2,
.zb-prose h3,
.zb-prose h4 {
  position: relative;
  color: var(--text);
  letter-spacing: -0.022em;
  line-height: 1.3;
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.zb-prose h2 { font-size: 1.6em; font-weight: 800; margin-top: 2.4em; }
.zb-prose h3 { font-size: 1.28em; font-weight: 750; margin-top: 2em; }
.zb-prose h4 { font-size: 1.08em; font-weight: 700; margin-top: 1.8em; }
.zb-prose h2 + *, .zb-prose h3 + *, .zb-prose h4 + * { margin-top: 0.75em; }
.zb-prose > :first-child { margin-top: 0; }

.zb-anchor {
  margin-left: 0.4em;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.2s ease;
  text-decoration: none;
}

.zb-prose h2:hover .zb-anchor,
.zb-prose h3:hover .zb-anchor,
.zb-prose h4:hover .zb-anchor,
.zb-anchor:focus-visible { opacity: 1; }

.zb-prose p { text-wrap: pretty; }

.zb-prose strong { color: var(--text); font-weight: 700; }

.zb-prose a:not(.zb-anchor) {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  transition: text-decoration-color 0.2s ease;
}

.zb-prose a:not(.zb-anchor):hover { text-decoration-color: var(--accent); }

.zb-prose ul,
.zb-prose ol { padding-left: 1.4em; }

.zb-prose li + li { margin-top: 0.5em; }
.zb-prose li::marker { color: var(--accent); font-weight: 700; }
.zb-prose li > ul, .zb-prose li > ol { margin-top: 0.5em; }
.zb-prose li:has(> input[type="checkbox"]) { list-style: none; margin-left: -1.4em; }
.zb-prose input[type="checkbox"] { margin-right: 0.5em; accent-color: var(--accent); }

.zb-prose blockquote {
  position: relative;
  padding: 1.15em 1.4em 1.15em 1.5em;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 1.04em;
  font-weight: 500;
}

.zb-prose blockquote > * + * { margin-top: 0.75em; }

.zb-prose blockquote.zb-callout {
  border-left: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  font-size: 0.97em;
}

.zb-prose hr {
  border: 0;
  height: 1px;
  margin: 3em 0;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.zb-prose :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 0.15em 0.42em;
  border-radius: 6px;
  color: var(--text);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
}

/* Görseller & galeriler */
.zb-prose img {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-inline: auto;
}

.zb-figure { margin-block: 2em; }

.zb-figure img {
  width: 100%;
  height: auto;
  cursor: zoom-in;
  background: var(--bg-subtle);
  transition: transform 0.3s var(--zb-ease), box-shadow 0.3s var(--zb-ease);
}

.zb-figure img:hover { box-shadow: var(--shadow-md); }

.zb-figure figcaption {
  margin-top: 0.7rem;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.zb-figure figcaption em { font-style: normal; }

/* Dikey telefon ekran görüntüleri sayfayı kaplamasın */
.zb-prose > .zb-figure img {
  width: auto;
  max-width: 100%;
  max-height: 80vh;
  margin-inline: auto;
  object-fit: contain;
}

/* Görsel editöründe seçilen hizalamalar (yayın + editör ortak) */
.zb-prose::after { content: ""; display: table; clear: both; }
.zb-prose h2, .zb-prose h3, .zb-prose h4, .zb-prose hr, .zb-prose .zb-code { clear: both; }
.zb-prose > .zb-figure.zb-align-wide { margin-block: 2em; }
.zb-prose > .zb-figure.zb-align-center { width: 68%; margin: 2em auto; }

.zb-prose > .zb-figure.zb-align-left,
.zb-prose > .zb-figure.zb-align-right {
  width: min(44%, 340px);
  margin-top: 0.35em;
  margin-bottom: 1em;
}

.zb-prose > .zb-figure.zb-align-left { float: left; margin-right: 1.6em; }
.zb-prose > .zb-figure.zb-align-right { float: right; margin-left: 1.6em; }
.zb-prose > .zb-figure.zb-align-left figcaption,
.zb-prose > .zb-figure.zb-align-right figcaption { text-align: left; }

@media (max-width: 640px) {
  .zb-prose > .zb-figure.zb-align-left,
  .zb-prose > .zb-figure.zb-align-right,
  .zb-prose > .zb-figure.zb-align-center {
    float: none;
    width: 100%;
    margin: 1.75em 0;
  }
}

.zb-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 2em;
}

.zb-gallery .zb-figure { margin: 0; }

.zb-gallery .zb-figure img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}

.zb-gallery-3 .zb-figure:first-child { grid-column: 1 / -1; }
.zb-gallery-3 .zb-figure:first-child img { aspect-ratio: 16 / 8; }

/* Tablolar */
.zb-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.zb-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  line-height: 1.55;
}

.zb-prose th,
.zb-prose td {
  padding: 0.7em 1em;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.zb-prose th {
  font-weight: 700;
  color: var(--text);
  background: var(--bg-soft);
  border-bottom-color: var(--border);
}

.zb-prose tr:last-child td { border-bottom: 0; }

/* Embed */
.zb-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.zb-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --------------------------------------------------------------------------
   5. KOD BLOKLARI + SYNTAX HIGHLIGHTING (marka uyumlu, iki temada da koyu)
   -------------------------------------------------------------------------- */
.zb-code {
  margin-block: 1.9em;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--zb-code-bg);
  border: 1px solid var(--zb-code-border);
  box-shadow: var(--shadow-sm);
}

.zb-code-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.6rem 0.5rem 0.9rem;
  background: var(--zb-code-head);
  border-bottom: 1px solid var(--zb-code-border);
}

.zb-code-dots { display: inline-flex; gap: 6px; }
.zb-code-dots i { width: 10px; height: 10px; border-radius: 50%; background: #334155; }
.zb-code-dots i:nth-child(1) { background: #f87171; opacity: 0.8; }
.zb-code-dots i:nth-child(2) { background: #fbbf24; opacity: 0.8; }
.zb-code-dots i:nth-child(3) { background: #34d399; opacity: 0.8; }

.zb-code-lang {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-right: auto;
}

.zb-code-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.zb-code-copy:hover { background: rgba(148, 163, 184, 0.2); color: #fff; }
.zb-code-copy.is-copied { color: #34d399; border-color: rgba(52, 211, 153, 0.4); }

.zb-code pre {
  margin: 0;
  padding: 1.1rem 1.25rem 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.7;
  color: #e2e8f0;
  tab-size: 2;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

.zb-code pre code {
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
}

.hljs-comment, .hljs-quote { color: #64748b; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-type, .hljs-doctag { color: #c4b5fd; }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute .hljs-string, .hljs-meta .hljs-string { color: #86efac; }
.hljs-number, .hljs-literal, .hljs-symbol, .hljs-bullet { color: #fdba74; }
.hljs-title, .hljs-title.function_, .hljs-title.class_, .hljs-section { color: #7dd3fc; }
.hljs-attr, .hljs-attribute, .hljs-property, .hljs-selector-class, .hljs-selector-id { color: #93c5fd; }
.hljs-variable, .hljs-template-variable, .hljs-params { color: #f9a8d4; }
.hljs-tag, .hljs-name { color: #fda4af; }
.hljs-meta, .hljs-punctuation { color: #94a3b8; }
.hljs-deletion { color: #fca5a5; background: rgba(248, 113, 113, 0.1); }
.hljs-addition { background: rgba(52, 211, 153, 0.08); }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }

/* --------------------------------------------------------------------------
   6. DETAY SAYFASI ALT BÖLÜMLER
   -------------------------------------------------------------------------- */
.zb-article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 3rem;
}

.zb-article-tags a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.8rem;
  transition: all 0.2s ease;
}

.zb-article-tags a:hover { color: var(--accent); border-color: var(--accent); }

.zb-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-soft);
}

.zb-share-title { font-size: 0.9rem; font-weight: 700; color: var(--text); }

.zb-share-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.zb-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  transition: transform 0.2s var(--zb-ease), border-color 0.2s ease, color 0.2s ease;
}

.zb-share-btn:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }

.zb-author {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-top: 2rem;
  padding: 1.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card-bg);
}

.zb-author img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.zb-author-name { font-weight: 800; color: var(--text); }
.zb-author-role { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.zb-author p { font-size: 0.88rem; line-height: 1.6; color: var(--text-secondary); }

.zb-postnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.zb-postnav a {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: border-color 0.2s ease, transform 0.2s var(--zb-ease);
}

.zb-postnav a:hover { border-color: var(--accent); transform: translateY(-2px); }
.zb-postnav a.next { text-align: right; grid-column: 2; }
.zb-postnav small { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.zb-postnav strong { font-size: 0.92rem; color: var(--text); line-height: 1.4; }

.zb-related {
  max-width: 1180px;
  margin: 4.5rem auto 0;
  padding: 0; /* style.css'teki global section padding'ini sıfırla */
}

.zb-related-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.zb-related-head h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
}

.zb-related-head a { font-size: 0.85rem; font-weight: 700; color: var(--accent); }

.zb-detail-loading {
  max-width: 860px;
  margin: 3rem auto;
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.zb-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 9999;
  transform: translate(-50%, 120%);
  opacity: 0;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: var(--text-inverse);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: transform 0.35s var(--zb-ease), opacity 0.35s var(--zb-ease);
  pointer-events: none;
}

.zb-toast.show { transform: translate(-50%, 0); opacity: 1; }

/* --------------------------------------------------------------------------
   7. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .zb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
  .zb-layout { grid-template-columns: minmax(0, var(--zb-read-width)); }
  .zb-main { justify-self: center; }
  .zb-toc { display: none; }
  .zb-toc-mobile { display: block; }
}

@media (max-width: 860px) {
  .zb-featured { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .zb-featured-media { aspect-ratio: 16 / 9; }
  .zb-featured-body { padding: 1.5rem 1.4rem 1.6rem; }
  .zb-toolbar-row { flex-direction: column; align-items: stretch; }
  .zb-search { flex-basis: auto; }
  .zb-cover { aspect-ratio: 16 / 10; border-radius: var(--radius-lg); }
}

@media (max-width: 640px) {
  .zb-page { padding: 4.5rem 1rem 4rem; }
  .zb-detail { padding: 1.25rem 1rem 4rem; }
  .zb-grid { grid-template-columns: minmax(0, 1fr); }
  .zb-toolbar { top: calc(var(--header-height) - 0.25rem); padding: 0.7rem; border-radius: var(--radius-md); }
  .zb-search kbd { display: none; }
  .zb-hero { text-align: left; }
  .zb-hero-top { justify-content: flex-start; }
  .zb-byline { justify-content: flex-start; border-radius: var(--radius-md); }
  .zb-gallery { grid-template-columns: 1fr; }
  .zb-gallery-3 .zb-figure:first-child img,
  .zb-gallery .zb-figure img { aspect-ratio: auto; object-fit: contain; }
  .zb-code { margin-inline: -1rem; border-radius: 0; border-inline: 0; }
  .zb-code pre { font-size: 0.8rem; }
  .zb-postnav { grid-template-columns: 1fr; }
  .zb-postnav a.next { grid-column: 1; }
  .zb-author { align-items: flex-start; }
  .zb-share { flex-direction: column; align-items: flex-start; }
}

@media (hover: none) {
  .zb-card:hover, .zb-featured:hover { transform: none; }
  .zb-anchor { opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
  .zb-anim-in, .zb-skeleton .zb-card-media, .zb-skel-line { animation: none; }
  .zb-card, .zb-featured, .zb-card-media img, .zb-featured-media img { transition: none; }
  ::view-transition-group(*) { animation: none; }
}
