/* ============================================
   Portfolio — light case study
   Bílé plátno, hodně vzduchu, práce prezentovaná jako case study
   (inspirace: e-t.studio) — klidný rám okolo hlasité práce
   ============================================ */

:root {
  --ink: #14140f;
  --ink-soft: #6f6f66;
  /* #a8a89c only reached 2.4:1 on --paper -- fails WCAG AA (needs 4.5:1) for the
     small labels/captions/breadcrumbs it's used on. Darkened to keep the same
     warm-grey hue while meeting AA (SEO/a11y audit item 10). */
  --ink-faint: #727264;
  --paper: #ffffff;
  --panel: #ffffff;
  --line: #dedad0;
  --accent-a: #ff3fb0;
  --accent-b: #7c3fff;
  --accent-c: #3f8bff;
  /* --accent-a itself is only 3.19:1 on --paper -- fine for borders/backgrounds
     (3:1 non-text threshold) but fails AA for text (4.5:1). Use this darker
     same-hue variant anywhere accent-a is used as a text `color`, and keep
     --accent-a unchanged for decorative/border/background use (audit item 10). */
  --accent-a-text: #e20085;
  --gap: clamp(1.5rem, 4vw, 3rem);
  --max-w: 1240px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

html {
  /* Always reserve the scrollbar's width, even on short pages that don't
     need to scroll. Without this, switching between a tall page (listing)
     and a short one (detail view) toggles the scrollbar on/off, which
     shifts the centered .wrap content sideways by the scrollbar's width. */
  overflow-y: scroll;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ---------- Header ---------- */

header.site {
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--line);
  z-index: 20;
}

/* The frosted-glass background lives on a pseudo-element rather than on
   header.site itself. A `backdrop-filter` (like `transform`/`filter`) makes
   its element a containing block for any position:fixed descendant -- and
   the mobile nav panel below is exactly that. With the filter on header.site
   directly, the closed (translateX(100%)) panel was positioned relative to
   the ~70px-tall header box instead of the viewport, which let it poke past
   the right edge of the page and created a permanent horizontal scrollbar
   even with the menu closed. Moving the filter to ::before keeps the same
   visual blur without header.site itself becoming that containing block. */
header.site::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(250,249,244,0.88);
  backdrop-filter: saturate(140%) blur(10px);
  z-index: -1;
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.4rem;
  padding-bottom: 1.4rem;
}

.logo {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
}

nav.main {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

nav.main a {
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

nav.main a:hover,
nav.main a.active {
  color: var(--ink);
  border-color: var(--accent-a);
}

/* ---------- Hero (simple, non-carousel pages) ---------- */

.hero {
  padding: clamp(4rem, 12vw, 8rem) 0 clamp(3rem, 8vw, 5rem);
  position: relative;
}

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.98;
  margin: 0 0 1.25rem;
  max-width: 16ch;
  color: var(--ink);
}

.hero p {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0;
}

/* ---------- Blob utility (retired in the light theme) ---------- */

.blob-bg { display: none; }

/* ---------- Hero text styles (eyebrow/title/desc) ----------
   Shared by both hero-carousel implementations below: the retired "chapter
   pages" one is gone, but its .hc-eyebrow/.hc-title/.hc-desc classes are
   still the ones used inside the current full-bleed rotating banner's
   .hero-carousel-overlay (see further down this file). */

.hc-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.hc-title {
  font-size: clamp(2.2rem, 7vw, 5.2rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 1.25rem;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  color: var(--ink);
}

.hc-desc {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 2rem;
}

/* ---------- Section headings ---------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 3rem 0 1.5rem;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}

.section-head h2 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}

.section-head .count {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- Gallery grid ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  padding-bottom: 5rem;
}

@media (min-width: 720px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

.piece {
  display: block;
  cursor: default;
  min-width: 0;
  min-height: 0;
}

.piece figure {
  margin: 0;
  aspect-ratio: 4 / 5;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.25s ease, border-color 0.25s ease;
}

.piece figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.piece .placeholder-label {
  font-size: 0.75rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem;
}

.piece:hover figure {
  opacity: 0.85;
  border-color: var(--accent-a);
}

.piece figcaption {
  padding-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.15rem 1rem;
  font-size: 0.85rem;
}

.piece figcaption .title {
  font-weight: 600;
  min-width: 0;
}

.piece figcaption .meta {
  color: var(--ink-soft);
  min-width: 0;
  white-space: normal;
}

/* ---------- About page ---------- */

.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 6vw, 4rem);
  padding: clamp(3rem, 8vw, 5rem) 0 5rem;
}

@media (min-width: 800px) {
  .about-layout { grid-template-columns: 340px 1fr; }
}

