:root {
  color-scheme: light;
  --bg: #f8f7f3;
  --surface: #fdfcf9;
  --text: #292e29;
  --muted: #6c7067;
  --faint: #74786e;
  --line: #dddfd5;
  --accent: #4a654d;
  --accent-soft: #eaf0e5;
  --code-bg: #17201d;
  --code-text: #e7f0ed;
  --selection: #d5e0cb;
  --shadow: 0 12px 32px rgb(36 45 31 / 5%);
  --content: 44rem;
  --wide: 66rem;
  --radius: 0.35rem;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", SimSun, serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #191c18;
    --surface: #20251e;
    --text: #e8e9df;
    --muted: #aeb5a6;
    --faint: #a0a796;
    --line: #373e32;
    --accent: #b1c49e;
    --accent-soft: #2b3726;
    --code-bg: #090c0b;
    --code-text: #e1e9e6;
    --selection: #285e54;
    --shadow: none;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #191c18;
  --surface: #20251e;
  --text: #e8e9df;
  --muted: #aeb5a6;
  --faint: #a0a796;
  --line: #373e32;
  --accent: #b1c49e;
  --accent-soft: #2b3726;
  --code-bg: #090c0b;
  --code-text: #e1e9e6;
  --selection: #285e54;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--selection);
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.13em;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 0.2rem;
}

.shell {
  width: min(calc(100% - 3rem), var(--wide));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  transform: translateY(-160%);
  border-radius: 0.4rem;
  background: var(--text);
  color: var(--bg);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.header-inner {
  min-height: 6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  font-size: 0.85rem;
}

.site-nav a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.65em;
}

