/* Blog sayfaları (/blog, /blog/<KOD>-<slug>). `style-v2.css` yüklenir ve bu dosya onun
   token'ları, başlığı ve altbilgisi üstüne kurulur: renk yalnız token'dan gelir, bu
   yüzden koyu kip ayrı kural istemez. Dosya adı sürümlüdür; değişirse `blog-v2.css`
   açılır ve çizici (`blogWebPage.ts`) yeni adı yükler.

   Hareket yoktur: geçiş, animasyon ve dönüşüm kullanılmaz. Basış geri bildirimi
   `:active` anında renk değiştirir. `text-transform` da yoktur; üst satır sunucuda
   `tr-TR` ile büyütülür (UI.md). */

html {
  /* style-v2 yumuşak kaydırır; blog sayfalarında hareket yok. */
  scroll-behavior: auto;
}

/* Ortak site stilinin logo basış hareketi blogun hareketsiz sözleşmesine girmez. */
.brand {
  transition: none;
}

.brand:active {
  transform: none;
}

.blog-main {
  padding-block: clamp(2rem, 6vw, 4rem);
}

/* Okuma ölçüsü 70 karakter. `ch` bu kabın yazı boyuna göre çözülür. */
.blog-column {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  font-size: 1.0625rem;
}

/* Üst satır: küçük boyda harf aralığı artı, büyük başlıkta eksidir. */
.blog-kicker {
  margin: 0 0 0.75rem;
  color: var(--primary-strong);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.4;
}

/* style-v2 `h1`i 18ch ile sınırlar ve harf aralığını -0.055em yapar; blog başlıkları
   100 karaktere çıkar, bu yüzden sınır kalkar ve aralık boyuta göre gevşer. */
.blog-title {
  max-width: none;
  margin: 0 0 1.1rem;
  font-size: clamp(1.9rem, 1.15rem + 3.4vw, 2.9rem);
  font-weight: 820;
  letter-spacing: -0.034em;
  line-height: 1.08;
  text-wrap: balance;
}

/* 60 karakteri aşan başlık bir kademe küçülür; satır aralığı boyutla ters orantılı açılır. */
.blog-title-long {
  font-size: clamp(1.5rem, 1rem + 2.4vw, 2.15rem);
  letter-spacing: -0.024em;
  line-height: 1.16;
}

.blog-article-head {
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
  padding-bottom: clamp(1.5rem, 4vw, 2rem);
  border-bottom: 1px solid var(--border);
}

.blog-author {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 720;
  line-height: 1.4;
}

.blog-date {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

/* Özet öne çıkan paragraftır: gövdeden büyük, ana metin renginde. */
.blog-summary {
  margin: 1.5rem 0 0;
  font-size: clamp(1.15rem, 1.05rem + 0.45vw, 1.3rem);
  letter-spacing: -0.012em;
  line-height: 1.5;
  text-wrap: pretty;
}

/* Gövde: rahat satır aralığı, harf aralığı sıfır. */
.blog-body {
  letter-spacing: 0;
  line-height: 1.75;
}

.blog-body > :first-child {
  margin-top: 0;
}

.blog-body > :last-child {
  margin-bottom: 0;
}

.blog-body p {
  margin: 0 0 1.25rem;
  text-wrap: pretty;
}

.blog-body h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: clamp(1.35rem, 1.15rem + 0.9vw, 1.65rem);
  letter-spacing: -0.022em;
  line-height: 1.25;
}

.blog-body h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.2rem;
  letter-spacing: -0.014em;
  line-height: 1.3;
}

.blog-body ul {
  margin: 0 0 1.25rem;
  padding-inline-start: 1.4rem;
}

.blog-body li + li {
  margin-top: 0.4rem;
}

.blog-body li::marker {
  color: var(--primary-strong);
}

.blog-body a {
  font-weight: inherit;
  text-decoration-thickness: 0.06em;
}

