:root {
  --bg: #0b1220;
  --bg-alt: #121b2e;
  --surface: #182338;
  --text: #e7ecf5;
  --text-muted: #9fb0c9;
  --accent: #2f6fed;
  --accent-light: #6f9dff;
  --border: #263852;
  --radius: 10px;
  --max-width: 1120px;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--accent-light);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

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

.site-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo:hover {
  text-decoration: none;
}

.nav-toggle {
  display: none;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

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

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--text);
}

.hero {
  background: linear-gradient(135deg, var(--bg-alt), var(--bg));
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: 2.4rem;
  line-height: 1.2;
  margin: 0 0 16px;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0 0 24px;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  background: var(--accent-light);
  text-decoration: none;
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent-light);
  margin-left: 12px;
}

section {
  padding: 56px 0;
}

section h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.section-lead {
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: 32px;
  max-width: 640px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card h3 {
  margin-top: 0;
}

.card--alt {
  background: var(--bg-alt);
}

.blog-list {
  display: grid;
  gap: 24px;
}

.post-preview {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  align-items: start;
}

.post-preview img {
  width: 100%;
}

.post-preview__meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 4px 0 12px;
}

.post-body h2,
.post-body h3 {
  margin-top: 2em;
}

.post-body p {
  margin: 1em 0;
}

.post-body a {
  text-decoration: underline;
}

.post-header {
  padding: 40px 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.post-header h1 {
  margin-bottom: 8px;
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.tag {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 32px;
  list-style: none;
  padding: 0;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.pagination a:hover {
  color: var(--text);
  text-decoration: none;
}

.pagination .is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

form.contact-form {
  display: grid;
  gap: 16px;
  max-width: 520px;
}

.contact-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-info {
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
}

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.footer-grid h4 {
  margin-top: 0;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer-bottom {
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.error-page {
  text-align: center;
  padding: 96px 20px;
}

.error-page .code {
  font-size: 5rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0;
}

.breadcrumb {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

@media (max-width: 780px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .post-preview {
    grid-template-columns: 1fr;
  }

  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav ul {
    gap: 12px;
  }
}
