/* ============================================================
   BLOG — STYLESHEET
   Same dark design language as main site
   ============================================================ */

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

:root {
  --bg:           #060a14;
  --surface:      #0d1322;
  --surface2:     #111827;
  --border:       rgba(255,255,255,0.07);
  --border-hi:    rgba(255,255,255,0.14);
  --text:         #f0f4ff;
  --text-muted:   #8a95a8;
  --text-light:   #b8c1cf;
  --accent-start: #6c63ff;
  --accent-end:   #06b6d4;
  --grad:         linear-gradient(135deg, var(--accent-start), var(--accent-end));
  --radius:       14px;
  --radius-lg:    20px;
  --radius-xl:    28px;
  --shadow-card:  0 4px 24px rgba(0,0,0,0.35);
  --nav-h:        68px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; line-height: 1.7;
}

/* ============================================================
   ORBS
   ============================================================ */
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.12; pointer-events: none; z-index: 0;
}
.orb1 { width: 400px; height: 400px; background: var(--accent-start); top:-100px; left:-80px; }
.orb2 { width: 350px; height: 350px; background: var(--accent-end);   bottom:-80px; right:-60px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.blog-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.blog-nav.scrolled {
  background: rgba(6,10,20,0.82);
  backdrop-filter: blur(20px);
  border-color: var(--border);
}
.blog-nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}

.blog-logo {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.logo-initials {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0;
}
.logo-name { font-weight: 600; font-size: 16px; color: var(--text); }

.blog-nav-links { display: flex; gap: 6px; }
.blog-nav-links a {
  padding: 7px 14px; border-radius: 10px;
  color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.blog-nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.blog-nav-links a.active { color: var(--accent-start); background: rgba(108,99,255,0.1); }

/* ============================================================
   LANGUAGE SWITCH (TR / EN) — blog (index ile aynı davranış)
   ============================================================ */
.lang-switch {
  --ls-pad: 3px;
  --ls-gap: 4px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ls-gap);
  align-items: stretch;
  width: 108px;
  padding: var(--ls-pad);
  border-radius: 99px;
  background: rgba(108,99,255,0.08);
  border: 1px solid rgba(108,99,255,0.35);
  flex-shrink: 0;
}
.lang-switch-thumb {
  position: absolute;
  top: var(--ls-pad);
  left: var(--ls-pad);
  width: calc((100% - 2 * var(--ls-pad) - var(--ls-gap)) / 2);
  height: calc(100% - 2 * var(--ls-pad));
  border-radius: 99px;
  background: var(--grad);
  box-shadow: 0 2px 14px rgba(99,102,241,0.4);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
  pointer-events: none;
}
.lang-switch[data-lang="en"] .lang-switch-thumb {
  transform: translateX(calc(100% + var(--ls-gap)));
}
.lang-switch-btn {
  position: relative;
  z-index: 1;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--font);
  letter-spacing: 0.06em;
  padding: 7px 0;
  border-radius: 99px;
  color: var(--text-muted);
  transition: color 0.25s ease;
}
.lang-switch-btn.is-active {
  color: #fff;
}
.lang-switch-btn:hover:not(.is-active) {
  color: rgba(232,234,246,0.85);
}
.lang-switch-btn:focus-visible {
  outline: 2px solid rgba(129,140,248,0.95);
  outline-offset: 2px;
}
.blog-lang-switch {
  margin-left: 4px;
}

/* ============================================================
   HERO
   ============================================================ */
.blog-hero {
  position: relative; overflow: hidden;
  padding: calc(var(--nav-h) + 80px) 32px 80px;
  text-align: center;
}
.blog-hero-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }

