/* ============================================================
   SILICON TALES: standart MAKALE tasarım sistemi
   Tek kaynak: public/<slug>/index.html sayfaları SADECE bunu +
   site-header.css'i bağlar. Renk, font, tipografi, bileşenler,
   içindekiler (TOC), back-to-top ve reklam yuvaları burada.

   Bu dosya GÖRSEL tasarımdır. İçeriği değiştirmez.
   Sınıflar "st-" / sade makale adlarıyla; header (st-head) ayrı
   dosyadan gelir ve burayla çakışmaz.

   Kontrast kuralı: gövde metni HER ZAMAN parlak mürekkep. Koyu gri
   gövde fontu YASAK. Soluk renkler yalnız küçük metadata içindir.
   ============================================================ */

@import url('/fonts/switzer.css');

:root {
  /* yüzeyler: siyaha yakın çok koyu gri */
  --st-bg: #0b0d11;
  --st-bg-soft: #0f131a;
  --st-surface: #14181f;
  --st-surface-2: #1a1f28;
  --st-line: #262d38;
  --st-line-soft: #1b212b;

  /* metin: YÜKSEK KONTRAST (bu site koyu, fontlar parlak olmalı) */
  --st-ink: #f4f2ec;        /* gövde metni: parlak, varsayılan */
  --st-ink-strong: #ffffff; /* başlıklar */
  --st-ink-soft: #cdd2db;   /* ikincil metin: yine yüksek kontrast */
  --st-ink-faint: #8b93a1;  /* SADECE küçük metadata/etiket: asla gövde */

  /* marka vurgusu: amber sinyal */
  --st-accent: #ff9d3c;
  --st-accent-soft: #ffb866;
  --st-accent-dim: #c9762a;
  --st-accent-glow: rgba(255, 157, 60, 0.16);

  /* sabit fonksiyonel palet (veri / durum / not kutuları) */
  --st-ok: #5fd08a;
  --st-info: #43c6b7;
  --st-warn: #f2c14e;
  --st-danger: #ff6b6b;
  --st-violet: #9b8cff;

  /* tipografi: Switzer her şey, IBM Plex Mono metadata */
  --st-sans: 'Switzer', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --st-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* ölçüler */
  --st-max: 74rem;   /* sayfa genişliği */
  --st-read: 44rem;  /* okuma sütunu */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 8.5rem; /* sticky header + TOC'un altına insin */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--st-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--st-ink);
  background: var(--st-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

/* hafif mühendislik atmosferi (opsiyonel, çok soluk) */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1100px 620px at 85% -10%, var(--st-accent-glow), transparent 60%),
    var(--st-bg);
}

::selection { background: var(--st-accent); color: #1a1205; }
a { color: inherit; text-decoration: none; }
img, svg, video { max-width: 100%; height: auto; display: block; }

/* layout shell */
.wrap { width: 100%; max-width: var(--st-max); margin-inline: auto; padding-inline: 1.5rem; }
.read { max-width: var(--st-read); margin-inline: auto; }

/* ---------------- okuma ilerleme çubuğu ---------------- */
#st-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--st-accent), var(--st-accent-soft));
  z-index: 300; box-shadow: 0 0 12px var(--st-accent-glow);
}

/* ---------------- içindekiler / bölüm rehberi (TOC) ----------------
   Header'ın hemen altında sticky kalır; tüm makale bölümlerini sırayla
   gösterir, tıklayınca o paragrafa götürür, kaydırınca aktif olur. */
.st-toc {
  position: sticky; top: 4.25rem; z-index: 90;
  background: rgba(11, 13, 17, 0.85);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--st-line-soft);
}
.st-toc__inner {
  max-width: var(--st-max); margin-inline: auto; padding: 0.7rem 1.5rem;
  display: flex; gap: 1.5rem; overflow-x: auto; scrollbar-width: none;
}
.st-toc__inner::-webkit-scrollbar { display: none; }
.st-toc a {
  white-space: nowrap; font-family: var(--st-mono);
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--st-ink-soft); padding: 0.2rem 0; transition: color 0.18s ease;
}
.st-toc a:hover { color: var(--st-ink); }
.st-toc a.is-active { color: var(--st-accent); }

/* ---------------- hero ---------------- */
.st-hero { padding: 4rem 0 2.5rem; }
.st-kicker {
  font-family: var(--st-mono); color: var(--st-accent);
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  margin-bottom: 1.4rem; display: flex; align-items: center; gap: 0.75rem;
}
.st-kicker::before { content: ""; width: 34px; height: 1px; background: var(--st-accent); }
.st-hero h1 {
  font-family: var(--st-sans); font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.02;
  letter-spacing: -0.025em; color: var(--st-ink-strong);
}
.st-hero h1 em { font-style: normal; color: var(--st-accent); }
.st-hero .st-sub {
  display: block; color: var(--st-accent); font-weight: 700;
  font-size: clamp(1.05rem, 2.4vw, 1.6rem); margin-top: 0.9rem; letter-spacing: -0.01em;
}
.st-lede {
  margin-top: 1.6rem; max-width: 60ch;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.6; color: var(--st-ink-soft);
}
.st-lede b { color: var(--st-ink); font-weight: 600; }

