* {
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --bg-light: #1e293b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #22d3ee;
  --accent-hover: #22c55e;
}

html, body {
  margin: 0;
  padding: 0;
}

html {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 32px;
  font-size: 16px;
  line-height: 1;
}

.site-nav .logo {
  display: flex;
  width: 32px;
  height: 32px;
}

.site-nav .logo img {
  width: 100%;
  height: 100%;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.site-nav a.current {
  color: var(--text);
}

main,
article,
footer.post-nav {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 32px 2rem;
}

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

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

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

article header {
  margin-bottom: 2rem;
}

article header time {
  color: var(--text-muted);
  font-size: 0.9rem;
}

p {
  margin: 1rem 0;
}

blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  background: var(--bg-light);
  font-style: italic;
}

blockquote p {
  margin: 0.5rem 0;
}

ul, ol {
  padding-left: 1.5rem;
}

li {
  margin: 0.5rem 0;
}

code {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-light);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

pre {
  background: var(--bg-light);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Syntax highlighting */
.hl-comment { color: #6b7280; font-style: italic; }
.hl-string { color: #a5d6ff; }
.hl-keyword { color: #ff7b72; }
.hl-number { color: #79c0ff; }

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

hr {
  border: none;
  border-top: 1px solid var(--bg-light);
  margin: 2rem 0;
}

/* Blog index */
.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--bg-light);
}

.post-list li:last-child {
  border-bottom: none;
}

.post-list a {
  flex: 1;
}

.post-list time {
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .site-nav {
    padding: 24px 1rem;
  }

  main,
  article,
  footer.post-nav {
    padding: 0 1rem 2rem;
  }

  .post-list li {
    flex-direction: column;
    gap: 0.25rem;
  }
}

/* Post navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--bg-light);
  font-size: 0.9rem;
}

.post-nav a {
  max-width: 45%;
}

.post-nav a:last-child {
  text-align: right;
}
