/* ─── Reset & Variables ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0f0f0f;
    --surface: #161616;
    --border: #242424;
    --green: #53fc18;
    --green-dim: rgba(83,252,24,0.1);
    --blue: #6495ed;
    --text: #e0e0e0;
    --muted: #505050;
    --muted2: #888;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
    position: relative;
}

/* ─── Arka Plan ──────────────────────────────────────────────────────────── */
.bg-grid {
    position: fixed; inset: 0;
    background-image:
        linear-gradient(rgba(100,149,237,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100,149,237,0.035) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none; z-index: 0;
}

/* ─── Okuma İlerleme Çubuğu ─────────────────────────────────────────────── */
#reading-progress {
    position: fixed; top: 0; left: 0; right: 0;
    height: 2px; z-index: 9999;
}
#reading-progress .rp-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--green) 0%, var(--blue) 100%);
    width: 0%;
    transition: width 0.08s linear;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(15,15,15,0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 780px; margin: 0 auto;
    padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    height: 54px;
}

.header-left {
    display: flex; align-items: center; gap: 10px;
}

.header-socials {
    display: flex; align-items: center; gap: 2px;
}

.brand {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.08em;
    transition: color 0.2s;
}
.brand span { color: var(--green); }
.brand:hover { color: rgba(196,211,252,0.9); }

.header-nav {
    display: flex; align-items: center; gap: 4px;
}
.header-nav a {
    color: var(--muted2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    padding: 6px 12px;
    border-radius: 7px;
    transition: all 0.18s;
}
.header-nav a:hover {
    color: var(--text);
    background: rgba(255,255,255,0.05);
}

/* ─── Ana İçerik ─────────────────────────────────────────────────────────── */
.content {
    position: relative; z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    padding: 44px 24px 100px;
}

/* ─── Sayfa Başlığı ──────────────────────────────────────────────────────── */
.page-header {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 46px;
    color: #fff;
    margin-bottom: 2px;
    letter-spacing: 0.01em;
    line-height: 1;
}
.page-header .dot { color: var(--green); font-size: 1.5em; line-height: 0; vertical-align: -8px; }

.page-sub {
    color: var(--muted);
    font-size: 13px;
    font-weight: 300;
    margin-bottom: 32px;
    margin-top: 6px;
}

/* ─── Yazı Listesi ───────────────────────────────────────────────────────── */
.list {
    list-style: none;
}

.list-item {
    border-bottom: 1px solid var(--border);
}

.post-header-row {
    display: flex; align-items: flex-start; gap: 0;
    flex-direction: column;
    padding: 18px 0;
}

.post-meta-row {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.post-date {
    color: var(--muted);
    font-size: 13px;
    font-weight: 300;
    font-variant-numeric: tabular-nums;
    min-width: 82px;
}

.readtime {
    color: var(--muted);
    font-size: 12px;
    font-weight: 300;
}

.post-tags {
    display: flex; gap: 5px; flex-wrap: wrap;
}

.post-tag {
    color: var(--muted);
    font-size: 11px;
    text-decoration: none;
    padding: 1px 7px;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.15s;
}
.post-tag:hover {
    color: var(--green);
    border-color: rgba(83,252,24,0.25);
}

.post-title-row {
    margin: 0;
}
.post-title-row a {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.18s;
}
.post-title-row a:hover { color: #fff; }

.post-excerpt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 300;
    line-height: 1.65;
    margin-top: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Sayfalama ──────────────────────────────────────────────────────────── */
.pagination {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.pagination a,
.older-posts,
.newer-posts {
    color: var(--muted2);
    font-size: 13px;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.18s;
    display: inline-block;
}
.pagination a:hover,
.older-posts:hover,
.newer-posts:hover {
    color: var(--text);
    border-color: rgba(255,255,255,0.15);
}
.page-number {
    border: none !important;
    color: var(--muted);
    font-size: 12px;
}

/* ─── Tekli Yazı ─────────────────────────────────────────────────────────── */
.back-link {
    display: inline-flex; align-items: center; gap: 7px;
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
    padding: 6px 0;
    margin-bottom: 28px;
    transition: color 0.18s;
}
.back-link:hover { color: var(--text); }
.back-link::before { content: '←'; }

.post-full-header {
    margin-bottom: 32px;
}
.post-full-meta {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 12px;
    font-weight: 300;
    margin-bottom: 14px;
}
.post-full-meta .sep { color: var(--border); }

.post-full-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 26px;
    font-weight: 500;
    color: #fff;
    line-height: 1.4;
}

.post-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 28px 0;
}

/* ─── İçerik Gövdesi ─────────────────────────────────────────────────────── */
.post-body {
    font-size: 15px;
    line-height: 1.9;
    color: #c8c8c8;
    font-weight: 300;
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    color: #f0f0f0;
    margin: 1.8em 0 0.6em;
    line-height: 1.3;
}
.post-body h2 { font-size: 20px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.post-body h3 { font-size: 17px; }
.post-body h4 { font-size: 15px; color: var(--muted2); }

.post-body p { margin-bottom: 1.2em; }

.post-body a {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(100,149,237,0.4);
    transition: all 0.18s;
}
.post-body a:hover {
    color: #a8c0ff;
    text-decoration-color: rgba(100,149,237,0.8);
}

.post-body blockquote {
    border-left: 3px solid var(--green);
    padding: 14px 20px;
    margin: 24px 0;
    background: rgba(83,252,24,0.03);
    border-radius: 0 8px 8px 0;
    color: var(--muted2);
    font-style: italic;
}
.post-body blockquote p { margin-bottom: 0; }

.post-body code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2px 7px;
    border-radius: 4px;
    color: var(--green);
}

.post-body pre {
    background: #0d0d0d;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
}
.post-body pre code {
    background: none; border: none; padding: 0; font-size: 13px;
}

.post-body img {
    max-width: 100%;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid var(--border);
    display: block;
}

.post-body ul,
.post-body ol {
    padding-left: 1.6em;
    margin-bottom: 1.2em;
}
.post-body li { margin-bottom: 0.4em; }

.post-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2em 0;
}

.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}
.post-body table th,
.post-body table td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    text-align: left;
}
.post-body table th {
    background: var(--surface);
    color: var(--text);
    font-weight: 500;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
footer {
    position: relative; z-index: 1;
    height: 60px;
}
.social-icon {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    color: rgba(255,255,255,0.22);
    text-decoration: none;
    border-radius: 7px;
    transition: all 0.18s;
}
.social-icon:hover {
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.06);
}

/* ─── Mobil ──────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .content { padding: 28px 16px 70px; }
    .page-header { font-size: 34px; }
    .post-full-title { font-size: 20px; }
    header { padding: 0; }
    .header-inner { padding: 0 16px; }
    .post-body { font-size: 14px; }
}

/* ─── Koenig Editor ──────────────────────────────────────────────────────── */
.kg-width-wide {
    margin-left: calc(50% - min(45vw, 680px));
    margin-right: calc(50% - min(45vw, 680px));
    width: min(90vw, 1360px);
    max-width: min(90vw, 1360px);
}
.kg-width-full {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    max-width: 100vw;
}
