:root {
  --text: #232620;
  --bg: #f6f5f0;
  --muted: #6b6f66;
  --line: #e2e1d8;
  --accent: #4c7a5e;
  --accent-dark: #3a5f48;
  --max-width: 640px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 3rem 1.5rem;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
}

header {
  max-width: var(--max-width);
  margin: 0 auto 3rem auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header a {
  color: var(--text);
  text-decoration: none;
}

.site-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.site-title::before {
  content: "";
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--accent);
  border-radius: 2px;
}

nav a {
  margin-left: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

nav a:hover, .site-title:hover {
  color: var(--accent-dark);
}

h1 {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

p {
  margin: 0 0 1.1rem 0;
}

a {
  color: var(--accent-dark);
}

.meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0;
  margin-bottom: 1.75rem;
}

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

.post-list li {
  margin-bottom: 1.5rem;
  padding: 1.1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
}

.post-list a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.post-list a:hover {
  color: var(--accent-dark);
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.post-excerpt {
  color: var(--muted);
  margin: 0.35rem 0 0 0;
}

footer {
  max-width: var(--max-width);
  margin: 4rem auto 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

a.back {
  display: inline-block;
  margin-top: 2rem;
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
}

a.back:hover {
  text-decoration: underline;
}

/* Dark mode */
html.dark {
  --text: #e8e8e2;
  --bg: #1c1e1a;
  --muted: #9a9d94;
  --line: #33362f;
  --accent: #7fb894;
  --accent-dark: #9bd3ad;
}

html.dark .post-list li {
  background: #24261f;
}

.theme-toggle {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 100;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: background 0.15s ease, transform 0.1s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

html.dark .theme-toggle {
  background: #24261f;
  border-color: var(--line);
}
