/* mekryz — Medium tarzı okuma düzeni.
   Ana renkler: #172226 (menü, footer, kenarlıklar, metin), soğuk gri (karşıt/vurgu), #F32B2C (başlıklar). */
:root {
    --ink: #172226;
    --ink-2: #22323a;
    --accent: #A9B4BC;        /* soğuk gri: koyu zeminde vurgu */
    --accent-line: #8C99A3;   /* açık zeminde çizgi ve kenar */
    --head: #F32B2C;
    --paper: #F7F4F0;
    --surface: #FFFFFF;
    --muted: #55625f;
    --rule: rgba(23, 34, 38, .14);
    --link: #3F4E58;          /* açık zeminde bağlantı metni */
    --accent-soft: rgba(140, 153, 163, .16);
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --narrow: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1 0 auto; }
a { color: var(--link); }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; }

.container { max-width: 1140px; padding-left: 16px; padding-right: 16px; }
.container.narrow { max-width: calc(var(--narrow) + 32px); }
.container.narrow-wide { max-width: 1000px; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--ink); padding: 8px 14px; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
    background: var(--ink);
    border-bottom: 1px solid rgba(169, 180, 188, .22);
    position: sticky; top: 0; z-index: 50;
}
.site-header .navbar { padding: 14px 0; }
.brand {
    font-weight: 800; font-size: 1.5rem; letter-spacing: -.03em;
    color: #fff; text-decoration: none;
}
.brand:hover { color: #fff; }
.brand-dot { color: var(--accent); }
.site-header .nav-link {
    color: rgba(255, 255, 255, .78); font-weight: 500; font-size: .95rem;
    padding: 6px 14px !important; border-radius: 999px;
}
.site-header .nav-link:hover { color: #fff; }
.site-header .nav-link.active { color: var(--ink); background: var(--accent); }
.navbar-toggler { border: 1px solid rgba(169, 180, 188, .4); color: #fff; font-size: 1.5rem; padding: 2px 10px; }
.navbar-toggler:focus { box-shadow: none; }
.nav-tools { display: flex; align-items: center; gap: 10px; margin-left: 16px; }
.lang-switch, .icon-link {
    color: var(--accent); text-decoration: none; font-weight: 700; font-size: .8rem;
    border: 1px solid rgba(169, 180, 188, .45); border-radius: 999px; padding: 4px 10px; line-height: 1.4;
}
.lang-switch:hover, .icon-link:hover { background: var(--accent); color: var(--ink); }
@media (max-width: 767.98px) {
    .site-header .navbar-nav { padding-top: 12px; gap: 2px; }
    .nav-tools { margin: 12px 0 4px; }
}

/* ---------- Hero (anasayfa) ---------- */
.hero {
    background: var(--ink);
    color: #fff;
    padding: 40px 0 44px;
    border-bottom: 1px solid var(--ink);
}
.hero-eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; margin-bottom: 10px; }
.hero h1 {
    font-family: var(--serif); font-weight: 600;
    font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.1; letter-spacing: -.02em;
    color: var(--head); max-width: 22ch; margin: 0 0 12px;
}
.hero-lede { font-size: 1.05rem; color: rgba(255, 255, 255, .8); max-width: 60ch; margin-bottom: 20px; }
.btn-accent {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent); color: var(--ink); font-weight: 700; text-decoration: none;
    padding: 8px 18px; font-size: .92rem; border-radius: 999px; border: 1px solid var(--accent);
}
.btn-accent:hover { background: transparent; color: var(--accent); }

/* ---------- Sayfa gövdesi ---------- */
.page-body { padding-top: 48px; padding-bottom: 80px; }
.page-head { padding: 48px 0 8px; }
.page-head h1, .post-head h1 {
    color: var(--head); font-weight: 800; letter-spacing: -.025em; line-height: 1.12;
    font-size: clamp(2rem, 4.6vw, 2.9rem); margin: 6px 0 12px;
}
.lede { font-size: 1.2rem; color: var(--muted); line-height: 1.5; margin-bottom: 0; }
.section-title {
    font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 10px; margin: 8px 0 4px;
}
.empty { color: var(--muted); padding: 32px 0; }
.more-link { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; margin-top: 20px; text-decoration: none; }

.crumb { font-size: .82rem; color: var(--muted); margin-bottom: 14px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--ink); text-decoration: underline; }
.crumb .sep { margin: 0 6px; opacity: .5; }
.crumb .current { color: var(--ink); }

