/* asvarga.com — one stylesheet for every page. Plain CSS, no build step.
   Colours are tokens on :root; dark mode follows the system unless the
   theme toggle (assets/site.js) pins one via <html data-theme>. */

:root {
  --accent: #d84315;        /* deep orange, readable as link text */
  --accent-hi: #ff5722;     /* deep orange, decorative */
  --accent-soft: #fff0e8;
  --bg: #fcfbf9;
  --card: #ffffff;
  --line: #ebe6e1;
  --text: #1d1a17;
  --muted: #6e665f;
  --code-bg: #f5f1ec;
  --chip-fg: #a53a0c;   /* inline code and math */
  --chip-bg: #fff1e9;
  --chip-line: #f6d3c1;
  --shadow: 0 1px 2px rgb(40 20 0 / 0.04), 0 4px 16px rgb(40 20 0 / 0.05);
  --img-filter: none;
  /* Fonts load from Google Fonts in each page's <head>; the system stacks are fallbacks. */
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --display: "Bricolage Grotesque", var(--sans);
  --measure: 44rem;
  --wide: 64rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #ff8a5c;
    --accent-hi: #ff6e42;
    --accent-soft: #3a2117;
    --bg: #131110;
    --card: #1c1917;
    --line: #2f2a26;
    --text: #ece7e2;
    --muted: #a39a92;
    --code-bg: #1f1b18;
    --chip-fg: #ffb48f;
    --chip-bg: #2b1a12;
    --chip-line: #4a2b1d;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 4px 16px rgb(0 0 0 / 0.25);
    --img-filter: brightness(0.82) contrast(1.06); /* tame white diagrams */
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: #ff8a5c;
  --accent-hi: #ff6e42;
  --accent-soft: #3a2117;
  --bg: #131110;
  --card: #1c1917;
  --line: #2f2a26;
  --text: #ece7e2;
  --muted: #a39a92;
  --code-bg: #1f1b18;
  --chip-fg: #ffb48f;
  --chip-bg: #2b1a12;
  --chip-line: #4a2b1d;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 4px 16px rgb(0 0 0 / 0.25);
  --img-filter: brightness(0.82) contrast(1.06);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body::before { /* the thin orange strip along the top */
  content: "";
  height: 3px;
  background: linear-gradient(90deg, var(--accent-hi), #ff9e40 60%, var(--accent-hi));
}
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--accent-hi); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; border-radius: 3px; }
img, video, canvas, iframe { max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.015em; font-weight: 650; }
/* Display face: only the big headings and the wordmark. Smaller headings stay in Geist. */
.brand, .hero h1, .page-head h1, .post-head h1, .section-head h2, .notfound h1 {
  font-family: var(--display); font-weight: 620; font-optical-sizing: auto;
}
code, pre, kbd, samp { font-family: var(--mono); font-size: 0.88em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 1rem; }
main { flex: 1; padding: 2.5rem 0 4rem; }
main > .wrap.narrow { max-width: calc(var(--measure) + 2rem); }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding-top: 0.9rem; padding-bottom: 0.9rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--text); text-decoration: none; font-weight: 650; letter-spacing: -0.01em;
}
.brand svg { width: 1.6rem; height: 1.6rem; color: var(--accent-hi); transition: transform 0.3s ease; }
.brand:hover svg { transform: rotate(180deg); }
.site-nav { display: flex; align-items: center; gap: 0.25rem; font-size: 0.95rem; }
.site-nav a {
  color: var(--muted); text-decoration: none; padding: 0.3rem 0.65rem; border-radius: 999px;
  transition: color 0.15s, background-color 0.15s;
}
.site-nav a:hover { color: var(--text); background: var(--accent-soft); }
.site-nav a[aria-current] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.theme-toggle {
  margin-left: 0.25rem; border: 1px solid var(--line); background: transparent; color: var(--muted);
  width: 2rem; height: 2rem; border-radius: 999px; cursor: pointer; display: grid; place-items: center;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 1rem; height: 1rem; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

/* Phones: keep the name and the nav on one row where it fits (wraps below ~360px). */
@media (max-width: 30rem) {
  .site-header .wrap { gap: 0.4rem 0.5rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .brand { font-size: 0.95rem; gap: 0.4rem; }
  .brand svg { width: 1.3rem; height: 1.3rem; }
  .site-nav { gap: 0; font-size: 0.9rem; }
  .site-nav a { padding: 0.3rem 0.45rem; }
  .theme-toggle { margin-left: 0.15rem; width: 1.9rem; height: 1.9rem; }
}

@media (max-width: 23rem) {
  .brand { font-size: 0.9rem; gap: 0.3rem; }
  .brand svg { width: 1.15rem; height: 1.15rem; }
  .site-nav { font-size: 0.86rem; }
  .site-nav a { padding: 0.3rem 0.36rem; }
  .theme-toggle { width: 1.75rem; height: 1.75rem; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 2rem; padding-top: 1.5rem; padding-bottom: 2rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.95rem; }
/* Social links are brand icons (Simple Icons, CC0); the name is the label and tooltip. */
.site-footer .social { display: inline-flex; transition: color 0.15s, transform 0.15s; }
.site-footer .social svg { width: 1.1rem; height: 1.1rem; }
.site-footer .social:hover, .site-footer .social:focus-visible { transform: translateY(-1px); }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
/* The footer's ⓘ: publish time and commit in a tooltip (filled by site.js). */
.site-footer .build-info {
  position: relative; display: inline-flex; vertical-align: -0.15em; margin-left: 0.25rem;
  color: var(--muted); opacity: 0.65; transition: opacity 0.15s, color 0.15s;
}
.site-footer .build-info svg { width: 0.95em; height: 0.95em; }
.site-footer .build-info:hover, .site-footer .build-info:focus-visible { opacity: 1; color: var(--accent); }
.build-tip {
  position: absolute; bottom: calc(100% + 0.5rem); left: -0.6rem; z-index: 10;
  white-space: nowrap; padding: 0.35rem 0.6rem; border-radius: 0.45rem;
  background: var(--text); color: var(--bg); font: 0.75rem/1.4 var(--mono); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(3px); pointer-events: none; transition: opacity 0.15s, transform 0.15s;
}
.build-tip::after { /* the little pointer */
  content: ""; position: absolute; top: 100%; left: 0.85rem;
  border: 5px solid transparent; border-top-color: var(--text);
}
.build-info:hover .build-tip, .build-info:focus-visible .build-tip { opacity: 1; transform: none; }
.build-tip:empty { display: none; } /* nothing to show until build.json loads */

/* The footer's 🐸: the Div Jumper bookmarklet, faint until hovered. */
.site-footer .summon {
  display: inline-block; opacity: 0.35; filter: grayscale(1);
  transition: opacity 0.2s, filter 0.2s, transform 0.2s;
}
.site-footer .summon:hover, .site-footer .summon:focus-visible { opacity: 1; filter: none; transform: translateY(-2px) rotate(-8deg); }

/* ---------- Shared bits ---------- */
.eyebrow {
  font: 500 0.78rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 0.6rem;
}
.page-head { margin-bottom: 2.5rem; }
.page-head h1 { font-size: clamp(2.1rem, 6vw, 2.8rem); letter-spacing: -0.02em; margin: 0; }
.page-head p { color: var(--muted); font-size: 1.1rem; margin: 0.6rem 0 0; max-width: 40rem; }
.meta { font: 0.85rem/1.5 var(--mono); color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.6rem; }
.meta > * + *::before { content: "·"; margin-right: 0.6rem; opacity: 0.6; }
.tags { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; }
.meta .tags::before { content: none; }
.tag {
  font: 500 0.75rem/1 var(--mono); color: var(--accent); background: var(--accent-soft);
  padding: 0.3rem 0.55rem; border-radius: 999px; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
}
a.tag:hover, button.tag:hover { border-color: var(--accent); }
button.tag[aria-pressed="true"] { background: var(--accent); color: var(--bg); }
.arrow { display: inline-block; transition: transform 0.15s; }
a:hover .arrow { transform: translateX(3px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 1.25rem; }
.section-head h2 { font-size: 1.35rem; margin: 0; }
.section-head a { font-size: 0.92rem; text-decoration: none; font-weight: 550; }

/* ---------- Home ---------- */
.hero { position: relative; padding: 2rem 0 3.5rem; }
.hero h1 { font-size: clamp(2.6rem, 9vw, 4.2rem); letter-spacing: -0.025em; line-height: 1.02; margin: 0; }
.hero h1 .hi { color: var(--accent-hi); }
.hero .lede { font-size: clamp(1.1rem, 2.6vw, 1.3rem); color: var(--muted); max-width: 38rem; margin: 1.25rem 0 0; }
.hero .lede strong { color: var(--text); font-weight: 600; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.6rem 1.1rem; border-radius: 0.6rem;
  font-weight: 600; font-size: 0.95rem; text-decoration: none; border: 1px solid var(--line);
  color: var(--text); background: var(--card); box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: var(--accent-hi); border-color: var(--accent-hi); color: #fff; }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }
.wave { display: block; width: 100%; height: 22px; color: var(--accent-hi); opacity: 0.35; margin: 0 0 3rem; }
.home-grid { display: grid; gap: 3.5rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
@media (max-width: 52rem) { .home-grid { grid-template-columns: minmax(0, 1fr); } }

/* Post list (home + blog index) */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list > li { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.post-list > li:first-child { border-top: 0; padding-top: 0; }
.post-list h3 { font-size: 1.15rem; margin: 0.15rem 0 0.25rem; }
.post-list h3 a { color: var(--text); text-decoration: none; }
.post-list h3 a:hover { color: var(--accent); }
.post-list p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.97rem; }

/* Cards (featured projects + projects page) */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); list-style: none; margin: 0; padding: 0; }
.home-grid .cards { grid-template-columns: minmax(0, 1fr); }
.card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 0.8rem;
  padding: 1.1rem 1.25rem; box-shadow: var(--shadow); transition: border-color 0.15s, transform 0.15s;
  display: flex; flex-direction: column; gap: 0.35rem;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h3 { font-size: 1.08rem; margin: 0; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* whole card clickable */
.card h3 a:hover { color: var(--accent); }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card .links { margin-top: auto; padding-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; font-size: 0.88rem; align-items: center; }
.card .links a { position: relative; z-index: 1; text-decoration: none; font-weight: 550; }
.card .links a:hover { text-decoration: underline; }
.card .ext { font-size: 0.8em; color: var(--muted); }

/* ---------- Projects page: a gallery of tiles, each led by a full-bleed preview ---------- */
.project-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr)); gap: 1.25rem; }
.project-grid .card { padding: 0; overflow: hidden; gap: 0.35rem; }
.project-grid .card > :not(.shot) { margin-left: 1.15rem; margin-right: 1.15rem; }
.project-grid .shot {
  aspect-ratio: 16 / 10; overflow: hidden; margin-bottom: 0.55rem;
  background: var(--code-bg); border-bottom: 1px solid var(--line);
}
.project-grid .shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.project-grid .card:hover .shot img { transform: scale(1.045); }
.project-grid .card .links { padding-bottom: 1.05rem; }
.project-grid h3 { font-size: 1.12rem; }

/* ---------- Blog index ---------- */
.filter { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: -1rem 0 2.25rem; }
.year { font: 600 0.85rem/1 var(--mono); color: var(--muted); letter-spacing: 0.06em; margin: 2.5rem 0 1rem; display: flex; align-items: center; gap: 0.75rem; }
.year::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.year:first-of-type { margin-top: 0; }
.blog-list .post-list > li { padding: 1.4rem 0; }
.blog-list .post-list h3 { font-size: 1.35rem; letter-spacing: -0.02em; }
.blog-list .post-list p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.blog-list > section:first-child .year { margin-top: 0; }
.blog-list .post-list > li { display: grid; grid-template-columns: minmax(0, 1fr) 11rem; gap: 1.5rem; align-items: start; }
.blog-list .thumb {
  display: block; aspect-ratio: 3 / 2; margin-top: 0.3rem; overflow: hidden;
  border: 1px solid var(--line); border-radius: 0.6rem; background: var(--card); box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
}
.blog-list .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.blog-list li:hover .thumb { border-color: var(--accent); transform: translateY(-2px); }
@media (max-width: 34rem) {
  .blog-list .post-list > li { grid-template-columns: minmax(0, 1fr); gap: 0.9rem; }
  .blog-list .thumb { grid-row: 1; aspect-ratio: 2 / 1; margin-top: 0; }
}
[hidden] { display: none !important; }

/* ---------- Post ---------- */
.post-head { margin-bottom: 2.25rem; }
.crumbs { font: 0.85rem var(--mono); margin: 0 0 1rem; }
.crumbs a { text-decoration: none; }
.post-head h1 { font-size: clamp(2rem, 6vw, 2.75rem); letter-spacing: -0.02em; margin: 0 0 0.9rem; }
.post-foot { margin-top: 3.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pager a {
  display: block; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 0.7rem;
  text-decoration: none; color: var(--text); background: var(--card);
}
.pager a:hover { border-color: var(--accent); }
.pager small { display: block; font: 0.75rem var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.2rem; }
.pager .next { text-align: right; grid-column: 2; }
@media (max-width: 34rem) { .pager { grid-template-columns: 1fr; } .pager .next { grid-column: 1; } }

/* ---------- Prose (posts, wiki, project write-ups) ---------- */
.prose { overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 1.1em 0; }
.prose li { margin: 0.3em 0; }
.prose li > ul, .prose li > ol { margin: 0.3em 0; }
.prose h2, .prose h3, .prose h4 { margin: 2.4rem 0 0.7rem; }
.prose h2 { font-size: 1.55rem; }
.prose h3 { font-size: 1.3rem; }
.prose h4 { font-size: 1.08rem; }
.prose :is(h2, h3, h4) .anchor { margin-left: 0.4rem; color: var(--line); text-decoration: none; opacity: 0; transition: opacity 0.15s; }
.prose :is(h2, h3, h4):hover .anchor { opacity: 1; color: var(--muted); }
.prose img { display: block; margin: 1.75rem auto; border-radius: 0.5rem; }
.prose figure { margin: 2rem 0; text-align: center; }
.prose figure img { margin: 0 auto; }
.prose figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.6rem; }
.prose iframe { display: block; border: 0; width: 100%; aspect-ratio: 16 / 9; margin: 1.75rem auto; border-radius: 0.5rem; }
.prose blockquote { margin: 1.5rem 0; padding: 0.1rem 1.1rem; border-left: 3px solid var(--accent-hi); color: var(--muted); }
.prose pre {
  background: var(--code-bg); border: 1px solid var(--line); border-radius: 0.6rem;
  padding: 0.9rem 1.1rem; overflow-x: auto; line-height: 1.5; font-size: 0.85rem;
}
.prose pre code { font-size: inherit; }
/* Inline code and math share one tinted chip so they stand out from prose
   (and from links, which stay underlined). */
.prose :not(pre) > code, .prose .math, .prose :not(.katex-display) > .katex,
.blog-list p code, .blog-list p :not(.katex-display) > .katex {
  color: var(--chip-fg); background: var(--chip-bg); border: 1px solid var(--chip-line);
  border-radius: 0.3rem; padding: 0.05em 0.32em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.prose a > code { color: inherit; }
/* Inline code never splits mid-token (checked: no span overflows at 320px). */
.prose :not(pre) > code { white-space: nowrap; }
.prose .math { font-family: "KaTeX_Main", "Latin Modern Roman", "Times New Roman", Georgia, serif; font-size: 1.08em; white-space: nowrap; }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; margin: 1.5rem 0; font-size: 0.95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.4rem 0.7rem; text-align: left; }
.prose th { background: var(--code-bg); }
.prose details { background: var(--card); border: 1px solid var(--line); border-radius: 0.6rem; margin: 1.5rem 0; padding: 0.7rem 1.1rem; }
.prose details[open] { padding-bottom: 1rem; }
.prose summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.prose details iframe { aspect-ratio: 1; max-width: 500px; }
.prose .katex-display {
  overflow-x: auto; overflow-y: hidden; margin: 1.25rem 0; padding: 0.75rem 1rem;
  color: var(--chip-fg); background: var(--chip-bg); border: 1px solid var(--chip-line); border-radius: 0.6rem;
}
.prose ul.task-list { list-style: none; padding-left: 0.5rem; }
.prose .task-list-item input { margin-right: 0.5rem; accent-color: var(--accent-hi); }
.prose .center { text-align: center; }

/* ---------- Project pages that carry their own demo ---------- */
.demo { margin: 2rem 0; }
.demo canvas { display: block; margin: 0 auto; border-radius: 0.5rem; }
.kbd-help { font: 0.85rem var(--mono); color: var(--muted); text-align: center; }
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); margin: 1.5rem 0; }
.gallery img { margin: 0; width: 100%; border-radius: 0.5rem; border: 1px solid var(--line); background: #fff; }

/* Content images: dimmed a little in dark mode (bright white diagrams glare), full on hover. */
.prose img, .blog-list .thumb img, .project-grid .shot img { filter: var(--img-filter); transition: filter 0.2s; }
.prose img:hover, .blog-list li:hover .thumb img, .project-grid .card:hover .shot img { filter: none; }

/* ---------- Lightbox (assets/site.js; opt in with data-lightbox) ---------- */
img.zoomable { cursor: zoom-in; }
img.zoomable:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; }
.lightbox {
  border: 0; padding: 0; margin: 0; background: transparent; color: #fff;
  width: 100vw; height: 100vh; max-width: none; max-height: none; overflow: hidden;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgb(12 10 8 / 0.9); }
.lightbox img {
  max-width: min(94vw, 1600px); max-height: 86vh; width: auto; height: auto; margin: 0;
  object-fit: contain; border-radius: 0.4rem; box-shadow: 0 10px 40px rgb(0 0 0 / 0.5);
  background: #fff; cursor: default;
}
.lb-btn {
  position: fixed; display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border: 1px solid rgb(255 255 255 / 0.25); border-radius: 999px; cursor: pointer;
  background: rgb(0 0 0 / 0.45); color: #fff; font: 400 1.9rem/1 var(--sans);
}
.lb-btn:hover, .lb-btn:focus-visible { background: var(--accent-hi); border-color: var(--accent-hi); outline: none; }
.lb-close { top: 1rem; right: 1rem; font-size: 1.6rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
.lb-count { position: fixed; bottom: 1rem; left: 0; right: 0; margin: 0; text-align: center; font: 0.85rem var(--mono); color: rgb(255 255 255 / 0.75); }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 4rem 0; }
.notfound h1 { font-size: clamp(3rem, 12vw, 6rem); margin: 0; color: var(--accent-hi); letter-spacing: -0.03em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .card:hover, .btn:hover { transform: none; }
}