.about-portrait {
  aspect-ratio: 4 / 5;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  overflow: hidden;
}

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

.about-text h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 1.5rem;
  color: var(--ink);
}

.about-text p.about-perex {
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-soft);
  letter-spacing: 0;
  text-transform: none;
  max-width: 52ch;
  margin: 0 0 1.75rem;
}

.about-text p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 60ch;
  margin: 0 0 1.25rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.8rem;
  padding: 0;
  margin: 2rem 0 0;
  list-style: none;
}

.skills-list li {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
}

/* ---------- Contact page ---------- */

.contact-layout {
  padding: clamp(3rem, 8vw, 5rem) 0 6rem;
  max-width: 640px;
}

.contact-layout h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  color: var(--ink);
}

.contact-layout > p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0 0 2.5rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.contact-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}

.contact-list li .label {
  color: var(--ink-soft);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-list li a {
  font-size: 1.05rem;
}

.contact-list li a:hover {
  color: var(--accent-a-text);
}

/* ---------- FAQ (Kontakt) ---------- */

.faq-section {
  max-width: 760px;
  padding-top: 1rem;
  margin-top: 1rem;
}

.faq-group-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 2.25rem 0 0.5rem;
}
.faq-group-label:first-child { margin-top: 0; }

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

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 1rem 2rem 1rem 0;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  transition: color 0.2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0.1rem;
  top: 0.85rem;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ink-faint);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item summary:hover { color: var(--accent-a-text); }

.faq-answer {
  padding: 0 2rem 1.15rem 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  max-width: 62ch;
}
.faq-answer a { color: var(--ink); border-bottom: 1px solid var(--line); }
.faq-answer a:hover { color: var(--accent-a-text); border-color: var(--accent-a); }

.faq-sources {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.faq-sources h3 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.75rem;
}
.faq-sources ol {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.78rem;
  color: var(--ink-faint);
  line-height: 1.6;
}
.faq-sources a { color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--line); }
.faq-sources a:hover { color: var(--accent-a-text); text-decoration-color: var(--accent-a); }

/* ---------- Footer ---------- */

footer.site {
  border-top: 1px solid var(--line);
  padding: 2rem var(--gap);
}

footer.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ---------- Homepage index / rozcestník ---------- */

.index-hero {
  position: relative;
  padding: clamp(4rem, 12vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem);
  overflow: hidden;
}

.index-hero > * { position: relative; z-index: 1; }

.index-hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.98;
  margin: 0 0 1rem;
  max-width: 20ch;
  color: var(--ink);
}

.index-hero p {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0;
}

.index-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
  margin-bottom: 5rem;
}

.index-tile {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: opacity 0.2s ease;
}

@media (min-width: 720px) {
  .index-tile {
    grid-template-columns: 140px 1fr auto;
    gap: 2.5rem;
  }
}

.index-tile:hover { opacity: 0.65; }
.index-tile:hover .info h2 { color: var(--accent-a-text); }

.index-tile .thumb {
  aspect-ratio: 1 / 1;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  overflow: hidden;
}

.index-tile .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.index-tile .info h2 {
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.index-tile .info p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0;
  max-width: 46ch;
}

.index-tile .arrow {
  font-size: 0.85rem;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Project page header (non-carousel fallback) ---------- */

.project-head {
  padding: clamp(3rem, 8vw, 5rem) 0 2.5rem;
  border-bottom: 1px solid var(--line);
}

.project-head .eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}

.project-head h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  max-width: 22ch;
  color: var(--ink);
}

.project-head p {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0 0 1.5rem;
}

.external-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  border-bottom: 1px solid var(--accent-a);
  padding-bottom: 2px;
  color: var(--ink);
}

.external-link:hover { color: var(--accent-a-text); }

/* ---------- Chapters (Pop Machine) ---------- */

.chapter {
  padding-top: 3rem;
}

.chapter-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 1.5rem;
}

