/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #1a1a2e;
  --text: #e0e0e0;
  --text-muted: #9a9ab0;
  --accent: #7ba4cc;
  --accent-hover: #a3c4e0;
  --border: #2d2d44;
  --code-bg: #16162a;
  --tag-bg: #252540;
  --max-width: 720px;
}	

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Navigation */
header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-links a {
  margin-left: 1.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--accent);
}

/* Main Content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
  flex: 1;
  width: 100%;
}

/* Home Intro */
.intro { margin-bottom: 2.5rem; }
.intro h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.intro p { color: var(--text-muted); font-size: 1.05rem; }

/* Post Lists */
.posts h2 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-weight: 400;
}

.post-summary {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

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

.post-summary h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.post-summary h3 a {
  color: var(--text);
  text-decoration: none;
}

.post-summary h3 a:hover { color: var(--accent); }

.post-summary time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.post-summary p {
  margin-top: 0.5rem;
  color: var(--text-muted);
}

/* Single Post */
.post-header { margin-bottom: 2rem; }
.post-header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.post-header time { color: var(--text-muted); font-size: 0.9rem; }

.post-content h2 { font-size: 1.4rem; margin: 2rem 0 0.75rem; }
.post-content h3 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }
.post-content p { margin-bottom: 1.25rem; }

.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content a:hover { color: var(--accent-hover); }

/* Code */
.post-content code {
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 3px;
  font-size: 0.9em;
}

.post-content pre {
  background: var(--code-bg);
  padding: 1rem 1.25rem;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.post-content pre code {
  background: none;
  padding: 0;
}

/* Tags */
.tags { margin-top: 0.5rem; }
.tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--text-muted);
  padding: 0.15em 0.6em;
  border-radius: 3px;
  font-size: 0.8rem;
  margin-right: 0.4rem;
}

/* Blockquotes */
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-style: italic;
}

/* Images */
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  margin: 1rem 0;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

/* Responsive */
@media (max-width: 600px) {
  header { padding: 0.75rem 1rem; }
  main { padding: 1.5rem 1rem; }
  nav { flex-direction: column; gap: 0.5rem; }
  .nav-links a { margin-left: 0; margin-right: 1rem; }
  .intro h1 { font-size: 1.6rem; }
  .post-header h1 { font-size: 1.6rem; }
}
