/* General Reset & Variables */
:root {
  --primary: #1a365d;
  --accent: #2b6cb0;
  --text: #2d3748;
  --bg-light: #f7fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --max-width: 1000px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg-light);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header & Navigation */
header {
  background-color: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.logo {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--primary);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-menu a {
  color: var(--primary);
  font-weight: 500;
}

.nav-menu a.active {
  border-bottom: 2px solid var(--accent);
}

/* Layout */
main {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1rem;
  flex: 1;
  width: 100%;
}

.hero {
  background: var(--white);
  padding: 2.5rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
  text-align: center;
}

/* Article Cards Grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.article-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.article-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-content h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.article-content p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  flex: 1;
}

/* Single Article Styling */
.article-single {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.article-single h1 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.meta {
  font-size: 0.85rem;
  color: #718096;
  margin-bottom: 1.5rem;
}

.article-single img {
  border-radius: 6px;
  margin: 1.5rem 0;
}

/* Footer */
footer {
  background-color: var(--primary);
  color: var(--white);
  text-align: center;
  padding: 1.5rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}

/* Mobile Responsiveness Rules */
@media (max-width: 600px) {
  .nav-container {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .hero {
    padding: 1.5rem 1rem;
  }
  
  .article-single {
    padding: 1.25rem;
  }
}