/* Konu çipleri */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-block; font-size: .85rem; font-weight: 500; text-decoration: none;
    color: var(--ink); background: var(--surface); border: 1px solid var(--ink);
    padding: 5px 14px; border-radius: 999px;
}
.chip:hover { background: var(--ink); color: var(--accent); }

/* ---------- Yazı satırı ---------- */
.post-row {
    display: flex; gap: 28px; align-items: flex-start;
    padding: 28px 0; border-bottom: 1px solid var(--rule);
}
.post-row-body { flex: 1; min-width: 0; }
.post-row h3 { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; margin: 6px 0 8px; }
.post-row h3 a, .featured h2 a, .work-card h3 a { color: var(--head); text-decoration: none; }
.post-row h3 a:hover, .featured h2 a:hover, .work-card h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 4px; }
.post-row p { font-family: var(--serif); color: var(--muted); font-size: 1.05rem; margin: 0; }
.post-row-img { flex: 0 0 160px; }
.post-row-img img { width: 160px; height: 107px; object-fit: cover; border: 1px solid var(--ink); }
@media (max-width: 575.98px) {
    .post-row { gap: 16px; }
    .post-row-img { flex-basis: 96px; }
    .post-row-img img { width: 96px; height: 96px; }
    .post-row h3 { font-size: 1.15rem; }
    .post-row p { display: none; }
}
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.post-cat {
    color: var(--link); font-weight: 600; text-decoration: none; font-size: .85rem;
}
.post-head .post-cat { display: inline-block; background: var(--accent-soft); padding: 3px 12px; border-radius: 999px; color: var(--ink); border: 1px solid var(--accent-line); }

/* Öne çıkan */
.featured { padding-bottom: 32px; margin-bottom: 24px; border-bottom: 1px solid var(--ink); }
.featured img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border: 1px solid var(--ink); margin-bottom: 18px; }
.featured .label {
    display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    background: var(--ink); color: var(--accent); padding: 3px 10px; border-radius: 999px;
}
.featured h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; margin: 12px 0 10px; }
.featured p { font-family: var(--serif); font-size: 1.15rem; color: var(--muted); }

/* ---------- Kenar çubuğu ---------- */
.sidebar { position: relative; }
@media (min-width: 992px) {
    .sidebar > .side-block:first-child { margin-top: 0; }
    .sidebar { border-left: 1px solid var(--rule); padding-left: 32px !important; }
}
.side-block { margin-bottom: 36px; }
.side-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.side-list { list-style: none; padding: 0; margin: 0; }
.side-list li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.side-list a { font-weight: 700; color: var(--ink); text-decoration: none; display: block; }
.side-list a:hover { color: var(--head); }
.side-list span { font-size: .88rem; color: var(--muted); }

/* ---------- Yazar ---------- */
.author { display: flex; gap: 14px; align-items: flex-start; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: 0 0 56px; border: 2px solid var(--accent-line); }
.avatar-letter {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--ink); color: var(--accent); font-weight: 800; font-size: 1.4rem;
}
.author-name { display: block; font-weight: 700; }
.author-job { display: block; font-size: .88rem; color: var(--muted); }
.author-bio { font-family: var(--serif); font-size: 1rem; color: var(--ink); margin: 8px 0 0; }
.author-compact .avatar { width: 44px; height: 44px; flex-basis: 44px; }
.author-compact .avatar-letter { font-size: 1.1rem; }