.chapter-head .num {
  font-size: 0.85rem;
  color: var(--accent-a-text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chapter-head h2 {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
  color: var(--ink);
}

.chapter-head .years {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-left: auto;
}

/* ---------- Dense archive grid ---------- */

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 2.5rem 0 5rem;
}

@media (min-width: 640px) {
  .archive-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 1000px) {
  .archive-grid { grid-template-columns: repeat(7, 1fr); }
}

.archive-item figure {
  aspect-ratio: 1 / 1;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  transition: opacity 0.2s ease;
}

.archive-item:hover figure { opacity: 0.7; }

.archive-item .placeholder-label {
  font-size: 0.6rem;
  color: var(--ink-faint);
  text-align: center;
  padding: 0.3rem;
}

.archive-year-head {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 2.5rem 0 0.5rem;
  border-top: 1px solid var(--line);
  margin-top: 1rem;
}

/* ---------- Clickable dynamic gallery pieces ---------- */

a.piece-link { cursor: pointer; }

/* ---------- Breadcrumb navigation ---------- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4em;
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin: 0 0 0.9rem;
}
.breadcrumb a {
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.breadcrumb a:hover { color: var(--accent-a-text); border-color: var(--accent-a); }
.breadcrumb .crumb-current { color: var(--ink); }
.breadcrumb .crumb-sep { color: var(--ink-faint); }

/* ---------- Work detail view ---------- */

.detail-view { padding: 0 0 5rem; }

.back-link {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 2rem;
  cursor: pointer;
  border-bottom: 1px solid transparent;
}

.detail-topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 2rem;
}
.detail-topbar .back-link { margin-bottom: 0; }
.detail-topbar .detail-nav {
  border-top: none;
  padding-top: 0;
  justify-content: flex-end;
  gap: 1.5rem;
}
.back-link:hover { color: var(--accent-a-text); border-color: var(--accent-a); }

.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
}
@media (min-width: 800px) {
  .detail-layout { grid-template-columns: 1.3fr 1fr; align-items: start; }
}
.detail-layout > * { min-width: 0; }

.detail-figure {
  position: relative;
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  min-width: 220px;
  max-height: min(78vh, 820px);
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
}
@media (min-width: 800px) { .detail-figure { justify-self: start; } }
.detail-figure img { width: auto; height: auto; max-width: 100%; max-height: min(78vh, 820px); object-fit: contain; display: block; }
.detail-figure .placeholder-label { font-size: 0.8rem; color: var(--ink-faint); letter-spacing: 0.05em; text-transform: uppercase; text-align: center; padding: 1.5rem; }

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(18,17,14,0.5);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}
.gallery-nav:hover { background: rgba(18,17,14,0.78); }
.gallery-nav svg { width: 22px; height: 22px; display: block; }
.gallery-nav.gallery-nav-prev { left: 0.75rem; }
.gallery-nav.gallery-nav-next { right: 0.75rem; }
.gallery-count {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 3;
  background: rgba(18,17,14,0.55);
  color: var(--paper);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.detail-figure img { cursor: zoom-in; }

/* ---------- Lightbox (click detail image to view full size) ---------- */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10,9,7,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 5vw, 3rem);
}
.lightbox-img {
  width: 92vw;
  height: 88vh;
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  display: block;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  cursor: default;
}
.lightbox-close,
.lightbox-nav {
  position: fixed;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255,255,255,0.24); }
.lightbox-close {
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1002;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  line-height: 1;
  padding: 0;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  z-index: 1002;
  width: 52px;
  height: 52px;
  padding: 0;
}
.lightbox-nav svg { width: 26px; height: 26px; display: block; }
.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }
.lightbox-count {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1002;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
}
@media (max-width: 640px) {
  .lightbox-nav { width: 42px; height: 42px; }
  .lightbox-nav svg { width: 20px; height: 20px; }
  .lightbox-close { width: 38px; height: 38px; font-size: 1.3rem; }
}

.detail-info .eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}
.detail-info h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 1.25rem;
  color: var(--ink);
}
.detail-info .desc {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 60ch;
  margin: 0 0 2rem;
}
.detail-info .desc p { margin: 0 0 1em; }
.detail-info .desc p:last-child { margin-bottom: 0; }
.detail-info .desc.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 20;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.desc-toggle {
  display: inline-block;
  margin: -1.25rem 0 2rem;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-a-text);
  cursor: pointer;
}
.desc-toggle:hover { text-decoration: underline; }

.detail-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin: 0 0 1.5rem;
}
.detail-extra:empty { display: none; border: none; padding: 0; margin: 0; }
.detail-extra span { white-space: normal; }
.detail-extra a { color: var(--accent-a-text); }
.detail-extra a:hover { text-decoration: underline; }

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 0.5rem;
  margin: 0 0 2rem;
  min-width: 0;
}
.detail-gallery:empty { display: none; margin: 0; }
.detail-gallery button {
  padding: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  line-height: 0;
}
.detail-gallery button.active { border-color: var(--accent-a); }
.detail-gallery img { width: 100%; height: 84px; object-fit: cover; display: block; }

