:root {
  --bg: #f7f6f2;
  --paper: #fffdf8;
  --ink: #212121;
  --muted: #66645f;
  --line: #dad4c9;
  --accent: #2f5b49;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #faf8f3, var(--bg));
  line-height: 1.55;
}

.site-header {
  max-width: 52rem;
  margin: 3rem auto 1.5rem;
  padding: 0 1.25rem;
}

.brand-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  width: 76px;
  height: 76px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.site-header h1 {
  margin: 0;
  font-family: "Iowan Old Style", "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.journal-description {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tagline {
  margin-top: 0.55rem;
  color: var(--muted);
  max-width: 44rem;
}

.compact {
  margin-bottom: 0;
}

.back-link {
  margin: 0 0 1rem;
}

.container {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.post-list {
  display: grid;
  gap: 1rem;
}

.post-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  padding: 1.1rem 1.2rem;
}

.post-card h2 {
  margin: 0.15rem 0 0.5rem;
  font-size: 1.4rem;
  line-height: 1.25;
}

.post-card p {
  margin: 0.45rem 0;
}

.meta {
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

a {
  color: inherit;
}

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

.inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.12em;
  text-decoration-thickness: 1px;
}

.post {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  padding-top: 1rem;
}

.post section {
  margin-bottom: 1.3rem;
}

.post h2 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.post p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.post-subheading {
  margin: 1.1rem 0 0.35rem;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.references-list {
  margin: 0.8rem 0 0;
  padding-left: 1.5rem;
}

.references-list li {
  margin: 0 0 0.7rem;
  padding-left: 0.2rem;
  text-align: left;
  hyphens: none;
}

figure {
  margin: 1.5rem 0;
}

figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  display: block;
  background: #fff;
}

figcaption {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.figure-title {
  font-weight: 700;
  color: var(--ink);
}

.MathJax {
  font-size: 1em;
}

.post .MathJax_Display,
.post mjx-container[display="true"] {
  margin: 1.1rem 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.site-footer {
  border-top: 1px solid var(--line);
  max-width: 52rem;
  margin: 0 auto 2rem;
  padding: 1rem 1.25rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.empty-state {
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 640px) {
  .site-header {
    margin-top: 2rem;
  }

  .site-logo {
    width: 56px;
    height: 56px;
  }

  .post-card h2 {
    font-size: 1.2rem;
  }
}
