/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: #f4f6f8; /* soft light gray */
  color: #2c3e50;      /* dark blue-gray for text */
  line-height: 1.6;
  font-size: 16px;
}

/* Navbar */
header {
  background: #1e3a8a; /* deep professional blue */
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* helps in small screens */
}

header h1 {
  font-size: 1.5rem;
  font-weight: bold;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

nav a {
  color: #e0f2fe; /* soft teal for links */
  margin-left: 1.5rem;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 1rem;
}

nav a:hover {
  color: #38bdf8; /* bright cyan accent */
}

/* Layout */
main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Blog Posts */
.post {
  background: #fff;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.post h2 {
  color: #1e3a8a; /* matches navbar */
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

.post .date {
  font-size: 0.9rem;
  color: #6b7280; /* muted gray */
  margin-bottom: 1rem;
}

/* Sidebar */
aside {
  background: #fff;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

aside h3 {
  margin-bottom: 1rem;
  color: #1e3a8a;
  font-size: 1.2rem;
}

aside ul {
  list-style: none;
}

aside li {
  margin-bottom: 0.8rem;
}

aside a {
  color: #2563eb; /* brighter blue for sidebar links */
  text-decoration: none;
  font-size: 0.95rem;
}

aside a:hover {
  text-decoration: underline;
  color: #38bdf8;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  background: #1e3a8a;
  color: #fff;
  margin-top: 2rem;
  font-size: 0.95rem;
}

/* Responsive Tweaks */

/* Tablets */
@media (max-width: 1024px) {
  main {
    grid-template-columns: 1fr; /* stack sidebar under posts */
  }

  .post h2 {
    font-size: 1.3rem;
  }

  nav a {
    margin-left: 1rem;
    font-size: 0.95rem;
  }
}

/* Mobiles */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }

  nav {
    margin-top: 0.5rem;
  }

  main {
    grid-template-columns: 1fr; /* full width */
    gap: 1.5rem;
  }

  .post, aside {
    padding: 1rem;
  }

  .post h2 {
    font-size: 1.2rem;
  }
}

/* Extra small mobiles */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  header h1 {
    font-size: 1.2rem;
  }

  nav a {
    margin: 0.5rem;
    font-size: 0.9rem;
  }

  .post h2 {
    font-size: 1.1rem;
  }

  aside h3 {
    font-size: 1rem;
  }
}
