/* ==========================================================
   FEA RANYA COMPUTERS – Posts Stylesheet (standalone)
   Bu dosya yalnızca /posts klasöründeki yazı sayfaları içindir.
   ========================================================== */

/* ---------- 1. Design Tokens ---------- */
:root {
  --bg-primary:   #F5F5F3;
  --bg-secondary: #ECEDEB;
  --border:       #DEE0DD;
  --text-primary: #121212;
  --text-muted:   #4A5568;
  --accent:       #000000;

  --bg-primary-rgb: 245, 245, 243;

  --glow-a: #00d2ff;
  --glow-b: #00f2fe;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  --nav-h: 72px;
  --radius: 10px;
  --ease: cubic-bezier(.4, 0, .2, 1);

  --menu-btn-w: 120px;
  --logo-h: 40px;        /* Logonun yüksekliği */
  --logo-w: 180px;       /* Logonun genişliği */
  --logo-left: 24px;
}

/* ---------- 2. Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.container { width: min(1160px, 92%); margin-inline: auto; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }

/* ---------- 3. Navbar ---------- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(var(--bg-primary-rgb), .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s var(--ease);
}
.navbar.scrolled { box-shadow: 0 4px 24px rgba(0, 0, 0, .06); }

.nav-inner {
  height: 100%;
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: var(--logo-left);
  padding-right: var(--logo-left);
}

.brand { display: block; width: var(--logo-w); height: var(--logo-h); flex-shrink: 0; }
.brand img { width: 100%; height: 100%; object-fit: contain; object-position: left center; }

.nav-menu {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: repeat(5, var(--menu-btn-w));
  gap: 6px;
}
.nav-link {
  display: flex; align-items: center; justify-content: center;
  height: 42px; text-align: center;
  font-size: .9rem; font-weight: 500;
  color: var(--text-muted);
  border: 1px solid transparent; border-radius: 8px;
  transition: all .25s var(--ease);
}
.nav-link:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }
.nav-link.active { color: var(--text-primary); border-color: var(--border); background: var(--bg-secondary); }
.nav-link.active:hover { background: var(--accent); color: #fff; }

/* Hamburger (mobil) */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; position: relative; }
.nav-toggle span {
  position: absolute; left: 9px; width: 22px; height: 2px; background: var(--text-primary);
  transition: all .3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 25px; }
.nav-toggle.open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* ---------- 4. Footer ---------- */
.footer { padding: 2rem 0; text-align: center; font-size: .85rem; color: var(--text-muted); background: var(--bg-secondary); border-top: 1px solid var(--border); }

/* ---------- 5. Article page layout ---------- */
.post-page { padding: calc(var(--nav-h) + 40px) 0 90px; background: var(--bg-primary); }
.post-container { width: min(760px, 92%); margin-inline: auto; }

/* Top bar: back link + breadcrumb */
.post-topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px 24px; margin-bottom: 2.5rem;
}
.back-link {
  display: inline-block;
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .06em;
  color: var(--text-muted); padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 6px;
  transition: all .25s var(--ease);
}
.back-link:hover { color: #fff; background: var(--accent); border-color: var(--accent); transform: translateX(-2px); }

.breadcrumb ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted);
}
.breadcrumb li + li::before { content: "/"; margin-right: 8px; opacity: .5; }
.breadcrumb a:hover { color: var(--text-primary); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--text-primary); }

/* ---------- 6. Article header ---------- */
.post-header { margin-bottom: 2.5rem; }
.post-tag {
  display: inline-block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .15em;
  text-transform: uppercase; color: #fff; background: var(--accent);
  padding: 5px 12px; border-radius: 4px;
}
.post-title {
  font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.08;
  letter-spacing: -0.03em; margin: 1.1rem 0 1rem;
}
.post-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.3rem); font-weight: 300; line-height: 1.55;
  color: var(--text-muted); margin-bottom: 1.8rem;
}
.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px;
  padding-top: 1.2rem; border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; color: var(--text-muted);
}
.post-author {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font); font-size: .9rem; font-weight: 600; letter-spacing: 0; color: var(--text-primary);
}
.author-avatar {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--accent); color: #fff; border-radius: 6px; font-size: .72rem; font-weight: 700;
}

/* ---------- 7. Hero image (16:9) ---------- */
.post-hero {
  width: min(1040px, 92%); margin: 0 auto 3.5rem;
  aspect-ratio: 16 / 9; overflow: hidden;
  border: 2px solid var(--text-primary); border-radius: 6px; background: var(--bg-secondary);
}
.post-hero img { width: 100%; height: 100%; object-fit: cover; }