/* ---------- Yazı sayfası ---------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--accent-line); transform-origin: 0 50%; transform: scaleX(0); }
.post-head { padding-top: 48px; }
.post-head .lede { font-family: var(--serif); font-size: 1.35rem; }
.post-byline {
    display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
    margin: 28px 0 36px; padding: 14px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.post-cover { margin: 0 auto 40px; }
.post-cover img { width: 100%; border: 1px solid var(--ink); }

.prose {
    font-family: var(--serif); font-size: 1.25rem; line-height: 1.75; color: var(--ink);
    overflow-wrap: break-word;
}
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose p + p { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 {
    font-family: var(--sans); color: var(--head); font-weight: 800; letter-spacing: -.02em; line-height: 1.25;
    margin: 1.8em 0 .5em;
}
.prose h2 { font-size: 1.7rem; }
.prose h3 { font-size: 1.35rem; }
.prose h4 { font-size: 1.15rem; }
.prose a { color: var(--link); text-decoration: underline; text-decoration-color: var(--accent-line); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { color: var(--ink); background: var(--accent-soft); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose blockquote {
    margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent-line);
    font-style: italic; color: var(--ink-2);
}
.prose code {
    font-size: .85em; background: var(--surface); border: 1px solid var(--rule);
    padding: .1em .35em; border-radius: 4px; color: var(--ink);
}
.prose pre {
    background: var(--ink); color: #e8eef0; padding: 18px 20px; border-radius: 6px;
    font-size: .95rem; line-height: 1.6; overflow-x: auto; border-left: 3px solid var(--accent);
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.prose img { border: 1px solid var(--ink); margin: 1.4em 0; }
.prose hr { border: 0; text-align: center; margin: 2.4em 0; opacity: 1; }
.prose hr::before { content: '· · ·'; color: var(--ink); letter-spacing: .6em; font-size: 1.3rem; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 8px 12px; text-align: left; }
.prose th { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (max-width: 575.98px) {
    .prose { font-size: 1.12rem; }
    .prose h2 { font-size: 1.45rem; }
}

.post-tags { margin-top: 40px; }
.share { display: flex; align-items: center; gap: 10px; margin-top: 28px; font-size: .9rem; color: var(--muted); }
.share a {
    width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--ink); border-radius: 50%; color: var(--ink); text-decoration: none;
}
.share a:hover { background: var(--ink); color: var(--accent); }
.author-box { margin: 40px 0 64px; padding: 24px; background: var(--surface); border: 1px solid var(--ink); }
.related { padding: 8px 0 72px; }
.category-content { margin-bottom: 24px; }

/* Çalışma detay */
.facts { display: grid; gap: 14px; margin: 24px 0 32px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--ink); }
.facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.facts dd { margin: 2px 0 0; font-weight: 500; }
.tech-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-list span { font-size: .78rem; font-weight: 600; background: var(--ink); color: var(--accent); padding: 3px 10px; border-radius: 999px; }
.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 36px; }
.results div { background: var(--ink); color: #fff; padding: 18px; }
.results strong { display: block; color: var(--accent); font-size: 1.8rem; font-weight: 800; }
.results span { font-size: .9rem; color: rgba(255, 255, 255, .8); }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 32px 0 64px; }
.gallery img { width: 100%; border: 1px solid var(--ink); }

/* ---------- Çalışmalar ızgarası ---------- */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.work-card { background: var(--surface); border: 1px solid var(--ink); display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.work-card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--accent-line); }
.work-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--ink); display: block; }
.work-body { padding: 20px 22px 24px; }
.work-card h3 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 8px; }
.work-card p { color: var(--muted); font-size: .98rem; margin-bottom: 14px; }
@media (max-width: 400px) { .work-grid { grid-template-columns: 1fr; } }

/* ---------- Sayfalama ---------- */
.pagination { --bs-pagination-color: var(--ink); --bs-pagination-border-color: var(--ink); --bs-pagination-hover-bg: var(--accent-soft);
    --bs-pagination-hover-color: var(--ink); --bs-pagination-active-bg: var(--ink); --bs-pagination-active-border-color: var(--ink);
    --bs-pagination-active-color: var(--accent); --bs-pagination-focus-box-shadow: none; --bs-pagination-bg: var(--surface); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .75); padding: 48px 0 28px; border-top: 3px solid var(--accent); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid rgba(169, 180, 188, .22); }
.footer-tagline { max-width: 42ch; margin: 10px 0 0; font-size: .95rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: flex-start; }
.footer-links a { color: #fff; text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 20px; font-size: .88rem; }
.social { display: flex; gap: 8px; }
.social a {
    width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(169, 180, 188, .45); border-radius: 50%; color: var(--accent); text-decoration: none;
}
.social a:hover { background: var(--accent); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .work-card { transition: none; }
}
