/* ── Design tokens ─────────────────────────────────────────── */
:root {
  --color-primary: #3f51b5;
  --color-primary-dark: #303f9f;
  --color-accent: #ff4081;
  --color-text: #212121;
  --color-text-light: #555;
  --color-border: #e0e0e0;
  --color-code-bg: #eee;
  --color-code-text: #37474f;
  --max-width: 1024px;
}

/* ── Reset & base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: monospace;
  color: var(--color-text);
  background: #fff;
}

a { color: inherit; }

img { max-width: 100%; }

/* ── Site header ───────────────────────────────────────────── */
.site-header {
  background: var(--color-primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  padding: 0 16px;
}

.site-header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header a {
  color: #fff;
  text-decoration: none;
  font-family: monospace;
  font-size: 20px;
  font-weight: 500;
}

.site-header .github-link img {
  display: block;
  padding-top: 4px;
}

/* ── Main content container ────────────────────────────────── */
.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px 48px;
  width: 100%;
}

/* ── Post article ──────────────────────────────────────────── */
article.post {
  margin-top: 25px;
  margin-bottom: 30px;
}

article.post .post-header h1,
article.post .post-header h2 {
  margin: 0;
  font-size: 2.2em;
  font-weight: 700;
}

article.post .post-header h1 a,
article.post .post-header h2 a {
  text-decoration: none;
  color: var(--color-text);
}

article.post .post-header time {
  font-size: 1em;
  color: var(--color-text-light);
}

article.post .post-content {
  margin-top: 20px;
  font-size: 1.3em;
  font-weight: 300;
  line-height: 1.8;
}

article.post .post-content h1 { font-size: 1.4em; font-weight: 600; }
article.post .post-content h2 { font-size: 1.2em; font-weight: 600; }
article.post .post-content h3 { font-size: 1.1em; font-weight: 600; }
article.post .post-content h4,
article.post .post-content h5,
article.post .post-content h6 { font-size: 1em; font-weight: 600; }

article.post .post-content img {
  max-width: 100%;
}

/* ── Post divider ──────────────────────────────────────────── */
.post-divider {
  border: none;
  border-top: 2px solid var(--color-primary);
  opacity: 0.25;
  width: calc(100vw - 64px);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
}

/* ── Inline code ───────────────────────────────────────────── */
:not(pre) > code {
  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
  background-color: var(--color-code-bg);
  border-radius: 0.3em;
  color: var(--color-code-text);
  padding: 2px 8px;
}

/* ── Code blocks ───────────────────────────────────────────── */
pre {
  background-color: var(--color-code-bg);
  border-radius: 0.3em;
  padding: 16px;
  overflow-x: auto;
  font-size: 0.9em;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: var(--color-code-text);
}

/* ── 404 page ──────────────────────────────────────────────── */
.not-found {
  text-align: center;
  padding: 80px 16px;
}

.not-found h1 {
  font-size: 5em;
  margin: 0;
  color: var(--color-primary);
}

.not-found p {
  font-size: 1.2em;
  color: var(--color-text-light);
}

.not-found a {
  color: var(--color-primary);
}

/* ── Updated date ──────────────────────────────────────────── */
.post-updated {
  font-size: 0.85em;
  color: var(--color-text-light);
  margin-left: 8px;
}

/* ── Pagination ────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  font-size: 0.95em;
}

.pagination-link {
  color: var(--color-primary);
  text-decoration: none;
}

.pagination-link:hover {
  text-decoration: underline;
}

.pagination-info {
  color: var(--color-text-light);
}