.blog-article-foot {
  margin-top: clamp(2.25rem, 6vw, 3.5rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

/* Uygulamada aç: düğme ve notu yan yana durur, dar ekranda alt alta iner. */
.blog-app {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.blog-app-note {
  flex: 1 1 14rem;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.blog-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.65rem 1.1rem;
  border-radius: 0.55rem;
  background: var(--primary);
  color: #1a0e08;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
}

/* Ok süstür; ikinci bildirim boş alternatif metin verir, ekran okuyucu "sağ ok" demez. */
.blog-button::after {
  margin-left: 0.6rem;
  content: "→";
  content: "→" / "";
}

/* style-v2 odaktaki bağlantının köşesini 0.25rem yapar; düğme kendi yarıçapını korur. */
.blog-button:focus-visible,
.blog-pager-link:focus-visible {
  border-radius: 0.55rem;
}

.blog-button:active {
  background: var(--primary-strong);
  color: var(--surface);
  box-shadow: inset 0 0.2rem 0 rgb(0 0 0 / 22%);
}

.blog-back {
  margin: 1.25rem 0 0;
}

.blog-back a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.blog-back a::before {
  margin-right: 0.45rem;
  content: "←";
  content: "←" / "";
}

/* Dizin */

.blog-index-head {
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
}

.blog-lede {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  letter-spacing: -0.01em;
  line-height: 1.55;
}

.blog-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Başlığın bağlantısı kartın tamamına yayılır; dokunma hedefi kartın kendisidir. */
.blog-card {
  position: relative;
  margin: 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.blog-card:last-child {
  border-bottom: 1px solid var(--border);
}

.blog-card .blog-kicker {
  margin-bottom: 0.5rem;
}

.blog-card-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  font-weight: 780;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-wrap: balance;
}

.blog-card-title a {
  color: var(--text);
  font-weight: inherit;
  text-decoration: none;
}

.blog-card-title a::after {
  position: absolute;
  inset: 0;
  content: "";
}

.blog-card-summary {
  max-width: 62ch;
  margin: 0 0 0.75rem;
  font-size: 1rem;
  line-height: 1.6;
}

.blog-card-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

/* Basılı kart anında tonlanır; ton düzeni değiştirmesin diye gölge olarak taşar. */
.blog-card:active {
  border-radius: 0.5rem;
  background: var(--surface-alt);
  box-shadow: 0 0 0 0.6rem var(--surface-alt);
}

@media (hover: hover) and (pointer: fine) {
  .blog-card:hover .blog-card-title a {
    color: var(--primary-strong);
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
  }
}

/* Odak halkası kartın tamamını çevreler; `:has` yoksa bağlantının kendi halkası kalır. */
@supports selector(:has(*)) {
  .blog-card-title a:focus-visible {
    outline: none;
  }

  .blog-card:has(.blog-card-title a:focus-visible) {
    border-radius: 0.5rem;
    outline: 3px solid var(--focus);
    outline-offset: 0.35rem;
  }
}

.blog-empty {
  margin: 0;
  padding: 1.25rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: var(--surface-alt);
  color: var(--text-muted);
}

.blog-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  margin-top: 2rem;
}

.blog-pager-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.8rem;
  padding: 0.6rem 0.95rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.55rem;
  color: var(--text);
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

/* Yalnız daha eski bağlantısı varsa sağda durur. */
.blog-pager-link[rel~="next"] {
  margin-inline-start: auto;
}

.blog-pager-link[rel~="prev"]::before {
  margin-right: 0.5rem;
  content: "←";
  content: "←" / "";
}

.blog-pager-link[rel~="next"]::after {
  margin-left: 0.5rem;
  content: "→";
  content: "→" / "";
}

.blog-pager-link:active {
  background: var(--border);
}

@media (hover: hover) and (pointer: fine) {
  .blog-pager-link:hover {
    background: var(--surface-alt);
  }

  .blog-button:hover {
    background: var(--primary-strong);
    color: var(--surface);
  }
}

/* Bulunamadı, kapalı kapı ve hata blokları */

.blog-notice {
  padding: clamp(1.35rem, 5vw, 2.4rem);
  border: 1px solid var(--border);
  border-left: 0.35rem solid var(--primary);
  border-radius: 0.85rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.blog-notice-title {
  max-width: none;
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.12;
  text-wrap: balance;
}

.blog-notice-text {
  max-width: 52ch;
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.blog-notice-text:last-child {
  margin-bottom: 0;
}

.blog-notice-actions {
  margin: 0;
}

/* Altbilgi bağlantıları */

.blog-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-footer-links li,
.blog-footer-links li + li {
  margin: 0;
}

.blog-footer-links a {
  display: inline-block;
  padding-block: 0.4rem;
  color: var(--text-muted);
}

@media (max-width: 46rem) {
  /* Parmakla basılan hedefler; masaüstündeki yükseklik dokunmatikte küçük kalıyor. */
  .blog-footer-links a {
    padding-block: 0.75rem;
  }
}

@media (max-width: 30rem) {
  .blog-button {
    width: 100%;
  }

  .blog-pager-link {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (prefers-contrast: more) {
  .blog-article-head,
  .blog-article-foot,
  .blog-card,
  .blog-card:last-child,
  .blog-notice,
  .blog-empty {
    border-color: var(--border-strong);
  }

  .blog-card-meta,
  .blog-date,
  .blog-app-note {
    color: var(--text);
  }
}

/* Zorunlu renklerde düğmenin dolgusu silinir; çerçeve onu görünür tutar. */
@media (forced-colors: active) {
  .blog-button {
    border: 1px solid ButtonText;
  }
}

@media print {
  .skip-link,
  .site-nav,
  .blog-app,
  .blog-pager,
  .blog-back,
  .blog-footer-links {
    display: none;
  }

  .blog-main {
    padding-block: 0;
  }

  .blog-column {
    max-width: none;
    font-size: 11pt;
  }

  .blog-title {
    font-size: 24pt;
    letter-spacing: -0.02em;
  }

  .blog-title-long {
    font-size: 20pt;
  }

  .blog-body {
    line-height: 1.55;
  }

  .blog-body h2,
  .blog-body h3 {
    break-after: avoid;
  }

  .blog-body p,
  .blog-body li {
    orphans: 3;
    widows: 3;
  }

  .blog-body a {
    color: inherit;
    text-decoration: underline;
  }

  /* Kâğıtta bağlantı tıklanamaz; adresi metnin yanına yazılır. */
  .blog-body a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    word-break: break-all;
  }

  .blog-card {
    break-inside: avoid;
  }

  .blog-notice {
    box-shadow: none;
  }
}
