:root {
  --bg: #0b1020;
  --bg-alt: #12182a;
  --border: #262b3e;
  --text: #e4e7f3;
  --muted: #8b91aa;
  --accent: #3fa9ff;
  --accent-soft: rgba(63, 169, 255, 0.12);
  --code-bg: #181e33;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               sans-serif;
  --font-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
               "Courier New", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #1a2340 0, #050814 55%);
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

/* Layout */

.wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, #050814, #0b1020);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrapper {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
}

.site-brand {
  display: flex;
  flex-direction: column;
}

.site-title {
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.site-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
}

.site-nav a {
  margin-left: 1rem;
  font-size: 0.9rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.site-nav a:hover {
  background: var(--accent-soft);
}

/* Main */

.site-main {
  padding: 2rem 0 3rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: #050814;
  color: var(--muted);
  font-size: 0.8rem;
}

.site-footer .wrapper {
  padding: 0.75rem 1.5rem 1.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer-separator {
  opacity: 0.6;
}

/* Typography */

h1, h2, h3, h4 {
  font-weight: 600;
  color: #f5f7ff;
}

h1 {
  font-size: 1.9rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.4rem;
  margin-top: 1.8rem;
  margin-bottom: 0.4rem;
}

p {
  margin-top: 0.4rem;
  margin-bottom: 0.9rem;
}

/* Posts */

.post-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.post-list li {
  padding: 0.6rem 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-right: 0.5rem;
}

.post-link {
  font-weight: 500;
}

/* Single post */

.post-header {
  margin-bottom: 1.5rem;
}

.post-title {
  margin-bottom: 0.2rem;
}

.post-tags {
  margin-left: 0.5rem;
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  margin-left: 0.2rem;
  border-radius: 999px;
  background: var(--accent-soft);
}

/* Code blocks */

pre,
code {
  font-family: var(--font-mono);
}

pre {
  background: var(--code-bg);
  padding: 0.9rem 1rem;
  border-radius: 6px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

code {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
}

/* Responsive */

@media (max-width: 640px) {
  .site-header .wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .site-nav a {
    margin-left: 0;
    margin-right: 0.75rem;
  }

  .post-list li {
    flex-direction: column;
    align-items: flex-start;
  }
}