.detail-video {
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem 2rem;
}
.detail-video:empty { display: none; margin: 0; }
.detail-video-item { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
.detail-video-frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: var(--panel);
  border: 1px solid var(--line);
}
.detail-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.detail-video-label {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.detail-nav {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.detail-nav a { cursor: pointer; color: var(--ink-soft); }
.detail-nav a:hover { color: var(--accent-a-text); }

/* ---------- Preview-only ---------- */

.preview-banner {
  background: var(--panel);
  color: var(--ink-soft);
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--line);
}

.page { display: none; }
.page.active { display: block; }

/* ---------- Hero carousel (big rotating banner, e.g. CypherpunkNow page-head) ---------- */
.hero-carousel { position: relative; width: 100%; height: calc(100vh - var(--header-h, 73px)); overflow: hidden; background: var(--ink); }
.hero-carousel-track { position: absolute; inset: 0; z-index: 0; }
.hero-carousel-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; }
.hero-carousel-slide.is-active { opacity: 1; }
.hero-carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-carousel.effect-ken .hero-carousel-slide.is-active { z-index: 2; }
.hero-carousel.effect-ken .hero-carousel-slide img { transform: scale(1); }
.hero-carousel.effect-ken .hero-carousel-slide.is-active img { animation: hc-kenburns 7s ease-in-out forwards; }
.hero-carousel.effect-ken .hero-carousel-slide:nth-child(odd) img { transform-origin: 32% 32%; }
.hero-carousel.effect-ken .hero-carousel-slide:nth-child(even) img { transform-origin: 68% 60%; }
@keyframes hc-kenburns { from { transform: scale(1); } to { transform: scale(1.14); } }
.hero-carousel.effect-clip .hero-carousel-slide { opacity: 1; transition: none; }
.hero-carousel.effect-clip .hero-carousel-slide.is-active { animation: hc-clipwipe 1s cubic-bezier(.65,0,.35,1) forwards; }
@keyframes hc-clipwipe { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
.hero-carousel.effect-glitch .hero-carousel-slide.is-active { z-index: 2; }
.hero-carousel.effect-glitch .hero-carousel-slide.is-active img { animation: hc-glitch-img 0.7s steps(2, end); }
.hero-carousel.effect-glitch .hero-carousel-slide::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.14) 0 2px, transparent 2px 4px); opacity: 0; mix-blend-mode: overlay; }
.hero-carousel.effect-glitch .hero-carousel-slide.is-active::after { animation: hc-glitch-scan 0.7s steps(2, end); }
@keyframes hc-glitch-img { 0% { transform: translate(0,0); filter: none; clip-path: inset(0 0 0 0); } 8% { transform: translate(-2.5%, 0); filter: hue-rotate(40deg) saturate(3); clip-path: inset(8% 0 62% 0); } 16% { transform: translate(2.5%, 0); filter: hue-rotate(-30deg) saturate(2.2); clip-path: inset(55% 0 15% 0); } 24% { transform: translate(-1.5%,0); filter: invert(0.12); clip-path: inset(0 0 78% 0); } 34% { transform: translate(1.5%,0); filter: none; clip-path: inset(28% 0 38% 0); } 46% { transform: translate(0,0); clip-path: inset(0 0 0 0); } 100% { transform: translate(0,0); filter: none; clip-path: inset(0 0 0 0); } }
@keyframes hc-glitch-scan { 0% { opacity: 0; } 10% { opacity: .5; } 20% { opacity: 0; } 30% { opacity: .4; } 45% { opacity: 0; } 100% { opacity: 0; } }
.hero-carousel-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 3rem 0 4.5rem; background: linear-gradient(to top, rgba(18,17,14,0.88) 0%, rgba(18,17,14,0.45) 55%, rgba(18,17,14,0) 100%); transition: opacity 0.6s ease; }

