/* ==========================================================================
   Osgood's Log — Editorial Design System (Light & Dark Adaptive)
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-subtle: #f6f8fa;
  --bg-elevated: #ffffff;
  --bg-quote: #f3f7fc;
  --ink: #181c20;
  --ink-secondary: #3f4852;
  --muted: #5c6672;
  --border: #e5e8ec;
  --border-strong: #cfd6df;
  --accent: #1d5bbf;
  --accent-soft: rgba(29, 91, 191, 0.1);
  --accent-hover: #144799;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --header-bg: rgba(255, 255, 255, 0.86);
  --code-bg: #f1f4f8;
  --container-wide: 1180px;
  --container-medium: 960px;
  --gutter: clamp(1.1rem, 3.6vw, 2.5rem);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
  --bg: #0f1216;
  --bg-subtle: #161b22;
  --bg-elevated: #1b222c;
  --bg-quote: #162030;
  --ink: #e6edf3;
  --ink-secondary: #c5cfd9;
  --muted: #8b949e;
  --border: #262e38;
  --border-strong: #37414f;
  --accent: #6cb6ff;
  --accent-soft: rgba(108, 182, 255, 0.14);
  --accent-hover: #90c9ff;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(15, 18, 22, 0.86);
  --code-bg: #1c222b;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

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

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

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

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0.75rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

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

.site-header__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.2vw, 1.5rem);
  flex-wrap: wrap;
}

.site-nav__link {
  position: relative;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.25rem 0;
  transition: color 0.15s ease;
}

.site-nav__link:hover,
.site-nav__link.is-current {
  color: var(--ink);
}

.site-nav__link.is-current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.theme-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

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

.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* Main & Page Shells */
.site-main {
  min-height: calc(100vh - 140px);
}

.page-shell {
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.25rem) var(--gutter) 4.5rem;
}

.page-shell--medium {
  max-width: var(--container-medium);
}

.page-shell--wide {
  max-width: var(--container-wide);
}

/* Home Intro & Hero */
.home-intro {
  margin-bottom: 1.75rem;
}

.home-intro__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2.05rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.home-intro__desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
  max-width: 72ch;
}

.home-intro__desc a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-hero {
  margin-bottom: 2.25rem;
}

.page-hero__eyebrow {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.page-hero__title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 750;
  line-height: 1.25;
}

.page-hero__desc {
  margin: 0 0 1.25rem;
  color: var(--muted);
  max-width: 70ch;
}

/* Pill Filters & Badges */
.pill-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pill-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

[data-theme="dark"] .pill-btn.is-active {
  color: #0b1118;
  font-weight: 600;
}

.pill-count {
  font-size: 0.76rem;
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}

.home-filter {
  margin-bottom: 2rem;
}

.home-filter__status {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.badge--series {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge--subtle {
  background: var(--bg-subtle);
  color: var(--muted);
  border: 1px solid var(--border);
}

.badge--archived {
  background: var(--bg-subtle);
  color: var(--muted);
  border: 1px solid var(--border);
}

.tag-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tag-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.tag-chip--static {
  cursor: default;
}

.tag-chip--static:hover {
  border-color: var(--border);
  color: var(--muted);
  background: transparent;
}

/* Home & Archive Feeds */
.year-group + .year-group {
  margin-top: 2.75rem;
}

.year-group__title {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.feed-list {
  border-top: 1px solid var(--border);
}

.feed-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--border);
}

.feed-item--compact {
  grid-template-columns: 92px minmax(0, 1fr);
  padding: 1rem 0;
}

.feed-item__date {
  padding-top: 0.2rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.feed-item__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.feed-item__title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 650;
  line-height: 1.4;
}

.feed-item--compact .feed-item__title {
  font-size: 1.04rem;
}

.feed-item__title a {
  color: var(--ink);
}

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

.feed-item__excerpt {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.feed-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.archive-section + .archive-section {
  margin-top: 3.5rem;
}

.archive-section__title {
  margin: 0 0 0.4rem;
  font-size: 1.28rem;
  font-weight: 700;
}

.archive-section__hint {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ==========================================================================
   Article Shell: Wide Adaptive Column + Sticky TOC
   ========================================================================== */
.article-shell {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.25rem) var(--gutter) 5rem;
  display: grid;
  grid-template-columns: minmax(0, 780px);
  justify-content: center;
}

@media (min-width: 1080px) {
  .article-shell:not(.article-shell--no-toc) {
    grid-template-columns: minmax(0, 780px) 240px;
    gap: clamp(2.25rem, 4vw, 4rem);
    align-items: start;
  }
}

.article-main {
  min-width: 0;
}

.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.article-header__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.article-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.7rem, 3.2vw, 2.25rem);
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

/* Mobile & Sticky Desktop TOC */
.toc-mobile {
  margin: 0 0 2rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-subtle);
  font-size: 0.88rem;
}

