/* ==========================================================================
   site.css — Renk paleti, tema değişkenleri ve özel stiller
   Tailwind Play CDN'in üzerine yalnızca onun karşılamadığı ihtiyaçları ekler:
   tema değişkenleri, kağıt dokusu, metin tipografisi ve yazdırma stilleri.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1) RENK PALETİ — "Kağıt & Varak" paleti
   Klasik kitap sanatlarından esinlenir: kağıt, mürekkep (çivit),
   varak altını, lal (kiremit) ve adaçayı.
   Değerler `R G B` üçlüsü olarak tutulur; böylece Tailwind opaklık
   modifier'ları (ör. bg-lacquer/10) çalışır.
   -------------------------------------------------------------------------- */
:root {
  --c-paper-rgb: 248 245 239;        /* #F8F5EF   kağıt            */
  --c-paper-dim-rgb: 239 234 225;    /* #EFEAE1   ikincil yüzey    */
  --c-card-rgb: 255 253 249;         /* #FFFDF9   kart             */
  --c-ink-rgb: 20 24 31;             /* #14181F   mürekkep         */
  --c-ink-soft-rgb: 42 48 59;        /* #2A303B                    */
  --c-muted-rgb: 110 106 98;         /* #6E6A62   ikincil metin    */
  --c-line-rgb: 222 213 198;         /* #DED5C6   çizgi            */
  --c-lacquer-rgb: 37 50 90;         /* #25325A   çivit / lacivert */
  --c-lacquer-deep-rgb: 20 28 52;    /* #141C34   derin çivit      */
  --c-lacquer-soft-rgb: 138 155 192; /* #8A9BC0                    */
  --c-gold-rgb: 176 141 87;          /* #B08D57   varak altını     */
  --c-gold-soft-rgb: 201 165 107;    /* #C9A56B                    */
  --c-terracotta-rgb: 168 86 47;     /* #A8562F   lal / kiremit    */
  --c-sage-rgb: 110 130 114;         /* #6E8272   adaçayı          */
  color-scheme: light;
}

/* --------------------------------------------------------------------------
   2) KOYU TEMA — aynı paletin düşük ışıkta okunur karşılıkları
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
  --c-paper-rgb: 15 19 25;
  --c-paper-dim-rgb: 21 26 34;
  --c-card-rgb: 26 32 41;
  --c-ink-rgb: 241 237 228;
  --c-ink-soft-rgb: 213 208 198;
  --c-muted-rgb: 150 148 142;
  --c-line-rgb: 48 56 68;
  --c-lacquer-rgb: 138 155 192;
  --c-lacquer-deep-rgb: 12 18 34;
  --c-lacquer-soft-rgb: 90 108 150;
  --c-gold-rgb: 201 165 107;
  --c-gold-soft-rgb: 217 190 138;
  --c-terracotta-rgb: 199 114 74;
  --c-sage-rgb: 138 158 142;
  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   3) TEMEL AYARLAR
   -------------------------------------------------------------------------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background-color: rgb(var(--c-paper-rgb));
  color: rgb(var(--c-ink-rgb));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
}

::selection { background-color: rgb(var(--c-gold-rgb) / 0.30); }

:focus-visible {
  outline: 2px solid rgb(var(--c-gold-rgb));
  outline-offset: 3px;
  border-radius: 3px;
}

* { scrollbar-width: thin; scrollbar-color: rgb(var(--c-line-rgb)) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: rgb(var(--c-line-rgb));
  border-radius: 999px;
  border: 3px solid rgb(var(--c-paper-rgb));
}

/* --------------------------------------------------------------------------
   4) KAĞIT DOKUSU — sayfanın arkasında çok hafif boya izleri
   -------------------------------------------------------------------------- */
.doku-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 18%, rgb(var(--c-lacquer-rgb) / 0.10), transparent 42%),
    radial-gradient(circle at 88% 8%,  rgb(var(--c-gold-rgb) / 0.12), transparent 38%),
    radial-gradient(circle at 72% 88%, rgb(var(--c-terracotta-rgb) / 0.09), transparent 44%),
    radial-gradient(circle at 30% 96%, rgb(var(--c-sage-rgb) / 0.08), transparent 40%);
}

/* --------------------------------------------------------------------------
   5) TİPOGRAFİ
   -------------------------------------------------------------------------- */
.prose-tr { line-height: 1.85; font-size: 1.0625rem; }
.prose-tr > p { margin-bottom: 1.15em; }
.prose-tr > p:first-of-type::first-letter {
  font-family: "Fraunces", Georgia, serif;
  float: left;
  font-size: 3.1em;
  line-height: 0.82;
  padding: 0.06em 0.10em 0 0;
  color: rgb(var(--c-lacquer-rgb));
  font-weight: 600;
}
.prose-tr h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 2.1em 0 0.7em;
}
.prose-tr h2::before {
  content: "";
  display: block;
  width: 2.25rem;
  height: 2px;
  margin-bottom: 0.85rem;
  background: rgb(var(--c-gold-rgb));
}
.prose-tr h3 { font-weight: 600; font-size: 1.15rem; margin: 1.6em 0 0.5em; }
.prose-tr ul, .prose-tr ol { margin: 0 0 1.2em 1.25em; }
.prose-tr li { margin-bottom: 0.4em; }
.prose-tr ul { list-style: none; }
.prose-tr ul > li::before {
  content: "—";
  color: rgb(var(--c-gold-rgb));
  margin-right: 0.55em;
  margin-left: -1.25em;
}
.prose-tr ol { list-style: decimal; }
.prose-tr ol > li::marker { color: rgb(var(--c-gold-rgb)); font-weight: 600; }
.prose-tr a {
  color: rgb(var(--c-lacquer-rgb));
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgb(var(--c-gold-rgb) / 0.6);
}
.prose-tr a:hover { text-decoration-color: rgb(var(--c-gold-rgb)); }
.prose-tr strong { font-weight: 600; }
.prose-tr blockquote {
  border-left: 2px solid rgb(var(--c-gold-rgb));
  padding-left: 1rem;
  font-style: italic;
  color: rgb(var(--c-muted-rgb));
  margin: 0 0 1.2em;
}

/* Bağlantı altı çizgisi animasyonu */
.link-underline {
  background-image: linear-gradient(rgb(var(--c-gold-rgb)), rgb(var(--c-gold-rgb)));
  background-repeat: no-repeat;
  background-size: 0% 1.5px;
  background-position: 0 100%;
  transition: background-size 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.link-underline:hover { background-size: 100% 1.5px; }

/* --------------------------------------------------------------------------
   6) GÖRÜNÜME GİRİŞ ANİMASYONU
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* --------------------------------------------------------------------------
   7) YAZDIRMA — akademik CV çıktısı için
   -------------------------------------------------------------------------- */
@media print {
  .no-print, header nav, footer { display: none !important; }
  body { background: #fff; color: #000; }
  a::after { content: " (" attr(href) ")"; font-size: 0.75em; color: #555; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .print-break { page-break-inside: avoid; }
}

/* --------------------------------------------------------------------------
   8) TAŞMA KORUMASI — blog içeriğindeki uzun bağlantı ve kod metinleri
   Mobilde (380 px) uzun URL'ler sayfayı yana kaydırmasın; satır sonunda
   kırılabilsin. Tablolar zaten `overflow-x-auto` sarmalayıcısıyla kaydırılır.
   -------------------------------------------------------------------------- */
[data-blog-yazi] a,
[data-blog-yazi] code { overflow-wrap: anywhere; }

