/* =========================================================================
   Emre Çayırlı — Kaynaklar
   Aesthetic: sıcak editöryel almanak. Espresso-siyah zemin, krem tipografi,
   tek marigold vurgu. Serif başlıklar (Fraunces) + grotesk gövde + mono detay.
   ========================================================================= */

:root {
  --bg:        #131009;
  --bg-2:      #1b1610;
  --card:      #1a1510;
  --line:      #342b1f;
  --line-soft: #241e16;
  --text:      #f1e9d9;
  --text-dim:  #b8aa92;
  --muted:     #8b7d67;
  --accent:    #f2a93b;
  --accent-2:  #e6743f;
  --accent-soft: rgba(242, 169, 59, 0.13);
  --code-bg:   #0c0a06;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --maxw: 720px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.72;
  font-size: 18px;
  font-weight: 380;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Warm atmospheric glow behind everything */
body::before {
  content: "";
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 70vh;
  background:
    radial-gradient(60% 80% at 22% 0%, rgba(242, 169, 59, 0.10), transparent 70%),
    radial-gradient(50% 70% at 90% 8%, rgba(230, 116, 63, 0.07), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Film grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--accent); text-decoration: none; }

::selection { background: var(--accent); color: #1a1208; }

/* ----------------------------------------------------------------- Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(19, 16, 9, 0.72);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 540;
  font-size: 21px;
  letter-spacing: -0.015em;
  color: var(--text);
}
.brand:hover { color: var(--accent); }
.header-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ----------------------------------------------------------------- Layout */
.container {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 28px 120px;
}

/* Mono eyebrow used across pages */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

/* ------------------------------------------------------------- Home / hero */
.hero {
  margin-bottom: 64px;
}
.hero h1 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 460;
  font-size: clamp(54px, 12vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 22px 0 0;
}
.hero h1 em {
  font-style: italic;
  font-weight: 460;
  color: var(--accent);
}
.lead {
  color: var(--text-dim);
  font-size: 20px;
  line-height: 1.6;
  max-width: 46ch;
  margin-top: 26px;
}

/* Editorial index list */
.index-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.index { list-style: none; }
.row {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 4px 22px;
  align-items: start;
  padding: 28px 14px 28px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  transition: background 0.35s ease, padding-left 0.35s ease;
}
.row::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.row:hover {
  background: linear-gradient(90deg, var(--accent-soft), transparent 80%);
  padding-left: 22px;
}
.row:hover::after { transform: scaleY(1); }

.row-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  padding-top: 9px;
  letter-spacing: 0.04em;
}
.row-main { grid-column: 2; }
.row-date {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.row-title {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 480;
  font-size: 27px;
  line-height: 1.18;
  letter-spacing: -0.018em;
  margin: 5px 0 7px;
}
.row:hover .row-title { color: var(--accent); }
.row-desc {
  color: var(--text-dim);
  font-size: 15.5px;
  line-height: 1.55;
  max-width: 52ch;
}
.row-arrow {
  grid-column: 3;
  align-self: center;
  font-family: var(--mono);
  font-size: 22px;
  color: var(--muted);
  transform: translateX(-6px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s, color 0.35s;
}
.row:hover .row-arrow { opacity: 1; transform: translateX(0); color: var(--accent); }

.empty {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 14px;
  padding: 40px 0;
}

/* ------------------------------------------------------------- Guide page */
.scroll-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 30;
  transition: width 0.1s linear;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 40px;
  transition: gap 0.25s, color 0.25s;
}
.back:hover { color: var(--accent); gap: 12px; }

.guide-date {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.guide-title {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 460;
  font-size: clamp(38px, 7vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 16px 0 22px;
}
.guide-standfirst {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 380;
  font-size: 22px;
  line-height: 1.5;
  color: var(--text-dim);
  max-width: 54ch;
  margin-bottom: 36px;
}
.rule {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 0 0 44px;
}

/* Guide body typography */
.guide-body { font-size: 18px; }
.guide-body > *:first-child { margin-top: 0; }

.guide-body h2 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 56px 0 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  position: relative;
}
.guide-body h2::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 42px;
  height: 2px;
  background: var(--accent);
}
.guide-body h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 34px 0 10px;
  color: var(--text);
}
.guide-body p { margin: 16px 0; color: var(--text); }
.guide-body ul, .guide-body ol { margin: 16px 0 16px 8px; padding-left: 22px; }
.guide-body li { margin: 8px 0; padding-left: 6px; }
.guide-body li::marker { color: var(--accent); }
.guide-body strong { font-weight: 620; color: #fff; }
.guide-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 169, 59, 0.4);
  transition: border-color 0.2s, background 0.2s;
}
.guide-body a:hover { border-color: var(--accent); background: var(--accent-soft); }

.guide-body blockquote {
  position: relative;
  border-left: 2px solid var(--accent);
  background: var(--bg-2);
  padding: 16px 22px;
  margin: 26px 0;
  border-radius: 0 12px 12px 0;
  color: var(--text-dim);
  font-style: italic;
  font-family: var(--serif);
  font-size: 18px;
}

/* Inline code */
.guide-body :not(pre) > code {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 0.84em;
  color: var(--accent);
}

/* Code blocks */
.code-wrap {
  position: relative;
  margin: 26px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--code-bg);
  box-shadow: 0 16px 40px -24px rgba(0, 0, 0, 0.8);
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.code-lang {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.code-lang::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.guide-body pre {
  background: transparent;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0;
}
.guide-body pre code {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.65;
  color: #d8cfbb;
}
.copy-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.copy-btn.copied { color: #1a1208; background: var(--accent); border-color: var(--accent); }

/* ----------------------------------------------------------------- Footer */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line-soft);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 28px 64px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer p, .site-footer span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.site-footer .sig { color: var(--text-dim); }

/* ------------------------------------------------------- Reveal animation */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
}

/* Uzun basliklar dar ekranda tasmasin */
.hero h1, .guide-title, .row-title { overflow-wrap: break-word; }

/* ----------------------------------------------------------------- Mobile */
@media (max-width: 600px) {
  body { font-size: 17px; }
  .container { padding: 52px 22px 90px; }
  .header-inner { padding: 14px 22px; }
  .header-tag { display: none; }

  .hero { margin-bottom: 48px; }
  .hero h1 { font-size: clamp(46px, 15vw, 72px); letter-spacing: -0.03em; }
  .lead { font-size: 18px; margin-top: 22px; }

  .row { grid-template-columns: 34px 1fr; gap: 2px 16px; padding: 22px 0; }
  .row:hover { padding-left: 10px; }
  .row-num { padding-top: 7px; font-size: 12px; }
  .row-arrow { display: none; }
  .row-title { font-size: 22px; }
  .row-desc { font-size: 15px; }

  .guide-title { margin: 14px 0 18px; }
  .guide-standfirst { font-size: 19px; }
  .guide-body { font-size: 17px; }
  .guide-body h2 { font-size: 25px; margin-top: 44px; }
  .guide-body pre code { font-size: 13px; }

  .site-footer { padding: 32px 22px 56px; }
}

/* Cok dar ekranlar (eski/kucuk telefonlar) */
@media (max-width: 360px) {
  .hero h1 { font-size: 42px; }
}

/* Dokunmatik cihazlarda satir vurgusu hep gorunur kalsin */
@media (hover: none) {
  .row::after { transform: scaleY(1); opacity: 0.5; }
}
