/* CSS Variables */
:root {
  --fg: #111;
  --bg: #fff;
  --muted: #666;
  --link: #0b79d0;
  --border: #e5e5e5;
}

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
}

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

a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  width: 100%;
  max-width: 740px;
  margin: 0;
  padding: 0 16px;
}

/* Header */
.site-header {
  background: #ADD8E6;
  border-bottom: 1px solid var(--border);
  border-radius: 8px;
  margin: 16px;
}

.site-title {
  margin: 0;
  padding: 12px 0;
}

.site-title a {
  color: #2c5582;
  text-decoration: none;
}

/* Post List */
.post-list {
  list-style: none;
  padding: 0;
}

.post-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

/* Ensure consistent spacing after posts, regardless of last element type (text, image, etc.) */
.post-item .content > *:last-child {
  margin-bottom: 2.5rem;
}

.meta {
  color: var(--muted);
  font-size: 0.9em;
}

/* Code Blocks */
pre {
  background: #f8f9fa;
  color: #000;
  padding: 12px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  overflow: auto;
}

code {
  background: #f5f5f5;
  color: #E21144;
  padding: 2px 4px;
  border: 1px solid #e1e1e8;
  border-radius: 3px;
}

/* Code inside pre blocks should be black */
pre code {
  background: transparent;
  color: #000;
  padding: 0;
  border: none;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
}

img.blog {
  border: 1vw solid white;
  box-shadow: 4px 4px 12px rgba(0,0,0,0.3);
}

/* Pagination */
.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 32px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.pagination-link {
  background: var(--link);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
}

.pagination-link:first-child {
  justify-self: start;
}

.pagination-link:last-child {
  justify-self: end;
}

.pagination-link:hover {
  background: #0056b3;
  text-decoration: none;
}

.pagination-info {
  color: var(--muted);
  font-size: 0.9em;
  text-align: center;
  grid-column: 2;
}

/* Title Styling */
.post-item h3,
.post h3 {
  font-size: 2em;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.post-item h3 a,
.post h3 {
  color: #0088cc;
  text-decoration: none;
}

.post-item h3 a:hover {
  text-decoration: underline;
  color: #2c5582;
}

/* Heading Sizes */
h1 { font-size: 1.8rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

/* All headings styling */
h1, h2, h3, h4, h5, h6 {
  margin: 1.5rem 0 0.5rem 0;
  line-height: 1.3;
  font-weight: 600;
}

/* Footer Styling - Typewriter Style */
.site-footer {
  margin-top: 1rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  background: #f8f9fa;
}

.site-footer .container {
  font-family: monospace;
  font-size: 0.8em;
  color: #555;
  line-height: 1.5;
}

.site-footer .container p {
  margin: 0;
}

/* Footer categories styling */
.site-footer .categories {
  margin: 0.5rem 0;
  line-height: 1.4;
}

.site-footer .categories a {
  white-space: nowrap;
}

/* Responsive: Stack categories on very small screens */
@media (max-width: 480px) {
  .site-footer .categories {
    word-break: break-all;
  }
}

/*
.footnotes {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9em;
}

.footnotes ol {
  padding-left: 1.5rem;
}

.footnotes li {
  margin-bottom: 0.5rem;
}

.footnote-ref {
  font-size: 0.8em;
  text-decoration: none;
  padding: 1px 4px;
  border-radius: 2px;
  background-color: var(--link);
  color: white;
}

.footnote-ref:hover {
  background-color: #0056b3;
  text-decoration: none;
}

.footnote-backref {
  margin-left: 0.5rem;
  text-decoration: none;
  font-size: 0.9em;
}
*/