/* =====================================================================
   Future Autonoms — StoA Journal
   "StoA - Component Kit v2" birleşik tasarım sistemine birebir bağlı.
   Aksiyon emerald (#028244), kimlik StoA yeşili (#06c167), sıcak nötrler.
   Bricolage Grotesque · Outfit · JetBrains Mono. Saf siyah/beyaz yok.
   ===================================================================== */

/* ---- Tokens ------------------------------------------------------- */
:root {
  /* Aksiyon (emerald) */
  --emerald:      #028244;
  --emerald-700:  #016b38;
  --emerald-500:  #039651;
  --emerald-100:  #c4e6d3;
  --emerald-50:   #e6f4ed;
  /* Kimlik (StoA yeşili) */
  --stoa:         #06c167;
  /* Sıcak nötrler */
  --bg:           #faf6ef;
  --surface:      #ffffff;
  --surface-2:    #f4ede0;
  --ink:          #1f1815;
  --ink-2:        #5f5343;
  --muted:        #847460;
  --faint:        #a08b6f;
  --border:       #ebe0cc;
  --border-2:     #f0e8da;
  --border-strong:#d9c9ad;
  /* Koyu yüzey (panel, toast, hero, footer) */
  --dark:         #0e1714;
  --dark-2:       #15211b;
  --on-dark:      #f4ede0;
  --on-dark-mut:  #b09c80;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-sans:    "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --radius-card:  18px;
  --radius-md:    14px;
  --radius-sm:    12px;
  --pill:         999px;

  --shadow-card:  0 1px 2px rgba(31,24,21,.05), 0 12px 28px -14px rgba(31,24,21,.18);
  --shadow-hover: 0 1px 2px rgba(31,24,21,.06), 0 22px 46px -16px rgba(2,130,68,.28);
  --shadow-deep:  0 32px 70px -16px rgba(31,24,21,.26);

  --ease-out:     cubic-bezier(.16, 1, .3, 1);
  --ease-spring:  cubic-bezier(.34, 1.56, .64, 1);

  --container: 1120px;
  --measure: 68ch;
}

/* ---- Reset / base ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--emerald); text-decoration: none; transition: color .18s var(--ease-out); }
a:hover { color: var(--emerald-500); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--ink);
  text-wrap: balance;
}
::selection { background: var(--emerald-100); color: var(--ink); }
:focus-visible { outline: 2px solid #3b4252; outline-offset: 3px; border-radius: 6px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
@media (min-width: 768px) { .container { padding-inline: 56px; } }

.site-main { flex: 1 0 auto; }

/* ---- Header ------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 70px;
}
.site-logo-link { display: inline-flex; align-items: center; gap: 14px; }
.site-logo-link:hover { color: inherit; }

/* §04 logo kilidi — siyah kare (+6°) arkasında emerald kare (-8°), beyaz "S" swipe */
.logo-tile { position: relative; width: 38px; height: 38px; flex-shrink: 0; }
.logo-tile .back { position: absolute; inset: 0; border-radius: 12px; background: #000; transform: rotate(6deg); }
.logo-tile .front {
  position: absolute; inset: 0; border-radius: 12px; background: var(--emerald);
  transform: rotate(-8deg); display: flex; align-items: center; justify-content: center;
}
.logo-tile .front svg { width: 19px; height: 19px; }
.site-logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.site-name { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; color: var(--ink); }
.site-tagline { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .04em; color: var(--faint); }

.site-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; margin: 0; }
.site-nav a {
  display: inline-flex; align-items: center; padding: 8px 15px;
  border-radius: var(--pill); font-size: 14px; font-weight: 500; color: var(--ink-2);
}
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
@media (max-width: 640px) { .site-tagline { display: none; } .site-nav a { padding: 8px 11px; } }