/* hero istatistik şeridi */
.st-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; margin-top: 2.6rem; background: var(--st-line-soft);
  border: 1px solid var(--st-line-soft); border-radius: 12px; overflow: hidden;
}
.st-stat { background: var(--st-bg-soft); padding: 1.2rem 1.1rem; }
.st-stat .n { font-weight: 800; font-size: 1.9rem; color: var(--st-accent-soft); line-height: 1; }
.st-stat .l {
  font-family: var(--st-mono); font-size: 0.66rem; color: var(--st-ink-faint);
  text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.55rem;
}

/* ---------------- bölümler + tipografi ---------------- */
.st-section { padding: 3.5rem 0; border-top: 1px solid var(--st-line-soft); }
.st-sectag {
  font-family: var(--st-mono); font-size: 0.75rem; color: var(--st-accent-dim);
  letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 0.8rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.st-sectag span { color: var(--st-ink-faint); }

h1, h2, h3, h4, h5 { font-family: var(--st-sans); color: var(--st-ink-strong); }
.st-section h2 {
  font-weight: 800; font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  letter-spacing: -0.015em; line-height: 1.08; margin-bottom: 1.2rem;
}
.st-section h3 { font-weight: 700; font-size: 1.4rem; margin: 2.2rem 0 0.8rem; letter-spacing: -0.005em; }
.st-section h4 {
  font-family: var(--st-mono); font-weight: 600; font-size: 0.9rem; color: var(--st-accent);
  letter-spacing: 0.05em; text-transform: uppercase; margin: 1.6rem 0 0.5rem;
}

/* gövde metni: DAİMA parlak mürekkep (yüksek kontrast) */
p { margin-bottom: 1rem; color: var(--st-ink); }
p b, li b { color: var(--st-ink-strong); font-weight: 600; }
.st-lead-p { font-size: 1.14rem; color: var(--st-ink); }

a.st-link { color: var(--st-accent); text-decoration: none; border-bottom: 1px dotted var(--st-accent-dim); }
a.st-link:hover { border-bottom-color: var(--st-accent); }

ul, ol { margin: 0 0 1rem 0.2rem; padding-left: 1.3rem; color: var(--st-ink); }
li { margin-bottom: 0.55rem; }
li::marker { color: var(--st-accent); }

blockquote, .st-pull {
  border-left: 3px solid var(--st-accent);
  padding: 0.4rem 0 0.4rem 1.4rem; margin: 1.8rem 0;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.4;
  color: var(--st-ink-strong); font-weight: 500;
}
.st-pull span { color: var(--st-accent); }

code, .st-code {
  font-family: var(--st-mono); font-size: 0.86em;
  background: var(--st-surface); border: 1px solid var(--st-line-soft);
  padding: 0.12em 0.4em; border-radius: 3px; color: var(--st-accent-soft);
}
pre {
  background: var(--st-bg-soft); border: 1px solid var(--st-line);
  border-radius: 8px; padding: 1.2rem 1.4rem; overflow-x: auto;
  font-size: 0.9rem; margin: 1.5rem 0;
}
pre code { background: none; border: none; padding: 0; color: var(--st-ink); }
hr { border: none; border-top: 1px solid var(--st-line); margin: 2.5rem 0; }
.st-section img { border-radius: 8px; border: 1px solid var(--st-line); margin: 1.5rem 0; }

/* ---------------- tablolar ---------------- */
.st-tbl { overflow-x: auto; margin: 1.6rem 0; border: 1px solid var(--st-line); border-radius: 11px; background: var(--st-bg-soft); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
caption { caption-side: top; text-align: left; font-family: var(--st-mono); font-size: 0.7rem; color: var(--st-ink-faint); padding: 0.8rem 1rem 0; letter-spacing: 0.04em; }
th, td { padding: 0.7rem 0.9rem; text-align: left; border-bottom: 1px solid var(--st-line-soft); vertical-align: top; }
thead th {
  background: var(--st-accent-glow); color: var(--st-accent-soft);
  font-family: var(--st-mono); font-weight: 600; font-size: 0.72rem;
  letter-spacing: 0.05em; text-transform: uppercase; border-bottom: 1px solid var(--st-line);
}
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
td:first-child, th:first-child { color: var(--st-ink-strong); font-weight: 600; }
.st-num { font-family: var(--st-mono); color: var(--st-ink); }

/* ---------------- kartlar / ızgara ---------------- */
.st-grid { display: grid; gap: 1rem; margin: 1.6rem 0; }
.st-grid.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.st-grid.g3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.st-card { background: var(--st-surface); border: 1px solid var(--st-line); border-radius: 12px; padding: 1.3rem; transition: border-color 0.2s, transform 0.2s; }
.st-card:hover { border-color: var(--st-accent-dim); transform: translateY(-2px); }
.st-card .ic { font-family: var(--st-mono); font-size: 0.7rem; color: var(--st-accent); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.5rem; }
.st-card h5 { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.5rem; }
.st-card p { font-size: 0.95rem; margin-bottom: 0; color: var(--st-ink-soft); }

/* pill / etiket */
.st-pill { font-family: var(--st-mono); font-size: 0.72rem; background: var(--st-surface-2); border: 1px solid var(--st-line); border-radius: 20px; padding: 0.3rem 0.75rem; color: var(--st-ink-soft); display: inline-block; }
.st-pill b { color: var(--st-accent-soft); font-weight: 600; }
.st-tag { font-family: var(--st-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--st-accent); border: 1px solid var(--st-line); padding: 0.2rem 0.55rem; border-radius: 3px; }

/* ---------------- not / uyarı kutuları (4 fonksiyonel renk) ---------------- */
.st-note { border-left: 3px solid var(--st-accent); background: linear-gradient(90deg, var(--st-accent-glow), transparent); padding: 0.95rem 1.2rem; border-radius: 0 8px 8px 0; margin: 1.4rem 0; font-size: 0.98rem; color: var(--st-ink); }
.st-note .t { font-family: var(--st-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--st-accent); display: block; margin-bottom: 0.35rem; }
.st-note.ok     { border-color: var(--st-ok);     background: linear-gradient(90deg, rgba(95,208,138,0.10), transparent); }
.st-note.ok .t     { color: var(--st-ok); }
.st-note.info   { border-color: var(--st-info);   background: linear-gradient(90deg, rgba(67,198,183,0.10), transparent); }
.st-note.info .t   { color: var(--st-info); }
.st-note.warn   { border-color: var(--st-warn);   background: linear-gradient(90deg, rgba(242,193,78,0.10), transparent); }
.st-note.warn .t   { color: var(--st-warn); }
.st-note.danger { border-color: var(--st-danger); background: linear-gradient(90deg, rgba(255,107,107,0.10), transparent); }
.st-note.danger .t { color: var(--st-danger); }

/* ---------------- REKLAM YUVALARI ----------------
   Kural: boş reklam kutusu OKUYUCUYA ASLA gösterilmez.
   Default display:none. Gerçek bir reklam (iframe) yüklenince
   :has(iframe) ile otomatik görünür hale gelir. AdSense doldurmazsa
   (data-ad-status="unfilled") yine gizli kalır. Yer üst/orta/alt'a
   konur ama tasarımı bozmaz çünkü görünene kadar yer kaplamaz. */
.st-ad {
  display: none;            /* boşken görünmez */
  max-width: var(--st-read); margin: 2.6rem auto; padding: 1rem;
  border: 1px dashed var(--st-line); border-radius: 12px;
  text-align: center; background: rgba(255, 255, 255, 0.012);
}
.st-ad__label { font-family: var(--st-mono); font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--st-ink-faint); }
.st-ad:has(iframe) { display: block; }                         /* reklam yüklendi → göster */
.st-ad:has(ins[data-ad-status="unfilled"]) { display: none; }  /* dolmadı → gizle */

/* ---------------- back-to-top ("PAT" yukarı) ----------------
   Sayfanın her yerinde, en altta bile tıklanabilir (position:fixed).
   Aşağı kaydırınca belirir, en üstte gizlidir. */
.st-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 250;
  width: 2.9rem; height: 2.9rem; display: grid; place-items: center;
  border-radius: 50%; cursor: pointer;
  background: var(--st-accent); color: #1a1205;
  border: none; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--st-accent-dim);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.st-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.st-top:hover { background: var(--st-accent-soft); }
.st-top:focus-visible { outline: 2px solid var(--st-ink-strong); outline-offset: 2px; }
.st-top svg { width: 1.2rem; height: 1.2rem; }

/* ---------------- footer ---------------- */
.st-foot { border-top: 1px solid var(--st-line); margin-top: 3rem; padding: 2.6rem 1.5rem 4rem; text-align: center; }
.st-foot p { color: var(--st-ink-soft); font-family: var(--st-mono); font-size: 0.78rem; margin-bottom: 0.4rem; }
.st-foot a { color: var(--st-accent); }

/* ---------------- giriş animasyonu ---------------- */
.st-reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.st-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .st-reveal { opacity: 1; transform: none; transition: none; }
  .st-top { transition: opacity 0.01s; }
}

@media (max-width: 640px) {
  .st-hero { padding-top: 3rem; }
  th, td { padding: 0.55rem 0.65rem; font-size: 0.82rem; }
  .st-top { right: 1rem; bottom: 1rem; }
}
