/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *   Wiki Engine — Kapsamlı CSS (v3.0)
 *   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&family=Syne:wght@700;800&display=swap');

/* ── Tasarım Değişkenleri ──────────────────────────────────────────────── */
:root {
    --bg-body:        #0b1120;
    --bg-sidebar:     #111827;
    --bg-card:        #161f30;
    --bg-card-hover:  #1d2a40;
    --bg-hover:       #1e2d42;
    --bg-elevated:    rgba(11,17,32,0.96);
    --text-primary:   #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary:  #4b6484;
    --primary:        #7c3aed;
    --primary-light:  #a78bfa;
    --primary-glow:   rgba(124,58,237,0.15);
    --primary-glow2:  rgba(124,58,237,0.25);
    --border:         1px solid rgba(255,255,255,0.07);
    --border-strong:  1px solid rgba(255,255,255,0.13);
    --radius-sm:      6px;
    --radius-md:      12px;
    --radius-lg:      18px;
    --sidebar-width:  275px;
    --header-height:  56px;
    --focus-ring:     0 0 0 3px rgba(124,58,237,0.28);
    --shadow-card:    0 4px 24px rgba(0,0,0,0.35);
    --shadow-modal:   0 24px 80px rgba(0,0,0,0.65);
    --transition:     0.18s ease;
    --font-display:   'Syne', 'Inter', sans-serif;
    --font-body:      'Inter', sans-serif;
    --font-mono:      'JetBrains Mono', monospace;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg-body); color: var(--text-primary); font-family: var(--font-body); height: 100vh; overflow: hidden; display: flex; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; }
::selection { background: rgba(124,58,237,0.35); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *   OKUMA İLERLEME ÇUBUĞU
 *   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.read-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    z-index: 999; transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(124,58,237,0.5);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *   SIDEBAR
 *   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.sidebar {
    width: var(--sidebar-width); background: var(--bg-sidebar); border-right: var(--border);
    display: flex; flex-direction: column; z-index: 50; transition: transform var(--transition);
    overflow: hidden;
}
.brand {
    height: var(--header-height); display: flex; align-items: center; padding: 0 20px;
    font-family: var(--font-display); font-weight: 800; font-size: 1rem; letter-spacing: -0.3px;
    border-bottom: var(--border); gap: 7px; user-select: none; flex-shrink: 0;
}
.brand .hash { color: var(--primary); }

/* Sidebar arama */
.search-container { padding: 14px 14px 8px; flex-shrink: 0; }
.search-input-wrapper {
    position: relative; background: rgba(11,17,32,0.7); border-radius: var(--radius-sm);
    border: var(--border);
}
.search-input-wrapper svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); pointer-events: none; }
.search-input {
    width: 100%; background: transparent; border: none; padding: 9px 10px 9px 32px;
    color: var(--text-primary); outline: none; font-size: 0.875rem; font-family: inherit;
}
.search-input::placeholder { color: var(--text-tertiary); }
.search-hint { display: flex; align-items: center; gap: 3px; margin-top: 7px; padding: 0 2px; color: var(--text-tertiary); font-size: 0.72rem; }
kbd { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: 4px; padding: 1px 5px; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-secondary); }

/* Nav menü */
.nav-menu { flex: 1; overflow-y: auto; padding: 8px 12px 20px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent; }
.nav-menu::-webkit-scrollbar { width: 4px; }
.nav-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }

/* Home item */
.nav-item {
    display: flex; align-items: center; padding: 7px 10px; margin-bottom: 2px;
    border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 0.875rem;
    gap: 8px; transition: background var(--transition), color var(--transition);
    min-width: 0; overflow: hidden;
}
.nav-item > *:not(.nav-dot) {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.nav-item:hover  { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--primary-glow2); color: var(--primary-light); font-weight: 600; }
.nav-home { border: var(--border); background: rgba(11,17,32,0.4); margin-bottom: 10px; }

/* Collapsible category sections */
.nav-section { border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 2px; }
.nav-section > summary {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 10px 6px 0; list-style: none; cursor: pointer;
    border-radius: var(--radius-sm); user-select: none;
    transition: background var(--transition);
}
.nav-section > summary::-webkit-details-marker { display: none; }
.nav-section > summary::before {
    content: '▶'; font-size: 0.6rem; color: var(--text-tertiary);
    margin-right: 8px; margin-left: 10px; transition: transform var(--transition);
    flex-shrink: 0;
}
.nav-section[open] > summary::before { transform: rotate(90deg); }
.nav-section > summary:hover { background: rgba(255,255,255,0.04); }

