/* Fexumo — a minimal blog stylesheet. No frameworks, no JS, no colors beyond ink. */

:root {
  --ink: #1a1a1a;
  --muted: #8a8a8a;
  --line: #e8e8e8;
  --bg: #ffffff;
  --code-bg: #f6f6f6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e6e6e6;
    --muted: #8a8a8a;
    --line: #2c2c2c;
    --bg: #121212;
    --code-bg: #1c1c1c;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.85 Georgia, "Songti SC", "Noto Serif SC", "SimSun", serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 2.5rem;
}

/* ---- header ---- */

header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 3rem;
}

.brand {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink);
  text-decoration: none;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-left: 1.4rem;
  transition: color 0.15s;
}

nav a:hover, nav a.on { color: var(--ink); }

/* ---- index ---- */

.tagline {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.post-list { list-style: none; }

.post-list li {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.post-list li:first-child { padding-top: 0.5rem; }

.post-list a {
  display: block;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}

.post-list a:hover { text-decoration: underline; }

.post-list .date {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

/* ---- article ---- */

article h1 { font-size: 1.75rem; line-height: 1.3; margin-bottom: 0.6rem; }

article > .date {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

article .body p { margin: 1.1rem 0; }

article h2 {
  font-size: 1.3rem;
  margin: 2.4rem 0 0.9rem;
  line-height: 1.4;
}

article h3 {
  font-size: 1.1rem;
  margin: 1.8rem 0 0.6rem;
}

article ul, article ol { margin: 1rem 0 1rem 1.6rem; }
article li { margin: 0.35rem 0; }

article blockquote {
  border-left: 2px solid var(--line);
  padding-left: 1.2rem;
  color: var(--muted);
  margin: 1.4rem 0;
}

article blockquote p { margin: 0.4rem 0; }

article pre {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  margin: 1.3rem 0;
  font: 0.83rem/1.65 "SF Mono", Menlo, Consolas, "Courier New", monospace;
}

article code {
  font-family: "SF Mono", Menlo, Consolas, "Courier New", monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.12em 0.4em;
  border-radius: 3px;
}

article pre code { background: none; padding: 0; font-size: 1em; }

article a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
article a:hover { text-decoration-thickness: 2px; }

article hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.6rem 0;
}

.back { margin-top: 3rem; }
.back a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.back a:hover { color: var(--ink); text-decoration: underline; }

/* ---- pager ---- */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.pager a {
  color: var(--muted);
  text-decoration: none;
  max-width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pager a.next { margin-left: auto; text-align: right; }
.pager a:hover { color: var(--ink); text-decoration: underline; }

/* ---- misc ---- */

h1 + p, h2 + p, h3 + p { margin-top: 0; }

footer {
  margin-top: 4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.3rem;
}

@media (max-width: 480px) {
  .wrap { padding: 2rem 1.25rem 1.5rem; }
  header { flex-direction: column; gap: 0.7rem; }
  nav a { margin-left: 0; margin-right: 1.2rem; }
}
