/* Malá Šárka Gallery – a dark olive gallery wall, as on the original site since 2004.
   One column of content up to 1280px; artworks sit on a slightly deeper plate. */
:root {
  --bg: #3d3e33;          /* the original gallery olive */
  --plate: #34352b;       /* deeper olive behind artworks */
  --line: #5c5d51;        /* hairlines and dividers */
  --fg: #ffffff;
  --fg-soft: #e6e6e1;
  --muted: #c9cac4;       /* secondary text, 6.6:1 on --bg */
  --stone: #a2a39f;       /* the original menu grey */
  --font: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1280px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--muted); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; background: var(--fg); color: var(--bg); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { padding-block: 36px 0; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.logo { display: block; line-height: 0; width: min(284px, 72vw); }
.logo svg { width: 100%; height: auto; display: block; }
.nav { display: flex; flex-wrap: wrap; gap: 2px; font-size: 14px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.nav a { display: block; padding: 11px 13px; border-left: 3px solid transparent; color: var(--muted); }
.nav a:hover { color: var(--fg); border-left-color: var(--stone); }
.nav a[aria-current="page"] { color: var(--fg); border-left-color: var(--fg); }
.nav .lang { letter-spacing: 0.08em; }

main { display: block; }

/* Shared type */
.eyebrow { font-size: 13px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 0; }
.section { padding-block: 112px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; border-top: 1px solid var(--line); padding-top: 24px; margin-bottom: 40px; }
.section-head h2 { margin: 0; font-size: 14px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; }
.section-head .meta, .section-head a { font-size: 14px; color: var(--muted); }
.section-head a:hover { color: var(--fg); }
.button { display: inline-block; padding: 14px 22px; border: 1px solid rgba(255, 255, 255, 0.5); font-size: 13px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; }
.button:hover { border-color: var(--fg); color: var(--fg); background: var(--plate); }
.page-title { margin: 0; font-size: clamp(44px, 7vw, 80px); line-height: 0.98; font-weight: 300; letter-spacing: -0.01em; }
.lead { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.5; font-weight: 300; max-width: 40em; margin: 0; }
.prose p { max-width: 38em; }

/* Home hero */
.hero { padding-block: 72px 0; display: flex; flex-wrap: wrap; gap: 48px 56px; align-items: flex-end; }
.hero-art { flex: 999 1 520px; min-width: 0; background: var(--plate); padding: clamp(20px, 5vw, 48px); display: flex; justify-content: center; }
.hero-art img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35); }
.hero-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; padding-bottom: 8px; }
.hero-name { margin: 0; font-size: clamp(52px, 7vw, 76px); line-height: 0.95; font-weight: 300; letter-spacing: -0.01em; }
.hero-name a:hover { color: var(--fg); }
.skip-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero .hero-art img, .hero .hero-text > *:not(.rot), .h-strip { transition: opacity 0.35s ease; }
.hero.is-fading .hero-art img, .hero.is-fading .hero-text > *:not(.rot), .h-strip.is-fading { opacity: 0; }
.hero-art { height: clamp(340px, 52vw, 620px); align-items: center; }
.hero-art > a { display: flex; align-items: center; justify-content: center; height: 100%; width: 100%; }
.hero-text { min-height: 25rem; justify-content: flex-end; }
.rot { display: flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.rot[hidden] { display: none; }
.rot button { background: none; border: 1px solid transparent; color: var(--fg); font: inherit; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; min-width: 44px; min-height: 44px; padding: 0 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rot button:hover { border-color: var(--line); }
.rot svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.rot-pos { min-width: 4.5em; text-align: center; }
.rot-pause { margin-left: 8px; color: var(--muted) !important; }
.hero-text .sub { font-size: 20px; font-weight: 300; color: var(--fg-soft); margin: 0; }
.hero-text p { margin: 0; color: var(--muted); max-width: 26em; }

/* Artwork grids */
.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 48px 32px; }
.works.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.work { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.work .plate { aspect-ratio: 1 / 1; max-width: 100%; background: var(--plate); display: flex; align-items: center; justify-content: center; padding: 8%; cursor: zoom-in; }
.work .plate img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; transition: transform 0.4s ease; }
.work .plate:hover img { transform: scale(1.02); }
.work.cover .plate { padding: 0; overflow: hidden; cursor: pointer; }
.work.cover .plate img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.work figcaption, .work .cap { font-size: 15px; line-height: 1.5; }
.cap-title { font-weight: 500; }
.cap-meta { color: var(--muted); }

/* Artist index */
.artist-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); column-gap: 32px; margin: 0; padding: 0; list-style: none; }
.artist-list a { display: block; padding: 9px 0 9px 12px; border-left: 3px solid transparent; font-size: 20px; font-weight: 300; }
.artist-list a:hover { border-left-color: var(--fg); color: var(--fg); }

