:root {
  --bg: #fafafa;
  --fg: #09090b;
  --muted: #71717a;
  --muted-2: #27272a;
  --border: #e4e4e7;
  --max-width: 1400px;
  --font: Archivo, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

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

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

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

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

header.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 18px 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.8) blur(14px);
  -webkit-backdrop-filter: saturate(1.8) blur(14px);
  transition: background 0.2s ease;
}

body:not(.has-hero) header.site-header {
  border-bottom: 1px solid var(--border);
}

body.has-hero header.site-header:not(.scrolled) {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

body.has-hero header.site-header:not(.scrolled) .brand,
body.has-hero header.site-header:not(.scrolled) nav.main-nav a {
  color: #fff;
}

body.has-hero header.site-header:not(.scrolled) .lang-toggle {
  color: #fff;
}

body.has-hero header.site-header:not(.scrolled) .lang-toggle strong {
  opacity: 1;
}

body.has-hero header.site-header:not(.scrolled) .lang-toggle a {
  opacity: 0.5;
}

header.site-header .wrap {
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav.main-nav a {
  text-transform: uppercase;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--fg);
  padding: 6px 0;
}

nav.main-nav a.active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.lang-toggle {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--fg);
}

.lang-toggle strong {
  opacity: 1;
}

.lang-toggle a {
  opacity: 0.5;
}

.menu-toggle {
  display: none;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: none;
  border: 0;
  padding: 6px 0;
  color: var(--fg);
  cursor: pointer;
}

body.has-hero header.site-header:not(.scrolled) .menu-toggle {
  color: #fff;
}

@media (max-width: 820px) {
  header.site-header .wrap {
    flex-wrap: nowrap;
  }

  body.has-hero header.site-header:not(.scrolled) {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(1.8) blur(14px);
    -webkit-backdrop-filter: saturate(1.8) blur(14px);
    border-bottom: 1px solid var(--border);
    color: var(--fg);
    text-shadow: none;
  }

  body.has-hero header.site-header:not(.scrolled) .brand,
  body.has-hero header.site-header:not(.scrolled) nav.main-nav a,
  body.has-hero header.site-header:not(.scrolled) .menu-toggle {
    color: var(--fg);
  }

  .menu-toggle {
    display: none;
  }

  .brand {
    font-size: 0.75rem;
    white-space: nowrap;
  }

  nav.main-nav ul {
    gap: 10px;
    flex-wrap: nowrap;
  }

  nav.main-nav a {
    font-size: 0.5rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  .lang-toggle {
    font-size: 0.6rem;
  }

  nav.main-nav.open {
    display: flex;
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 300;
    align-items: center;
    justify-content: center;
    padding: 80px 28px;
  }

  nav.main-nav.open ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  nav.main-nav.open a {
    color: #fff;
    font-size: 1.75rem;
  }
}

/* Hero (homepage only) */

.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slide--active { opacity: 1; }

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.25) 40%, rgba(0, 0, 0, 0.05) 65%, rgba(0, 0, 0, 0) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 32px 72px;
}

.hero-name {
  font-size: clamp(3.5rem, 13vw, 8.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.88;
  color: #fff;
  margin: 0;
  max-width: 930px;
}

/* ---------- Main content ---------- */

main {
  min-height: 60vh;
}

body.has-hero main { padding: 0; }
body:not(.has-hero) main { padding: 140px 0 80px; }

.hero-section-top {
  padding-top: 96px;
}

h1.page-title {
  font-size: clamp(2.5rem, 8vw, 5.2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 0 0 12px;
}

.page-subtitle {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 28px;
  letter-spacing: -0.02em;
}

.intro-text {
  margin: 24px 0 40px;
  padding: 20px 24px;
  background: #f4f4f5;
  border-radius: 6px;
  color: var(--muted-2);
  font-size: 1.125rem;
}

blockquote.quote {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted-2);
  border-left: 2px solid var(--fg);
  padding-left: 20px;
  max-width: 680px;
  margin: 0 0 56px;
}

blockquote.quote .quote-author {
  font-weight: 600;
  font-style: normal;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

.subcats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin: 0;
  padding: 20px 0;
  list-style: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.subcats a {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.subcats a.active {
  color: var(--fg);
  font-weight: 600;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 25px;
  margin: 40px 0;
}

.hero + .wrap .tile-grid,
.tile-grid.tile-grid--main {
  grid-template-columns: repeat(4, 1fr);
}

.tile-grid.tile-grid--cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1000px) {
  .tile-grid.tile-grid--cols-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .hero + .wrap .tile-grid,
  .tile-grid.tile-grid--main {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .tile-grid.tile-grid--cols-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hero + .wrap .tile-grid,
  .tile-grid.tile-grid--main {
    grid-template-columns: 1fr;
    row-gap: 24px;
    column-gap: 24px;
  }
}

.tile {
  display: block;
}

.tile img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #eee;
}

.tile .tile-label {
  margin-top: 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.tile-grid--main .tile-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}

.tile-grid--main .tile-label::after {
  content: "\2192";
  color: var(--muted);
  font-weight: 400;
}

.tile .tile-meta {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px 20px;
  margin: 40px 0;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #eee;
}

/* Detail (project) pages - reorder via CSS so the 93 generated pages
   don't need their markup touched: title, meta, back-link, images */
main:has(.project-images) .wrap {
  display: flex;
  flex-direction: column;
}

.back-link {
  order: 2;
  display: inline-block;
  margin-top: 20px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-title { order: 0; }

.project-meta {
  order: 1;
  color: var(--muted);
  font-size: 1.125rem;
  margin: 0;
}

.project-images {
  order: 3;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.project-images img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #eee;
}

/* Painting collections (tvorba/obrazy/*) - image + title/year + technique/dimensions caption */
.painting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px 20px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.painting-item figure {
  margin: 0;
}

.painting-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #eee;
}

.painting-item figcaption {
  margin-top: 14px;
}

.painting-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
}

.painting-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.exhibit-list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
}

