html {
  font-family: monospace;
  --ui-font-size: 1rem;
  --ui-content-width: 70ch;
  --bg: #ffffff;
  --text: #333333;
  --muted: #777777;
  --link: #007300;
  --link-visited: #6b5b73;
  --link-hover: #ff3300;
  --surface: #f5f5f5;
  --surface-alt: #fafafa;
  --code-bg: #f3f0e8;
  --code-text: #5a4a33;
  --border: #cccccc;
  --title: #888686;
  font-size: var(--ui-font-size);
  line-height: 1.5;
  margin: auto;
  max-width: var(--ui-content-width);
  padding: 1.5rem 1em 3em;
  background: var(--bg);
  --tc: #eeeeee;
  color: var(--text);
}

html[data-theme="dark"] {
  --bg: #111317;
  --text: #d9d9d9;
  --muted: #a7a7a7;
  --link: #7fd98e;
  --link-visited: #b89cd8;
  --link-hover: #ff9a69;
  --surface: #1b1f27;
  --surface-alt: #161a22;
  --code-bg: #222833;
  --code-text: #f2d9a4;
  --border: #4a505c;
  --title: #d0d0d0;
}

img {
  max-width: 100%;
}

img:not([src$=".svg"]),
article > div,
blockquote,
pre {
  border-radius: 0.3rem;
}

img[src$="#pixelate"] {
  image-rendering: pixelated;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  margin: 2rem 0 1em;
}

h1::before {
  content: "# ";
}

h2::before {
  content: "## ";
}

h3::before {
  content: "### ";
}

p {
  text-align: justify;
}

p,
ul,
ol,
.g,
article > footer,
article > header {
  margin: 0 0 2em;
}

pre,
blockquote {
  padding: 1.5rem;
  margin: 0 0 1.5rem;
}

pre {
  overflow-x: auto;
}

pre code {
  background: 0 !important;
}

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

article > img,
article > p > img,
article > div {
  display: block;
  margin-bottom: 1.5rem;
  width: 100%;
}

.yt {
  aspect-ratio: 16/9;
  width: 100%;
  overflow: hidden;
}

.yt iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.s {
  font-size: 0.85rem;
}

header > div {
  margin-bottom: 1.5rem;
}

.site-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.site-preferences {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-pref-btn {
  border: 1px dashed currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0.08rem 0.55rem;
  cursor: pointer;
}

.site-pref-btn:hover {
  text-decoration: underline;
}

footer {
  margin-top: 1.5rem;
}

body > footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

body > footer img,
body > footer svg {
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

.tags {
  padding: 0.5rem 0 0 0;
}

.tags li {
  display: inline;
}

.tags li + li::before {
  content: " · ";
}

nav {
  display: flex;
  gap: 1rem;
  margin: 0.8rem 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-start;
}

nav a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: normal;
  text-decoration: underline;
  overflow: visible;
  text-underline-offset: 0.3em;
}

nav img,
nav svg {
  width: 1rem;
  height: 1rem;
  margin-bottom: 0;
  flex-shrink: 0;
}

nav a .s {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  font-size: 1rem;
}

.site-breadcrumb {
  margin: 0 0 1rem;
}

.site-breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.45rem;
  align-items: center;
}

.site-breadcrumb a {
  text-decoration: none;
}

.site-breadcrumb a:hover {
  text-decoration: underline;
}

.g {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: 0.5rem;
}