/* ---- Hero (anasayfa, koyu mesh) ----------------------------------- */
.site-hero {
  background: linear-gradient(155deg, #0e1714 0%, #0a100d 60%, #080b09 100%);
  color: var(--on-dark);
  position: relative;
  overflow: hidden;
}
.site-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(at 12% 8%, rgba(6,193,103,.12) 0px, transparent 52%),
    radial-gradient(at 92% 100%, rgba(2,130,68,.14) 0px, transparent 55%);
}
.site-hero-inner { position: relative; padding-block: 64px 60px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .04em;
  color: var(--stoa); background: var(--dark-2); border: 1px solid #1d3a29;
  padding: 5px 13px; border-radius: var(--pill); margin-bottom: 22px;
}
.hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--stoa); }
.site-hero h1 {
  margin: 0 0 16px; font-size: clamp(2.25rem, 5vw, 3.25rem); font-weight: 800;
  line-height: 1.03; letter-spacing: -.03em; color: var(--on-dark); max-width: 18ch;
}
.site-hero p { margin: 0; font-size: 17px; font-weight: 300; color: var(--on-dark-mut); max-width: 60ch; line-height: 1.6; }

/* ---- Section header (§ "01 Başlık" deseni) ------------------------ */
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px; }
.section-num { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--emerald); }
.section-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.grid-section { padding-block: 56px; }
@media (min-width: 768px) { .grid-section { padding-block: 72px; } }

/* ---- Buttons ------------------------------------------------------ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: var(--pill);
  background: var(--emerald); color: #fff; font-weight: 600; font-size: 15px;
  box-shadow: var(--shadow-card);
  transition: transform .32s var(--ease-spring), background .18s var(--ease-out), box-shadow .32s var(--ease-out);
}
.btn-primary:hover { color: #fff; background: var(--emerald-500); transform: scale(1.03); box-shadow: var(--shadow-hover); }
.btn-primary:active { transform: scale(.98); }
.btn-primary svg { width: 16px; height: 16px; }
.btn-text {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; font-size: 14px; color: var(--emerald-700);
}
.btn-text svg { width: 15px; height: 15px; transition: transform .18s var(--ease-out); }
.btn-text:hover { color: var(--emerald-700); }
.btn-text:hover svg { transform: translateX(3px); }

/* ---- Category label & chips --------------------------------------- */
.post-category {
  display: inline-block; font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; color: var(--emerald);
}
.tag-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: var(--pill);
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.tag-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); }

/* ---- Meta --------------------------------------------------------- */
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.post-meta .meta-dot { color: var(--border-strong); }
.post-meta-divider { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border-2); }

/* ---- Post grid + cards -------------------------------------------- */
.post-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }

.post-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  overflow: hidden; box-shadow: var(--shadow-card);
  transition: transform .32s var(--ease-out), box-shadow .32s var(--ease-out);
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.post-card-inner { display: flex; flex-direction: column; gap: 7px; height: 100%; color: inherit; }
.post-card-inner:hover { color: inherit; }
.post-card-image-wrap { aspect-ratio: 1200 / 630; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.post-card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.post-card:hover .post-card-img { transform: scale(1.04); }
.post-card-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--surface-2), var(--border)); }
.post-card .post-category { margin: 18px 20px 0; }
.post-card-title { margin: 0 20px; font-size: 19px; font-weight: 600; line-height: 1.22; }
.post-card-excerpt { margin: 0 20px; font-size: 14px; font-weight: 300; color: var(--ink-2); line-height: 1.55; }
.post-card .post-meta { margin: auto 20px 18px; padding-top: 6px; font-size: 11.5px; }