.nav-cat-link { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-tertiary); font-weight: 700; flex: 1; transition: color var(--transition); }
.nav-cat-link:hover, .nav-cat-link.active { color: var(--primary-light); }
.nav-count { font-size: 0.68rem; background: rgba(255,255,255,0.07); padding: 1px 6px; border-radius: 999px; color: var(--text-tertiary); }

.nav-items { padding: 2px 0 6px; }
.nav-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(148,163,184,0.3); flex-shrink: 0; transition: background var(--transition); }
.nav-item.active .nav-dot { background: var(--primary); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *   MOBILE HEADER
 *   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.mobile-header {
    display: none; height: var(--header-height); align-items: center;
    justify-content: space-between; padding: 0 16px; border-bottom: var(--border);
    background: var(--bg-sidebar); z-index: 60; position: sticky; top: 0;
}
.menu-btn { background: none; border: none; color: var(--text-primary); padding: 7px; border-radius: 8px; outline: none; transition: background var(--transition); }
.menu-btn:hover { background: var(--bg-hover); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *   MAIN LAYOUT
 *   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.main-wrapper { flex: 1; display: flex; flex-direction: column; height: 100vh; overflow: hidden; min-width: 0; }
.content-area { flex: 1; overflow-y: auto; padding: 32px 36px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent; }
.content-area::-webkit-scrollbar { width: 6px; }
.content-area::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *   BACK TO TOP BUTTON
 *   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.back-to-top {
    position: fixed; bottom: 28px; right: 28px; z-index: 100;
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--primary); border: none; color: #fff;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transform: translateY(12px);
    transition: opacity var(--transition), transform var(--transition), background var(--transition);
    box-shadow: 0 4px 20px rgba(124,58,237,0.45);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-light); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *   ANASAYFA
 *   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.home-layout { max-width: 1140px; margin: 0 auto; padding-bottom: 64px; }

.home-hero {
    background: linear-gradient(135deg, rgba(124,58,237,0.18) 0%, rgba(99,102,241,0.12) 50%, rgba(11,17,32,0) 100%);
    border: var(--border); border-radius: var(--radius-lg); padding: 44px 40px 36px;
    margin-bottom: 48px; position: relative; overflow: hidden;
}
.home-hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse 60% 50% at 80% 50%, rgba(124,58,237,0.08), transparent);
    pointer-events: none;
}
.hero-eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; color: var(--primary-light); font-weight: 700; margin-bottom: 14px; }
.hero-title { font-family: var(--font-display); font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.8px; margin-bottom: 14px; }
.hero-subtitle { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.65; max-width: 560px; margin-bottom: 28px; }

/* Hero arama */
.search-hero {
    display: flex; align-items: center; gap: 10px; max-width: 500px;
    background: rgba(11,17,32,0.7); border: var(--border-strong); border-radius: var(--radius-md);
    padding: 13px 16px; cursor: pointer; transition: border-color var(--transition), box-shadow var(--transition);
}
.search-hero:hover { border-color: rgba(124,58,237,0.5); box-shadow: var(--focus-ring); }
.search-hero svg { color: var(--text-tertiary); flex-shrink: 0; }
.search-hero input { background: transparent; border: none; outline: none; color: var(--text-tertiary); font-size: 0.95rem; font-family: inherit; width: 100%; cursor: pointer; }

/* İstatistik bar */
.stats-bar { display: flex; gap: 28px; margin-top: 28px; flex-wrap: wrap; }
.stat-item { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-lbl { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-tertiary); font-weight: 600; }

