:root {
  --bg: #fff;
  --text: #171717;
  --muted: #777;
  --faint: #f6f6f6;
  --line: #e6e6e6;
  --accent: #c52d2f;
  --max: 1090px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

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

img {
  max-width: 100%;
  height: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(var(--max), calc(100% - 40px));
  min-height: 96px;
  margin-inline: auto;
}

.site-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-logo {
  display: block;
  width: 190px;
  height: auto;
  object-fit: contain;
}

.search-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 28px;
  height: 28px;
  color: var(--text);
}

.search-link svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.78rem;
}

.site-nav-row {
  border-top: 1px solid var(--line);
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 34px;
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
  min-height: 56px;
  align-items: center;
  font-size: 1.18rem;
  font-weight: 400;
}

.home-shell,
.page-shell,
.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.publication-intro {
  padding: 28px 0 34px;
  text-align: center;
}

.publication-intro h1 {
  margin: 0;
  display: inline-block;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(3rem, 7vw, 6.8rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
  font-style: italic;
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.14em;
}

.publication-intro p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.feed-section,
.explore-section,
.artifact-section {
  padding: 30px 0 36px;
  border-bottom: 1px solid var(--line);
}

.feed-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.feed-heading h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.show-more {
  display: block;
  width: max-content;
  margin: 30px 0 0 auto;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
}

.show-more::after {
  content: " ->";
}

.term-groups {
  display: grid;
  gap: 38px;
}

.term-group h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.term-group p {
  max-width: 660px;
  margin: -6px 0 18px;
  color: var(--muted);
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.explore-grid a {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
}

.explore-grid span {
  color: #8a8a8a;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.explore-grid strong {
  font-size: 1.25rem;
  line-height: 1.15;
}

.explore-grid p {
  max-width: 32rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.explore-grid a:hover {
  border-color: var(--accent);
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 78px;
  row-gap: 32px;
}

.feed-grid .post-card:first-child {
  grid-column: 1 / -1;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.feed-grid .post-card:first-child h3 {
  max-width: 820px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.feed-grid .post-card:first-child p {
  max-width: 720px;
  margin-top: 10px;
  font-size: 1.05rem;
}

.post-card a {
  display: block;
}

.content-kind {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.content-kind span {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}

.post-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.07rem;
  line-height: 1.2;
  font-weight: 800;
}

.post-card p {
  margin: 7px 0 0;
  color: #2c2c2c;
  font-size: 0.95rem;
  line-height: 1.35;
}

.post-card__meta,
.post-meta,
.site-footer p {
  display: block;
  margin-top: 13px;
  color: #8a8a8a;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-card__meta time::before {
  content: " · ";
}

.article-paths {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.article-paths__group {
  display: grid;
  gap: 8px;
}

.article-paths__group > span {
  color: #8a8a8a;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-paths__group ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-paths__group a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  color: #444;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.article-paths__group a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.path-section {
  margin: 0 0 34px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.path-section h2 {
  margin: 0 0 14px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.path-grid a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
}

.path-grid a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.artifact-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.artifact-list a {
  display: block;
  min-height: 76px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-weight: 800;
  line-height: 1.2;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.button:hover {
  color: #fff;
  background: #aa2527;
}

.page-shell {
  padding: 48px 0 72px;
}

.section-header,
.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.section-header h1,
.article h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.section-intro,
.article-dek {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
}

.article {
  max-width: 760px;
  margin-inline: auto;
}

.content {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  line-height: 1.72;
}

.podcast-episode-link {
  margin: 2.5rem 0 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: #f5f1ed;
  font-weight: 700;
}

.podcast-episode-link a {
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.media-embed {
  width: 100%;
  margin: 0 0 28px;
  aspect-ratio: 16 / 9;
  background: #000;
}

.media-embed iframe,
.media-embed video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.content p,
.content li {
  color: #252525;
}

.content p {
  margin: 0 0 1.15em;
}

.content h2,
.content h3,
.content h4 {
  margin-top: 1.7em;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.2;
}

.content pre {
  overflow-x: auto;
  padding: 16px;
  background: #171717;
  color: #fff;
}

.content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.content :not(pre) > code {
  background: var(--faint);
  padding: 0.12em 0.28em;
}

.content blockquote {
  margin: 1.5em 0;
  padding-left: 1em;
  border-left: 4px solid var(--accent);
  color: #3c3c3c;
}

.zt-access-note {
  margin: 1.8em 0;
  padding: 16px 18px;
  border-left: 4px solid var(--accent);
  background: var(--faint);
}

.zt-access-note strong {
  display: block;
  margin-bottom: 4px;
}

.zt-access-note p {
  margin: 0;
  color: #333;
}

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

.content th,
.content td {
  padding: 8px 10px;
  border: 1px solid var(--line);
}

.post-list {
  display: grid;
  gap: 22px;
}

.term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.term-grid a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--text);
}

.term-grid a strong {
  flex: 0 0 2.4ch;
  color: var(--accent);
  font-size: 0.88rem;
  text-align: right;
}

.map-shell {
  max-width: 1320px;
}

.context-graph {
  margin: 0 0 34px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.article .context-graph {
  margin-top: -8px;
}

.context-graph__heading {
  margin-bottom: 14px;
}

.context-graph__heading h2 {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-map {
  display: grid;
  gap: 14px;
}

.site-map__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-map__filter {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.site-map__filter:hover,
.site-map__filter.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.site-map__frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  min-height: 620px;
  border: 1px solid var(--line);
}

.site-map__frame--compact {
  min-height: 420px;
}

.site-map__canvas {
  display: block;
  width: 100%;
  height: 620px;
  background: #fbfbfb;
  touch-action: none;
}

.site-map__frame--compact .site-map__canvas {
  height: 420px;
}

.site-map__panel {
  min-width: 0;
  padding: 18px;
  border-left: 1px solid var(--line);
  background: #fff;
}

.site-map__panel h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.site-map__panel h3,
.site-map__type {
  margin: 18px 0 8px;
  color: #8a8a8a;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-map__panel p {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-map__panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-map__panel li a {
  display: block;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.25;
}

.site-map__open {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 800;
}

.site-map__open::after {
  content: " ->";
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 34px;
  color: var(--muted);
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
}

.site-footer nav,
.social-links,
.contact-box {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.search-box input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  font: inherit;
}

.search-box input:focus {
  border-color: var(--text);
  outline: 2px solid transparent;
}

.search-count {
  margin: 18px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.contact-box {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.image-shortcode {
  margin: 1.4em 0;
}

.image-shortcode.right {
  float: right;
  margin: 0.25em 0 1em 1.4em;
}

.image-shortcode.left {
  float: left;
  margin: 0.25em 1.4em 1em 0;
}

.image-shortcode.frame {
  padding: 10px;
  border: 1px solid var(--line);
}

.image-shortcode figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.88rem;
}

.resume-section {
  margin: 2em 0;
}

.resume-entry {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.resume-entry header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.resume-entry p {
  margin: 4px 0 8px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .site-topbar {
    grid-template-columns: auto 1fr auto;
    width: min(100% - 24px, var(--max));
  }

  .site-logo {
    width: 148px;
    height: auto;
  }

  .site-nav {
    width: min(100% - 24px, var(--max));
    justify-content: flex-start;
    gap: 18px;
    min-height: 52px;
    font-size: 1.06rem;
    overflow-x: auto;
    white-space: nowrap;
  }

  .home-shell,
  .page-shell,
  .site-footer {
    width: min(100% - 24px, var(--max));
  }

  .feed-grid,
  .explore-grid {
    grid-template-columns: 1fr;
    row-gap: 26px;
  }

  .site-map__frame {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .site-map__canvas {
    height: 430px;
  }

  .site-map__frame--compact .site-map__canvas {
    height: 360px;
  }

  .site-map__panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .feed-grid .post-card:first-child h3 {
    font-size: 2.1rem;
  }

  .artifact-list {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: block;
  }

  .site-footer nav {
    margin-top: 18px;
  }
}

@media (max-width: 500px) {
  .feed-heading {
    margin-bottom: 22px;
  }

  .feed-grid .post-card:first-child h3,
  .section-header h1,
  .article h1 {
    font-size: 1.9rem;
  }

  .content {
    font-size: 1.08rem;
  }
}