.theme-toggle {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.main-content {
  min-height: calc(100vh - 12rem);
  padding-block: 5rem 6rem;
}

.intro,
.page-header,
.post,
.toc,
.post-pager,
.not-found {
  width: min(100%, var(--content));
  margin-inline: auto;
}

.intro {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  align-items: center;
  gap: 3rem;
  padding-block: 0.6rem 4.5rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow a {
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  color: var(--text);
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.intro h1 {
  max-width: 10em;
  margin-block: 1.5rem 1.4rem;
  font-size: clamp(2.4rem, 4.1vw, 3.65rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

.intro-copy {
  max-width: 35rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 2;
}

.intro-phrase {
  display: inline-block;
  max-width: 100%;
  text-wrap: wrap;
}

.section-heading {
  width: min(100%, var(--content));
  margin: 0 auto;
  padding-bottom: 1.3rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
}

.section-heading a {
  color: var(--muted);
  font-size: 0.76rem;
  text-decoration: none;
}

.post-list {
  width: min(100%, var(--content));
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.post-list > li {
  border-bottom: 1px solid var(--line);
}

.post-preview {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 2rem;
  padding-block: 2.25rem;
}

.post-preview-main {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

.post-preview:has(.post-preview-cover) .post-preview-main {
  grid-template-columns: minmax(0, 1fr) 10rem;
  gap: 2rem;
}

.post-preview-cover {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  overflow: hidden;
  border-radius: var(--radius);
}

.post-preview-cover img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  transition: transform 180ms ease;
}

.post-preview-cover:hover img {
  transform: scale(1.025);
}

.post-preview-copy {
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
}

.post-kickers {
  margin: 0 0 0.55rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--faint);
  font-size: 0.74rem;
}

.post-badge {
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 750;
}

.post-date {
  padding-top: 0.25rem;
  color: var(--faint);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.post-preview h2 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

.post-preview h2 a {
  color: var(--text);
  text-decoration: none;
}

.post-preview h2 a:hover {
  color: var(--accent);
}

.post-summary {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.9;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.tag {
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: none;
}

.tag:hover {
  color: var(--accent);
}

.page-header,
.post-header {
  margin-bottom: 3.5rem;
}

.page-header h1,
.post-header h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.15rem, 4.5vw, 3.15rem);
  text-wrap: pretty;
}

.page-header > p:last-child,
.post-deck {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1.2rem;
  color: var(--faint);
  font-size: 0.86rem;
}

.post-cover {
  width: min(100%, var(--wide));
  margin: -0.5rem auto 3.5rem;
}

.post-cover img {
  width: 100%;
  max-height: 38rem;
  display: block;
  border-radius: calc(var(--radius) + 0.2rem);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.post-cover figcaption,
.content-figure figcaption,
.content-gallery figcaption,
.video-embed figcaption {
  margin-top: 0.7rem;
  color: var(--faint);
  font-size: 0.78rem;
  text-align: center;
}

.content-figure figcaption small {
  display: block;
  margin-top: 0.15rem;
}

.prose {
  width: 100%;
  color: var(--text);
  line-height: 2;
  overflow-wrap: anywhere;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose > *:last-child {
  margin-bottom: 0;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre,
.prose table {
  margin-block: 1.35rem;
}

.prose li > ul,
.prose li > ol {
  margin-block: 0.35rem;
}

.prose .task-list-item {
  list-style: none;
}

.prose .task-list-item-checkbox {
  width: 1rem;
  height: 1rem;
  margin: 0 0.5rem 0 -1.45rem;
  accent-color: var(--accent);
}

.prose h2 {
  margin-top: 3.6rem;
  margin-bottom: 1.1rem;
  padding-top: 0.2rem;
  font-size: 1.65rem;
}

.prose h3 {
  margin-top: 2.6rem;
  margin-bottom: 0.9rem;
  font-size: 1.3rem;
}

.prose h4 {
  margin-top: 2rem;
  margin-bottom: 0.7rem;
  font-size: 1.08rem;
}

.heading-anchor {
  margin-left: 0.45rem;
  color: var(--faint);
  font-size: 0.72em;
  font-weight: 500;
  text-decoration: none;
  opacity: 0;
}

.prose h2:hover .heading-anchor,
.prose h3:hover .heading-anchor,
.prose h4:hover .heading-anchor,
.heading-anchor:focus {
  opacity: 1;
}

.prose a {
  overflow-wrap: anywhere;
}

.prose img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.prose blockquote {
  margin-inline: 0;
  padding: 0.3rem 1.5rem;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  font-family: var(--serif);
  color: var(--muted);
}

.prose code:not(pre code) {
  padding: 0.13em 0.35em;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: var(--surface);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.88em;
}

.code-block {
  margin-block: 1.6rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--code-bg);
}

.code-toolbar {
  min-height: 2.45rem;
  padding: 0.25rem 0.6rem 0.25rem 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
  color: #aebbb6;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
}

.copy-code {
  min-width: 3.7rem;
  min-height: 2rem;
  border: 0;
  border-radius: 0.3rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.copy-code:hover {
  background: rgb(255 255 255 / 8%);
  color: #ffffff;
}

.code-block pre {
  margin: 0;
  padding: 1.15rem 1.25rem;
  overflow-x: auto;
  color: var(--code-text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.65;
  tab-size: 2;
}

.hljs-comment,
.hljs-quote { color: #8ea099; }
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal { color: #f0a9cf; }
.hljs-string,
.hljs-doctag,
.hljs-regexp { color: #a8d4a2; }
.hljs-number,
.hljs-built_in,
.hljs-type { color: #f3c98b; }
.hljs-title,
.hljs-section,
.hljs-selector-id { color: #8fc9f2; }
.hljs-variable,
.hljs-template-variable,
.hljs-attribute { color: #e7b995; }
.hljs-meta { color: #c8b9f3; }

.callout {
  --callout: #2563eb;
  margin-block: 1.75rem;
  padding: 1.05rem 1.2rem;
  border: 1px solid color-mix(in srgb, var(--callout) 34%, var(--line));
  border-left: 4px solid var(--callout);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--callout) 7%, var(--bg));
}

.callout--tip { --callout: #0f766e; }
.callout--warning { --callout: #b45309; }
.callout--danger { --callout: #b91c1c; }

.callout-title {
  margin: 0 0 0.25rem !important;
  color: var(--callout);
  font-size: 0.9rem;
  font-weight: 800;
}

.callout-content > :first-child,
.content-details-body > :first-child {
  margin-top: 0;
}

.callout-content > :last-child,
.content-details-body > :last-child {
  margin-bottom: 0;
}

.content-details {
  margin-block: 1.75rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.content-details summary {
  color: var(--text);
  font-weight: 720;
  cursor: pointer;
}

.content-details-body {
  padding-top: 0.75rem;
  color: var(--muted);
}

.content-figure,
.content-gallery,
.video-embed {
  margin: 2.4rem 0;
}

.content-figure img {
  width: 100%;
  margin: 0;
}

.gallery-grid {
  display: grid;
  gap: 0.75rem;
}

.gallery-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0;
  object-fit: cover;
}

.video-embed > div {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0c0f0e;
  box-shadow: var(--shadow);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.table-wrap {
  margin-block: 1.75rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.content-table {
  width: 100%;
  margin: 0 !important;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.content-table caption {
  padding: 0.8rem 0.95rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 750;
  text-align: left;
}

.content-table th,
.content-table td {
  min-width: 7rem;
  padding: 0.65rem 0.85rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.content-table th {
  background: var(--surface);
  color: var(--text);
}

.content-table tr:last-child td {
  border-bottom: 0;
}

.content-table th:last-child,
.content-table td:last-child {
  border-right: 0;
}

.content-actions {
  margin-block: 1.75rem !important;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.content-button {
  min-height: 2.75rem;
  padding: 0.52rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 0.45rem;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
}

.content-button--primary {
  background: var(--accent);
  color: var(--bg);
}

.content-button--secondary {
  background: var(--surface);
}

.content-button--text {
  border-color: transparent;
}

.footnotes {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.footnote-ref,
.footnote-backref {
  font-weight: 750;
  text-decoration: none;
}

.featured-section {
  width: min(100%, var(--wide));
  margin: 0 auto 5rem;
}

.featured-section .section-heading {
  width: 100%;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
}

.featured-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.15rem);
  background: var(--surface);
}

.featured-cover {
  aspect-ratio: 16 / 10;
  display: block;
  overflow: hidden;
  background: var(--accent-soft);
}

.featured-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 180ms ease;
}

.featured-cover:hover img {
  transform: scale(1.025);
}

.featured-cover--empty {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 2rem;
  font-weight: 850;
  letter-spacing: -0.08em;
}

.featured-card-copy {
  padding: 1.15rem;
}

.featured-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.12rem;
}

.featured-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.featured-card-copy > p:not(.post-kickers) {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.featured-card time {
  color: var(--faint);
  font-size: 0.75rem;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-social a {
  color: var(--faint);
  text-decoration: none;
}

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

.prose hr {
  width: 4rem;
  margin: 3.5rem auto;
  border: 0;
  border-top: 1px solid var(--line);
}

.toc {
  margin-top: -1.5rem;
  margin-bottom: 3rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}

.toc summary {
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.toc ol {
  margin: 0.8rem 0 0;
  padding-left: 1.3rem;
}

.toc li {
  margin-block: 0.35rem;
}

.toc-level-3 {
  margin-left: 1rem;
}

.article-footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.post-pager {
  margin-top: 4.5rem;
  padding-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  border-top: 1px solid var(--line);
}

.post-pager a {
  color: var(--text);
  font-size: 0.92rem;
  text-decoration: none;
}

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

.post-pager a span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--faint);
  font-size: 0.75rem;
}

.pager-newer {
  text-align: right;
}

.archive-groups {
  width: min(100%, var(--content));
  margin-inline: auto;
}

.archive-year {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 2rem;
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}

.archive-year h2 {
  margin: 0;
  font-size: 1.25rem;
}

.archive-year ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive-year li {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.45rem;
}

.archive-year time {
  color: var(--faint);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.archive-year a {
  color: var(--text);
  text-decoration: none;
}

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

.tag-cloud {
  width: min(100%, var(--content));
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
}

.tag-cloud a {
  min-height: 2.75rem;
  padding: 0.55rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
}

.tag-cloud a:hover {
  border-color: var(--accent);
}

.tag-cloud span {
  color: var(--faint);
  font-size: 0.75rem;
}

.not-found {
  padding-block: 4rem;
  text-align: center;
}

.error-code {
  margin: 0;
  color: var(--accent);
  font-size: clamp(4rem, 18vw, 9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.08em;
}

.not-found h1 {
  margin: 1rem 0 0.8rem;
  font-size: 2rem;
}

.not-found > p:not(.error-code) {
  color: var(--muted);
}

.not-found-actions {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

.button {
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  display: inline-flex;
  align-items: center;
  border-radius: 0.4rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.78rem;
}

.footer-inner {
  min-height: 6.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.empty-state {
  width: min(100%, var(--content));
  margin-inline: auto;
  color: var(--muted);
}

/* The journal masthead and article index share one quiet, full-width grid. */
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.65rem;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.1em;
}

.intro-link {
  display: inline-flex;
  align-items: center;
  gap: 1.6rem;
  min-height: 2.75rem;
  margin-top: 1.5rem;
  color: var(--accent);
  font-size: 0.8rem;
  text-decoration: none;
}

.intro-link span {
  font-size: 1.1rem;
}

.journal-art {
  position: relative;
  width: 17rem;
  height: 19rem;
  color: var(--accent);
  user-select: none;
}

.journal-orbit {
  position: absolute;
  inset: 1rem 2.5rem 3rem;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  border-radius: 50%;
}

.orbit-one { transform: rotate(-28deg); }
.orbit-two { transform: rotate(28deg); }
.orbit-three { transform: rotate(90deg); }

.journal-monogram {
  position: absolute;
  inset: 3.9rem 0 auto;
  font-family: var(--serif);
  font-size: 5.5rem;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
  letter-spacing: -0.1em;
}

.journal-star {
  position: absolute;
  z-index: 1;
  top: 0.7rem;
  right: 3.4rem;
  padding-inline: 0.35rem;
  background: var(--bg);
  font-size: 1.75rem;
  line-height: 1;
}

.journal-caption {
  position: absolute;
  bottom: 0;
  width: 100%;
  font-size: 0.55rem;
  letter-spacing: 0.19em;
  text-align: center;
}

.journal-divider {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 3.75rem;
  padding-block: 1rem;
  border-block: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.latest-section .section-heading,
.latest-section .post-list,
.latest-section .empty-state {
  width: 100%;
}

.section-count {
  margin-left: 0.6rem;
  color: var(--faint);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 400;
  vertical-align: middle;
}

#latest-posts,
.prose :is(h2, h3, h4) {
  scroll-margin-top: 2rem;
}

.reading-time {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.7rem;
}

.read-story {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 2.75rem;
  margin-top: 0.5rem;
  color: var(--accent);
  font-size: 0.75rem;
  text-decoration: none;
}

.read-story span,
.section-heading a span,
.footer-rss span {
  display: inline-block;
  transition: transform 180ms ease;
}

:is(.read-story, .section-heading a, .footer-rss):hover span {
  transform: translate(2px, -2px);
}

.latest-section .post-list > li:first-child .post-preview {
  padding-block: 2.5rem;
}

.latest-section .post-list > li:first-child .post-preview-main:has(.post-preview-cover) {
  grid-template-columns: minmax(0, 1fr) 42%;
  gap: 2.5rem;
}

.latest-section .post-list > li:first-child .post-preview-cover img {
  aspect-ratio: 4 / 3;
}

.latest-section .post-list > li:first-child h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  line-height: 1.6;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.1rem 0.55rem;
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
}

.tag-row:empty { display: none; }

.footer-rss {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-inner { flex-wrap: wrap; }
.footer-note { margin-inline: auto; }
.post-deck { line-height: 1.9; }
.post-header { padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.post-cover { margin-top: 0; }
.prose strong { font-weight: 650; }
.section-heading a:hover,
.footer-rss:hover { color: var(--accent); }

@media (max-width: 900px) {
  .intro { grid-template-columns: minmax(0, 1fr) 12rem; gap: 1.5rem; }
  .journal-art { transform: scale(0.75); transform-origin: center right; width: 17rem; justify-self: end; }
  .post-preview { grid-template-columns: 6rem minmax(0, 1fr); gap: 1.5rem; }
  .latest-section .post-list > li:first-child .post-preview-main:has(.post-preview-cover) { gap: 1.5rem; }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .shell {
    width: min(calc(100% - 2.5rem), var(--wide));
  }

  .header-inner {
    min-height: 6.5rem;
    padding-block: 0.9rem 0.5rem;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
  }

  .brand { font-size: 1.2rem; }
  .brand img { width: 27px; height: 27px; }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 0.8rem;
  }

  .site-nav a[href="/rss.xml"] {
    display: none;
  }

  .theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
  }

  .main-content {
    padding-block: 2.75rem 4rem;
  }

  .intro {
    display: block;
    padding-block: 0.5rem 2.5rem;
  }

  .intro h1 {
    max-width: 11em;
    font-size: clamp(2rem, 7.5vw, 3rem);
  }

  .journal-art { display: none; }
  .journal-divider { margin-bottom: 2.5rem; font-size: 0.65rem; }
  .journal-divider > span:last-child { display: none; }
  .intro-copy { max-width: 24rem; }

  .post-preview {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .post-preview:has(.post-preview-cover) .post-preview-main {
    grid-template-columns: minmax(0, 1fr) 6rem;
    gap: 0.9rem;
  }

  .latest-section .post-list > li:first-child .post-preview { padding-block: 1.75rem; }
  .latest-section .post-list > li:first-child .post-preview-main:has(.post-preview-cover) { grid-template-columns: 1fr; gap: 1.25rem; }
  .latest-section .post-list > li:first-child .post-preview-cover { grid-column: 1; grid-row: 1; }
  .latest-section .post-list > li:first-child .post-preview-cover img { aspect-ratio: 16 / 9; }
  .latest-section .post-list > li:first-child .post-preview-copy { grid-column: 1; grid-row: 2; }
  .latest-section .post-list > li:first-child h2 { font-size: 1.55rem; }
  .reading-time { display: inline; margin-left: 0.8rem; }
  .post-date { margin-bottom: 0.5rem; font-size: 0.73rem; }
  .post-header { padding-bottom: 1.5rem; }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .featured-card {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
  }

  .featured-cover {
    height: 100%;
    min-height: 9rem;
  }

  .gallery-grid--3,
  .gallery-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-button {
    width: 100%;
  }

  .post-date {
    padding: 0;
  }

  .page-header,
  .post-header {
    margin-bottom: 2.8rem;
  }

  .page-header h1,
  .post-header h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .prose h2 {
    margin-top: 3rem;
    font-size: 1.45rem;
  }

  .archive-year {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .post-pager {
    grid-template-columns: 1fr;
  }

  .pager-newer {
    text-align: left;
  }

  .footer-inner {
    padding-block: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.2rem;
  }

  .footer-note { margin-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .toc,
  .post-pager,
  .copy-code,
  .heading-anchor {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .main-content {
    padding: 0;
  }

  a {
    color: inherit;
  }
}