.hero-carousel-overlay .hc-eyebrow, .hero-carousel-overlay .hc-title, .hero-carousel-overlay .hc-desc { color: var(--paper); }
.hero-carousel-overlay .hc-eyebrow { opacity: 0.85; }
.hero-carousel-overlay .hc-desc { color: rgba(250,248,244,0.82); }
.hero-carousel-overlay .external-link { color: var(--paper); border-color: rgba(250,248,244,0.5); }
.hero-carousel-overlay .external-link:hover { border-color: var(--paper); }
.hero-carousel-dots { position: absolute; right: max(1.25rem, calc((100% - 1200px) / 2 + 1.25rem)); bottom: 1.5rem; display: flex; gap: 0.5rem; z-index: 2; }
.hero-carousel-dots button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 1px solid rgba(250,248,244,0.7); background: transparent; cursor: pointer; transition: background 0.2s ease, transform 0.2s ease; }
.hero-carousel-dots button.is-active { background: var(--paper); transform: scale(1.15); }
.hero-carousel-caption { position: absolute; top: 1.25rem; right: max(1.25rem, calc((100% - 1200px) / 2 + 1.25rem)); z-index: 2; max-width: 60%; padding: 0.35rem 0.75rem; background: rgba(18,17,14,0.5); color: rgba(250,248,244,0.88); font-size: 0.72rem; letter-spacing: 0.02em; line-height: 1.3; text-align: right; border-radius: 3px; opacity: 0; transition: opacity 0.3s ease; }
.hero-carousel-slide.is-active .hero-carousel-caption { opacity: 1; }
#home-hero .hero-carousel-slide::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(to bottom, rgba(8,7,6,0.58) 0%, rgba(8,7,6,0.24) 18%, rgba(8,7,6,0) 34%); }
#home-hero .hero-carousel-caption { left: max(1.25rem, calc((100% - 1200px) / 2 + 1.25rem)); right: auto; max-width: 70%; padding: 0.4rem 0.85rem; font-size: clamp(0.75rem, 1.1vw, 0.95rem); font-weight: 400; letter-spacing: 0.02em; text-align: left; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.9); text-shadow: 0 1px 3px rgba(0,0,0,0.55); }
.hero-scroll-indicator { position: absolute; left: 50%; bottom: 1.5rem; transform: translate(-50%, 0); z-index: 2; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: none; background: transparent; color: rgba(250,248,244,0.78); cursor: pointer; animation: hc-scroll-bounce 2.4s ease-in-out infinite; transition: color 0.2s ease; }
.hero-scroll-indicator:hover { color: var(--paper); }
.hero-scroll-indicator svg { width: 32px; height: 32px; display: block; }
@keyframes hc-scroll-bounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 7px); } }
.hero-carousel.is-collapsed { height: auto; background: none; }
.hero-carousel.is-collapsed .hero-carousel-track, .hero-carousel.is-collapsed .hero-carousel-dots, .hero-carousel.is-collapsed .hero-scroll-indicator { display: none; }
.hero-carousel.is-collapsed .hero-carousel-overlay { position: static; padding: clamp(1.5rem, 3.5vw, 2.25rem) 0 clamp(1.125rem, 2.5vw, 1.5rem); background: none; }
.hero-carousel.is-collapsed .hero-carousel-overlay .hc-eyebrow { color: var(--ink-soft); opacity: 1; }
.hero-carousel.is-collapsed .hero-carousel-overlay .hc-title { color: var(--ink); font-size: clamp(1.8rem, 5vw, 3.2rem); }
.hero-carousel.is-collapsed .hero-carousel-overlay .hc-desc { color: var(--ink-soft); margin-bottom: 0; }
.hero-carousel.is-collapsed .hero-carousel-overlay .external-link { color: var(--accent-a-text); border-color: var(--accent-a); }
.hero-carousel.is-collapsed .hero-carousel-overlay .external-link:hover { color: var(--ink); }
.hero-carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 48px; height: 48px; border: none; border-radius: 50%; background: rgba(18,17,14,0.45); color: var(--paper); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s ease; }
.hero-carousel-arrow:hover { background: rgba(18,17,14,0.72); }
.hero-carousel-arrow svg { width: 24px; height: 24px; display: block; }
.hero-carousel-arrow.prev { left: clamp(0.75rem, 3vw, 2rem); }
.hero-carousel-arrow.next { right: clamp(0.75rem, 3vw, 2rem); }
@media (max-width: 640px) { .hero-carousel-arrow { width: 38px; height: 38px; } .hero-carousel-arrow svg { width: 18px; height: 18px; } }
@media (max-width: 640px) { .hero-carousel { height: calc(100svh - var(--header-h, 60px)); } .hero-carousel-overlay { padding: 1.75rem 0 2.25rem; } .hero-carousel-dots { display: none; } .hero-carousel-caption { top: 0.85rem; right: 0.85rem; max-width: 65%; font-size: 0.66rem; padding: 0.3rem 0.6rem; } .hero-scroll-indicator { display: none; } #home-hero .hero-carousel-caption { left: 0.85rem; right: auto; max-width: 78%; font-size: 0.8rem; font-weight: 400; padding: 0.35rem 0.65rem; } #home-hero .hero-carousel-slide::before { background: linear-gradient(to bottom, rgba(8,7,6,0.62) 0%, rgba(8,7,6,0.26) 24%, rgba(8,7,6,0) 42%); } }

/* ---------- Section banner grid (tab sub-navigation: project -> click -> gallery) ---------- */
.banner-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); padding: 2.5rem 0 5rem; }

/* Mystic Sk8 Cup has no banner-tile level — its flat work grid sits directly
   under the page-head divider, so give it the same top/bottom breathing
   room as the other pages' .banner-grid instead of touching the line. */