/* ---- Single post -------------------------------------------------- */
.post-full { max-width: 760px; margin-inline: auto; padding-block: 48px 72px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 28px; }
.back-link:hover { color: var(--emerald); }
.post-header { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.post-title { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; }
.post-excerpt { font-size: 1.2rem; font-weight: 300; color: var(--ink-2); max-width: var(--measure); line-height: 1.55; }
.post-feature-image { border-radius: var(--radius-card); overflow: hidden; margin-bottom: 36px; box-shadow: var(--shadow-card); border: 1px solid var(--border); }

/* ---- Content (gh-content) ----------------------------------------- */
.post-content { font-size: 1.125rem; line-height: 1.75; color: var(--ink); }
.post-content > * { max-width: var(--measure); margin-inline: auto; }
.post-content > figure, .post-content > .kg-card, .post-content > .kg-width-wide, .post-content > .kg-width-full { max-width: 100%; }
.post-content p, .post-content ul, .post-content ol, .post-content blockquote { margin-bottom: 1.5rem; }
.post-content h2 { font-size: 1.75rem; font-weight: 700; margin-top: 2.75rem; margin-bottom: 1rem; scroll-margin-top: 6rem; }
.post-content h3 { font-size: 1.35rem; font-weight: 700; margin-top: 2rem; margin-bottom: .75rem; }
.post-content a { text-decoration: underline; text-underline-offset: .18em; text-decoration-color: var(--emerald-100); text-decoration-thickness: 2px; }
.post-content a:hover { text-decoration-color: var(--emerald-500); }
.post-content ul, .post-content ol { padding-left: 1.4rem; }
.post-content li { margin-bottom: .5rem; }
.post-content img { border-radius: var(--radius-md); }
.post-content figure { margin-bottom: 2rem; }
.post-content figcaption { text-align: center; font-family: var(--font-mono); font-size: 12.5px; color: var(--faint); margin-top: .6rem; }
.post-content blockquote { border-left: 3px solid var(--emerald); padding: .25rem 0 .25rem 1.4rem; font-size: 1.3rem; font-style: italic; color: var(--ink-2); }
.post-content code { font-family: var(--font-mono); font-size: .9em; background: var(--surface-2); padding: .15em .4em; border-radius: 6px; color: var(--emerald-700); }
.post-content pre { font-family: var(--font-mono); background: var(--dark); color: var(--on-dark); padding: 1.25rem 1.4rem; border-radius: var(--radius-md); overflow-x: auto; font-size: .9rem; margin-bottom: 1.5rem; }
.post-content pre code { background: none; color: inherit; padding: 0; }
.post-content hr { border: none; border-top: 1px solid var(--border); margin-block: 2.5rem; }

.post-tags { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--border); }
.post-footer-brand { margin-top: 2.5rem; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }

/* ---- Pagination --------------------------------------------------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 56px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.pagination a {
  display: inline-flex; align-items: center; padding: 11px 20px; border-radius: var(--pill);
  border: 1px solid var(--border); background: var(--surface); font-weight: 600; color: var(--ink-2);
  transition: all .18s var(--ease-out);
}
.pagination a:hover { border-color: var(--emerald); color: var(--emerald); box-shadow: var(--shadow-card); }
.pagination .page-number { font-variant-numeric: tabular-nums; }

/* ---- Footer (koyu yüzey + marka köprüsü) -------------------------- */
.site-footer { flex-shrink: 0; background: var(--dark); color: var(--on-dark); position: relative; overflow: hidden; }
.site-footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(at 50% 120%, rgba(6,193,103,.10) 0px, transparent 60%);
}
.site-footer-inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; padding-block: 44px; text-align: center; }
.footer-logo svg { height: 26px; width: auto; }
.site-footer-brand {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .02em; color: var(--on-dark-mut);
}
/* Marka köprüsü — kimlik (StoA yeşili) vs aksiyon (emerald) semantik ayrım */
.site-footer-brand .sep { color: #3a4a40; }
.site-footer-brand .brand-stoa { color: var(--stoa); font-weight: 600; }
.site-footer-brand .brand-stoa:hover { color: var(--stoa); opacity: .82; }
.site-footer-brand .brand-cv { color: #3fc587; font-weight: 600; }
.site-footer-brand .brand-cv:hover { color: var(--stoa); }

/* ---- Reduced motion ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