/* Artist page */
.artist-head { padding-block: 72px 0; display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-start; }
.artist-head .title { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.bio-wrap { flex: 2 1 420px; min-width: 0; }
.bio { margin: 0; display: grid; grid-template-columns: minmax(96px, max-content) 1fr; gap: 10px 28px; font-size: 16px; line-height: 1.5; }
.bio dt { color: var(--muted); font-size: 14px; padding-top: 2px; }
.bio dd { margin: 0; }
.bio .sec { grid-column: 1 / -1; margin: 22px 0 2px; font-size: 13px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg); }
.bio-more { margin-top: 20px; border-top: 1px solid var(--line); }
.bio-more summary { cursor: pointer; padding: 14px 0; font-size: 13px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; list-style: none; }
.bio-more summary::-webkit-details-marker { display: none; }
.bio-more summary::after { content: " +"; }
.bio-more[open] summary::after { content: " –"; }
.bio-more summary:hover { color: var(--muted); }
.bio-more .bio .sec:first-child { margin-top: 4px; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 96px; font-size: 18px; }
.pager span { color: var(--muted); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; display: block; }

/* Exhibitions list */
.shows { list-style: none; margin: 0; padding: 0; }
.shows li + li { border-top: 1px solid var(--line); }
.shows a { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 20px 28px; align-items: center; padding: 16px 0; }
.shows .thumb { width: 96px; height: 72px; background: var(--plate); overflow: hidden; }
.shows .thumb img { width: 100%; height: 100%; object-fit: cover; }
.shows .t { font-size: 20px; font-weight: 300; line-height: 1.3; }
.shows .d { color: var(--muted); font-size: 15px; display: block; margin-top: 2px; }
.shows .n { color: var(--muted); font-size: 14px; white-space: nowrap; }
.year { font-size: 13px; font-weight: 500; letter-spacing: 0.2em; color: var(--muted); padding: 32px 0 8px; }
@media (max-width: 560px) {
  .shows a { grid-template-columns: 72px minmax(0, 1fr); }
  .shows .thumb { width: 72px; height: 56px; }
  .shows .n { display: none; }
}

/* About / contact */
.split { display: flex; flex-wrap: wrap; gap: 56px; }
.split > * { flex: 1 1 300px; min-width: 0; }
.split > .wide { flex: 2 1 420px; }
.contact-lines { font-size: 18px; line-height: 1.9; }
.contact-lines .k { color: var(--muted); display: inline-block; min-width: 5.5em; }
.contact-lines a { text-decoration: underline; text-underline-offset: 4px; }

/* Footer */
.site-footer { padding-block: 128px 40px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 24px; }
.site-footer a:hover { color: var(--fg); }

/* Mobile menu toggle (hidden on wide screens) */
.menu-toggle { display: none; }
.menu-icon { position: relative; width: 20px; height: 2px; background: currentColor; display: inline-block; transition: background 0.2s ease; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor; transition: transform 0.2s ease, top 0.2s ease; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }
h1, h2, h3, .page-title { overflow-wrap: break-word; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .site-header { padding-block: 14px 0; }
  .site-header .wrap { flex-wrap: wrap; gap: 0 16px; }
  .logo { width: min(220px, 56vw); }
  .js .menu-toggle { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 2px 0 12px; margin-right: -2px; background: none; border: 0; color: var(--fg); font: 500 13px/1 var(--font); letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer; }
  .nav { flex-basis: 100%; flex-direction: column; gap: 0; margin-top: 14px; padding-block: 6px 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 15px; }
  .js .nav { display: none; }
  .js .nav.is-open { display: flex; }
  .nav a { padding: 12px 12px; }
  .nav .lang { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 16px; }

  .section { padding-block: 72px 0; }
  .section-head { margin-bottom: 28px; }
  .hero { padding-block: 28px 0; gap: 28px; }
  .hero-art { height: clamp(260px, 82vw, 440px); padding: 20px; }
  .hero-text { min-height: 0; justify-content: flex-start; gap: 16px; }
  .hero-name { font-size: 44px; }
  .hero-text .sub { font-size: 17px; }
  .page-title { font-size: clamp(34px, 9vw, 44px); }
  .lead { font-size: 19px; }

  .works, .works.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .work { gap: 10px; }
  .work figcaption, .work .cap { font-size: 14px; }
  .work .plate { padding: 7%; }
  .artist-list a { font-size: 18px; padding-block: 7px; }

  .artist-head { padding-block: 36px 0; gap: 28px; }
  .bio { grid-template-columns: minmax(0, 1fr); gap: 0; font-size: 15px; }
  .bio dt { padding-top: 12px; font-size: 13px; }
  .bio .sec { margin-top: 24px; }
  .pager { margin-top: 64px; font-size: 16px; }
  .pager a { max-width: 48%; }

  .split { gap: 40px; }
  .contact-lines { font-size: 17px; }
  .site-footer { padding-block: 88px 28px; }
  .site-footer .wrap { font-size: 13px; }
  .rot { margin-top: 4px; }
}

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(28, 29, 23, 0.97); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
.lb[hidden] { display: none; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px var(--gutter); font-size: 14px; color: var(--muted); }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 0 clamp(8px, 7vw, 96px); min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.lb-cap { padding: 16px var(--gutter) 24px; text-align: center; font-size: 15px; min-height: 64px; }
.lb button { background: none; border: 0; color: var(--fg); font: inherit; cursor: pointer; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.lb button:hover { color: var(--muted); }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: clamp(0px, 2vw, 24px); }
.lb-next { right: clamp(0px, 2vw, 24px); }
.lb svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.5; }
body.lb-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