/* Bölüm başlıkları */
.home-section { margin-bottom: 48px; }
.section-header { margin-bottom: 20px; }
.section-heading { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; border-left: 3px solid var(--primary); padding-left: 12px; }
.section-sub { color: var(--text-tertiary); font-size: 0.875rem; margin-top: 5px; padding-left: 15px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *   PORTAL KARTLARI
 *   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.portal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.portal-card {
    display: block; background: var(--bg-card); border: var(--border); border-radius: var(--radius-md);
    padding: 20px; transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    position: relative; overflow: hidden;
}
.portal-card::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(124,58,237,0.05), transparent);
    opacity: 0; transition: opacity var(--transition);
}
.portal-card:hover { transform: translateY(-3px); border-color: rgba(124,58,237,0.4); box-shadow: var(--shadow-card); }
.portal-card:hover::after { opacity: 1; }
.portal-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; gap: 8px; }
.portal-card-title { font-family: var(--font-display); font-size: 1rem; font-weight: 800; color: var(--text-primary); line-height: 1.3; }
.portal-count { font-size: 0.7rem; background: var(--primary-glow); color: var(--primary-light); padding: 3px 8px; border-radius: 999px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.portal-subcats { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.portal-subcats span { font-size: 0.7rem; color: var(--text-tertiary); background: rgba(255,255,255,0.05); padding: 2px 7px; border-radius: 4px; }
.portal-card-desc { font-size: 0.8rem; color: var(--text-tertiary); line-height: 1.5; margin-top: 4px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *   MAKALe KARTLARI
 *   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.article-card {
    display: flex; flex-direction: column; gap: 8px;
    background: var(--bg-card); border: var(--border); border-radius: var(--radius-md);
    padding: 18px; transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    cursor: pointer;
}
.article-card:hover { transform: translateX(3px); border-color: rgba(124,58,237,0.35); box-shadow: 0 4px 18px rgba(0,0,0,0.25); }
.article-card--compact { padding: 14px; gap: 6px; }

.card-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-height: 22px; }
.card-category { font-size: 0.7rem; color: var(--primary-light); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; transition: color var(--transition); }
.card-category:hover { color: #fff; }
.card-date { font-size: 0.7rem; color: var(--text-tertiary); margin-left: auto; }
.card-title { font-weight: 700; font-size: 0.975rem; color: var(--text-primary); line-height: 1.4; }
.card-excerpt { font-size: 0.83rem; color: var(--text-tertiary); line-height: 1.55; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; border-top: var(--border); }
.card-readtime { font-size: 0.72rem; color: var(--text-tertiary); }
.card-version  { font-size: 0.7rem; font-family: var(--font-mono); color: var(--text-tertiary); background: rgba(255,255,255,0.05); padding: 2px 6px; border-radius: 4px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *   ETİKETLER
 *   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.tag-badge {
    display: inline-block; font-size: 0.7rem; padding: 2px 8px; border-radius: 999px;
    background: rgba(124,58,237,0.12); color: var(--primary-light); font-weight: 600;
    border: 1px solid rgba(124,58,237,0.2); transition: background var(--transition), border-color var(--transition);
}
a.tag-badge:hover { background: rgba(124,58,237,0.25); border-color: rgba(124,58,237,0.45); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 16px; background: var(--bg-card); border: var(--border); border-radius: var(--radius-md); }
.tag-cloud-item { color: var(--text-secondary); transition: color var(--transition); font-weight: 600; }
.tag-cloud-item:hover { color: var(--primary-light); }

/* Rozet */
.badge { display: inline-block; font-size: 0.72rem; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,0.06); font-weight: 600; color: var(--text-secondary); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *   KATEGORİ SAYFASI
 *   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.category-page, .tag-page, .article-page, .error-page { max-width: 1100px; margin: 0 auto; padding-bottom: 64px; }
.category-header, .tag-page-header { margin-bottom: 28px; padding-bottom: 24px; border-bottom: var(--border); }
.category-eyebrow { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--primary-light); font-weight: 700; margin-bottom: 10px; }
.category-title, .tag-title { font-family: var(--font-display); font-size: 2rem; font-weight: 800; letter-spacing: -0.5px; }
.category-desc, .tag-desc { color: var(--text-secondary); margin-top: 8px; font-size: 0.95rem; }
.cat-tags-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }

/* Alt kategori filtresi */
.subcat-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.subcat-btn { background: var(--bg-card); border: var(--border); color: var(--text-secondary); padding: 7px 14px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 600; transition: all var(--transition); }
.subcat-btn:hover  { background: var(--bg-hover); color: var(--text-primary); }
.subcat-btn.active { background: var(--primary-glow); border-color: rgba(124,58,237,0.4); color: var(--primary-light); }

.filter-item { display: block; }

/* ── Etiket sayfası ──── */
.tag-badge-lg { display: inline-block; font-size: 1rem; padding: 6px 16px; border-radius: 999px; background: var(--primary-glow); color: var(--primary-light); font-weight: 800; margin-bottom: 10px; border: 1px solid rgba(124,58,237,0.3); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *   MAKALe SAYFASI
 *   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.breadcrumbs { font-size: 0.8rem; color: var(--text-tertiary); margin-bottom: 20px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-weight: 500; }
.breadcrumbs a { color: var(--text-secondary); transition: color var(--transition); }
.breadcrumbs a:hover { color: var(--primary-light); text-decoration: underline; text-underline-offset: 2px; }
.breadcrumbs span { color: var(--text-primary); }

.article-shell { display: grid; gap: 36px; align-items: start; }
.article-body  { min-width: 0; }

.article-header { padding-bottom: 20px; border-bottom: var(--border); margin-bottom: 24px; }
.article-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.article-h1 { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.5px; }
.article-desc { color: var(--text-tertiary); font-size: 1.05rem; line-height: 1.55; margin-top: 10px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }

/* Kapak görseli */
.cover-wrapper { margin-bottom: 24px; border-radius: var(--radius-md); overflow: hidden; border: var(--border); }
.article-cover { width: 100%; max-height: 380px; object-fit: cover; display: block; transition: opacity var(--transition); }
.article-cover:hover { opacity: 0.9; }

/* Makale içerik sidebar */
.article-sidebar { position: relative; }
.sidebar-sticky { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }

/* İçindekiler */
.toc-panel { background: var(--bg-card); padding: 18px; border-radius: var(--radius-md); border: var(--border); }
.toc-title, .infobox-title { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 800; color: var(--text-tertiary); margin-bottom: 10px; }
.toc-item { display: block; padding: 5px 0; font-size: 0.85rem; color: var(--text-secondary); transition: color var(--transition); border-left: 2px solid transparent; padding-left: 8px; }
.toc-item:hover { color: var(--primary-light); border-left-color: var(--primary); }
.toc-item.active-toc { color: var(--primary-light); border-left-color: var(--primary); font-weight: 600; }
.toc-item.level-3 { padding-left: 20px; opacity: 0.8; font-size: 0.8rem; }

/* Bilgi kutusu */
.infobox { background: var(--bg-card); padding: 18px; border-radius: var(--radius-md); border: var(--border); }
.infobox-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.infobox-table th { text-align: left; padding: 7px 4px; color: var(--text-tertiary); font-weight: 600; vertical-align: top; width: 42%; }
.infobox-table td { padding: 7px 4px; color: var(--text-primary); font-weight: 500; }
.infobox-table tr { border-bottom: 1px solid rgba(255,255,255,0.04); }
.infobox-table tr:last-child { border-bottom: none; }

/* Bölüm başlığı */
.section-h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: var(--text-primary); margin: 1.8em 0 0.65em; padding-top: 8px; display: flex; align-items: center; gap: 8px; scroll-margin-top: 20px; }
.heading-anchor { opacity: 0; color: var(--text-tertiary); font-size: 0.85em; font-weight: 400; font-family: var(--font-body); transition: opacity var(--transition); }
.section-h2:hover .heading-anchor { opacity: 1; }

/* Lead text */
.lead-text { font-size: 1.04rem; color: var(--text-primary); border-bottom: var(--border); padding-bottom: 24px; margin-bottom: 28px; line-height: 1.75; }

/* İlgili makaleler */
.related-section { margin-top: 48px; padding-top: 32px; border-top: var(--border); }
.related-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; margin-bottom: 18px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }

/* Geri bağlantılar */
.backlinks-section { margin-top: 32px; padding-top: 24px; border-top: var(--border); }
.backlinks-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-tertiary); font-weight: 700; margin-bottom: 12px; }
.backlinks-list { display: flex; flex-wrap: wrap; gap: 8px; }
.backlink-item { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; background: var(--bg-card); border: var(--border); border-radius: var(--radius-sm); transition: all var(--transition); font-size: 0.85rem; }
.backlink-item:hover { border-color: rgba(124,58,237,0.35); background: var(--bg-card-hover); }
.backlink-title { color: var(--text-primary); font-weight: 600; }
.backlink-cat   { font-size: 0.7rem; color: var(--text-tertiary); padding: 1px 6px; background: rgba(255,255,255,0.05); border-radius: 999px; }

