/* --- Progress bar --- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--green);
  z-index: 9999;
  transition: width 0.1s linear;
  pointer-events: none;
  isolation: isolate;
}

/* ========================================
   ChunkyMonkey — stylesheet
   Fonts: DM Sans (body), IBM Plex Mono (mono)
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #28262c;
  --text:       #f5f0e5;
  --accent:     #f78da7;   /* pink — nav, titles */
  --mono-dim:   #abb8c3;   /* blue-grey — dates, footer */
  --green:      #00d084;   /* teal-green — archive label */
  --border:     rgba(0, 208, 132, 0.4);
  --max-w:      1200px;
  --gap:        4px;
}

html { font-size: 18px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* --- Header --- */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem 0;
}

.logo-link { display: block; }

.site-logo {
  width: clamp(280px, 50vw, 520px);
  height: auto;
}

nav {
  display: flex;
  gap: 3rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
}

nav a {
  color: var(--accent);
  font-weight: 400;
  transition: color 0.2s, opacity 0.2s;
}
nav a:hover { opacity: 0.7; }
nav a.nav-active { color: var(--green); opacity: 1; }

/* --- Gallery Grid (home) --- */
/* Fluid: auto-fill with min ~560px per column — matches original WP behavior.
   1 col on mobile, 2 cols on tablet/desktop, 3+ on very wide screens. */
.gallery-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(35rem, 100%), 1fr));
  gap: 24px;
  padding: 0 min(30px, 5vw);
}

/* Each card: meta on top, image below, gap 20px between — exact WP structure */
.gallery-item a {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* META BLOCK — rounded top-right corner like original */
.gallery-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 0px 15px 0px 0px;
  padding: 0 0 0 0;
}

/* TITLE — teal/green like original (not pink) */
.gallery-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--green);
}

/* DATE PILL — rounded top corners, calendar icon via mask-image */
.gallery-date {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--mono-dim);
  padding: 0px 7px;
  border-radius: 10px 10px 0px 0px;
}

/* Calendar icon via SVG mask — exactly as the original */
.gallery-date::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-color: var(--mono-dim);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M19.5 7.5H4.5V19.0005C4.5 19.2764 4.72363 19.5 4.9995 19.5H19.0005C19.2764 19.5 19.5 19.2764 19.5 19.0005V7.5ZM3 7.5V4.9995V4.995C3 3.89319 3.89319 3 4.995 3H4.9995H19.0005H19.005C20.1068 3 21 3.89319 21 4.995V4.9995V7.5V19.0005C21 20.1048 20.1048 21 19.0005 21H4.9995C3.89521 21 3 20.1048 3 19.0005V7.5ZM7.5 10.5H9V12H7.5V10.5ZM9 15H7.5V16.5H9V15ZM11.25 10.5H12.75V12H11.25V10.5ZM12.75 15H11.25V16.5H12.75V15ZM15 10.5H16.5V12H15V10.5ZM16.5 15H15V16.5H16.5V15Z' fill='currentColor'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M19.5 7.5H4.5V19.0005C4.5 19.2764 4.72363 19.5 4.9995 19.5H19.0005C19.2764 19.5 19.5 19.2764 19.5 19.0005V7.5ZM3 7.5V4.9995V4.995C3 3.89319 3.89319 3 4.995 3H4.9995H19.0005H19.005C20.1068 3 21 3.89319 21 4.995V4.9995V7.5V19.0005C21 20.1048 20.1048 21 19.0005 21H4.9995C3.89521 21 3 20.1048 3 19.0005V7.5ZM7.5 10.5H9V12H7.5V10.5ZM9 15H7.5V16.5H9V15ZM11.25 10.5H12.75V12H11.25V10.5ZM12.75 15H11.25V16.5H12.75V15ZM15 10.5H16.5V12H15V10.5ZM16.5 15H15V16.5H16.5V15Z' fill='currentColor'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* IMAGE WRAPPER — shadow + slight background tint + top-right micro-radius */
.gallery-thumb-wrap {
  box-shadow: rgba(0, 0, 0, 0.2) 6px 6px 9px 0px;
}

.gallery-thumb {
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: rgba(171, 183, 194, 0.07);
  border-radius: 0px 3px 0px 0px;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.gallery-item:hover .gallery-thumb img {
  transform: scale(1.02);
  opacity: 0.88;
}

/* --- Post detail --- */
.post-main {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.post-header {
  padding: 2rem 0 1.5rem;
}

.post-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--accent);
}

.post-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}

.post-figure {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: auto;
  margin: 0;
}

.post-figure a {
  display: block;
}

.post-figure img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.3s ease;
}

.post-figure:hover img {
  opacity: 0.85;
}

@media (max-width: 480px) {
  .post-gallery { gap: 4px; }
  .post-figure { flex-basis: 100%; }
}

