/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #fafafa;
  --color-text: #1a1a1a;
  --color-accent: #2563eb;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Georgia', serif;
  --max-width: 1100px;
  --content-width: 720px;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== HEADER ===== */
header {
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem 2rem;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

/* ===== MAIN ===== */
main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem;
  width: 100%;
}

/* ===== HOMEPAGE GRID ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.article-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s;
  background: white;
}

.article-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.article-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

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

.article-card-body h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.article-card-body h2 a {
  text-decoration: none;
  color: var(--color-text);
}

.article-card-body h2 a:hover {
  color: var(--color-accent);
}

.article-meta {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

.article-excerpt {
  font-size: 0.95rem;
  color: var(--color-muted);
}

/* ===== ARTICLE PAGE ===== */
.article-header {
  margin-bottom: 2rem;
  text-align: center;
}

.article-header h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.article-header .article-meta {
  font-size: 1rem;
}

.article-cover {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.article-content {
  max-width: var(--content-width);
  margin: 0 auto;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 2rem 0;
}

.article-content h2, .article-content h3 {
  font-family: var(--font-sans);
  margin: 2rem 0 1rem;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .article-header h1 {
    font-size: 1.8rem;
  }
}