/* Referans linkler */
.section-links { margin-top: 16px; padding: 14px; background: rgba(11,17,32,0.4); border-radius: var(--radius-sm); border: 1px solid rgba(124,58,237,0.2); font-size: 0.87rem; }
.section-links ul { margin-top: 6px; padding-left: 18px; }
.section-links li { margin-bottom: 4px; }
.section-links a { color: var(--primary-light); text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *   MARKDOWN BODY (içerik stili)
 *   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.markdown-body { line-height: 1.78; color: var(--text-secondary); font-size: 0.98rem; }
.markdown-body p  { margin-bottom: 1.15em; }
.markdown-body h3 { color: var(--text-primary); font-size: 1.05rem; font-weight: 800; margin: 1.5em 0 0.5em; scroll-margin-top: 20px; }
.markdown-body h4 { color: var(--text-secondary); font-size: 0.95rem; font-weight: 700; margin: 1.2em 0 0.4em; text-transform: uppercase; letter-spacing: 0.4px; }

/* Kod */
.markdown-body code { background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 5px; color: #e2e8f0; font-family: var(--font-mono); font-size: 0.88em; }
.code-block { position: relative; background: #080e1c; padding: 18px; border-radius: var(--radius-md); border: var(--border); overflow-x: auto; margin-bottom: 1.2em; }
.code-block code { background: transparent; padding: 0; font-size: 0.88rem; color: #cbd5e1; }
.code-lang { display: inline-block; font-size: 0.65rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 1px; color: var(--primary-light); background: rgba(124,58,237,0.15); padding: 2px 8px; border-radius: var(--radius-sm); margin-bottom: 10px; }
.markdown-body pre { margin-bottom: 1.2em; } /* fallback */

/* Tablo */
.table-wrapper { overflow-x: auto; margin-bottom: 1.4em; border-radius: var(--radius-md); border: var(--border); }
.md-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.md-table th { background: rgba(124,58,237,0.1); color: var(--text-primary); font-weight: 700; padding: 10px 14px; text-align: left; border-bottom: 1px solid rgba(124,58,237,0.2); white-space: nowrap; }
.md-table td { padding: 9px 14px; color: var(--text-secondary); border-bottom: 1px solid rgba(255,255,255,0.04); }
.md-table tr:hover td { background: rgba(255,255,255,0.02); }
.md-table tr:last-child td { border-bottom: none; }

/* Liste */
.md-list { padding-left: 22px; margin-bottom: 1.2em; }
.md-list li { margin-bottom: 0.4em; color: var(--text-secondary); line-height: 1.65; }
.md-list .md-list { margin-top: 0.4em; margin-bottom: 0; }

/* Blockquote */
.markdown-body blockquote { border-left: 3px solid var(--primary); background: rgba(124,58,237,0.07); padding: 12px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: 1.2em; color: rgba(226,232,240,0.9); font-style: italic; }

/* Yatay çizgi */
.md-hr { border: none; border-top: var(--border); margin: 1.8em 0; }

/* Vurgu */
.markdown-body mark { background: rgba(234,179,8,0.2); color: #fcd34d; padding: 1px 4px; border-radius: 3px; font-style: normal; }
.markdown-body del { color: var(--text-tertiary); text-decoration: line-through; }
.markdown-body strong { color: var(--text-primary); font-weight: 700; }
.markdown-body em { font-style: italic; }

/* Görseller */
.md-figure { margin: 1.4em 0; }
.md-img { width: 100%; border-radius: var(--radius-sm); border: var(--border); }
.md-figure figcaption { font-size: 0.78rem; color: var(--text-tertiary); text-align: center; margin-top: 6px; }

/* Bağlantılar */
.markdown-body a { color: var(--primary-light); }
.markdown-body a:hover { text-decoration: underline; text-underline-offset: 2px; }
.wikilink { color: #60a5fa !important; font-weight: 600; border-bottom: 1px dashed rgba(96,165,250,0.4); transition: all var(--transition); }
.wikilink:hover { background: rgba(96,165,250,0.08); border-bottom-color: #60a5fa; text-decoration: none !important; }
.wikilink.redlink { color: #f87171 !important; border-bottom-color: rgba(248,113,113,0.4); }
.wikilink.redlink:hover { background: rgba(248,113,113,0.08); border-bottom-color: #f87171; }
.external-link { color: var(--primary-light) !important; }
.ext-icon { vertical-align: middle; margin-left: 3px; opacity: 0.7; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *   KOMUT PALETİ (Ctrl+K)
 *   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.cp-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: none; z-index: 200; padding: 14px; align-items: flex-start; justify-content: center; backdrop-filter: blur(4px); }
.cp-overlay.open { display: flex; }
.cp-modal { width: min(700px, 100%); margin-top: 7vh; border-radius: var(--radius-lg); background: var(--bg-elevated); border: var(--border-strong); overflow: hidden; box-shadow: var(--shadow-modal); }
.cp-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: var(--border); }
.cp-input { flex: 1; background: transparent; border: none; color: var(--text-primary); outline: none; font-size: 0.95rem; font-family: inherit; }
.cp-esc { margin-left: auto; flex-shrink: 0; }
.cp-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.cp-footer { display: flex; gap: 16px; padding: 10px 16px; border-top: var(--border); }
.cp-footer span { font-size: 0.72rem; color: var(--text-tertiary); display: flex; align-items: center; gap: 4px; }
.cp-footer kbd { font-size: 0.65rem; padding: 1px 5px; }

.cp-row { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; transition: background var(--transition), border-color var(--transition); }
.cp-row:hover, .cp-row.selected { background: var(--primary-glow); border-color: rgba(124,58,237,0.3); }
.cp-row-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cp-title { font-weight: 700; color: var(--text-primary); font-size: 0.9rem; }
.cp-tags { display: flex; gap: 5px; }
.cp-tag { font-size: 0.68rem; padding: 1px 6px; border-radius: 999px; background: rgba(124,58,237,0.15); color: var(--primary-light); }
.cp-badge { font-size: 0.7rem; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,0.07); color: var(--text-secondary); white-space: nowrap; flex-shrink: 0; }
.cp-excerpt { font-size: 0.78rem; color: var(--text-tertiary); padding-left: 2px; }
.cp-empty { text-align: center; color: var(--text-tertiary); padding: 24px; font-size: 0.9rem; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *   404 HATA SAYFASI
 *   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.error-page { text-align: center; padding: 60px 20px 64px; }
.error-code { font-family: var(--font-display); font-size: 8rem; font-weight: 800; color: rgba(124,58,237,0.15); line-height: 1; letter-spacing: -4px; margin-bottom: 8px; }
.error-title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; margin-bottom: 10px; }
.error-desc { color: var(--text-tertiary); font-size: 1rem; margin-bottom: 24px; }
.btn-primary { display: inline-block; background: var(--primary); color: #fff; padding: 11px 24px; border-radius: var(--radius-md); font-weight: 700; font-size: 0.9rem; transition: background var(--transition), transform var(--transition); }
.btn-primary:hover { background: var(--primary-light); color: #000; transform: translateY(-2px); }
.error-suggestions { margin-top: 48px; text-align: left; }
.error-sugg-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; margin-bottom: 18px; text-align: center; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *   MOBİL UYUMLULUK
 *   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 860px) {
    .article-shell[style*="grid-template-columns"] { display: block !important; }
    .article-sidebar { margin-top: 36px; }
    .sidebar-sticky { position: static; }
}

@media (max-width: 768px) {
    body { overflow: auto; flex-direction: column; }
    .mobile-header { display: flex; }
    .sidebar {
        position: fixed; left: 0; top: var(--header-height); bottom: 0;
        width: 100%; max-width: 320px; transform: translateX(-105%);
    }
    .sidebar.open { transform: translateX(0); box-shadow: 8px 0 40px rgba(0,0,0,0.4); }
    .main-wrapper { height: auto; }
    .content-area { padding: 20px 16px; overflow: visible; height: auto; }
    .back-to-top { bottom: 16px; right: 16px; }
    .read-progress { display: none; }
    .hero-title { font-size: 1.7rem; }
    .home-hero { padding: 28px 22px; }
    .portal-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .articles-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stats-bar { gap: 18px; }
    .stat-num { font-size: 1.5rem; }
    .cp-modal { margin-top: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
}
