/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8f9fa;
  color: #222;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; border-radius: 8px; }

/* ── Layout ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

main.container { flex: 1; }

/* ── Header ── */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: #e63946;
}

nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
nav a { font-size: 0.9rem; color: #444; transition: color .2s; }
nav a:hover { color: #e63946; }

/* ── Post Grid ── */
.page-title {
  font-size: 1.75rem;
  margin: 2rem 0 1.5rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-bottom: 3rem;
}

.post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  transition: transform .2s, box-shadow .2s;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

.post-card img {
  width: 100%;
  height: 210px;
  object-fit: contain;
  border-radius: 0;
  background: #fff;
}

.post-card-body { padding: 1.25rem; }

.post-card-body h2 { font-size: 1.1rem; margin: .5rem 0; }
.post-card-body h2 a:hover { color: #e63946; }

/* ── Tags ── */
.tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .4rem; }

.tag {
  background: #fff0f1;
  color: #e63946;
  font-size: 0.75rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 20px;
  border: 1px solid #ffc9cd;
}

.tag:hover { background: #e63946; color: #fff; }

/* ── Description & Date ── */
.description { font-size: .9rem; color: #555; margin: .4rem 0; }
.date { font-size: .8rem; color: #999; display: block; margin-top: .6rem; }

/* ── Tekil Yazı ── */
.post-page { padding: 2rem 1.25rem 4rem; flex: 1; }

.post-header { margin-bottom: 1.5rem; }
.post-header h1 { font-size: 2rem; line-height: 1.3; margin: .5rem 0; }
.post-description { font-size: 1.05rem; color: #555; margin: .5rem 0 .75rem; }

.post-cover { margin-bottom: 2rem; }
.post-cover img { width: 100%; height: auto; max-height: none; object-fit: contain; border-radius: 12px; background: #fff; }

.post-content { max-width: 740px; }
.post-content h2 { font-size: 1.4rem; margin: 2rem 0 .75rem; }
.post-content h3 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
.post-content p  { margin-bottom: 1.1rem; }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.post-content li { margin-bottom: .4rem; }
.post-content strong { color: #111; }
.post-content a { color: #e63946; text-decoration: underline; }

.back-link {
  display: inline-block;
  margin-top: 2.5rem;
  color: #e63946;
  font-weight: 600;
}

/* ── Footer ── */
.site-footer {
  background: #111;
  color: #aaa;
  text-align: center;
  padding: 2rem 1rem;
  font-size: .88rem;
}

.footer-desc { margin-top: .4rem; color: #666; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .site-header .container { flex-direction: column; align-items: flex-start; }
  nav { gap: .75rem; }
  .post-header h1 { font-size: 1.5rem; }
}
