/* ===== 1. CORE RESET & BASE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #2d3436;
  background-color: #f9f9f9;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.2s ease;
}

/* ===== 2. HEADER & NAVIGATION ===== */
header {
  background: #ffffff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.logo a { color: #1a1a1a; }

/* Desktop Menu */
nav#mobile-menu a {
  margin-left: 1.5rem;
  font-weight: 500;
  color: #636e72;
  font-size: 0.95rem;
}

nav#mobile-menu a:hover { color: #2563eb; }

/* Mobile Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
}

/* ===== 3. HOMEPAGE GRID (Post Cards) ===== */
main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: 300px 1fr; /* Image on left, text on right */
  gap: 1.5rem;
  transition: transform 0.2s ease;
}

.post-card:hover { transform: translateY(-3px); }

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0; /* Let it fill the left side */
}

.post-body { padding: 1.5rem 1.5rem 1.5rem 0; }

.post-title { font-size: 1.4rem; margin-bottom: 0.5rem; line-height: 1.3; }
.post-meta { font-size: 0.85rem; color: #b2bec3; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.5px; }
.post-excerpt { color: #636e72; font-size: 1rem; margin-bottom: 1rem; }
.read-more { color: #2563eb; font-weight: 700; font-size: 0.9rem; }

/* ===== 4. THE BLOG POST PAGE (Single Article) ===== */
.post-article {
  background: #fff;
  padding: 3rem;
  border-radius: 16px;
  border: 1px solid #eee;
}

.post-article h1 {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: #1a1a1a;
}

.post-article .post-meta {
  border-bottom: 1px solid #eee;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.post-article p {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 1.8rem;
  color: #333;
}

.post-article h2 { margin: 3rem 0 1rem; font-size: 1.8rem; }
.post-article h3 { 
  margin: 2rem 0 0.5rem; 
  font-size: 1.4rem; 
  border-left: 4px solid #2563eb; 
  padding-left: 1rem;
}

.featured-image { margin-bottom: 2.5rem; }
.post-image { margin: 2rem 0; text-align: center; }
.post-image figcaption { margin-top: 0.8rem; font-style: italic; color: #999; font-size: 0.9rem; }
/* ===== 5. FOOTER ===== */
.site-footer {
  background: #fff;
  padding: 4rem 1.5rem;
  text-align: center;
  border-top: 1px solid #eee;
}

.footer-nav { margin-bottom: 1.5rem; }
.footer-nav a { margin: 0 10px; color: #636e72; font-size: 0.9rem; }

/* ===== 6. MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
  /* Header Changes */
  .menu-toggle { display: block; }
  
  #mobile-menu {
      display: none;
      flex-direction: column;
      position: absolute;
      top: 100%;
      left: 0;
      width: 100%;
      background: #fff;
      border-bottom: 1px solid #eee;
      padding: 1rem 0;
      box-shadow: 0 10px 15px rgba(0,0,0,0.05);
  }
  
  #mobile-menu.show { display: flex; }
  #mobile-menu a { margin: 0; padding: 12px 1.5rem; border-bottom: 1px solid #f9f9f9; }

  /* Home Grid Stacks on Mobile */
  .post-card { grid-template-columns: 1fr; }
  .post-body { padding: 1.5rem; }

  /* Post Content padding for mobile */
  .post-article { padding: 1.5rem; border: none; border-radius: 0; }
  .post-article h1 { font-size: 2rem; }
  .post-article p { font-size: 1.1rem; }
}