#msc-grid { padding: 2.5rem 0 5rem; }
@media (min-width: 640px) { .banner-grid { grid-template-columns: repeat(2, 1fr); } }
.banner-grid.cols-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .banner-grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .banner-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.project-banner { display: block; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: var(--panel); overflow: hidden; transition: opacity 0.2s ease, border-color 0.2s ease; }
.project-banner:hover { opacity: 0.82; border-color: var(--accent-a); }
.project-banner figure { margin: 0; aspect-ratio: 4 / 3; background: var(--paper); overflow: hidden; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.project-banner figure img { width: 100%; height: 100%; object-fit: cover; }
.project-banner figure .placeholder-label { font-size: 0.72rem; color: var(--ink-faint); letter-spacing: 0.05em; text-transform: uppercase; text-align: center; padding: 1rem; }
.project-banner .banner-info { padding: 1.25rem 1.4rem 1.5rem; }
.project-banner .banner-info h3 { font-size: 1.2rem; font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; margin: 0 0 0.4rem; }
.project-banner .banner-info p { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 0.7rem; max-width: 40ch; }
.project-banner .banner-info .count { font-size: 0.75rem; color: var(--ink-faint); letter-spacing: 0.05em; text-transform: uppercase; }
#pm-banner-grid .project-banner figure { aspect-ratio: 1 / 1; }
#arch-interier-banner-grid .project-banner figure { aspect-ratio: 1 / 1; }

/* ---------- CypherpunkNow category tiles: tall, edge-to-edge filmstrip ---------- */
#cpn-banner-grid {
  grid-template-columns: 1fr;
  gap: var(--gap);
}
@media (min-width: 768px) {
  #cpn-banner-grid { grid-template-columns: repeat(3, 1fr); }
}
#cpn-banner-grid .project-banner {
  border: none;
  background: transparent;
}
#cpn-banner-grid .project-banner figure {
  aspect-ratio: 3 / 4;
  border-bottom: none;
}
#cpn-banner-grid .project-banner:hover { opacity: 0.85; }
#arch-banner-grid { grid-template-columns: 1fr; gap: var(--gap); }
@media (min-width: 768px) { #arch-banner-grid { grid-template-columns: repeat(3, 1fr); } }
#arch-banner-grid .project-banner { border: none; background: transparent; }
#arch-banner-grid .project-banner figure { aspect-ratio: 3 / 4; border-bottom: none; }
#arch-banner-grid .project-banner:hover { opacity: 0.85; }
.hc-desc a { color: inherit; border-bottom: 1px solid currentColor; opacity: 0.85; }
.hc-desc a:hover { opacity: 1; }

/* Simple static page header (no carousel) — used on every chapter page
   except the homepage, which keeps the full hero carousel. */
.page-head {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(1.75rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}
.page-head .hc-title { font-size: clamp(1.8rem, 5vw, 3.2rem); }
.page-head .hc-desc { margin-bottom: 0; }
.page-head .external-link { margin-top: 1.25rem; }

/* ============================================
   Design overhaul: mobile nav, crop thumbnails, grid variants
   ============================================ */

/* ---------- Mobile hamburger navigation ---------- */

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle:hover span { background: var(--accent-a); }

.nav-scrim { display: none; }

@media (max-width: 720px) {
  /* Its own stacking context, above the scrim (25) and the panel (30), so a
     tap on the hamburger/X icon always hits the button, not the scrim. */
  .nav-toggle { display: flex; position: relative; z-index: 31; }

  header.site .wrap { position: relative; }

  nav.main {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: var(--paper);
    border-left: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.75rem;
    padding: 2rem clamp(1.5rem, 6vw, 2.5rem);
    transform: translateX(100%);
    /* Closed panel is also visually hidden (after the slide-out finishes) so
       it can't be tabbed into or read by a screen reader; JS mirrors this
       with the `inert` attribute. Opening flips visibility back instantly so
       the slide-in transition is visible from the first frame. */
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s 0.3s;
    z-index: 30;
    font-size: 0.95rem;
  }

  nav.main.open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.3s ease, visibility 0s 0s;
  }

  body.nav-open { overflow: hidden; }

  .nav-scrim {
    position: fixed;
    inset: 0;
    background: rgba(20,20,15,0.35);
    z-index: 25;
  }

  body.nav-open .nav-scrim { display: block; }
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Crop-to-fill thumbnails ---------- */

.piece figure img {
  object-fit: cover;
  transition: transform 0.4s ease;
}

.piece:hover figure img,
.piece:focus-visible figure img {
  transform: scale(1.035);
}

.piece:hover figure { opacity: 1; }

/* ---------- Mystic Sk8 Cup — uncropped poster thumbnails. Posters all
   share the same A-series shape, so the frame is sized to each image's own
   intrinsic proportions (no fixed box + object-fit:contain) instead of
   stretching to match its grid row. ---------- */
#msc-year-groups .gallery { align-items: start; }
#msc-year-groups .piece figure { aspect-ratio: auto; height: auto; }
#msc-year-groups .piece figure img { width: 100%; height: auto; object-fit: unset; }

/* ---------- Autorské sítotisky — uniform tile size. Prints don't all
   share one exact aspect ratio, so unlike Mystic Sk8 Cup, shrink-wrapping
   each frame to its image made caption rows drift out of alignment between
   tiles. Frames stay a fixed, uniform size again (so captions line up),
   with no border or background fill so any small gap doesn't read as a
   visible frame. Almost every print in this set is close to an ISO
   A-series (√2:1) sheet, so the frame ratio matches that instead of the
   generic 4:5 box used elsewhere — this is also why the tiles now look
   bigger/taller, matching Mystic Sk8 Cup's posters. ---------- */
#cpn-year-groups .piece figure {
  aspect-ratio: 1000 / 1435;
  background: transparent;
  border: none;
}
#cpn-year-groups .piece figure img {
  object-fit: contain;
}

