/* Happy's blog — dark warm theme */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f0f0f;
  --text: #e8e0d0;
  --muted: #8a8070;
  --accent: #f59e0b;
  --border: #2a2520;
  --max-w: 680px;
}

html { font-size: 17px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  padding: 2rem 1.25rem 4rem;
  min-height: 100vh;
}

.container { max-width: var(--max-w); margin: 0 auto; }

.site-header {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.site-title {
  font-family: monospace;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
}
.site-title:hover { opacity: 0.8; }

.site-nav {
  margin-top: 0.75rem;
  display: flex;
  gap: 1.25rem;
}
.site-nav a {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.03em;
}
.site-nav a:hover, .site-nav a.active { color: var(--accent); }

.about { margin-bottom: 2.5rem; color: var(--muted); font-size: 0.95rem; }
.about strong { color: var(--text); }

.search-wrap { margin-bottom: 0.8rem; }
.post-count {
  margin-bottom: 1.6rem;
  color: var(--muted);
  font-family: monospace;
  font-size: 0.82rem;
}

#search {
  width: 100%;
  padding: 0.6rem 0.9rem;
  background: #171310;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}
#search:focus { border-color: var(--accent); }
#search::placeholder { color: var(--muted); }

.post-list { list-style: none; }
.post-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.post-list li:first-child { border-top: 1px solid var(--border); }
.post-list a { color: var(--text); text-decoration: none; font-weight: 500; flex: 1; }
.post-list a:hover { color: var(--accent); }
.post-date { font-family: monospace; font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.read-time { font-size: 0.75rem; color: var(--muted); margin-left: 0.6rem; opacity: 0.7; }
.post-tags { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; margin-left: 0.6rem; vertical-align: middle; }
.tag { font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--muted); color: var(--bg); opacity: 0.75; }
.no-results { color: var(--muted); font-size: 0.9rem; padding: 1rem 0; display: none; }

.pager {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.pager-btn {
  background: #171310;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.7rem;
  border-radius: 4px;
  font-family: monospace;
  cursor: pointer;
}
.pager-btn:hover:enabled { border-color: var(--accent); color: var(--accent); }
.pager-btn:disabled { opacity: 0.45; cursor: default; }
.page-info {
  color: var(--muted);
  font-family: monospace;
  font-size: 0.85rem;
}

.post-header { margin-bottom: 2.5rem; }
.post-title {
  font-family: monospace;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.post-meta { font-family: monospace; font-size: 0.82rem; color: var(--muted); }

.back-link {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
}
.back-link:hover { color: var(--accent); }

.post-content { max-width: var(--max-w); }
.post-content h1, .post-content h2, .post-content h3 {
  font-family: monospace; color: var(--accent); margin: 2rem 0 0.75rem; line-height: 1.3;
}
.post-content h1 { font-size: 1.4rem; }
.post-content h2 { font-size: 1.2rem; }
.post-content h3 { font-size: 1rem; }
.post-content p { margin-bottom: 1.25rem; }
.post-content a { color: var(--accent); }
.post-content a:hover { text-decoration: underline; }
.post-content code {
  font-family: monospace; background: #1a1612;
  padding: 0.15em 0.4em; border-radius: 3px; font-size: 0.9em;
}
.post-content pre {
  background: #1a1612; padding: 1rem; border-radius: 5px;
  overflow-x: auto; margin-bottom: 1.25rem; border-left: 3px solid var(--accent);
}
.post-content pre code { background: none; padding: 0; }
.post-content blockquote {
  border-left: 3px solid var(--border); padding-left: 1rem;
  color: var(--muted); margin-bottom: 1.25rem;
}
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.post-content li { margin-bottom: 0.35rem; }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.post-content strong { color: var(--text); font-weight: 600; }
.post-content em { color: var(--muted); }
.empty { color: var(--muted); font-size: 0.9rem; }

.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.rss-link {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
}
.rss-link:hover { color: var(--accent); }

.about-page h1 {
  font-family: monospace;
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.about-page h2 {
  font-family: monospace;
  font-size: 1.1rem;
  color: var(--text);
  margin: 2rem 0 0.75rem;
}
.about-page p { margin-bottom: 1.25rem; color: var(--text); line-height: 1.75; }
.about-page strong { color: var(--accent); }
.about-page em { color: var(--muted); }
.about-page a { color: var(--accent); text-decoration: none; }
.about-page a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  html { font-size: 16px; }
  .post-list li { flex-direction: column; gap: 0.2rem; }
  .post-title { font-size: 1.3rem; }
}