.toc-mobile summary {
  padding: 0.75rem 1rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
}

.toc-mobile .toc-nav {
  padding: 0 0.75rem 0.75rem;
}

.article-toc {
  display: none;
}

@media (min-width: 1080px) {
  .article-shell:not(.article-shell--no-toc) .toc-mobile {
    display: none;
  }

  .article-shell:not(.article-shell--no-toc) .article-toc:not([hidden]) {
    display: block;
  }
}

.article-toc__sticky {
  position: sticky;
  top: 5.25rem;
  max-height: calc(100vh - 6.5rem);
  overflow-y: auto;
  padding-left: 0.9rem;
  border-left: 1px solid var(--border);
}

.article-toc__title {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toc-list,
.toc-sublist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-sublist {
  padding-left: 0.85rem;
}

.toc-link {
  display: block;
  padding: 0.3rem 0.4rem;
  margin-left: -0.95rem;
  padding-left: 0.95rem;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc-link:hover {
  color: var(--ink);
}

.toc-link.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

.toc-mobile .toc-link {
  margin-left: 0;
  padding-left: 0.5rem;
  border-left: 0;
  border-radius: 6px;
}

.toc-mobile .toc-link:hover {
  background: var(--accent-soft);
}

/* ==========================================================================
   Prose Typography: Headings, Blockquotes, Lists, Tables, Figures
   ========================================================================== */
.prose {
  font-size: 1.03rem;
  line-height: 1.85;
  color: var(--ink);
  overflow-wrap: break-word;
}

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

.prose h2 {
  margin: 2.75rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.42rem;
  font-weight: 720;
  line-height: 1.35;
}

.prose h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.18rem;
  font-weight: 680;
  line-height: 1.4;
}

.prose p {
  margin: 0 0 1.25rem;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}

.prose hr {
  border: 0;
  height: 1px;
  margin: 2.25rem auto;
  width: 45%;
  background: var(--border-strong);
}

.prose blockquote {
  margin: 1.65rem 0;
  padding: 0.95rem 1.25rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--bg-quote);
  color: var(--ink-secondary);
  font-size: 0.98rem;
  line-height: 1.78;
}