.blog-hero-tag {
  display: inline-block; margin-bottom: 16px;
  padding: 5px 16px; border-radius: 99px;
  background: rgba(108,99,255,0.12); color: var(--accent-start);
  font-size: 13px; font-weight: 600; letter-spacing: 0.05em;
  border: 1px solid rgba(108,99,255,0.25);
}
.blog-hero-title {
  font-size: clamp(42px, 8vw, 72px); font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1.1; margin-bottom: 18px;
}
.blog-hero-sub { font-size: 17px; color: var(--text-muted); max-width: 480px; margin: 0 auto; }

/* ============================================================
   FILTER BAR
   ============================================================ */
.blog-filter-bar {
  position: sticky; top: var(--nav-h); z-index: 50;
  background: rgba(6,10,20,0.8); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 32px;
}
.blog-filter-bar-inner { max-width: 1200px; margin: 0 auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.tag-filter-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-filter-chip {
  padding: 5px 12px; border-radius: 99px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--border); color: var(--text-muted); cursor: pointer;
  transition: all 0.2s; user-select: none;
}
.tag-filter-chip:hover { border-color: var(--accent-start); color: var(--text); }
.tag-filter-chip.active { background: rgba(108,99,255,0.15); color: var(--accent-start); border-color: rgba(108,99,255,0.4); }

/* ============================================================
   BLOG GRID
   ============================================================ */
.blog-container {
  max-width: 1200px; margin: 0 auto; padding: 48px 32px 80px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.blog-loading {
  grid-column: 1/-1; text-align: center; color: var(--text-muted);
  font-size: 24px; padding: 40px;
}

.blog-empty {
  flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 20px; color: var(--text-muted); text-align: center;
}
.blog-empty i { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }
.blog-empty h3 { font-size: 20px; margin-bottom: 8px; color: var(--text-light); }
.blog-empty p  { font-size: 15px; }

/* ============================================================
   BLOG CARD
   ============================================================ */
.blog-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; text-decoration: none; display: flex; flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  /* reveal animation */
  opacity: 0; transform: translateY(24px);
}
.blog-card.visible {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover {
  border-color: var(--border-hi);
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}

.bc-image { height: 200px; overflow: hidden; position: relative; }
.bc-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; display: block; }
.blog-card:hover .bc-image img { transform: scale(1.04); }

.bc-image-placeholder {
  background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(6,182,212,0.08));
  display: flex; align-items: center; justify-content: center;
}
.bc-image-placeholder i { font-size: 40px; color: var(--text-muted); opacity: 0.4; }

.bc-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }

.bc-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-muted); margin-bottom: 10px;
}
.bc-meta span { display: flex; align-items: center; gap: 5px; }

.bc-title {
  font-size: 18px; font-weight: 700; line-height: 1.35;
  color: var(--text); margin-bottom: 10px;
  transition: color 0.2s;
}
.blog-card:hover .bc-title { color: var(--accent-start); }

.bc-excerpt { font-size: 13.5px; color: var(--text-muted); line-height: 1.65; flex: 1; margin-bottom: 14px; }

.bc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.bc-tag {
  font-size: 11px; padding: 3px 9px; border-radius: 99px;
  background: rgba(108,99,255,0.1); color: var(--accent-start);
  border: 1px solid rgba(108,99,255,0.2);
}

.bc-read-more {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--accent-start);
  margin-top: auto; transition: gap 0.2s;
}
.blog-card:hover .bc-read-more { gap: 10px; }

/* ============================================================
   POST VIEW
   ============================================================ */
.post-container {
  max-width: 760px; margin: 0 auto;
  padding: calc(var(--nav-h) + 48px) 32px 80px;
}

.post-back {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 8px 0; margin-bottom: 32px;
  transition: color 0.2s, gap 0.2s;
}
.post-back:hover { color: var(--text); gap: 12px; }

.post-tags-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.post-tag {
  font-size: 12px; padding: 4px 12px; border-radius: 99px;
  background: rgba(108,99,255,0.1); color: var(--accent-start);
  border: 1px solid rgba(108,99,255,0.25); text-decoration: none;
  transition: background 0.2s;
}
.post-tag:hover { background: rgba(108,99,255,0.2); }