/* Post nav */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem 0;
  margin-top: 4rem;
  position: relative;
}

.post-nav-line {
  border: none;
  margin: 0;
}
.post-nav-line-left  { grid-column: 1; }
.post-nav-line-right { grid-column: 2; }

.post-nav-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: var(--mono-dim);
  transition: color 0.2s;
  padding-top: 0.4rem;
}
.post-nav-link:hover { color: var(--text); }
.post-nav-prev { grid-column: 1; grid-row: 2; }
.post-nav-next { grid-column: 2; grid-row: 2; text-align: right; }

/* --- Footer --- */
footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 2rem 2rem;
  margin-top: auto;
  gap: 2rem;
}

.footer-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.footer-copy {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--mono-dim);
}

.footer-right {
  text-align: right;
}

.footer-archive-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: var(--green);
  margin-bottom: 0.4rem;
}

.footer-archive {
  list-style: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--mono-dim);
  line-height: 1.9;
}

.footer-archive a {
  color: var(--mono-dim);
  transition: color 0.2s;
}
.footer-archive a:hover { color: var(--text); }

/* --- Post description --- */
.post-date {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--mono-dim);
  margin-top: 0.3rem;
}

.post-description {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  color: var(--mono-dim);
  line-height: 1.75;
  margin: 0 0 2rem;
  padding: 0;
}

/* Post nav (updated layout) */
.post-nav {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2rem;
}

.post-nav-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-nav-row:last-child {
  text-align: right;
}

/* --- About page --- */
.about-main {
  flex: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-main p {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--text);
}

/* --- Not found --- */
.not-found {
  padding: 3rem 0;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--mono-dim);
}
.not-found a { color: var(--accent); }

/* --- Responsive --- */
@media (max-width: 700px) {
  nav {
    gap: 1.5rem;
    font-size: 0.8rem;
  }

  footer {
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-right {
    text-align: left;
  }
}
.footer-archive a.active {
  color: var(--green);
}

/* --- Toolbar (size slider + year filter) --- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px min(30px, 5vw) 16px;
}

.toolbar-slider {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  color: var(--mono-dim);
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.toolbar-slider input[type=range] {
  width: 120px;
  accent-color: var(--green);
  cursor: pointer;
}

.toolbar-years {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar-years a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  color: var(--mono-dim);
  letter-spacing: 0.04em;
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s;
}

.toolbar-years a:hover { color: var(--text); }

.toolbar-years a.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

@media (max-width: 600px) {
  .toolbar { flex-wrap: wrap; gap: 12px; }
}

@media (max-width: 480px) {
  .toolbar-slider { display: none; }
}


.gallery-grid.view-list .gallery-item a {
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 208, 132, 0.1);
}

.gallery-grid.view-list .gallery-thumb-wrap {
  flex-shrink: 0;
  width: 80px;
  box-shadow: none;
}

.gallery-grid.view-list .gallery-thumb {
  width: 80px;
  height: 50px;
  aspect-ratio: unset;
  border-radius: 2px;
}

.gallery-grid.view-list .gallery-meta {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.gallery-grid.view-list .gallery-date {
  border-radius: 0;
  padding: 0;
}

/* --- Scroll to top button --- */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 36px;
  height: 36px;
  background: var(--bg);
  color: var(--green);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  transform: translateY(-2px);
}

/* --- Lazy fade-in --- */
.gallery-thumb img,
.post-figure img {
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.4s ease;
}

.gallery-thumb img.loaded,
.post-figure img.loaded {
  opacity: 1;
}

.gallery-item:hover .gallery-thumb img.loaded {
  transform: scale(1.02);
  opacity: 0.88;
}

/* --- Page transitions --- */
body {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-out {
  animation: fadeOut 0.25s ease forwards;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* --- Card cascade entry animation --- */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gallery-item {
  animation: cardIn 0.4s ease both;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 18, 22, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  display: block;
  opacity: 0;
  cursor: zoom-in;
  transition: opacity 0.2s ease;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-img.visible {
  opacity: 1;
}

.lightbox-close {
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--mono-dim);
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: color 0.15s;
  z-index: 201;
}

.lightbox-close:hover { color: var(--text); }

.lightbox-full {
  position: fixed;
  top: 1.2rem;
  right: 5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--mono-dim);
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color 0.15s;
  z-index: 201;
}

.lightbox-full:hover { color: var(--green); }

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: var(--mono-dim);
  background: none;
  border: none;
  cursor: pointer;
  padding: 1rem;
  transition: color 0.15s;
  z-index: 201;
  user-select: none;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-prev:hover,
.lightbox-next:hover { color: var(--text); }

.lightbox-prev.hidden,
.lightbox-next.hidden { opacity: 0; pointer-events: none; }

.lightbox-counter {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  color: var(--mono-dim);
  letter-spacing: 0.1em;
  z-index: 201;
}

/* --- 404 page --- */
.error-code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 20rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  margin: 0;
}

