:root {
  --bg-color: #4a1e1e;
  --text-color: #f2eaea;
  --accent-color: #b35a5a;
  --nav-bg: #3a1616;
}

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

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

header {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  font-weight: bold;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav ul li a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 0.95rem;
}

nav ul li a:hover {
  text-decoration: underline;
}

main {
  max-width: 800px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

article p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

article h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  font-size: 1.6rem;
}

article h3 {
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
}

.path {
  margin-top: 1rem;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
  word-break: break-word;
}

@media (max-width: 1100px) {
  .toc {
    position: static;
    width: 100%;
    margin-bottom: 2rem;
  }
}

.path a {
  color: var(--accent-color);
  text-decoration: none;
}

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

.path-root {
  color: #9fb3c8;
}

.path-current {
  color: #ffffff;
  font-weight: bold;
}

.meta {
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.meta .date {
  display: block;
  color: var(--accent-color);
  margin-bottom: 0.3rem;
}

.meta .date.updated {
  display: block;
  font-style: italic;
  color: #816262;
  margin-bottom: .3rem;
}

.tags {
  margin-top: 0.3rem;
}

.tag {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-color);
  border: 1px solid rgba(255,255,255,0.3);
  text-decoration: none;
}

.tag:hover {
  background-color: rgba(255,255,255,0.1);
}

article .image {
  text-align: center;
  margin: 2rem 0;
}

article .image img {
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  display: inline-block;
}

article .image figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  font-style: italic;
}

footer {
  margin-top: 5rem;
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

pre, code {
  font-family: "Courier New", Courier, monospace;
}

pre {
  background-color: rgba(0,0,0,0.25);
  padding: 1rem;
  margin: 1.5rem 0;
  border-left: 3px solid var(--accent-color);
  overflow-x: auto;
  font-size: 0.9rem;
}

article a {
  color: var(--accent-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

article a:hover {
  opacity: 0.85;
}

.disclaimer {
  margin: 2.5rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--accent-color);
  background-color: rgba(0, 0, 0, 0.25);
  font-size: 0.95rem;
}

.disclaimer h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: var(--accent-color);
}

.disclaimer p {
  margin-bottom: 0;
}

.references-box {
  margin-top: 4rem;
  padding: 1.75rem 2rem;
  background-color: rgba(0, 0, 0, 0.25);
  border-top: 3px solid var(--accent-color);
  border-radius: 6px;
  font-size: 0.95rem;
}

.references-box h3 {
  margin-top: 0;
  margin-bottom: 1.25rem;
  font-size: 1.4rem;
  color: var(--accent-color);
}

.references-box ul {
  list-style: none;
  padding-left: 0;
}

.references-box li {
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.references-box a {
  color: var(--accent-color);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.references-box a:hover {
  opacity: 0.85;
}

.references p {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.references a {
  word-break: break-word;
}

span.end-of-article {
  color: #b35a5a;
}

.toc li a {
  color: white;
  text-decoration: none;
  opacity: 0.75;
}

.toc li a:hover {
  opacity: 1;
  text-decoration: none;
}

.toc-title {
  display: block;
  text-decoration: underline;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

/* ===== POST NAVIGATION ===== */
.post-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  gap: 1rem;
  flex-wrap: wrap;
}

.post-nav-left,
.post-nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-nav-btn {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: inherit;
  background: transparent;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}

.post-nav-btn:hover {
  background: var(--accent-color);
  color: var(--bg-color);
  text-decoration: none;
}

.post-nav-disabled {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: default;
  user-select: none;
}

.post-nav-divider {
  color: rgba(255, 255, 255, 0.3);
  padding: 0 0.1rem;
}
@media (max-width: 400px) {
  header nav {
    padding: 0.5rem 0.75rem; /* same padding left AND right */
    gap: 0.25rem;
  }
}

.label {
  color: #b35a5a; /* accent */
  font-weight: 700;
}