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

:root {
  --bg-primary: #3d6a8e;
  --bg-dark: #2c5070;
  --bg-card: rgba(255, 255, 255, 0.08);
  --bg-card-hover: rgba(255, 255, 255, 0.12);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-muted: rgba(255, 255, 255, 0.55);
  --accent: #7eb8e0;
  --border: rgba(255, 255, 255, 0.12);
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1100px;
  --narrow-width: 720px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.85;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: var(--narrow-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === Header / Nav === */
.site-header {
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.site-logo:hover {
  opacity: 1;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  opacity: 1;
}

/* === Hero === */
.hero {
  background: var(--bg-dark);
  padding: 5rem 1.5rem;
  text-align: center;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.35rem;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* === Section Titles === */
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
}

.page-header {
  background: var(--bg-dark);
  padding: 3rem 1.5rem;
}

.page-title {
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 2.5rem;
  font-weight: 700;
}

/* === Post Cards === */
.recent-posts {
  padding: 3.5rem 0;
}

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

.posts-listing {
  padding: 2rem 0 4rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: background 0.2s, transform 0.2s;
}

.post-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.post-card a {
  display: block;
  padding: 1.75rem;
  color: inherit;
}

.post-card a:hover {
  opacity: 1;
}

.post-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.post-card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.separator {
  opacity: 0.5;
}

.post-card-excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.view-all {
  text-align: center;
  margin-top: 2.5rem;
}

.view-all-link {
  font-weight: 500;
  font-size: 1rem;
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  transition: all 0.2s;
  display: inline-block;
}

.view-all-link:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  opacity: 1;
}

/* === Single Post === */
.post-header {
  background: var(--bg-dark);
  padding: 3rem 1.5rem 2.5rem;
}

.post-title {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1rem;
  max-width: var(--narrow-width);
}

.post-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.post-author {
  font-weight: 500;
  color: var(--text-secondary);
}

.post-body {
  padding: 3rem 0 4rem;
}

.post-body p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.post-body p:last-child {
  margin-bottom: 0;
}

.post-body h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  color: var(--text-primary);
}

.post-body h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--text-primary);
}

.post-body ul, .post-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.post-body li {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--bg-card);
  border-radius: 0 6px 6px 0;
}

.post-body blockquote p {
  margin-bottom: 0;
  font-style: italic;
}

.post-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.post-body em {
  font-style: italic;
}

/* === Footer === */
.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-brand {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* === Responsive === */
@media (max-width: 768px) {
  .hero {
    padding: 3.5rem 1.25rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .post-title {
    font-size: 1.75rem;
  }

  .post-body p,
  .post-body li {
    font-size: 1rem;
  }

  .page-title {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0.85rem 1rem;
  }

  .site-logo {
    font-size: 0.95rem;
  }

  .nav-links {
    gap: 1.25rem;
  }

  .nav-links a {
    font-size: 0.9rem;
  }

  .hero {
    padding: 2.5rem 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .post-card a {
    padding: 1.25rem;
  }
}
