:root {
  --cream:      #faf6ef;
  --cream-2:    #f2ecdf;
  --ink:        #2b2622;
  --ink-soft:   #5a5045;
  --muted:      #8a7f6f;
  --rule:       #e8ded0;
  --accent:     #b5563c;
  --accent-2:   #d98a6f;
  --accent-ink: #ffffff;
  --serif:      'Fraunces', Georgia, serif;
  --sans:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max: 760px;
  --max-wide: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--max-wide); margin: 0 auto; padding: 0 1.5rem; }
.wrap-narrow { max-width: var(--max); margin: 0 auto; padding: 3rem 1.5rem 5rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header / nav */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 1.5rem;
}
.site-brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ink);
  letter-spacing: -.01em;
}
.site-brand:hover { text-decoration: none; color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav > a {
  color: var(--ink-soft);
  font-size: .93rem;
  font-weight: 500;
}
.site-nav > a:hover, .site-nav > a.active { color: var(--accent); text-decoration: none; }

.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  background: none; border: none; cursor: pointer;
  font: inherit; font-size: .93rem; font-weight: 500; color: var(--ink-soft);
  display: flex; align-items: center; gap: .3rem; padding: 0;
}
.nav-dropdown-toggle:hover { color: var(--accent); }
.nav-dropdown-toggle .caret { font-size: .65rem; transition: transform .15s; }
.nav-dropdown.open .caret { transform: rotate(180deg); }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + .9rem);
  left: 50%;
  transform: translateX(-50%);
  background: #fffdf9;
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(43,38,34,.10);
  padding: .5rem;
  min-width: 190px;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block; padding: .5rem .75rem; border-radius: 6px;
  color: var(--ink-soft); font-size: .9rem;
}
.nav-dropdown-menu a:hover { background: var(--cream-2); color: var(--accent); text-decoration: none; }

/* Post list / cards */
.post-list { display: grid; gap: 2.75rem; padding: 3rem 0 2rem; }
.post-card { display: grid; grid-template-columns: 220px 1fr; gap: 1.75rem; align-items: start; }
.post-card-image { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; background: var(--cream-2); }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card:not(:has(.post-card-image)) { grid-template-columns: 1fr; }
.post-meta { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.post-card h2 { font-family: var(--serif); font-size: 1.65rem; font-weight: 600; margin: .5rem 0 .6rem; line-height: 1.25; }
.post-card h2 a { color: var(--ink); }
.post-card h2 a:hover { color: var(--accent); text-decoration: none; }
.post-excerpt { color: var(--ink-soft); margin: 0 0 .75rem; }
.read-more { font-size: .88rem; font-weight: 600; }

@media (max-width: 640px) {
  .post-card { grid-template-columns: 1fr; }
}

/* Single post/page */
.single-header h1 { font-family: var(--serif); font-size: 2.4rem; font-weight: 700; line-height: 1.15; margin: .6rem 0 1rem; letter-spacing: -.01em; }
.single-cover { width: 100%; border-radius: 12px; margin: 1.5rem 0; display: block; }
.tag-list { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.tag-pill { font-size: .8rem; background: var(--cream-2); color: var(--ink-soft); padding: .25rem .7rem; border-radius: 999px; }
.tag-pill:hover { background: var(--accent); color: #fff; text-decoration: none; }

.prose { font-size: 1.08rem; line-height: 1.8; margin-top: 2rem; }
.prose p { margin: 0 0 1.4rem; }
.prose h2 { font-family: var(--serif); font-size: 1.6rem; margin: 2.2rem 0 1rem; }
.prose h3 { font-family: var(--serif); font-size: 1.3rem; margin: 1.8rem 0 .8rem; }
.prose img { max-width: 100%; border-radius: 10px; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem; color: var(--ink-soft); font-style: italic; }
.prose a { text-decoration: underline; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose table { border-collapse: collapse; width: 100%; }
.prose table td, .prose table th { border: 1px solid var(--rule); padding: .5rem .75rem; }

.mastodon-note { margin-top: 2.5rem; font-size: .9rem; }

/* Pages */
.breadcrumb-trail { font-size: .85rem; color: var(--muted); margin-bottom: 1.5rem; }
.breadcrumb-trail span { color: var(--ink); }
.child-pages { margin-top: 3rem; border-top: 1px solid var(--rule); padding-top: 1.5rem; }
.child-pages h2 { font-family: var(--serif); font-size: 1.3rem; margin-bottom: .75rem; }
.child-pages ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }

.archive-header { padding: 2.5rem 0 .5rem; }
.archive-header h1 { font-family: var(--serif); font-size: 2rem; }

.empty-state { padding: 5rem 0; text-align: center; color: var(--muted); }

/* Pagination */
.pagination { display: flex; gap: .4rem; justify-content: center; padding: 2rem 0 4rem; }
.page-link { padding: .45rem .85rem; border-radius: 6px; border: 1px solid var(--rule); color: var(--ink-soft); font-size: .9rem; }
.page-link.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-link:hover { text-decoration: none; border-color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); margin-top: 3rem; padding: 2rem 0; color: var(--muted); font-size: .88rem; }
.site-footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--ink-soft); }
