/* Color themes */
:root {
  --bg: #ffffff;
  --text: #222222;
  --link: #0066cc;
  --link-hover: #004499;
  --border: #e0e0e0;
  --code-bg: #f5f5f5;
  --meta: #666666;
}

[data-theme="dark"] {
  --bg: #121212;
  --text: #e0e0e0;
  --link: #66b2ff;
  --link-hover: #99ccff;
  --border: #333333;
  --code-bg: #1e1e1e;
  --meta: #aaa;
}

/* Body and Headings: Native System Serif Stack */
body {
  font-family: "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Headings inherit the clean serif font */
h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
  font-weight: 600;
  line-height: 1.25;
}

/* Code, Metadata, Links in Footer: Monospace Stack */
code, pre, footer, .post-meta, button#theme-toggle {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Base Link Styling */
a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--link-hover);
}

/* Footer & Meta links maintain low contrast intentionally unless hovered */
footer a, .post-meta a {
  color: inherit;
  opacity: 0.85;
}

footer a:hover, .post-meta a:hover {
  opacity: 1;
}

/* Remove default list styling */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Row styling with bottom separator border */
.post-row {
  display: flex;
  align-items: baseline;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border); /* Fixed variable name */
  gap: 1rem; /* Space between date and title */
}

/* Remove bottom border on the very last row */
.post-row:last-child {
  border-bottom: none;
}

/* Distinct monospace font for the date and post number */
.post-date,
.post-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--meta); /* Fixed variable name */
  white-space: nowrap;
  flex-shrink: 0;
}

/* Title styling */
.post-title {
  color: var(--text); /* Fixed variable name */
  text-decoration: none;
  font-weight: 500;
}

.post-title:hover {
  color: var(--link-hover);
  text-decoration: underline;
}
