:root {
  --text: #3f2f24;
  --muted: #7b6250;
  --link: #8a4f20;
  --border: rgba(93, 64, 44, 0.28);
  --soft-border: rgba(93, 64, 44, 0.2);
  --code-bg: rgba(93, 64, 44, 0.1);
  --row: rgba(93, 64, 44, 0.07);
  --bg: #f3e3c3;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.markdown-body {
  margin: 0 auto;
  max-width: 980px;
  padding: 44px 28px 72px;
}

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

a:hover {
  text-decoration: underline;
}

p,
ul,
table,
figure {
  margin-bottom: 16px;
  margin-top: 0;
}

ul {
  padding-left: 2em;
}

li + li {
  margin-top: 0.25em;
}

h1,
h2,
h3 {
  font-family: Lora, Georgia, serif;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
  margin-top: 24px;
}

h1 {
  border-bottom: 1px solid var(--soft-border);
  font-size: 2em;
  padding-bottom: 0.3em;
}

h1:first-child {
  border-bottom: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.5em;
  margin-top: 0;
  padding-bottom: 0;
}

h2 {
  border-bottom: 1px solid var(--soft-border);
  font-size: 1.5em;
  padding-bottom: 0.3em;
}

h3 {
  font-size: 1.25em;
}

hr {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--soft-border);
  height: 0.25em;
  margin: 24px 0;
  padding: 0;
}

strong {
  font-weight: 700;
}

table {
  border-collapse: collapse;
  display: block;
  max-width: 100%;
  overflow: auto;
  width: max-content;
}

tr {
  background: var(--bg);
  border-top: 1px solid var(--border);
}

tr:nth-child(2n) {
  background: var(--row);
}

th,
td {
  border: 1px solid var(--border);
  padding: 8px 13px;
  vertical-align: top;
}

th {
  font-weight: 700;
}

code {
  background: var(--code-bg);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 85%;
  padding: 0.2em 0.4em;
}

.reading-figure {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.reading-figure img {
  display: block;
  height: 220px;
  object-fit: cover;
  width: 100%;
}

.post-meta,
.back-link {
  color: var(--muted);
  font-size: 0.95em;
}

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

.post-list li {
  border-bottom: 1px solid var(--soft-border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: space-between;
  padding: 12px 0;
}

.post-body {
  max-width: 760px;
}

.post-body p {
  font-family: Lora, Georgia, serif;
  font-size: 1.08rem;
}

.post-body .lede {
  color: var(--text);
  font-size: 1.28rem;
}

.draft-notice {
  background: rgba(138, 79, 32, 0.12);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  display: inline-block;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin: 0 0 10px;
  padding: 6px 12px;
  text-transform: uppercase;
}

.life-map {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.4), transparent 26%),
    linear-gradient(145deg, rgba(255, 250, 235, 0.62), rgba(226, 189, 131, 0.18));
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(93, 64, 44, 0.12);
  margin: 32px 0;
  overflow: hidden;
}

.life-map__header {
  align-items: start;
  border-bottom: 1px solid var(--soft-border);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
  padding: 22px 24px 14px;
}

.life-map__header h2 {
  border: 0;
  margin: 0;
  padding: 0;
}

.life-map__header p:last-child {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.eyebrow {
  color: var(--muted);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.life-map__canvas {
  min-height: 560px;
  position: relative;
}

.life-map__canvas svg {
  display: block;
  height: auto;
  min-height: 520px;
  width: 100%;
}

.life-map__halo {
  fill: none;
  stroke: rgba(138, 79, 32, 0.18);
  stroke-dasharray: 8 10;
  stroke-width: 2;
}

.life-map__link {
  stroke: rgba(93, 64, 44, 0.22);
  stroke-linecap: round;
  stroke-width: 2.4;
  transition: opacity 180ms ease, stroke 180ms ease, stroke-width 180ms ease;
}

.life-map__link.is-active {
  opacity: 1;
  stroke: rgba(138, 79, 32, 0.76);
  stroke-width: 4;
}

.life-map__node {
  cursor: default;
  outline: none;
}

.life-map__node circle {
  filter: drop-shadow(0 8px 12px rgba(93, 64, 44, 0.18));
  stroke: rgba(93, 64, 44, 0.34);
  stroke-width: 1.6;
  transition: filter 180ms ease, stroke 180ms ease, transform 180ms ease;
}

.life-map__node.is-active circle,
.life-map__node:focus-visible circle {
  filter: drop-shadow(0 12px 18px rgba(93, 64, 44, 0.28));
  stroke: rgba(138, 79, 32, 0.86);
  stroke-width: 3;
}

.life-map__node text {
  fill: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  pointer-events: none;
  text-anchor: middle;
}

.life-map__node .node-title {
  font-size: 16px;
  font-weight: 800;
}

.life-map__node .node-group {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.life-map__legend {
  border-top: 1px solid rgba(93, 64, 44, 0.16);
  color: var(--muted);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.68rem;
  line-height: 1.25;
  padding: 6px 12px 8px;
}

.life-map__legend p {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  margin: 0;
}

.life-map__legend strong {
  color: var(--text);
}

@media (max-width: 680px) {
  .life-map__header {
    grid-template-columns: 1fr;
    padding: 18px 18px 12px;
  }

  .life-map__canvas {
    min-height: 620px;
  }

  .markdown-body {
    padding: 28px 18px 56px;
  }

  h1 {
    font-size: 1.65em;
  }

  h1:first-child {
    font-size: 1.25em;
  }

  th,
  td {
    padding: 7px 10px;
  }
}