.post-title {
  font-size: clamp(26px, 4.5vw, 42px); font-weight: 800; line-height: 1.2;
  color: var(--text); margin-bottom: 16px;
}

.post-meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-muted); margin-bottom: 36px;
}
.post-meta span { display: flex; align-items: center; gap: 6px; }

.post-cover {
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 40px;
}
.post-cover img { width: 100%; max-height: 420px; object-fit: cover; display: block; }

/* Post body typography */
.post-body {
  font-size: 16px; color: var(--text-light); line-height: 1.8;
  font-weight: 400;
}
.post-body h2 {
  font-size: 1.5em; font-weight: 700; color: var(--text);
  margin: 1.8em 0 0.6em; padding-bottom: 0.3em;
  border-bottom: 1px solid var(--border);
}
.post-body h3 { font-size: 1.2em; font-weight: 700; color: var(--text); margin: 1.4em 0 0.5em; }
.post-body p  { margin-bottom: 1.1em; }
.post-body ul, .post-body ol { padding-left: 1.6em; margin-bottom: 1.1em; }
.post-body li { margin-bottom: 0.4em; }
.post-body blockquote {
  border-left: 4px solid var(--accent-start);
  padding: 12px 20px; margin: 1.5em 0;
  background: rgba(108,99,255,0.06); border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted); font-style: italic;
}
.post-body a { color: var(--accent-start); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { opacity: 0.8; }
.post-body strong { color: var(--text); font-weight: 700; }
.post-body em { font-style: italic; }
.post-body code {
  background: rgba(255,255,255,0.07); border-radius: 5px;
  padding: 2px 6px; font-family: 'Fira Code', monospace; font-size: 0.9em;
  color: var(--accent-end);
}
.post-body pre {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  overflow-x: auto; margin-bottom: 1.2em;
}
.post-body pre code { background: none; padding: 0; font-size: 0.875em; }
.post-body img { max-width: 100%; border-radius: var(--radius); margin: 1em 0; display: block; }
.post-body hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }

.post-footer { padding-top: 40px; border-top: 1px solid var(--border); margin-top: 60px; }

/* ============================================================
   RELATED POSTS
   ============================================================ */
.related-section { margin-top: 60px; }
.related-title { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.related-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; display: flex; flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.related-card:hover { border-color: var(--border-hi); transform: translateY(-3px); }
.rc-image { height: 120px; overflow: hidden; }
.rc-image img { width: 100%; height: 100%; object-fit: cover; }
.rc-image-placeholder { background: rgba(108,99,255,0.08); display: flex; align-items: center; justify-content: center; }
.rc-image-placeholder i { font-size: 28px; color: var(--text-muted); opacity: 0.35; }
.rc-body { padding: 14px; }
.rc-body h4 { font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--text); margin-bottom: 4px; }
.rc-body p  { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   FOOTER
   ============================================================ */
.blog-footer {
  border-top: 1px solid var(--border);
  padding: 28px 32px;
}
.blog-footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.blog-footer-copy { font-size: 13px; color: var(--text-muted); }
.blog-footer-links { display: flex; gap: 12px; }
.blog-footer-links a {
  width: 36px; height: 36px; border-radius: 9px;
  border: 1px solid var(--border); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; text-decoration: none; transition: all 0.2s;
}
.blog-footer-links a:hover { border-color: var(--border-hi); color: var(--text); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .blog-hero { padding: calc(var(--nav-h) + 50px) 20px 50px; }
  .blog-filter-bar { padding: 12px 16px; }
  .blog-container { padding: 32px 16px 60px; }
  .blog-grid { grid-template-columns: 1fr; }
  .post-container { padding: calc(var(--nav-h) + 32px) 20px 60px; }
  .blog-nav-inner { padding: 0 20px; }
  .blog-footer { padding: 24px 20px; }
  .blog-footer-inner { flex-direction: column; text-align: center; }
}
