/* Albers Theme - Minimal & High Contrast */

/* Color Variables */
:root {
  --bg-primary: #faf7f2;
  --bg-secondary: #efe8de;
  --text-primary: #2c2621;
  --text-secondary: #6d6257;
  --border-color: #d5c7b7;
  --accent-color: #a3392f;
  --accent-muted: #7a241d;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: Georgia, "Times New Roman", Times, serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

/* Page shell — matches layouts: <div class="page"> */
.page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  margin-bottom: 1rem;
  font-weight: 600;
}

h1 { font-size: 2rem; }
h2 {
  font-size: 1.5rem;
  color: rgba(86, 124, 119, 0.8);
}
h3 { font-size: 1.25rem; }

h1 {
  color: #cc2a41;
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  margin-bottom: 1rem;
}

/* ul li, ol li { */
/*     margin-bottom: 0.5rem; */
/* } */

a {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  transition: border-color 0.2s ease;
}

a:hover {
  border-bottom-color: var(--text-primary);
}

/* Site header (not <header> inside articles) */
.site-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.site-avatar-link {
  border-bottom: none;
  flex-shrink: 0;
}

.site-avatar {
  display: block;
  width: 50px;
  height: 50px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.site-header-content {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.site-title {
  font-size: 2rem;
  font-weight: 600;
  border: none;
  margin-bottom: 0;
  letter-spacing: 0.01em;
}

.site-title a {
  border-bottom: none;
}

.site-header .menu {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 0.35rem 0.6rem;
  margin: 0;
  padding: 0;
}

.site-header .menu li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.menu-separator {
  color: var(--accent-color);
}

.site-header .menu a {
  border: none;
  color: var(--accent-color);
  text-transform: lowercase;
}

.site-header .menu a:hover {
  color: var(--accent-muted);
}

/* Main Content */
main {
  min-height: calc(100vh - 200px);
  padding: 2rem 0 3rem;
}

.intro {
  margin-bottom: 2rem;
  color: var(--text-primary);
  font-size: 1.08rem;
}

.intro p:last-child {
  margin-bottom: 0;
}

.intro blockquote {
  margin-top: 1.25rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent-color);
  color: var(--text-secondary);
  font-style: italic;
}

.intro cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  color: var(--accent-muted);
}

main > section + section {
  margin-top: 2.5rem;
}

.meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.post-preview {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.post-preview:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.post-preview h3 {
  margin-bottom: 0.35rem;
}

.post-preview .summary {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.post-preview .summary p:last-child {
  margin-bottom: 0;
}

.continued {
  margin-top: 0.75rem;
  margin-bottom: 0;
  font-size: 0.95rem;
  font-style: italic;
}

.continued a {
  color: var(--accent-color);
  border-bottom-color: transparent;
}

.continued a:hover {
  border-bottom-color: var(--accent-color);
}

/* Single Post */
.post-header {
  margin-bottom: 2rem;
}

.post-header h1 {
  margin-bottom: 0.5rem;
}

.post-header .meta,
.post-header time {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.content {
  line-height: 1.7;
}

.content ul,
.content ol {
  padding-left: 1.5rem;
}

.content li {
  margin-bottom: 0.35rem;
}

.content img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
}

a:has(img) {
  border-bottom: none;
}

.content code {
  background-color: var(--bg-secondary);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: 'Monaco', 'Courier New', monospace;
}

.content pre {
  background-color: var(--bg-secondary);
  padding: 1rem;
  border-radius: 5px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.content pre code {
  background-color: transparent;
  padding: 0;
}

.content blockquote {
  border-left: 3px solid var(--border-color);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* Footer */
.site-footer,
footer {
  padding: 2rem 0 2.5rem;
  margin-top: 3rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.badge-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.badge-row a {
  border-bottom: none;
}

.badge-row img {
  display: block;
  width: 88px;
  height: 31px;
  image-rendering: pixelated;
}

.site-footer p,
footer p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 640px) {
  html {
      font-size: 15px;
  }

  .page {
      padding: 0 1rem;
  }

  .site-header {
      align-items: flex-start;
      gap: 1rem;
  }

  .site-avatar {
      width: 50px;
      height: 50px;
  }

  .site-title {
      font-size: 1.75rem;
  }

  main {
      padding: 1.5rem 0 2.5rem;
  }

  h2 { font-size: 1.375rem; }
  h3 { font-size: 1.125rem; }
}
