:root {
    --color-bg: #f8f7f4;
    --color-text: #1a1a1a;
    --color-accent: #8b7355;
    --color-light: #e8e6e1;
    --color-border: #d4d2cc;
    --font-display: 'Crimson Pro', serif;
    --font-body: 'Montserrat', sans-serif;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    color: var(--color-text);
}

a:hover {
    color: var(--color-accent);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

.section-label {
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1rem;
    font-weight: 500;
}

/* ── Navigation ─────────────────────────────────────────── */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    z-index: 1000;
    background: linear-gradient(to bottom, var(--color-bg) 0%, rgba(248, 247, 244, 0) 100%);
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--color-text);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Logo při scrollování dolů jemně zmizí, při pohybu nahoru se vrátí */
.site-nav.logo-hidden:not(.is-open) .logo {
    opacity: 0;
    visibility: hidden;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a[aria-current="page"] {
    color: var(--color-accent);
}

.nav-toggle {
    display: none;
    position: relative;
    z-index: 1100;
    width: 56px;
    height: 52px;
    /* přisazené k pravému okraji obrazovky, mimo sloupec obsahu */
    margin-right: -2rem;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.nav-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background-color: var(--color-text);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.site-nav.is-open .nav-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.site-nav.is-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

.site-nav.is-open .nav-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ── Hero carousel ──────────────────────────────────────── */
.hero {
    position: relative;
    /* Výška = viditelná část okna. svh nepočítá s lištami mobilního prohlížeče,
       takže je popisek i tlačítka vidět vždy celý; 100vh je záloha pro starší prohlížeče. */
    height: 100vh;
    height: 100svh;
    min-height: 320px;
    overflow: hidden;
    background-color: var(--color-text);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.4s ease-in-out;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 7s ease-out;
}

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

.hero-slide.is-active img {
    transform: scale(1.06);
}

.hero-shade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 45%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.hero-bar {
    position: absolute;
    left: 4rem;
    right: 4rem;
    bottom: 3.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    flex-wrap: wrap;
    color: #ffffff;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 300;
    font-style: italic;
    line-height: 1.1;
}

.hero-meta {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 0.5rem;
    opacity: 0.85;
}

.hero-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.hero-arrow {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: none;
    color: #ffffff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.hero-arrow:hover {
    background-color: #ffffff;
    color: var(--color-text);
}

.hero-dots {
    display: flex;
    gap: 10px;
    align-items: center;
}

.hero-dot {
    width: 16px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: width 0.5s ease;
}

.hero-dot span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    opacity: 0.5;
    transition: opacity 0.5s ease;
}

.hero-dot.is-active {
    width: 40px;
}

.hero-dot.is-active span {
    opacity: 1;
}

/* ── About ──────────────────────────────────────────────── */
.about {
    padding: 9rem 4rem 8rem;
    max-width: calc(760px + 8rem);
    margin: 0 auto;
    text-align: center;
}

.about h2 {
    font-family: var(--font-display);
    font-size: 4.75rem;
    font-weight: 300;
    font-style: italic;
    line-height: 1.1;
    margin-bottom: 2.5rem;
}

.about-divider {
    width: 64px;
    height: 1px;
    background-color: var(--color-accent);
    margin: 0 auto 3.5rem;
}

.about p {
    font-size: 1.1rem;
    line-height: 1.8;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    text-align: left;
}

.signature {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-style: italic;
    margin-top: 2.5rem;
    color: var(--color-accent);
}

/* ── Gallery ────────────────────────────────────────────── */
.gallery {
    padding: 8rem 4rem;
    background-color: var(--color-light);
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h1,
.section-header h2 {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 300;
    line-height: 1.1;
}

.gallery-grid {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

.gallery-item:hover .gallery-overlay,
.gallery-item:focus-visible .gallery-overlay {
    opacity: 1;
}

.gallery-title {
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 300;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-title,
.gallery-item:focus-visible .gallery-title {
    transform: translateY(0);
}

.gallery-cta {
    text-align: center;
    margin-top: 4rem;
}

.btn-more-works {
    display: inline-block;
    padding: 1.2rem 3rem;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.btn-more-works:hover {
    background-color: var(--color-accent);
    color: #ffffff;
}

/* ── Contact ────────────────────────────────────────────── */
.contact {
    padding: 8rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.contact h2 {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 300;
    margin-bottom: 3rem;
}

.contact-label {
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact-value {
    font-size: 1.2rem;
    font-weight: 300;
}

.contact-value a {
    text-decoration: none;
}

/* ── Exhibitions ────────────────────────────────────────── */
.vystavy {
    padding: 8rem 4rem;
    background-color: var(--color-light);
}

.vystavy-columns {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6rem;
}

.vystavy-col-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--color-accent);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.vystavy-list {
    list-style: none;
}

.vystavy-list li {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 1rem;
    align-items: baseline;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
    font-weight: 300;
    transition: color 0.2s ease;
}

.vystavy-list li:hover {
    color: var(--color-accent);
}

.vystavy-place {
    font-weight: 500;
    letter-spacing: 0.5px;
}

.vystavy-gallery {
    opacity: 0.8;
}

.vystavy-year {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--color-accent);
    text-align: right;
    white-space: nowrap;
}

/* ── Projects page ──────────────────────────────────────── */
.projects-hero {
    padding: 12rem 4rem 5rem;
    text-align: center;
}

.projects-hero h1 {
    font-family: var(--font-display);
    font-size: 5.4rem;
    font-weight: 300;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 1rem;
}

.projects-hero p {
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 300;
    opacity: 0.6;
}

/* ── Lightbox ───────────────────────────────────────────── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(10, 10, 10, 0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-close,
.lightbox-nav {
    position: fixed;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    z-index: 2100;
    font-weight: 100;
    transition: color 0.2s ease;
}

.lightbox-close {
    top: 1.5rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 2.5rem;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 4rem;
    padding: 1rem;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    color: #ffffff;
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

.lightbox-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
}

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

.lightbox-info {
    text-align: center;
    padding: 1.8rem 2rem 0;
    color: #ffffff;
}

.lightbox-name {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.lightbox-meta {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.55;
}

.lightbox-counter {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 300;
}

/* ── Footer ─────────────────────────────────────────────── */
footer {
    padding: 3rem 4rem;
    text-align: center;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
    font-weight: 300;
    opacity: 0.7;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 968px) {
    .site-nav {
        padding: 1.5rem 2rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .hero-bar {
        left: 2rem;
        right: 2rem;
        bottom: 2.5rem;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .about {
        padding: 6rem 2rem 5rem;
    }

    .about h2 {
        font-size: 3.5rem;
    }

    .gallery,
    .vystavy {
        padding: 5rem 2rem;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .section-header h1,
    .section-header h2,
    .contact h2 {
        font-size: 3rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .contact {
        padding: 5rem 2rem;
    }

    .vystavy-columns {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .projects-hero {
        padding: 10rem 2rem 4rem;
    }

    .projects-hero h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 640px) {
    .nav-toggle {
        display: flex;
    }

    .logo {
        position: relative;
        z-index: 1100;
    }

    .nav-links {
        position: fixed;
        inset: 0;
        z-index: 1050;
        background-color: var(--color-bg);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .site-nav.is-open .nav-links {
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        font-family: var(--font-display);
        font-size: 2.5rem;
        letter-spacing: 0;
        text-transform: none;
    }

    .nav-links a::after {
        display: none;
    }

    .hero-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-meta {
        font-size: 0.8rem;
    }

    .hero-controls {
        justify-content: space-between;
    }

    .hero-arrow {
        width: 44px;
        height: 44px;
    }

    .hero-dots {
        gap: 8px;
    }

    .hero-dot {
        width: 12px;
    }

    .hero-dot.is-active {
        width: 32px;
    }

    .about h2 {
        font-size: 2.875rem;
        margin-bottom: 2rem;
    }

    .about-divider {
        width: 48px;
        margin-bottom: 2.5rem;
    }

    .about p {
        font-size: 1rem;
    }

    .signature {
        font-size: 2.1rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .vystavy-list li {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .vystavy-year {
        text-align: left;
    }

    .lightbox-inner img {
        max-width: 95vw;
        max-height: 60vh;
    }

    .lightbox-nav {
        font-size: 2.5rem;
    }

    .lightbox-name {
        font-size: 1.6rem;
    }
}

/* Nízká okna (telefon na šířku, malý notebook) – carousel se vejde celý */
@media (max-height: 700px) {
    .hero-bar {
        bottom: 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-height: 480px) {
    .hero-bar {
        flex-direction: row;
        align-items: flex-end;
        bottom: 1rem;
        gap: 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-meta {
        margin-top: 0.25rem;
    }

    .hero-arrow {
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    .hero-slide.is-active img {
        transform: none;
    }
}