.error-msg {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  color: var(--mono-dim);
  margin: 0.8rem 0 2rem;
}

.error-back {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--green);
  transition: opacity 0.2s;
}

.error-back:hover { opacity: 0.7; }

/* --- Works counter --- */
.works-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  color: var(--mono-dim);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* --- Toolbar right group --- */
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* --- Noise background --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

header, main, footer, .toolbar {
  position: relative;
  z-index: 1;
}

/* --- Card hover --- */
.gallery-item:hover .gallery-thumb-wrap {
  box-shadow: 0 -2px 0 0 var(--green), rgba(0, 0, 0, 0.2) 6px 6px 9px 0px;
}

.gallery-item:hover .gallery-meta {
  transform: translateY(-2px);
  transition: transform 0.25s ease;
}

.gallery-meta {
  transition: transform 0.25s ease;
}

.gallery-item:hover .gallery-title {
  color: var(--text);
}

/* --- 404 glitch --- */
@keyframes glitch-1 {
  0%, 90%, 100% { clip-path: inset(0 0 100% 0); transform: translate(0); }
  92%           { clip-path: inset(20% 0 60% 0); transform: translate(-4px, 1px); }
  94%           { clip-path: inset(50% 0 30% 0); transform: translate(4px, -1px); }
  96%           { clip-path: inset(70% 0 10% 0); transform: translate(-3px, 2px); }
  98%           { clip-path: inset(10% 0 80% 0); transform: translate(3px, -2px); }
}

@keyframes glitch-2 {
  0%, 90%, 100% { clip-path: inset(0 0 100% 0); transform: translate(0); }
  93%           { clip-path: inset(40% 0 40% 0); transform: translate(4px, -1px); }
  95%           { clip-path: inset(60% 0 20% 0); transform: translate(-4px, 1px); }
  97%           { clip-path: inset(15% 0 70% 0); transform: translate(3px, 2px); }
  99%           { clip-path: inset(80% 0 5%  0); transform: translate(-3px, -1px); }
}

.error-code {
  position: relative;
}

.error-code::before,
.error-code::after {
  content: '404';
  position: absolute;
  inset: 0;
  font-size: inherit;
  font-family: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.error-code::before {
  color: #f04;
  animation: glitch-1 4s infinite;
  left: 0;
}

.error-code::after {
  color: #0cf;
  animation: glitch-2 4s infinite 0.1s;
  left: 0;
}

/* --- Page transitions --- */
body {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-out {
  animation: fadeOut 0.25s ease forwards;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* --- Card cascade entry animation --- */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gallery-item {
  animation: cardIn 0.4s ease both;
}

/* --- Works counter --- */
.works-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  color: var(--mono-dim);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* --- Toolbar right group --- */
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* --- Scroll to top button --- */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 36px;
  height: 36px;
  background: var(--bg);
  color: var(--green);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  transform: translateY(-2px);
}

/* --- Lazy fade-in --- */
.gallery-thumb img,
.post-figure img {
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.4s ease;
}

.gallery-thumb img.loaded,
.post-figure img.loaded {
  opacity: 1;
}

.gallery-item:hover .gallery-thumb img.loaded {
  transform: scale(1.02);
  opacity: 0.88;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 18, 22, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  display: block;
  opacity: 0;
  cursor: zoom-in;
  transition: opacity 0.2s ease;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-img.visible {
  opacity: 1;
}

.lightbox-close {
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--mono-dim);
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: color 0.15s;
  z-index: 201;
}

.lightbox-close:hover { color: var(--text); }

.lightbox-full {
  position: fixed;
  top: 1.2rem;
  right: 5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--mono-dim);
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color 0.15s;
  z-index: 201;
}

.lightbox-full:hover { color: var(--green); }

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: var(--mono-dim);
  background: none;
  border: none;
  cursor: pointer;
  padding: 1rem;
  transition: color 0.15s;
  z-index: 201;
  user-select: none;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-prev:hover,
.lightbox-next:hover { color: var(--text); }

.lightbox-prev.hidden,
.lightbox-next.hidden { opacity: 0; pointer-events: none; }

.lightbox-counter {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  color: var(--mono-dim);
  letter-spacing: 0.1em;
  z-index: 201;
}

/* --- 404 page --- */
.error-code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 20rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  margin: 0;
}

.error-msg {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  color: var(--mono-dim);
  margin: 0.8rem 0 2rem;
}

.error-back {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--green);
  transition: opacity 0.2s;
}

.error-back:hover { opacity: 0.7; }
