:root {
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Newsreader', Georgia, Cambria, "Times New Roman", serif;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --border-color: #e2e8f0;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 28px -8px rgba(15, 23, 42, 0.12);
}

nav a.active {
  color: var(--primary);
  font-weight: 600;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

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

.brand-logo {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  text-decoration: none;
}

.brand-dot {
  color: var(--primary);
}

nav {
  display: flex;
  gap: 1.75rem;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--primary);
}

/* Hero Section */
.hero-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin: 2.5rem 0 3rem;
}

@media (min-width: 768px) {
  .hero-card {
    grid-template-columns: 1.25fr 1fr;
  }
}

.hero-image {
  min-height: 280px;
  background-size: cover;
  background-position: center;
}

@media (min-width: 768px) {
  .hero-image {
    min-height: 400px;
  }
}

.hero-content {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.badge {
  align-self: flex-start;
  background: #dbeafe;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.hero-excerpt {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: 1rem;
}

/* Post Meta & Links */
.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.read-more, .card-link, .back-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.read-more:hover, .card-link:hover, .back-link:hover {
  color: var(--primary-hover);
}

/* Grid Section */
.articles-section {
  margin: 2.5rem 0 4.5rem;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  letter-spacing: -0.015em;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 640px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Post Cards */
.post-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-image-link {
  display: block;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 195px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.post-card:hover .card-image {
  transform: scale(1.03);
}

.card-content {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-date {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
  line-height: 1.28;
}

.card-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.empty-state {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Individual Article Page */
.article-page {
  max-width: 780px;
  padding-top: 2.5rem;
  padding-bottom: 4.5rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
}

.article-full {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.article-header {
  margin-bottom: 1.75rem;
}

.article-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  margin: 0.5rem 0 0.85rem;
}

.article-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
}

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

.article-body p,
.article-body h2,
.article-body h3,
.article-body ul,
.article-body ol,
.article-body blockquote,
.article-figure {
  margin-bottom: 1.25rem;
}

.article-body h2,
.article-body h3 {
  font-family: var(--font-serif);
  line-height: 1.25;
  margin-top: 2rem;
}

.article-body ul,
.article-body ol {
  padding-left: 1.5rem;
}

.article-body blockquote {
  border-left: 3px solid var(--primary);
  padding-left: 1rem;
  color: var(--text-muted);
  font-style: italic;
}

.article-body code {
  background: #f1f5f9;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.article-figure img {
  width: 100%;
  border-radius: 10px;
}
nav a.active {
  color: var(--primary);
  font-weight: 600;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  background: var(--card-bg);
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}