:root {
  --bg: #f9f8f4;
  --surface: #ffffff;
  --text: #222222;
  --muted: #555555;
  --primary: #8c02ab;
  --primary-dark: #78009d;
  --border: #e1e3e8;
  --footer-bg: #1a293e;
  --footer-text: #f7fbff;
}

body.dark-theme {
  --bg: #111827;
  --surface: #1f2937;
  --text: #f9fafb;
  --muted: #d1d5db;
  --primary: #c084fc;
  --primary-dark: #a855f7;
  --border: #374151;
  --footer-bg: #0f172a;
  --footer-text: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.main-nav {
  display: flex;
  gap: 1.25rem;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.hero {
  padding: 5rem 0;
  background: linear-gradient(135deg, #eaf3ff 0%, #ffffff 100%);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.05;
}

.hero p {
  max-width: 42rem;
  color: var(--muted);
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
}

.button {
  display: inline-block;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.button:hover {
  background: var(--primary-dark);
}

.main {
  padding: 3rem 0;
}

.posts-section,
.about-section {
  margin-bottom: 3rem;
}

.posts-section h2,
.about-section h2 {
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

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

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: 0 10px 30px rgba(33, 41, 61, 0.05);
}

.post-card h3 {
  margin-top: 0;
  margin-bottom: 0.85rem;
  font-size: 1.25rem;
}

.post-card p {
  margin: 0 0 1.2rem;
  color: var(--muted);
}

.read-more {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.read-more:hover {
  background: var(--primary-dark);
}

.about-section p {
  max-width: 42rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 2rem 0;
}

.footer-inner h3 {
  margin: 0 0 0.5rem;
}

.footer-inner p {
  margin: 0;
  max-width: 36rem;
  color: var(--footer-text);
  opacity: 0.9;
}

.button-secondary {
  background: #f7fbff;
  color: #1a293e;
}

.theme-toggle {
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .header-inner,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav {
    flex-wrap: wrap;
  }

  .hero {
    padding: 3rem 0;
  }
}
