/* Base styles */
body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background-color: #fffcf0;
  color: #1e293b;
  margin: 0;
  line-height: 1.7;
  font-size: 1rem;
}
/* Layout */
.container {
  display: flex;
  min-height: 100vh;
}
/* Sidebar */
aside {
  width: 220px;
  background-color: #fffcf0;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  padding: 2rem 1rem;
  box-sizing: border-box;
  position: fixed;
  top: 0;
  bottom: 0;
}
aside .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
aside .logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
aside .logo span {
  font-weight: 600;
  font-size: 1rem;
  color: #0f172a;
}
aside .links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
aside .links a {
  color: #334155;
  text-decoration: none;
  font-size: 0.95rem;
}
aside .links a:hover {
  color: #ef4444;
  text-decoration: underline;
}
/* Main content */
main {
  flex: 1;
  margin-left: 240px;
  padding: 4rem 2rem;
  max-width: 720px;
}
main h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #b91c1c;
}
main h2, main h3 {
  margin-top: 2.5rem;
  font-weight: 500;
}
main p {
  margin-top: 1.5rem;
}
main a {
  color: #dc2626;
  text-decoration: none;
}
main a:hover {
  text-decoration: underline;
}
main ul {
  padding-left: 1.5rem;
}
main li {
  margin-bottom: 0.75rem;
}
main blockquote {
  margin: 2rem 0;
  padding-left: 1rem;
  border-left: 4px solid #e2e8f0;
  color: #64748b;
  font-style: italic;
}
/* Code styling */
main pre {
  background-color: #1e1e1e;
  color: #f8f8f2;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 2rem;
  font-family: 'Source Code Pro', monospace;
}
main code {
  font-family: 'Source Code Pro', monospace;
}
/* Search bar */
.search-bar-wrapper {
  margin-bottom: 2rem;
}
#search-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  background-color: #f1f5f9;
}
#search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #0f172a;
  font-size: 0.9rem;
}
#search-input::placeholder {
  color: #94a3b8;
  opacity: 0.8;
}
/* Search functionality - Hide/Show elements */
.hidden {
  display: none !important;
}
/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: #64748b;
  font-size: 0.85rem;
  margin-left: 220px;
  border-top: 1px solid #e2e8f0;
}
/* Responsive layout */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  aside {
    width: 100%;
    position: static;
    flex-direction: row;
    justify-content: space-around;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  main {
    margin-left: 0;
    padding: 2rem 1rem;
  }
  footer {
    margin-left: 0;
  }
}
/* Post list styling */
#post-list li {
  margin-bottom: 2rem;
}
#post-list li a {
  color: #dc2626;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.25rem; /* tighter space below the title */
}
#post-list li a:hover {
  color: #38bdf8;
}
#post-list li .summary,
#post-list li .topics,
#post-list li .published-at {
  margin: 0.25rem 0; /* reduce top & bottom margin */
  font-size: 0.85rem;
  color: #94a3b8;
}
#post-list li p:first-of-type {
  margin-top: 0; /* remove top margin for first paragraph (summary) */
}
/* Search results styling */
#search-results {
  padding-left: 0; /* Remove default ul padding for search results */
}
#search-results li {
  margin-bottom: 2rem;
  list-style: none; /* Remove bullet points for search results */
}
#search-results li a {
  color: #dc2626;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.25rem;
}
#search-results li a:hover {
  color: #38bdf8;
}
#search-results li .summary,
#search-results li .topics,
#search-results li .published-at {
  margin: 0.25rem 0;
  font-size: 0.85rem;
  color: #94a3b8;
}
#search-results li p:first-of-type {
  margin-top: 0;
}