.g a {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.g img {
  object-fit: contain;
  max-height: 100%;
  max-width: 100%;
}

.p {
  list-style: none;
  padding: 0;
}

.p ul {
  margin: 0;
}

.p > li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.p time {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3rem;
  margin: 0.25rem 0;
}

.p time span:first-child {
  font-size: 1.5em;
  line-height: 1;
}

.lb {
  position: fixed;
  inset: 0;
  background: #000d;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  cursor: pointer;
}

.lb img {
  max-width: 95vw;
  max-height: 95vh;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  padding: 0.45rem 0.7rem;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

html a {
  color: var(--link);
  text-underline-offset: 0.24em;
}

html a:visited {
  color: var(--link-visited);
}

html a.active,
html a:active,
html a:hover {
  color: var(--link-hover);
}

html p,
html ul,
html ol,
html .desc {
  color: var(--text);
}

html blockquote,
html pre,
html article > img,
html article > p > img,
html .g img {
  background: var(--surface);
}

html code {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.08rem 0.28rem;
  border-radius: 0.2rem;
}

html blockquote,
html pre.giallo,
html pre.giallo[style] {
  background: #f3f0e8 !important;
  background-color: #f3f0e8 !important;
  color: #2f2a24 !important;
  border: 1px dashed #cbbfae;
}

html pre.giallo code {
  background: transparent !important;
  color: inherit !important;
  padding: 0 !important;
}

html pre.giallo .giallo-l,
html pre.giallo .giallo-l span {
  color: inherit !important;
  background: transparent !important;
}

html hr,
html table,
html th,
html td,
html input,
html textarea,
html button {
  border-color: var(--border);
}

a.active,
a:active,
a:hover {
  text-decoration-style: wavy;
}

.tags a {
  text-decoration-style: dotted;
}

hr {
  border: 0;
  border-top: 1px dashed;
  clear: both;
  margin-bottom: 1.5rem;
}

.site-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--title);
}

.post-meta {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.post-tags {
  margin-left: 0.3rem;
}

.post-tags a {
  text-decoration: none;
  font-size: 0.9rem;
}

.post-tags a:hover {
  text-decoration: underline;
}

.post-reading-progress {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  z-index: 1001;
  pointer-events: none;
}

.post-reading-progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  background: #ff3300;
  transform-origin: left center;
  transform: scaleX(0);
}

.post-toc {
  margin: 0 0 1.5rem;
  border: 1px dashed currentColor;
  border-radius: 0.3rem;
  padding: 0.4rem 0.75rem 0.65rem;
}

.post-toc summary {
  cursor: pointer;
  user-select: none;
}

.post-toc nav {
  margin: 0.55rem 0 0;
  display: block;
}

.post-toc ul {
  margin: 0.35rem 0 0.35rem 1rem;
  padding: 0;
}

.post-toc li {
  margin: 0.2rem 0;
}

.post-toc a {
  text-decoration: none;
}

.post-toc a:hover {
  text-decoration: underline;
}

article[data-reading-progress-article] pre {
  position: relative;
}

.post-heading-copy {
  margin-left: 0.4rem;
  border: 1px dashed currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.75rem;
  padding: 0 0.45rem;
  cursor: pointer;
  vertical-align: middle;
}

.post-heading-copy:hover {
  text-decoration: underline;
}

.post-code-copy {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  border: 1px dashed currentColor;
  border-radius: 999px;
  background: var(--bg);
  color: inherit;
  font: inherit;
  font-size: 0.75rem;
  line-height: 1.2;
  padding: 0.1rem 0.5rem;
  cursor: pointer;
}

.post-code-copy:hover {
  text-decoration: underline;
}

.post-series {
  margin-top: 1.8rem;
}

.post-series h2,
.post-next-recommendation h2 {
  margin-bottom: 0.8rem;
}

.post-series h2::before,
.post-next-recommendation h2::before {
  content: "";
}

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

.post-series-item {
  padding: 0.65rem 0;
  border-top: 1px dashed currentColor;
}

.post-series-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.post-series-item time {
  display: inline-block;
  min-width: 5.7rem;
  margin-right: 0.45rem;
}

.post-series-item.is-current a {
  text-decoration-style: dotted;
}

.post-next-recommendation {
  margin-top: 1.8rem;
}

.post-next-card {
  border: 1px dashed currentColor;
  border-radius: 0.3rem;
  padding: 0.85rem 0.95rem;
}

.post-next-card p {
  margin: 0;
}

.post-next-card p + p {
  margin-top: 0.35rem;
}