.prose blockquote p {
  margin: 0 0 0.5rem;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose ul,
.prose ol {
  margin: 1.1rem 0 1.4rem;
  padding-left: 1.5rem;
}

.prose li {
  margin: 0.42rem 0;
  padding-left: 0.25rem;
}

.prose li::marker {
  color: var(--accent);
  font-weight: 600;
}

.prose ul.task-list {
  list-style: none;
  padding-left: 0.25rem;
}

.prose .task-list-item-checkbox {
  margin-right: 0.55rem;
  accent-color: var(--accent);
  transform: scale(1.08);
  vertical-align: middle;
}

.prose .table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.65rem 0;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

.prose thead {
  background: var(--bg-subtle);
}

.prose th,
.prose td {
  padding: 0.72rem 0.95rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.prose th {
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
}

.prose tbody tr:last-child td {
  border-bottom: 0;
}

.prose tbody tr:hover {
  background: var(--bg-subtle);
}

.prose code {
  padding: 0.15em 0.4em;
  border-radius: 5px;
  background: var(--code-bg);
  font-family: var(--font-mono);
  font-size: 0.87em;
}

.prose pre {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-subtle);
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
}

.prose pre code {
  padding: 0;
  background: transparent;
}

.prose .post-figure,
.prose .journal-figure {
  margin: 1.8rem 0;
  padding: 0.5rem;
  border-radius: 10px;
  text-align: center;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

.prose .post-figure:target,
.prose .post-figure.is-highlighted {
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px var(--accent);
}

.prose .post-figure img,
.prose .journal-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 75vh;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: zoom-in;
  box-shadow: var(--shadow-sm);
}

.prose .post-figure figcaption,
.prose .journal-figure figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.5;
}

/* Series Card, Post Nav & Giscus */
.article-source {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.series-card {
  margin-top: 2.5rem;
  padding: 1.15rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-subtle);
}

.series-card__title {
  margin-bottom: 0.65rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}

.series-card__list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.92rem;
}

.series-card__list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.3rem 0;
}

.series-card__list li.is-current span {
  font-weight: 650;
  color: var(--ink);
}

.series-card__list time {
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.post-nav {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.post-nav__slot {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.post-nav__slot--right {
  text-align: right;
  align-items: flex-end;
}

.post-nav__label {
  color: var(--muted);
  font-size: 0.8rem;
}

.post-nav__link {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}

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

.post-comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.post-comments__header {
  margin-bottom: 1.25rem;
}

.post-comments__title {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.post-comments__hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* ==========================================================================
   Gallery Cards & Citation Links
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

.gallery-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.gallery-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.gallery-card__media {
  appearance: none;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  background: var(--bg-subtle);
  overflow: hidden;
  cursor: zoom-in;
}

.gallery-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.gallery-card:hover .gallery-card__media img {
  transform: scale(1.03);
}

.gallery-card__zoom-hint {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(15, 18, 22, 0.72);
  color: #ffffff;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.gallery-card:hover .gallery-card__zoom-hint {
  opacity: 1;
}

.gallery-card__body {
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.6rem;
}

.gallery-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.gallery-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 680;
  line-height: 1.35;
}

.gallery-card__quote {
  margin: 0;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.6;
  flex: 1;
}

.gallery-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
}

.gallery-card__date {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.citation-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  transition: background-color 0.15s ease;
}

.citation-link:hover {
  background: var(--accent);
  color: #ffffff;
}

.citation-link--lg {
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  white-space: nowrap;
}

/* ==========================================================================
   Lightbox Modal
   ========================================================================== */
.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 13, 18, 0.86);
  backdrop-filter: blur(6px);
}

.lightbox__panel {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.lightbox__media {
  position: relative;
  background: #0b0e12;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  max-height: 68vh;
}

.lightbox__media img {
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 18, 22, 0.72);
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__nav {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px;
  height: 52px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 18, 22, 0.65);
  color: #ffffff;
  font-size: 1.8rem;
  cursor: pointer;
}

.lightbox__nav--prev { left: 0.75rem; }
.lightbox__nav--next { right: 0.75rem; }

.lightbox__nav[hidden] {
  display: none;
}

.lightbox__caption {
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--border);
}

.lightbox__counter {
  font-size: 0.76rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.lightbox__title {
  margin: 0.1rem 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.lightbox__meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.lightbox__quote {
  margin: 0.35rem 0 0;
  color: var(--ink-secondary);
  font-size: 0.88rem;
  max-width: 65ch;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.site-footer__inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer__links {
  display: flex;
  gap: 1.15rem;
}

.site-footer__links a {
  color: var(--muted);
}

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

@media (max-width: 640px) {
  .feed-item {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

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

  .post-nav__slot--right {
    text-align: left;
    align-items: flex-start;
  }
}