/* ---------- Layout variant: editorial (hero tile) grid ---------- */

.gallery--editorial {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
  .gallery--editorial { grid-template-columns: repeat(4, 1fr); }
}

.gallery--editorial .piece:first-child {
  grid-column: span 2;
  grid-row: span 2;
  position: relative;
}

.gallery--editorial .piece:first-child figure {
  height: 100%;
  aspect-ratio: auto;
}

.gallery--editorial .piece:first-child figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 1.5rem 1.25rem 1.1rem;
  background: linear-gradient(to top, rgba(20,20,15,0.78), rgba(20,20,15,0));
}

.gallery--editorial .piece:first-child figcaption .title,
.gallery--editorial .piece:first-child figcaption .meta {
  color: var(--paper);
}

.gallery--editorial .piece figcaption {
  flex-wrap: wrap;
  row-gap: 0.15rem;
}

.gallery--editorial .piece figcaption .title,
.gallery--editorial .piece figcaption .meta {
  min-width: 0;
}

.gallery--editorial .piece figcaption .meta {
  white-space: normal;
}

/* ---------- Layout variant: dense/masonry-ish grid ---------- */

.gallery--masonry {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: dense;
}

@media (min-width: 640px) {
  .gallery--masonry { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1000px) {
  .gallery--masonry { grid-template-columns: repeat(6, 1fr); }
}

.gallery--masonry .piece:nth-child(9n+1) {
  grid-column: span 2;
  grid-row: span 2;
  position: relative;
}

.gallery--masonry .piece:nth-child(9n+1) figure {
  height: 100%;
  aspect-ratio: auto;
}

.gallery--masonry .piece:nth-child(9n+1) figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 1.25rem 1rem 0.9rem;
  background: linear-gradient(to top, rgba(20,20,15,0.78), rgba(20,20,15,0));
}

.gallery--masonry .piece:nth-child(9n+1) figcaption .title,
.gallery--masonry .piece:nth-child(9n+1) figcaption .meta {
  color: var(--paper);
}

.gallery--masonry .piece figcaption {
  flex-wrap: wrap;
  font-size: 0.76rem;
  row-gap: 0.15rem;
}

.gallery--masonry .piece figcaption .title,
.gallery--masonry .piece figcaption .meta {
  min-width: 0;
}

.gallery--masonry .piece figcaption .meta {
  white-space: normal;
}

/* ---------- Layout variant: journal (Original Artworks) ---------- */

.journal-list {
  padding-bottom: 5rem;
}

.journal-entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.journal-entry:first-child {
  border-top: none;
  padding-top: 0;
}

@media (min-width: 780px) {
  .journal-entry {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: center;
    padding: 3.25rem 0;
  }

  .journal-entry:nth-child(even) {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .journal-entry:nth-child(even) .journal-entry__media {
    order: 2;
  }
}

.journal-entry__media {
  margin: 0;
  aspect-ratio: 4 / 3;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}

.journal-entry__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.journal-entry:hover .journal-entry__media img {
  transform: scale(1.03);
}

.journal-entry__media .placeholder-label {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 0.75rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem;
}

.journal-entry__body {
  min-width: 0;
}

.journal-entry__meta {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.7rem;
}

.journal-entry__title {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 700;
  line-height: 1.22;
  margin: 0 0 0.9rem;
}

.journal-entry__excerpt {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0 0 1.1rem;
  max-width: 46em;
}

.journal-entry__more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-a-text);
  transition: gap 0.25s ease;
}