.post-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.post-nav a {
  display: block;
  padding: 0.9rem 1rem;
  border: 1px dashed currentColor;
  border-radius: 0.3rem;
  text-decoration: none;
}

.post-nav a:hover {
  text-decoration: underline;
}

.post-nav-label {
  display: block;
  margin-bottom: 0.35rem;
}

.related-posts {
  margin-top: 2rem;
}

.related-posts h2 {
  margin-bottom: 0.8rem;
}

.related-posts h2::before {
  content: "";
}

.related-posts ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-posts li {
  padding: 0.8rem 0;
  border-top: 1px dashed currentColor;
}

.related-posts li:first-child {
  border-top: 0;
}

.related-posts time {
  display: inline-block;
  margin-right: 0.5rem;
}

@media (max-width: 30em) {
  header .desc {
    display: none;
  }

  .nav-mobile-grid {
    flex-wrap: wrap;
    row-gap: 1.5rem;
  }

  .nav-mobile-grid a {
    flex-basis: 50%;
  }

  .nav-mobile-grid.nav-cols-3 a {
    flex-basis: 33.333%;
  }

  .nav-mobile-grid.nav-cols-4 a {
    flex-basis: 25%;
  }

  .nav-mobile-grid.nav-cols-5 a {
    flex-basis: 20%;
  }

  .nav-mobile-grid.nav-cols-6 a {
    flex-basis: 16.666%;
  }

  .nav-mobile-grid.nav-cols-7 a {
    flex-basis: 14.285%;
  }

  .nav-mobile-grid.nav-cols-8 a {
    flex-basis: 12.5%;
  }
}

/* Home page */
.home-search-google {
  margin: 2.5rem 0 2rem;
}

.search-title {
  text-align: left;
  margin-bottom: 1rem;
}

.search-shell {
  max-width: 760px;
  margin: 0 auto;
}

.search-suggestions {
  max-width: 760px;
  margin: 0.6rem auto 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.search-suggestions-label {
  color: var(--muted);
}

.search-suggestion {
  border: 1px dashed currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.85rem;
  padding: 0.06rem 0.5rem;
  cursor: pointer;
}

.search-suggestion:hover {
  text-decoration: underline;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px dashed var(--border);
  border-radius: 0.3rem;
  padding: 0.2rem 0.45rem 0.2rem 0.85rem;
  background: var(--surface-alt);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.search-input-wrap:focus-within {
  border-color: var(--border);
  background: var(--bg);
}

.search-input-wrap input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 0.8rem 0;
  font-size: 1rem;
  background: transparent;
}

.search-input-wrap button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 0.2rem;
}

.search-input-wrap button:hover {
  background: var(--surface);
}

