:root {
  --bg: #ffffff;
  --text: #222;
  --accent: #0066ff;
  --card: #f4f4f4;
}

body.dark {
  --bg: #121212;
  --text: #e0e0e0;
  --card: #1e1e1e;
}

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

header {
  background: var(--card);
  padding: 1rem 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  margin: 0;
  font-size: 1.5rem;
  color: var(--accent);
}

nav a {
  margin: 0 1rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

nav button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
}

.hero {
  text-align: center;
  padding: 4rem 1rem;
  background: var(--card);
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: auto;
}

.cta {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 4px;
}

.latest-posts {
  padding: 2rem 0;
}

.latest-posts h3 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.posts-grid article {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 8px;
  transition: transform 0.3s;
}

.posts-grid article:hover {
  transform: translateY(-5px);
}

.posts-grid h4 {
  margin-top: 0;
}

.posts-grid a {
  text-decoration: none;
  color: var(--accent);
  font-weight: 500;
}

footer {
  padding: 1rem;
  text-align: center;
  background: var(--card);
  margin-top: 3rem;
}