.journal-entry:hover .journal-entry__more {
  gap: 0.55rem;
}

/* ---------- Language switcher (CZ / EN) ---------- */

.lang-toggle {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  margin-left: 1.25rem;
  flex-shrink: 0;
}

.lang-toggle a {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-toggle a:hover {
  color: var(--ink);
}

.lang-toggle a.active {
  background: var(--ink);
  color: var(--paper);
}

@media (max-width: 720px) {
  .lang-toggle {
    margin-left: auto;
    margin-right: 0.75rem;
  }
}

/* ---------- Site search ---------- */

.search-open-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  margin-left: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.search-open-btn:hover {
  color: var(--ink);
  border-color: var(--ink-soft);
}

.search-open-btn svg {
  width: 17px;
  height: 17px;
  display: block;
}

@media (max-width: 720px) {
  .search-open-btn {
    margin-left: 0.6rem;
  }
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20,20,15,0.5);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 1.25rem 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.search-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

body.search-locked {
  overflow: hidden;
}

.search-panel {
  width: 100%;
  max-width: 620px;
  max-height: 70vh;
  background: var(--paper);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(-8px);
  transition: transform 0.2s ease;
}

.search-overlay.is-open .search-panel {
  transform: translateY(0);
}

.search-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.search-input-icon {
  width: 19px;
  height: 19px;
  color: var(--ink-soft);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1.05rem;
  color: var(--ink);
  font-family: inherit;
}

.search-input::placeholder {
  color: var(--ink-soft);
}

.search-close {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  flex-shrink: 0;
}

.search-close:hover {
  color: var(--ink);
}

.search-results {
  overflow-y: auto;
  padding: 0.5rem;
}

.search-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0.65rem;
  border-radius: 8px;
  color: var(--ink);
  transition: background 0.12s ease;
}

.search-result:hover,
.search-result.is-active {
  background: rgba(20,20,15,0.06);
}

.search-result-thumb {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--line);
}

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

.search-result-thumb-empty {
  background: linear-gradient(135deg, var(--line), rgba(0,0,0,0.03));
}

.search-result-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.search-result-title {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-sub {
  font-size: 0.78rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .search-overlay { padding: 6vh 0.75rem 1.5rem; }
  .search-panel { max-height: 80vh; }
}


/* Shared interaction fixes, 2026-09-26. */
.lang-toggle a { display: inline-block; text-decoration: none; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 2000; padding: .7rem 1rem; background: white; color: #14140f; }
.skip-link:focus { top: 1rem; }
a:focus-visible, button:focus-visible, input:focus-visible, [role="button"]:focus-visible { outline: 3px solid #7c3fff; outline-offset: 4px; }
.hero-pause { position: absolute; z-index: 4; right: 1rem; bottom: .75rem; background: #14140f; color: white; border: 1px solid white; border-radius: 4px; padding: .5rem .75rem; cursor: pointer; }
.hero-carousel-slide[aria-hidden="true"] { pointer-events: none; }
.static-portfolio { margin: 2rem auto; }
.static-portfolio img { max-height: 70vh; width: auto; }
button.piece { font: inherit; text-align: left; background: none; border: none; cursor: pointer; padding: 0; }
@media (max-width: 720px) {
  header.site { backdrop-filter: none; -webkit-backdrop-filter: none; background: #faf9f4; }
  nav.main:not(.open) { display: none; }
  nav.main { height: 100dvh; overflow-y: auto; }
  .nav-toggle { z-index: 31; flex-shrink: 0; }
  header.site .wrap { gap: .35rem; }
  .logo { font-size: clamp(.8rem, 3.4vw, 1.05rem); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* Homepage text clears the slideshow after three seconds of inactivity. */
#home-hero.is-idle .hero-carousel-overlay { opacity: 0; pointer-events: none; }
#home-hero .hero-carousel-overlay:focus-within { opacity: 1; pointer-events: auto; }

.video-poster { position:absolute; inset:0; width:100%; height:100%; padding:0; border:0; cursor:pointer; background:#14140f; }
.video-poster img { width:100%; height:100%; object-fit:contain; display:block; }
.video-poster-play { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); background:#14140fe6; color:white; border:2px solid white; border-radius:50%; width:4rem; height:4rem; display:grid; place-items:center; font-size:1.5rem; }
.video-poster:hover .video-poster-play { background:#7421a8; }

/* Article headings: compact wrapping, shared by portraits and poster text. */
#cpn-d-desc h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.15; margin: 1.7em 0 .65em; letter-spacing: -.015em; }
#cpn-d-desc h3 { font-size: 1.2em; line-height: 1.2; margin: 1.4em 0 .45em; letter-spacing: normal; }