.search-status {
  max-width: 760px;
  margin: 0.9rem auto 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.home-search-results {
  list-style: none;
  padding: 0;
  margin: 0 auto 2rem;
  max-width: 760px;
}

.home-search-results li {
  padding: 0.9rem 0;
  border-bottom: 1px dashed var(--border);
}

.home-search-results h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.home-search-results h3 a {
  text-decoration: none;
}

.home-search-results h3 a:hover {
  text-decoration: underline;
}

.home-search-results small {
  display: inline-block;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.home-search-results p {
  margin: 0.2rem 0 0;
  color: var(--text);
  line-height: 1.65;
}

.home-intro p {
  margin: 0.4rem 0;
}

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

.home-post-list li {
  margin: 0 0 0.35rem;
}

.home-inline-meta {
  color: var(--muted);
}

.home-post-list .home-inline-meta::before,
.home-gallery-line span::before {
  content: "· ";
  color: var(--muted);
}

.home-gallery-line {
  margin: -0.6rem 0 2rem;
  color: var(--muted);
}

.home-gallery-line a + a::before {
  content: "· ";
  color: var(--muted);
  text-decoration: none;
}

.home-discovery {
  margin: 0 0 2rem;
}

.home-discovery h1 {
  margin-bottom: 0.75rem;
}

.home-discovery h1::before,
.home-on-this-day h2::before {
  content: "";
}

.home-random-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.home-random-refresh {
  border: 1px dashed currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0.08rem 0.5rem;
  cursor: pointer;
}

.home-random-refresh:hover {
  text-decoration: underline;
}

.home-on-this-day h2 {
  margin: 0 0 0.6rem;
}

.home-on-this-day ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-on-this-day li {
  padding: 0.55rem 0;
  border-top: 1px dashed currentColor;
}

.home-on-this-day li:first-child {
  border-top: 0;
  padding-top: 0;
}

.home-on-this-day time {
  display: inline-block;
  min-width: 6.1rem;
  margin-right: 0.45rem;
}

/* 404 page */
.not-found-page .not-found-lead {
  margin-bottom: 0.8rem;
}

.not-found-path {
  color: var(--muted);
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}

.not-found-back-btn {
  border: 1px dashed currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  padding: 0.08rem 0.7rem;
  font: inherit;
  cursor: pointer;
}

.not-found-back-btn:hover {
  text-decoration: underline;
}

.not-found-search {
  margin: 0 0 1.6rem;
}

.not-found-suggested {
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.not-found-recent h2::before,
.not-found-search h2::before {
  content: "";
}

/* Archive page */
.archive-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1.5rem;
  padding: 0 0 1rem;
  border-bottom: 1px dashed currentColor;
}

.archive-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.archive-filter button {
  border: 1px dashed currentColor;
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.35;
}

.archive-filter button.active,
.archive-filter button:hover {
  text-decoration: underline;
}

.archive-filter-link {
  margin: 0;
}

.archive-item-tags {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

.archive-item-tags a {
  text-decoration: none;
}

.archive-item-tags a:hover {
  text-decoration: underline;
}

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

.archive-item {
  margin: 0 0 0.45rem;
}

.archive-date {
  color: var(--muted);
}

.archive-date::before {
  content: "· ";
  color: var(--muted);
}

.archive-empty {
  margin: 0 0 1rem;
}

[hidden] {
  display: none !important;
}

/* Taxonomy page */
.taxonomy-header {
  margin-bottom: 1.5rem;
}

.taxonomy-note {
  margin-top: 0.8rem;
}

.taxonomy-toolbar {
  margin: 0 0 1.5rem;
  padding: 0 0 1rem;
  border-bottom: 1px dashed currentColor;
}

.taxonomy-overview {
  margin-top: 0.45rem;
  color: var(--muted);
}

.taxonomy-tag-tools {
  margin: 0 0 1rem;
}

.taxonomy-tag-filter-box {
  border: 1px dashed var(--border);
  border-radius: 0.3rem;
  padding: 0.2rem 0.7rem;
  background: var(--surface-alt);
  max-width: 760px;
}

.taxonomy-tag-filter-box:focus-within {
  border-color: var(--border);
  background: var(--bg);
}

.taxonomy-tag-filter-box input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0.6rem 0;
  background: transparent;
  font-size: 1rem;
}

.taxonomy-tag-sort {
  display: flex;
  gap: 0.5rem;
  margin: 0.7rem 0 0.35rem;
}

.taxonomy-tag-sort button {
  border: 1px dashed currentColor;
  border-radius: 999px;
  padding: 0.08rem 0.65rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.taxonomy-tag-sort button:hover,
.taxonomy-tag-sort button.active {
  text-decoration: underline;
}

.taxonomy-tag-status {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.taxonomy-search-advanced {
  margin-top: 0.75rem;
}

.taxonomy-search-title {
  margin: 0;
  color: var(--muted);
}

.tag-search {
  max-width: 760px;
  margin: 0.8rem 0 0;
}

.tag-search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px dashed var(--border);
  border-radius: 0.3rem;
  padding: 0.2rem 0.45rem 0.2rem 0.85rem;
  background: var(--surface-alt);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.tag-search-box:focus-within {
  border-color: var(--border);
  background: var(--bg);
}

.tag-search-box input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 0.8rem 0;
  font-size: 1rem;
  background: transparent;
}

.tag-search-box button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 0.2rem;
}

.tag-search-box button:hover {
  background: var(--surface);
}

.tag-search-status {
  color: var(--muted);
  margin: 0.9rem 0 1rem;
  font-size: 0.9rem;
}

.tag-search-results {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.tag-search-results li {
  padding: 0.9rem 0;
  border-bottom: 1px dashed var(--border);
}

.tag-search-results h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.tag-search-results p {
  margin: 0.2rem 0 0;
  color: var(--text);
  line-height: 1.65;
}

.tag-search-results small {
  color: var(--muted);
}

.taxonomy-terms {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
}

.taxonomy-terms li {
  padding: 0;
  margin: 0;
}

.taxonomy-term-count {
  color: var(--muted);
}

.taxonomy-tags-page .taxonomy-terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.8rem;
}

.taxonomy-term-item {
  border-radius: 0.3rem;
  padding: 0.6rem 0.7rem;
}

.taxonomy-term-item .taxonomy-term-count {
  margin-left: 0.3rem;
}

.taxonomy-term-latest {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
}

.taxonomy-tags-empty {
  margin-top: 0.8rem;
  color: var(--muted);
}

/* Gallery detail page */
.gallery-detail-backlink {
  margin-bottom: 1rem;
}

.gallery-detail-meta {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.gallery-detail-tags a {
  text-decoration: none;
}

.gallery-detail-tags a:hover {
  text-decoration: underline;
}

.gallery-detail-desc {
  margin-bottom: 1.5rem;
}

/* Project detail page */
.project-page .project-lead {
  margin: -0.5rem 0 1rem;
  color: var(--muted);
}

.project-page .project-cover {
  margin: 0.8rem 0 1rem;
}

.project-page .project-cover img {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.project-page .project-meta,
.project-page .project-actions,
.project-page .project-stack,
.project-page .project-tags,
.project-page .project-back {
  color: var(--muted);
}

.project-page .project-meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.project-page .project-meta-badge {
  padding: 0 0.45rem;
  border: 1px dashed currentColor;
  border-radius: 999px;
}

.project-page .project-actions,
.project-page .project-stack,
.project-page .project-tags {
  margin: 0.35rem 0;
}

.project-page .project-tags a {
  text-decoration: none;
}

.project-page .project-tags a:hover {
  text-decoration: underline;
}

.project-page .project-back {
  margin-top: 2rem;
}

/* Projects list page */
.projects-page .projects-intro {
  margin-bottom: 2rem;
}

.projects-page .project-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.projects-page .project-card {
  padding: 1rem 0 1.2rem;
  border-top: 1px dashed currentColor;
}

.projects-page .project-card:first-child {
  border-top: 0;
  padding-top: 0;
}

.projects-page .project-card h2 {
  margin: 0 0 0.5rem;
}

.projects-page .project-card h2::before {
  content: "";
}

.projects-page .project-card-cover {
  margin: 0 0 0.7rem;
}

.projects-page .project-card-cover a {
  display: block;
}

.projects-page .project-card-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.projects-page .project-topline,
.projects-page .project-links,
.projects-page .project-stack {
  color: var(--muted);
}

.projects-page .project-topline {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.projects-page .project-status {
  padding: 0 0.45rem;
  border: 1px dashed currentColor;
  border-radius: 999px;
}

.projects-page .project-description {
  margin-bottom: 0.6rem;
}

.projects-page .project-stack,
.projects-page .project-links {
  margin: 0.35rem 0 0;
}

/* Updates page */
.updates-page .updates-intro {
  margin-bottom: 1.6rem;
}

.updates-meta {
  margin-bottom: 1rem;
  color: var(--muted);
}

.updates-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.updates-item {
  padding: 0.85rem 0;
  border-top: 1px dashed currentColor;
}

.updates-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.updates-item-meta {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 0.28rem;
  color: var(--muted);
}

.updates-kind {
  border: 1px dashed currentColor;
  border-radius: 999px;
  padding: 0 0.45rem;
}

/* Taxonomy term detail page */
.taxonomy-detail-backlink {
  margin-bottom: 1rem;
}

.taxonomy-detail-meta {
  margin: -0.6rem 0 1rem;
  color: var(--muted);
}

.taxonomy-detail-filter-box {
  border: 1px dashed var(--border);
  border-radius: 0.3rem;
  padding: 0.2rem 0.7rem;
  background: var(--surface-alt);
  max-width: 760px;
  margin-bottom: 0.55rem;
}

.taxonomy-detail-filter-box:focus-within {
  border-color: var(--border);
  background: var(--bg);
}

.taxonomy-detail-filter-box input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0.6rem 0;
  background: transparent;
  font-size: 1rem;
}

.taxonomy-detail-filter-status {
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.taxonomy-detail-year-block + .taxonomy-detail-year-block {
  margin-top: 1.2rem;
}

.taxonomy-detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.taxonomy-detail-item {
  padding: 0.7rem 0;
  border-top: 1px dashed currentColor;
}

.taxonomy-detail-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.taxonomy-detail-date {
  display: inline-block;
  min-width: 5.4rem;
  margin-right: 0.45rem;
}

.taxonomy-detail-empty {
  color: var(--muted);
  margin-top: 0.9rem;
}

/* Gallery listing pages */
.gallery-archive {
  max-width: 72rem;
  margin: 0 auto;
}

.gallery-header {
  margin-bottom: 2rem;
}

.gallery-intro {
  max-width: 62ch;
}

.gallery-note {
  margin-top: 0.8rem;
}

.gallery-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1.5rem;
  padding: 0 0 1rem;
  border-bottom: 1px dashed currentColor;
}

.gallery-toolbar p {
  margin: 0;
}

.gallery-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gallery-filter button {
  border: 1px dashed currentColor;
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.gallery-filter button.active,
.gallery-filter button:hover {
  text-decoration: underline;
}

.gallery-filter-count {
  opacity: 0.75;
  font-size: 0.9em;
}

.gallery-empty {
  margin-top: 1rem;
}

.gallery-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 2rem;
  padding: 0 0 1rem;
  border-bottom: 1px dashed currentColor;
}

.gallery-jump a {
  text-decoration: none;
}

.gallery-jump a:hover {
  text-decoration: underline;
}

.gallery-year + .gallery-year {
  margin-top: 2.5rem;
}

.gallery-year-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.gallery-year-head h2 {
  margin: 0;
}

.gallery-year-count {
  margin: 0;
}

.gallery-list {
  display: grid;
  gap: 0.9rem;
}

.gallery-entry {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed currentColor;
  align-items: start;
}

.gallery-visual {
  min-width: 0;
}

.gallery-cover {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  text-decoration: none;
  position: relative;
}

.gallery-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-count-badge {
  position: absolute;
  right: 0.35rem;
  bottom: 0.35rem;
  padding: 0.05rem 0.35rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border-radius: 0.2rem;
  font-size: 0.75rem;
}

.gallery-cover-empty {
  align-items: center;
  justify-content: center;
  border: 1px dashed currentColor;
  color: inherit;
  display: flex;
}

.gallery-copy {
  min-width: 0;
}

.gallery-copy h3 {
  margin: 0 0 0.7rem;
}

.gallery-copy h3::before {
  content: "";
}

.gallery-copy p {
  margin: 0 0 0.75rem;
}

.gallery-meta {
  margin-bottom: 0.5rem;
}

.gallery-backlink {
  margin-bottom: 1rem;
}

@media (max-width: 42em) {
  .gallery-year-head {
    display: block;
  }

  .gallery-entry {
    grid-template-columns: 1fr;
  }

  .gallery-visual {
    max-width: 16rem;
  }
}

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--link-hover);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 51, 0, 0.25);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