.media-placeholder {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, var(--bg-secondary) 0 14px, var(--border) 14px 15px);
}
.media-placeholder span {
  font-family: var(--font-mono); font-size: .75rem; letter-spacing: .15em;
  color: var(--text-muted); background: var(--bg-primary);
  padding: 6px 12px; border: 1px solid var(--border);
}

/* ---------- 8. Long-form typography ---------- */
.post-content { font-size: 1.12rem; line-height: 1.8; color: #1f2430; }
.post-content > * + * { margin-top: 1.4em; }

.post-content h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -0.02em;
  margin: 2.4em 0 0; padding-top: 1.1em;
  border-top: 1px solid var(--border); color: var(--text-primary);
}
.post-content h3 {
  font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em;
  margin: 2em 0 0; color: var(--text-primary);
}
.post-content h2 + p,
.post-content h3 + p { margin-top: .8em; }

.post-content a { color: var(--text-primary); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .2s var(--ease); }
.post-content a:hover { color: #00a9c4; }

.post-content ul, .post-content ol { padding-left: 1.4em; }
.post-content li + li { margin-top: .5em; }
.post-content li::marker { color: var(--text-muted); }

.post-content :not(pre) > code {
  font-family: var(--font-mono); font-size: .86em;
  background: var(--bg-secondary); border: 1px solid var(--border);
  padding: .15em .45em; border-radius: 4px;
}

/* Blockquote */
.post-content blockquote {
  margin-top: 2em; padding: .4em 0 .4em 1.5rem;
  border-left: 3px solid var(--accent);
}
.post-content blockquote p {
  font-size: 1.35rem; font-weight: 300; line-height: 1.5;
  letter-spacing: -0.01em; color: var(--text-primary);
}
.post-content blockquote cite {
  display: block; margin-top: .8rem; font-family: var(--font-mono);
  font-size: .75rem; font-style: normal; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted);
}

/* ---------- 9. Code block with copy button ---------- */
.code-block {
  margin-top: 1.8em; background: #121212; color: #e6e6e6;
  border-radius: var(--radius); overflow: hidden; border: 1px solid #121212;
}
.code-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px 8px 16px; background: #1c1c1c; border-bottom: 1px solid #2a2a2a;
}
.code-lang { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; color: #9aa3af; }
.copy-btn {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; cursor: pointer;
  color: #e6e6e6; background: transparent; border: 1px solid #3a3a3a; border-radius: 5px;
  padding: 5px 12px; transition: all .25s var(--ease);
}
.copy-btn:hover { border-color: var(--glow-a); color: var(--glow-a); }
.copy-btn.copied { background: var(--glow-a); border-color: var(--glow-a); color: #04141a; }
.copy-btn:focus-visible { outline: 2px solid var(--glow-a); outline-offset: 2px; }

.code-block pre { margin: 0; padding: 18px 20px; overflow-x: auto; }
.code-block code { font-family: var(--font-mono); font-size: .88rem; line-height: 1.7; color: #e6e6e6; white-space: pre; }
.code-block .tk { color: #00d2ff; }   /* keywords */
.code-block .tc { color: #7a8494; }   /* comments */
.code-block .ts { color: #9ef0d0; }   /* strings / numbers */

/* ---------- 10. Comments (Giscus) ---------- */
.comments-section { margin-top: 4.5rem; padding-top: 2.2rem; border-top: 2px solid var(--text-primary); }
.comments-label {
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 1.2rem;
}
.comments-container {
  min-height: 160px; padding: 1.2rem; overflow: hidden;
  background: #121212; border-radius: var(--radius);
}
.post-end { margin-top: 2.5rem; }

/* ---------- 11. Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }

  .nav-menu {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    transform: translateY(-12px);
    display: flex; flex-direction: column; gap: 6px; padding: 16px 4%;
    background: var(--bg-primary); border-bottom: 1px solid var(--border);
    opacity: 0; visibility: hidden;
    transition: all .3s var(--ease);
  }
  .nav-menu.open { transform: none; opacity: 1; visibility: visible; }
  .nav-link { width: 100%; height: 48px; }
}

@media (max-width: 640px) {
  .post-content { font-size: 1.04rem; }
  .post-content blockquote p { font-size: 1.15rem; }
  .post-topbar { flex-direction: column; align-items: flex-start; }
  .comments-container { padding: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}