.exhibit-year {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin: 32px 0 8px;
}

.exhibit-year:first-child { margin-top: 0; }

.exhibit-item {
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--muted-2);
}

.exhibit-item a { color: var(--fg); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }

.media-list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 20px;
}

.media-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.media-item img {
  width: 90px;
  height: auto;
}

.media-title { font-weight: 600; }
.media-title a { text-decoration: underline; text-underline-offset: 2px; }
.media-sub { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

/* Publications: same tile pattern as painting-grid, book-cover proportions */
.publication-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px 20px;
  margin-top: 40px;
}

.publication-item figure {
  margin: 0;
}

.publication-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #eee;
}

.publication-item figcaption {
  margin-top: 14px;
}

.publication-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
}

.publication-title a { color: inherit; }

.publication-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.year-block {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.year-label {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.video-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px 20px;
}

@media (max-width: 600px) {
  .video-tile-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    row-gap: 18px;
    column-gap: 14px;
  }

  .video-tile p {
    font-size: 13px;
  }
}

.video-tile {
  cursor: pointer;
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  transition: transform 0.6s ease, opacity 0.3s ease;
}

.video-tile:hover .video-thumb img {
  transform: scale(1.04);
  opacity: 1;
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  padding-left: 3px;
  transition: background 0.2s ease;
}

.video-tile:hover .video-play {
  background: rgba(0, 0, 0, 0.8);
}

.video-tile p {
  margin-top: 12px;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--fg);
  font-weight: 500;
}

.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 200;
  display: none;
  flex-direction: column;
}

.video-modal.open {
  display: flex;
}

.video-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: #09090b;
  color: #fff;
  gap: 16px;
}

.video-modal-title {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-modal-close {
  background: none;
  border: 0;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
}

.video-modal-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.video-modal-frame {
  width: 100%;
  max-width: 1100px;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

.video-section-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: #f4f4f5;
  padding: 24px;
  border-radius: 4px;
  margin: 40px 0 0;
}

.video-section-label .video-tile-grid {
  margin-top: 20px;
}

/* Print media (media/rozhovory) - year blocks of magazine cover scans */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 24px 18px;
}

@media (min-width: 700px) {
  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }
}

.media-tile {
  display: block;
}

.media-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #f4f4f5;
  border: 1px solid var(--border);
  overflow: hidden;
}

.media-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.year-items {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 3;
  column-gap: 24px;
}

.year-items li {
  padding: 4px 0;
  break-inside: avoid;
}

.year-items a {
  font-size: 0.9rem;
}

.year-items--stack {
  columns: 1;
}

/* ---------- Contact card + footer ---------- */

.contact-section {
  padding: 80px 0;
  text-align: center;
}

.contact-heading {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 48px;
}

.contact-card {
  max-width: 320px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 32px;
  text-align: left;
}

.contact-card .contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.contact-card a {
  display: block;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

footer.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

footer.site-footer a { color: var(--fg); }
footer.site-footer .brand-copy { text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Lightbox ---------- */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox .lb-close,
.lightbox .lb-prev,
.lightbox .lb-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

.lightbox .lb-close {
  top: 24px;
  right: 32px;
  font-size: 2rem;
}

.lightbox .lb-prev,
.lightbox .lb-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  padding: 16px;
}

.lightbox .lb-prev { left: 8px; }
.lightbox .lb-next { right: 8px; }

.project-images img,
.painting-item img,
.publication-item img,
.photo-grid img {
  cursor: pointer;
}
