/* ==========================================================================
   Ed: the minimal edition theme — adapted for blog.theochrone.fr
   ========================================================================== */

html { font-size: 62.5%; }

body {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1.8rem;
  line-height: 1.75;
  color: #222;
  background: #fafaf8;
  margin: 0;
  padding: 0;
}

a { color: #333; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Sidebar ---- */

#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 20rem;
  height: 100%;
  background: #111;
  color: #eee;
  padding: 2.5rem 2rem;
  overflow-y: auto;
  box-sizing: border-box;
}

#sidebar header {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid #333;
  padding-bottom: 1.5rem;
}

.site-title a {
  color: #fff;
  font-size: 1.7rem;
  font-weight: bold;
  line-height: 1.3;
  display: block;
}

.site-title a:hover { text-decoration: none; color: #ddd; }

.site-subtitle {
  color: #999;
  font-size: 1.2rem;
  font-style: italic;
  margin-top: 0.5rem;
  line-height: 1.4;
}

#sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#sidebar ul li {
  margin-bottom: 0.6rem;
}

#sidebar ul li a {
  color: #bbb;
  font-size: 1.4rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#sidebar ul li a:hover { color: #fff; text-decoration: none; }

.nav-section-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #555;
  margin: 2rem 0 0.8rem;
}

/* ---- Homepage explore bar ---- */

.index-explore {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.4rem;
  margin-bottom: 2.5rem;
  color: #aaa;
}

.index-explore a {
  color: #888;
  text-decoration: none;
}

.index-explore a:hover { color: #222; text-decoration: underline; }

.index-explore-sep { margin: 0 0.8rem; color: #ccc; }

/* ---- Main content ---- */

.main-content {
  margin-left: 22rem;
  padding: 4rem 4rem 4rem 3rem;
  max-width: 72rem;
}

article header {
  margin-bottom: 2.5rem;
}

article header h1 {
  font-size: 2.6rem;
  font-weight: normal;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

.post-meta {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.3rem;
  color: #999;
  margin: 0;
}

/* ---- Post list (homepage & section lists) ---- */

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-item {
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px solid #ebebeb;
}

.post-item:last-child { border-bottom: none; }

.post-date {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.3rem;
  color: #aaa;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 11rem;
}

.post-item-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.post-item a {
  font-size: 1.6rem;
  color: #222;
}

.post-item a:hover { color: #555; text-decoration: underline; }

.post-item-cats {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.2rem;
  color: #aaa;
}

.post-item-cats a {
  font-size: 1.2rem;
  color: #aaa;
  text-decoration: none;
}

.post-item-cats a:hover { color: #555; text-decoration: underline; }
.post-item-cats a + a::before { content: ", "; }

/* Categories inline in post header */
.post-categories { font-size: 1.3rem; }
.post-categories a {
  color: #aaa;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-decoration: none;
}
.post-categories a:hover { color: #555; text-decoration: underline; }
.post-categories a + a::before { content: ", "; }

/* ---- Post content ---- */

.post-content p { margin-bottom: 1.4rem; }

.post-content h2,
.post-content h3,
.post-content h4 {
  font-weight: normal;
  margin: 2rem 0 0.8rem;
  line-height: 1.3;
}

.post-content a {
  color: #222;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content a:hover { color: #555; }

.post-content blockquote {
  border-left: 3px solid #ccc;
  margin: 1.5rem 0;
  padding: 0 0 0 1.5rem;
  color: #555;
  font-style: italic;
}

.post-content ul,
.post-content ol {
  margin: 1rem 0 1.5rem 2rem;
}

.post-content li { margin-bottom: 0.3rem; }

.post-content pre {
  background: #f0f0ec;
  padding: 1rem 1.5rem;
  overflow-x: auto;
  font-size: 1.4rem;
  border-radius: 3px;
  margin: 1.5rem 0;
}

.post-content code {
  font-size: 0.9em;
  background: #f0f0ec;
  padding: 0.1em 0.3em;
  border-radius: 2px;
}

.post-content pre code { background: none; padding: 0; }

.post-content hr {
  border: none;
  border-top: 1px solid #e0e0d8;
  margin: 2rem 0;
}

/* ---- Post footer (tags) ---- */

.post-footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0d8;
}

.post-tags {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.3rem;
  color: #aaa;
  line-height: 2;
}

.post-tags a { color: #aaa; margin-right: 0.3em; }
.post-tags a:hover { color: #555; text-decoration: none; }

/* ---- Post navigation (prev/next) ---- */

.post-nav {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0d8;
  display: flex;
  justify-content: space-between;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.4rem;
}

.post-nav a { color: #555; max-width: 45%; }
.post-nav a:hover { color: #111; text-decoration: underline; }
.post-nav .next { text-align: right; }

/* ---- Pagination ---- */

.pagination {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.3rem;
  list-style: none;
  padding: 0;
}

.pagination .page-item .page-link {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border: 1px solid #ddd;
  color: #555;
  text-decoration: none;
  border-radius: 2px;
}

.pagination .page-item .page-link:hover { border-color: #999; color: #111; }
.pagination .page-item.active .page-link { background: #111; color: #fff; border-color: #111; }
.pagination .page-item.disabled .page-link { color: #ccc; border-color: #eee; pointer-events: none; }

/* ---- Responsive ---- */

@media (max-width: 800px) {
  #sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 1.5rem;
  }

  .main-content {
    margin-left: 0;
    padding: 2rem;
  }

  .post-item { flex-direction: column; gap: 0.2rem; }
  .post-date { min-width: unset; }
}
