/* ──────────────────────────────────────────────────────────────

   ArtPortfolio – global site styles
   Design token → layout → typography → components → utilities

   ────────────────────────────────────────────────────────────── */

/* 1. Design tokens ─────────────────────────────────────────── */
:root {
    /* Palette */
    --color-bg:           #faf9f7;
    --color-bg-subtle:    #f2f0ec;
    --color-surface:      #ffffff;
    --color-border:       #e5e1db;
    --color-text:         #1a1814;
    --color-text-muted:   #6b6560;
    --color-accent:       #c8956c;
    --color-accent-dark:  #a3734e;
    --color-overlay:      rgba(15, 14, 12, 0.85);

    /* Typography */
    --font-display:       'Cormorant Garamond', Georgia, serif;
    --font-body:          'DM Sans', system-ui, -apple-system, sans-serif;
    --font-mono:          'JetBrains Mono', ui-monospace, monospace;

    /* Type scale */
    --text-xs:   0.75rem;
    --text-sm:   0.875rem;
    --text-base: 1rem;
    --text-lg:   1.125rem;
    --text-xl:   1.25rem;
    --text-2xl:  1.5rem;
    --text-3xl:  1.875rem;
    --text-4xl:  2.25rem;
    --text-5xl:  3rem;
    --text-6xl:  3.75rem;
    --text-7xl:  4.5rem;

    /* Spacing rhythm (4-point) */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-6:  1.5rem;
    --space-8:  2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Transitions */
    --transition-fast:   150ms ease;
    --transition-base:   250ms ease;
    --transition-slow:   400ms ease;

    /* Shadows */
    --shadow-sm:   0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md:   0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
    --shadow-lg:   0 10px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.07);
    --shadow-xl:   0 20px 60px rgba(0,0,0,.16);

    /* Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;

    /* Z-index layers */
    --z-header:   100;
    --z-lightbox: 500;
    --z-toast:    900;
}

/* 2. Reset & base ──────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html,
body,
body *:not(input):not(textarea):not([contenteditable="true"]) {
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

::selection {
    background: transparent;
}

img,
picture,
svg {
    -webkit-user-drag: none;
    user-select: none;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-accent); }

/* Remove browser focus outline from non-interactive elements (headings, sections, divs).
   Interactive elements (a, button, input…) keep :focus-visible outline for keyboard nav. */
h1, h2, h3, h4, h5, h6,
p, section, article, div, span { outline: none; }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

/* 3. Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0;
}

.display-xl   { font-size: clamp(var(--text-4xl), 8vw, var(--text-7xl)); }
.display-lg   { font-size: clamp(var(--text-3xl), 5.5vw, var(--text-6xl)); }
.display-md   { font-size: clamp(var(--text-2xl), 4vw, var(--text-5xl)); }
.display-sm   { font-size: clamp(var(--text-xl), 3vw, var(--text-4xl)); }

.text-muted   { color: var(--color-text-muted); }
.text-accent  { color: var(--color-accent); }
.text-serif   { font-family: var(--font-display); }
.text-body    { font-family: var(--font-body); }

.caption {
    font-size: var(--text-xs);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* 4. Layout ────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: var(--space-6);
}
.container-narrow { max-width: 780px; }
.container-wide   { max-width: 1400px; }

section { padding-block: var(--space-24); }

/* Automatické striedanie pozadia pre sekcie za sebou kvôli lepšej čitateľnosti a oddeleniu */
main > *:nth-child(even) {
    background-color: var(--color-bg-subtle);
}
main > *:nth-child(odd) {
    background-color: var(--color-surface);
}

/* Kvôli zachovaniu kontrastu medzi predposlednou (okrem iného About) a poslednou sekciou */
main > *:last-child {
    background-color: var(--color-bg) !important;
}

.social-section {
    /* pozadie sa flexibilne dedí z 'main > *' pravidla */
}

.about-section {
    border-top: 1px solid color-mix(in srgb, var(--color-border) 60%, transparent);
}

/* 5. Site header ───────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    /* Iný odtieň pozadia vychádzajúci z jemného podkladového odtieňa palety */
    background-color: color-mix(in srgb, var(--color-bg-subtle) 85%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    /* Jemný priestorový tieň */
    box-shadow: var(--shadow-md);
    transition: border-color var(--transition-base);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    height: 64px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-display);
    font-size: clamp(var(--text-base), 2.5vw, var(--text-xl));
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-text);
    transition: color var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex-shrink: 1;
}

.site-logo__img {
    height: 54px; /* Zabezpečí, že logo má vždy zvrchu aj zospodu dostatočnú medzeru (10px margin v 64px hlavičke) */
    max-height: 100%;
    width: auto;
    flex-shrink: 0;
    object-fit: contain;
}

.site-logo:hover { color: var(--color-accent); }

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(var(--space-4), 3vw, var(--space-8));
    list-style: none;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.site-nav a {
    font-size: var(--text-sm);
    font-weight: 300;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
    position: relative;
    white-space: nowrap;
}
.site-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-accent);
    transform: scaleX(0);
    transition: transform var(--transition-base);
    transform-origin: left;
}
.site-nav a:hover, .site-nav a:focus-visible {
    color: var(--color-text);
}
.site-nav a:hover::after,
.site-nav a:focus-visible::after {
    transform: scaleX(1);
}

/* Hamburger toggle button ─────────────────────────────────── */
/* Hidden checkbox drives open/close state via CSS :has() */
.nav-toggle__input { display: none; }

.nav-toggle__btn {
    display: none; /* visible only on mobile */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}
.nav-toggle__btn:hover { background: var(--color-bg-subtle); }

.nav-toggle__bar {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform var(--transition-base), opacity var(--transition-base);
    transform-origin: center;
}

/* Mobile header – hamburger menu */
@media (max-width: 540px) {
    .site-header .container {
        height: 56px;
        gap: var(--space-2);
    }

    .site-logo {
        font-size: var(--text-sm);
    }

    .nav-toggle__btn {
        display: flex;
        margin-left: auto;
    }

    /* Nav hidden by default on mobile */
    .site-header .site-nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: center;
        background-color: color-mix(in srgb, var(--color-bg) 98%, transparent);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--color-border);
        padding: var(--space-3) var(--space-6) var(--space-5);
        gap: 0;
        z-index: calc(var(--z-header) - 1);
        animation: slideDown 200ms ease both;
    }

    .site-header .site-nav li { width: 100%; }

    .site-header .site-nav a {
        display: block;
        padding-block: var(--space-3);
        font-size: var(--text-base);
        border-bottom: 1px solid var(--color-border);
        text-align: center;
    }
    .site-header .site-nav li:last-child a { border-bottom: none; }

    /* Show nav when checkbox is checked (:has() – Chrome 105+, Safari 15.4+, FF 121+) */
    .site-header:has(.nav-toggle__input:checked) .site-nav { display: flex; }

    /* Animate bars → ✕ */
    .site-header:has(.nav-toggle__input:checked) .nav-toggle__bar:nth-child(1) {
        transform: translateY(6.5px) rotate(45deg);
    }
    .site-header:has(.nav-toggle__input:checked) .nav-toggle__bar:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    .site-header:has(.nav-toggle__input:checked) .nav-toggle__bar:nth-child(3) {
        transform: translateY(-6.5px) rotate(-45deg);
    }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 6. Site footer ───────────────────────────────────────────── */
.site-footer {
    position: relative;
    /* initial peel size */
    --peel-size: 60px; 
}

/* Expanded state class handled by JS */
.site-footer.is-peeled {
    --peel-size: 300px;
}

.site-footer__content {
    background-color: var(--color-bg);
    border-top: 1px solid var(--color-border);
    padding-block: var(--space-12);
    position: relative;
    z-index: 2;
}

/* Fallback border when clip path doesn't cut everything perfectly or for extra separation */
.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.footer-copy {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* Page Peel Effect (Bottom-Right Easter Egg) */
.site-peel-underneath {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 320px;
    height: 320px;
    background: #111;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    gap: var(--space-2);
    padding: 0 40px 40px 0;
    z-index: 10; /* Overlay above page */
    /* Presná definícia rohu tak, aby nič nevyčnievalo z priestoru za limitom ohybu predtým ani po */
    clip-path: polygon(100% calc(100% - var(--peel-size)), 100% 100%, calc(100% - var(--peel-size)) 100%);
    transition: clip-path 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.site-peel-heart {
    width: 96px; /* Zväčšené */
    height: 96px;
    align-self: flex-end;
    margin-right: -10px; /* Posun doprava pre odokrytie */
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: scale(0.4) translateY(20px);
}

.site-footer.is-peeled .site-peel-heart {
    transform: scale(1) translateY(0);
}

.site-peel-text {
    font-size: var(--text-base);
    font-family: var(--font-display);
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    margin-right: -20px; /* Zarovnať k srdcu doprava */
    line-height: 1.4;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    transition-delay: 0s;
}

.site-footer.is-peeled .site-peel-text {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.site-peel-flap {
    position: absolute;
    bottom: 0;
    right: 0;
    width: var(--peel-size);
    height: var(--peel-size);
    background: linear-gradient(135deg, 
        /* Back of the paper */
        var(--color-bg) 0%, 
        color-mix(in srgb, var(--color-bg) 88%, #000000) 45%,
        /* Edge highlight - solid color */
        #ffffff 49%, 
        /* Hard stop to transparent */
        transparent 50%
    );
    filter: drop-shadow(-8px -8px 24px rgba(0,0,0,0.18));
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 11; /* overlaid on top */
    pointer-events: auto;
    cursor: pointer;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    -webkit-tap-highlight-color: transparent;
}

.site-peel-trigger {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 320px;
    height: 320px;
    z-index: 12;
    cursor: pointer;
    background: transparent;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    /* Kopíruje presný tvar čierneho rohu. Tým zaisťuje, že je klikateľná 
       dokonale celá plocha odkrytého papiera a rastie spolu s ním. */
    clip-path: polygon(100% calc(100% - var(--peel-size)), 100% 100%, calc(100% - var(--peel-size)) 100%);
    transition: clip-path 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* 7. Hero section ──────────────────────────────────────────── */
.hero {
    min-height: 90svh;
    display: flex;
    align-items: center;
    padding-block: var(--space-32);
    overflow: clip;
    background-color: #fcf9f2 !important; /* Jemný krémový teplejší odtieň pre Hero sekciu */
}

.hero__layout {
    display: grid;
    gap: clamp(var(--space-8), 5vw, var(--space-20));
    align-items: center;
}

@media (min-width: 992px) {
    .hero__layout {
        grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
    }
}

.hero__inner {
    display: grid;
    gap: var(--space-6);
    max-width: 640px;
}

.hero__eyebrow {
    display: block;
    font-family: var(--font-body);
    font-size: var(--text-xs);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-2);
}

.hero__title {
    font-size: clamp(var(--text-4xl), 7vw, var(--text-7xl));
    line-height: 1.05;
    font-weight: 300;
}

.hero__subtitle {
    font-family: var(--font-body);
    font-size: clamp(var(--text-base), 1.5vw, var(--text-lg));
    color: var(--color-text-muted);
    line-height: 1.7;
    max-width: 500px;
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-4);
    font-size: var(--text-sm);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text);
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}
.hero__cta:hover { color: var(--color-accent); }

.hero-art {
    position: relative;
    min-height: min(72vw, 720px);
    display: grid;
    place-items: center;
    isolation: isolate;
    contain: layout style;
}

.hero-art__backdrop {
    position: absolute;
    inset: 10% 6% 12%;
    border-radius: 38% 62% 55% 45% / 42% 40% 60% 58%;
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.95), transparent 42%),
        linear-gradient(140deg, rgba(239, 230, 220, 0.9), rgba(246, 243, 239, 0.55));
    filter: blur(12px);
    opacity: 0.9;
    transform: rotate(-9deg) translateZ(0);
    will-change: transform;
}

.hero-art__orb {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(22px);
    opacity: 0.75;
    will-change: transform;
    transform: translateZ(0);
}

.hero-art__orb--one {
    width: 180px;
    height: 180px;
    top: 4%;
    right: 6%;
    background: rgba(200, 149, 108, 0.20);
}

.hero-art__orb--two {
    width: 220px;
    height: 220px;
    bottom: 6%;
    left: 2%;
    background: rgba(140, 116, 87, 0.12);
}

.hero-art__stack {
    position: relative;
    width: min(100%, 580px);
    aspect-ratio: 5 / 6;
}

.hero-art__frame {
    position: absolute;
    inset: 0;
    margin: auto;
    overflow: visible;
    width: 92%;
    height: 94%;
    background: transparent;
    opacity: 0;
    transform:
        translate3d(var(--hero-offset-x, 0), var(--hero-offset-y, 0), 0)
        scale(calc(var(--hero-scale, 1.02) - 0.08))
        rotate(var(--hero-rotation, 0deg));
    transition:
        opacity 4200ms cubic-bezier(0.19, 1, 0.22, 1),
        transform 4200ms cubic-bezier(0.19, 1, 0.22, 1);
    will-change: opacity, transform;
    pointer-events: none;
    filter: saturate(0.94) brightness(1.02);
}

.hero-art__frame--active {
    opacity: 1;
    transform:
        translate3d(var(--hero-offset-x, 0), var(--hero-offset-y, 0), 0)
        scale(var(--hero-scale, 1.02))
        rotate(var(--hero-rotation, 0deg));
    filter: saturate(1) brightness(1);
    z-index: 12;
}

.hero-art__frame--exit {
    opacity: 0;
    transform:
        translate3d(
            calc(var(--hero-offset-x, 0) + (var(--hero-drift-x, 0%) * 0.72)),
            calc(var(--hero-offset-y, 0) + (var(--hero-drift-y, 0%) * 0.72)),
            0)
        scale(calc(var(--hero-scale, 1.02) + 0.02))
        rotate(calc(var(--hero-rotation, 0deg) + 0.9deg));
    filter: saturate(0.96) brightness(1.03);
    z-index: 11;
}

.hero-art__frame--preload {
    opacity: 0.02;
    transform:
        translate3d(
            calc(var(--hero-offset-x, 0) - (var(--hero-drift-x, 0%) * 0.22)),
            calc(var(--hero-offset-y, 0) - (var(--hero-drift-y, 0%) * 0.22)),
            0)
        scale(calc(var(--hero-scale, 1.02) - 0.028))
        rotate(calc(var(--hero-rotation, 0deg) - 0.55deg));
    filter: saturate(0.93) brightness(1.04);
    z-index: 10;
}

.hero-art__frame::after {
    content: "";
    position: absolute;
    inset: -22%;
    background: radial-gradient(ellipse at center,
        rgba(250, 249, 247, 0) 22%,
        rgba(250, 249, 247, 0.55) 58%,
        rgba(250, 249, 247, 0.92) 78%,
        rgba(250, 249, 247, 1) 100%);
    filter: blur(38px);
    pointer-events: none;
    z-index: 5;
}

.hero-art__frame::before {
    content: "";
    position: absolute;
    inset: -28%;
    background: radial-gradient(ellipse at center,
        rgba(250, 249, 247, 0) 15%,
        rgba(250, 249, 247, 0.3) 44%,
        rgba(250, 249, 247, 0.72) 68%,
        rgba(250, 249, 247, 0.96) 84%,
        rgba(250, 249, 247, 1) 100%);
    filter: blur(55px);
    opacity: 1;
    pointer-events: none;
    z-index: 4;
}

.hero-art__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.hero-art__image--aura {
    opacity: 0.46;
    filter: blur(26px) saturate(0.9) brightness(1.07);
    transform: scale(1.06);
    -webkit-mask-image:
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0.92) 10%, rgba(0, 0, 0, 0.72) 24%, rgba(0, 0, 0, 0.42) 40%, rgba(0, 0, 0, 0.18) 54%, rgba(0, 0, 0, 0.06) 66%, transparent 78%);
    -webkit-mask-composite: source-over;
    mask-image:
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0.92) 10%, rgba(0, 0, 0, 0.72) 24%, rgba(0, 0, 0, 0.42) 40%, rgba(0, 0, 0, 0.18) 54%, rgba(0, 0, 0, 0.06) 66%, transparent 78%);
    z-index: 1;
}

.hero-art__image--mist {
    opacity: 0.72;
    filter: blur(9px) saturate(0.92) brightness(1.05);
    transform: scale(1.01);
    -webkit-mask-image:
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0.96) 8%, rgba(0, 0, 0, 0.78) 20%, rgba(0, 0, 0, 0.46) 34%, rgba(0, 0, 0, 0.2) 48%, rgba(0, 0, 0, 0.08) 60%, transparent 72%);
    mask-image:
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0.96) 8%, rgba(0, 0, 0, 0.78) 20%, rgba(0, 0, 0, 0.46) 34%, rgba(0, 0, 0, 0.2) 48%, rgba(0, 0, 0, 0.08) 60%, transparent 72%);
    z-index: 2;
}

.hero-art__image--core {
    opacity: 0.96;
    filter: blur(0.5px) saturate(0.96) contrast(1.01) brightness(1.03);
    transform: scale(0.96);
    -webkit-mask-image:
        radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0.98) 22%, rgba(0, 0, 0, 0.9) 34%, rgba(0, 0, 0, 0.62) 46%, rgba(0, 0, 0, 0.26) 58%, rgba(0, 0, 0, 0.08) 66%, transparent 74%);
    mask-image:
        radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0.98) 22%, rgba(0, 0, 0, 0.9) 34%, rgba(0, 0, 0, 0.62) 46%, rgba(0, 0, 0, 0.26) 58%, rgba(0, 0, 0, 0.08) 66%, transparent 74%);
    z-index: 3;
}

.hero-art__stack::after {
    content: "";
    position: absolute;
    inset: -6% -8%;
    border-radius: 46% 54% 58% 42% / 42% 38% 62% 58%;
    background: radial-gradient(ellipse at center,
        rgba(250, 249, 247, 0) 10%,
        rgba(250, 249, 247, 0.2) 36%,
        rgba(250, 249, 247, 0.62) 60%,
        rgba(250, 249, 247, 0.9) 78%,
        rgba(250, 249, 247, 1) 100%);
    filter: blur(50px);
    will-change: transform;
    transform: translateZ(0);
    pointer-events: none;
    z-index: 20;
}

@media (max-width: 991.98px) {
    .hero {
        min-height: auto;
        padding-block: var(--space-24);
    }

    .hero-art {
        min-height: min(96vw, 560px);
    }

    .hero-art__stack {
        width: min(100%, 490px);
    }
}

@media (max-width: 575.98px) {
    .hero-art__frame {
        width: 92%;
        height: 92%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-art__frame {
        transition: none;
    }

    .hero-art__frame--active {
        opacity: 1;
    }

    .hero-art__frame--exit,
    .hero-art__frame--preload {
        display: none;
    }
}

/* 8. Gallery section ───────────────────────────────────────── */
.gallery-section-wrapper {
    background-color: transparent !important;
}
.gallery-section { padding-block: var(--space-24); }
.gallery-section--soft { background-color: var(--color-bg-subtle); }
.gallery-section--mist {
    background:
        radial-gradient(circle at 12% 18%, rgba(255,255,255,.6), transparent 20%),
        linear-gradient(180deg, #f8f5f0 0%, #f2ede5 100%);
}

.section-heading {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-heading__label {
    display: block;
    font-size: var(--text-xs);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-3);
}

.section-heading__title {
    font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
    font-weight: 300;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
}

@media (min-width: 768px) {
    .gallery-grid { gap: var(--space-6); }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: var(--space-2);
    }
}

@media (min-width: 481px) and (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: var(--space-3);
    }
}

/* ── Circles layout ─────────────────────────────────────── */
.gallery-grid--circles {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-8);
    align-items: start;
}

@media (max-width: 480px) {
    .gallery-grid--circles {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: var(--space-4);
    }
}

@media (min-width: 481px) and (max-width: 640px) {
    .gallery-grid--circles {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: var(--space-5);
    }
}

.gallery-grid--circles .gallery-item {
    aspect-ratio: 1;
    border-radius: 50%;
    transform: scale(0.92);
    transition:
        border-radius 200ms ease,
        transform     200ms ease,
        box-shadow    200ms ease;
}

.gallery-grid--circles .gallery-item:hover,
.gallery-grid--circles .gallery-item:focus-visible {
    border-radius: var(--radius-md);
    transform: scale(1);
    box-shadow: var(--shadow-lg);
}

/* Don't scale on regular hover when circles – handled above */
.gallery-grid--circles .gallery-item:hover img { transform: scale(1.04); }
/* ─────────────────────────────────────────────────────────── */

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    aspect-ratio: 4 / 5;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.gallery-item:hover,
.gallery-item:focus-visible {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    outline: none;
}

.gallery-item__media {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.08);
    transition: transform var(--transition-slow);
}

.gallery-item:hover img { transform: scale(1.12); }

.gallery-item__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.5) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-base);
    display: flex;
    align-items: flex-end;
    padding: var(--space-4);
}

.gallery-item:hover .gallery-item__overlay,
.gallery-item:focus-visible .gallery-item__overlay { opacity: 1; }

.gallery-item__title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    color: #fff;
    font-weight: 400;
}

/* ── Liquid layout ──────────────────────────────────────── */
.gallery-grid--liquid {
    position: relative;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: clamp(var(--space-4), 2vw, var(--space-8));
    align-items: center;
    padding: var(--space-4) 0;
    overflow: visible;
    filter: url('#gallery-liquid-goo');
    isolation: isolate;
}

@media (max-width: 480px) {
    .gallery-grid--liquid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: clamp(var(--space-3), 3vw, var(--space-5));
    }
}

@media (min-width: 481px) and (max-width: 640px) {
    .gallery-grid--liquid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: clamp(var(--space-3), 2.5vw, var(--space-6));
    }
}

.gallery-grid--liquid .gallery-item {
    --liquid-tail-x: 50%;
    --liquid-tail-y: 50%;
    --liquid-tail-size: 18%;
    --liquid-tail-opacity: 0;
    --liquid-stretch-x: 1;
    --liquid-stretch-y: 1;
    --liquid-core-radius: 50%;
    --liquid-shadow: 0.18;
    overflow: visible;
    border-radius: 50%;
    background: transparent;
    transition:
        filter 220ms ease-out,
        opacity 220ms ease-out;
    filter: drop-shadow(0 18px 34px rgba(26, 24, 20, var(--liquid-shadow)));
    z-index: 2;
}

.gallery-grid--liquid .gallery-item:hover,
.gallery-grid--liquid .gallery-item:focus-visible {
    box-shadow: none;
}

.gallery-grid--liquid .gallery-item__media {
    overflow: hidden;
    height: 100%;
    border-radius: 50%;
    transform: translateZ(0);
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.7), transparent 20%),
        rgba(255, 255, 255, 0.08);
    isolation: isolate;
    box-shadow:
        0 0 0 8px rgba(250, 249, 247, 0.24),
        0 0 28px rgba(250, 249, 247, 0.34);
}

.gallery-grid--liquid .gallery-item__media::before,
.gallery-grid--liquid .gallery-item__media::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}

.gallery-grid--liquid .gallery-item__media::before {
    inset: 0;
    background:
        radial-gradient(circle at 22% 20%, rgba(255, 255, 255, 0.55), transparent 16%),
        radial-gradient(circle at 75% 78%, rgba(255, 255, 255, 0.22), transparent 18%),
        radial-gradient(circle at var(--liquid-tail-x) var(--liquid-tail-y), rgba(255, 255, 255, calc(var(--liquid-tail-opacity) * 0.55)), transparent var(--liquid-tail-size));
    mix-blend-mode: screen;
    opacity: 0.65;
}

.gallery-grid--liquid .gallery-item__media::after {
    inset: -12%;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, rgba(255,255,255,0) 48%, rgba(255,255,255,0.03) 66%, rgba(255,255,255,0.12) 82%, rgba(255,255,255,0) 100%),
        radial-gradient(circle at var(--liquid-tail-x) var(--liquid-tail-y), rgba(255,255,255,calc(var(--liquid-tail-opacity) * 1.15)) 0%, rgba(255,255,255,calc(var(--liquid-tail-opacity) * 0.72)) calc(var(--liquid-tail-size) * 0.58), rgba(255,255,255,0) var(--liquid-tail-size));
    filter: blur(24px);
    opacity: 1;
}

.gallery-grid--liquid .gallery-item img {
    transform: scaleX(var(--liquid-stretch-x)) scaleY(var(--liquid-stretch-y)) scale(1.01);
    transform-origin: center;
    transition: transform 220ms ease-out, filter 220ms ease-out;
    filter: saturate(1.02) contrast(1.02);
    border-radius: 50%;
}

.gallery-grid--liquid .gallery-item:hover img,
.gallery-grid--liquid .gallery-item:focus-visible img {
    transform: scaleX(calc(var(--liquid-stretch-x) + 0.02)) scaleY(calc(var(--liquid-stretch-y) + 0.02)) scale(1.02);
}

.gallery-grid--liquid .gallery-item__overlay {
    inset: auto 12% 10% 12%;
    border-radius: 999px;
    min-height: 54px;
    padding: var(--space-3) var(--space-4);
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(16, 15, 13, 0.14), rgba(16, 15, 13, 0.42));
    backdrop-filter: blur(8px);
    z-index: 5;
}

.gallery-grid--liquid .gallery-item__title {
    text-align: center;
    font-size: clamp(var(--text-base), 1.4vw, var(--text-xl));
}

.gallery-liquid-bridge {
    --liquid-bridge-x: 0px;
    --liquid-bridge-y: 0px;
    --liquid-bridge-length: 0px;
    --liquid-bridge-thickness: 20px;
    --liquid-bridge-angle: 0deg;
    --liquid-bridge-opacity: 0;
    --liquid-bridge-scale-x: 0.2;
    --liquid-bridge-scale-y: 0.65;
    position: absolute;
    left: 0;
    top: 0;
    width: var(--liquid-bridge-length);
    height: var(--liquid-bridge-thickness);
    transform:
        translate3d(var(--liquid-bridge-x), var(--liquid-bridge-y), 0)
        translate(-50%, -50%)
        rotate(var(--liquid-bridge-angle))
        scaleX(var(--liquid-bridge-scale-x))
        scaleY(var(--liquid-bridge-scale-y));
    transform-origin: center;
    border-radius: 999px;
    opacity: var(--liquid-bridge-opacity);
    pointer-events: none;
    z-index: 3;
    transition:
        opacity 180ms ease-out,
        transform 180ms ease-out,
        width 180ms ease-out,
        height 180ms ease-out;
    background:
        radial-gradient(circle at 50% 50%, rgba(255,255,255,1), rgba(255,255,255,0.6) 42%, rgba(255,255,255,0) 82%),
        linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,1) 16%, rgba(255,255,255,1) 84%, rgba(255,255,255,0));
    filter: blur(28px) saturate(1.2);
    mix-blend-mode: screen;
}

.gallery-liquid-defs {
    position: absolute;
}

@media (max-width: 767.98px) {
    .gallery-grid--liquid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: var(--space-4);
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-grid--liquid .gallery-item {
        transform: none !important;
        transition: none !important;
        filter: none !important;
    }

    .gallery-grid--liquid .gallery-item img,
    .gallery-grid--liquid .gallery-item__overlay,
    .gallery-liquid-bridge {
        transition: none !important;
    }

    .gallery-liquid-bridge {
        display: none;
    }

    .gallery-grid--liquid {
        filter: none;
    }
}

/* ── Zoom layout ─────────────────────────────────────── */
.gallery-grid--zoom .gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: none;
}

.gallery-grid--zoom .gallery-item:hover,
.gallery-grid--zoom .gallery-item:focus-visible {
    transform: none;
    box-shadow: none;
}

.gallery-grid--zoom .gallery-item img {
    transition: transform 0.3s ease;
}

.gallery-grid--zoom .gallery-item:hover img,
.gallery-grid--zoom .gallery-item:focus-visible img {
    transform: scale(1.1);
}

.gallery-grid--zoom .gallery-item__brush {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.gallery-grid--zoom .gallery-item__brush path {
    transition: stroke-dashoffset 0.8s ease-out;
}

.gallery-grid--zoom .gallery-item:hover .gallery-item__brush path {
    stroke-dashoffset: 0;
}

.gallery-grid--zoom .gallery-item__overlay {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .gallery-grid--zoom .gallery-item img {
        transform: none !important;
        transition: none !important;
    }

    .gallery-grid--zoom .gallery-item__brush path {
        stroke-dashoffset: 0 !important;
        transition: none !important;
    }
}

.gallery-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-24) var(--space-6);
    text-align: center;
    color: var(--color-text-muted);
    gap: var(--space-4);
}

.section-sort-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.section-sort-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.section-sort-item--dragging {
    opacity: 0.6;
    transform: scale(0.99);
}

.section-sort-item--drop-target {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

.section-sort-item__handle {
    color: var(--color-text-muted);
    font-size: 1.2rem;
    line-height: 1;
    cursor: grab;
    user-select: none;
}

.section-sort-item__main {
    min-width: 0;
}

/* 9. Lightbox ──────────────────────────────────────────────── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: var(--z-lightbox);
    background: var(--color-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    animation: fadeIn var(--transition-base) both;
}

.lightbox__inner {
    position: relative;
    max-width: 90vw;
    max-height: 90svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border-top-right-radius: 0; /* Ensures a sharp paper corner for the peeled flap */
    padding: var(--space-8);
    gap: var(--space-4);
    filter: drop-shadow(0 20px 48px rgba(0,0,0,0.12));
    clip-path: polygon(0 0, calc(100% - 76px) 0, 100% 76px, 100% 100%, 0 100%);
    transition: clip-path 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox__inner:has(.lightbox__close:hover) {
    clip-path: polygon(0 0, calc(100% - 92px) 0, 100% 92px, 100% 100%, 0 100%);
}

.lightbox__inner--detail {
    padding: 0;
    width: min(1320px, 100%);
    max-width: min(1320px, 100%);
    max-height: calc(100svh - var(--space-12));
    overflow: hidden;
    position: relative;
    border-radius: var(--radius-lg);
    border-top-right-radius: 0; 
    background: var(--color-surface);
    /* Changed to drop-shadow so the clip-path defines the exact shadow bounds! */
    filter: drop-shadow(0 20px 48px rgba(0,0,0,0.12));
    display: flex;
    flex-direction: column;
}

.lightbox__inner--preview-only {
    width: min(1100px, 100%);
    max-width: min(1100px, 100%);
    max-height: calc(100svh - var(--space-12));
    overflow: hidden;
    position: relative;
    border-radius: var(--radius-lg);
    border-top-right-radius: 0;
    background: var(--color-surface);
    filter: drop-shadow(0 20px 48px rgba(0,0,0,0.12));
    display: flex;
    flex-direction: column;
}

.lightbox-preview-only {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1;
    min-height: 0;
}

.lightbox-preview-only__hero {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: var(--space-4);
}

.lightbox__img-container--preview {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__img--preview {
    max-width: 100%;
    max-height: calc(100svh - var(--space-20));
    object-fit: contain;
    border-radius: var(--radius-md);
}

.lightbox-preview-only__gallery-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
}

.lightbox-preview-only__gallery-strip {
    display: flex;
    flex: 1;
    min-width: 0;
    gap: var(--space-2);
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: var(--space-1) 0;
    -ms-overflow-style: none;
    scrollbar-width: thin;
}

.lightbox-preview-only__gallery-strip::-webkit-scrollbar {
    height: 4px;
}

.lightbox-preview-only__gallery-strip::-webkit-scrollbar-track {
    background: transparent;
}

.lightbox-preview-only__gallery-strip::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 2px;
}

.lightbox-preview-only__gallery-card {
    flex: 0 0 clamp(70px, 15vw, 100px);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    cursor: pointer;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 120ms ease, opacity 120ms ease;
    opacity: 0.65;
    padding: var(--space-1);
}

.lightbox-preview-only__gallery-card:hover,
.lightbox-preview-only__gallery-card:focus-visible {
    opacity: 0.9;
    transform: translateY(-2px);
}

.lightbox-preview-only__gallery-card--active {
    opacity: 1;
    transform: translateY(-2px);
}

.lightbox-preview-only__gallery-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    transition: border-color 120ms ease;
}

.lightbox-preview-only__gallery-card--active img {
    border-color: var(--color-accent);
}

.lightbox-preview-only__gallery-card span {
    font-size: 10px;
    color: var(--color-text-muted);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lightbox-preview-only__gallery-nav {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 120ms ease, opacity 120ms ease;
}

.lightbox-preview-only__gallery-nav:hover:not(:disabled) {
    background: var(--color-bg-subtle);
}

.lightbox-preview-only__gallery-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.lightbox-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr);
    width: 100%;
    flex: 1;
    min-height: 0;
}

@media (max-width: 991.98px) {
    .lightbox-detail {
        display: flex;
        flex-direction: column;
        flex: none;
        min-height: 0;
        height: 100svh;
        overflow: hidden;
    }
    
    .lightbox {
        padding: var(--space-2);
    }

    .lightbox__inner--detail {
        height: 100svh;
        max-height: 100svh;
        border-radius: 0;
        overflow: hidden;
    }

    .lightbox-detail__hero {
        position: relative;
        width: 100%;
        height: auto;
        flex: 1;
        min-height: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

    .lightbox__img--detail {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    .lightbox-detail__media-column {
        display: flex;
        flex-direction: column;
        gap: var(--space-2);
        padding: var(--space-2);
        width: 100%;
        flex-shrink: 0;
        /* Reset knižnej väzby pre mobil */
        box-shadow: none;
    }

    .lightbox-detail__sidebar {
        border-left: none;
        border-top: 1px solid var(--color-border);
        padding: var(--space-4);
        overflow-y: auto;
        width: 100%;
        flex-shrink: 0;
        max-height: 40svh;
        /* Reset knižnej väzby pre mobil */
        background: var(--color-surface);
        box-shadow: none;
    }

    .lightbox-detail__gallery-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        width: 100%;
        min-width: 0;
        flex-shrink: 0;
    }

    .lightbox-detail__gallery-card {
        flex: 0 0 clamp(80px, 20vw, 120px);
        flex-shrink: 0;
    }
}

.lightbox-detail__media-column {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: var(--space-6);
    padding: var(--space-6);
    background: var(--color-surface);
    min-height: 0;
    /* Knižná väzba: jemný plynulý ohyb */
    box-shadow: 
        inset -80px 0 60px -50px rgba(0, 0, 0, 0.08),
        inset -30px 0 40px -20px rgba(0, 0, 0, 0.06);
}

.lightbox-detail__hero {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: transparent;
    box-shadow: none;
}

.lightbox__img--detail {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-detail__gallery-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.lightbox-detail__gallery-nav {
    position: absolute;
    top: calc(50% - var(--space-1));
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lightbox-detail__gallery-nav--prev {
    left: 0;
}

.lightbox-detail__gallery-nav--next {
    right: 0;
}

.lightbox-detail__gallery-nav:hover:not(:disabled) {
    background: var(--color-accent);
    color: var(--color-bg);
    border-color: var(--color-accent);
}

.lightbox-detail__gallery-nav:disabled {
    opacity: 0;
    pointer-events: none;
}

.lightbox-detail__gallery-strip {
    display: flex;
    gap: var(--space-3);
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: var(--space-2);
    scrollbar-width: thin;
    scrollbar-color: rgba(26, 24, 20, 0.3) transparent;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-width: 0;
}

.lightbox-detail__gallery-strip::-webkit-scrollbar {
    height: 4px;
}

.lightbox-detail__gallery-strip::-webkit-scrollbar-button {
    display: none;
}

.lightbox-detail__gallery-strip::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 2px;
    margin-inline: 10%;
}

.lightbox-detail__gallery-strip::-webkit-scrollbar-thumb {
    background: rgba(26, 24, 20, 0.3);
    border-radius: 2px;
}

.lightbox-detail__gallery-strip::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 24, 20, 0.5);
}

.lightbox-detail__gallery-card {
    flex: 0 0 160px;
    display: grid;
    gap: var(--space-2);
    padding: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    transition: transform var(--transition-base), opacity var(--transition-base);
    opacity: 0.7;
}

.lightbox-detail__gallery-card:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.lightbox-detail__gallery-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.lightbox-detail__gallery-card span {
    font-size: var(--text-xs);
    line-height: 1.5;
    color: var(--color-text-muted);
    padding-inline: 0;
}

.lightbox-detail__gallery-card--active {
    background: transparent;
    transform: translateY(-2px);
    opacity: 1;
}

.lightbox-detail__sidebar {
    display: grid;
    align-content: start;
    gap: var(--space-6);
    padding: var(--space-8) var(--space-6);
    overflow-y: scroll;    /* always reserve scrollbar track width */
    
    /* Knižná väzba: svetlejší zaoblený prechod do pravej strany */
    border-left: none;
    background: linear-gradient(to right, 
        rgba(0, 0, 0, 0.12) 0%, 
        rgba(0, 0, 0, 0.04) 6%, 
        transparent 25%), 
        var(--color-surface);
    box-shadow: 
        -15px 0 30px -10px rgba(0, 0, 0, 0.12),
        inset 15px 0 30px -15px rgba(0, 0, 0, 0.04);
    position: relative;
    z-index: 2;
}

/* Firefox fallback for custom scrollbar */
@-moz-document url-prefix() {
    .lightbox-detail__sidebar {
        scrollbar-width: thin;
        scrollbar-color: transparent transparent;
        transition: scrollbar-color 0.2s;
    }
    .lightbox-detail__sidebar:hover {
        scrollbar-color: rgba(26, 24, 20, 0.22) transparent;
    }
}

.lightbox-detail__sidebar::-webkit-scrollbar {
    width: 4px;
}

.lightbox-detail__sidebar::-webkit-scrollbar-button {
    display: none;
}

.lightbox-detail__sidebar::-webkit-scrollbar-track {
    background: transparent;
    margin-top: 96px;  /* Avoid crossing the peeled right page corner (which scales up to 92px) */
    margin-bottom: 5%;
}

.lightbox-detail__sidebar::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 2px;
    transition: background 0.2s;
}

.lightbox-detail__sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(26, 24, 20, 0.22);
}

.lightbox-detail__sidebar:hover::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 24, 20, 0.42);
}

.lightbox-detail__eyebrow {
    font-size: var(--text-xs);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.lightbox-detail__title {
    font-size: clamp(var(--text-3xl), 3.2vw, var(--text-5xl));
    line-height: 0.95;
}

.lightbox-detail__lead {
    font-size: var(--text-lg);
    color: color-mix(in srgb, var(--color-text-muted) 88%, #ffffff 12%);
    line-height: 1.82;
    max-width: 34ch;
    white-space: pre-wrap;
}

.lightbox-detail__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.lightbox-detail__tag {
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.78);
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lightbox-detail__section {
    display: grid;
    gap: var(--space-3);
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
    border-top: 1px solid rgba(26, 24, 20, 0.08);
}

.lightbox-detail__section h4 {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.lightbox-detail__section p {
    color: var(--color-text-muted);
    line-height: 1.8;
    white-space: pre-line;
}

.lightbox-detail__author-card {
    display: flow-root;
    padding: var(--space-4) 0;
    border-top: 1px solid var(--color-border);
    border-radius: 0;
    background: transparent;
}

.lightbox-detail__author-photo {
    float: left;
    width: 100px;
    height: 100px;
    margin: 0 var(--space-4) var(--space-2) 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #e2c9b4, #c8956c);
    color: #fff;
    font-family: var(--font-display);
    font-size: 2.5rem;
    line-height: 1;
}

.lightbox-detail__author-photo-image {
    float: left;
    width: 100px;
    height: 100px;
    margin: 0 var(--space-4) var(--space-2) 0;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: 0 10px 24px rgba(26, 24, 20, 0.12);
    will-change: transform;
    transform: translateZ(0);
}

.lightbox-detail__author-photo-image:hover {
    transform: scale(1.03) translateZ(0);
}

.lightbox-detail__author-photo-image--active {
    transform: scale(1.05) translateZ(0);
    box-shadow: 0 0 0 2px var(--color-accent), 0 10px 24px rgba(26, 24, 20, 0.12);
}

.lightbox-detail__author-name {
    display: block;
    font-size: 1.5rem;
    line-height: 1.15;
    margin-bottom: var(--space-2);
    overflow-wrap: anywhere;
}

.lightbox-detail__author-card .lightbox-detail__author-bio {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
}

.lightbox-detail__actions {
    display: grid;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.lightbox-detail__action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.lightbox-detail__action::after {
    content: "↗";
    color: var(--color-accent);
}

.lightbox-detail__action:hover {
    transform: translateY(-2px);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-sm);
}

.lightbox__img {
    max-width: 100%;
    max-height: calc(85svh - var(--space-8) * 2 - var(--space-12)); /* account for padding and caption */
    object-fit: contain;
}

.lightbox__caption {
    text-align: center;
    color: var(--color-foreground);
    font-family: var(--font-display);
    font-size: var(--text-lg);
    margin: 0;
}

.lightbox__close {
    position: absolute;
    top: 0;
    right: 0;
    width: 76px;
    height: 76px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    z-index: 10;
    /* We animate size on the parent so children stretch with it */
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* no overflow:hidden — drop-shadow must not be clipped */
}

.lightbox__close:hover {
    width: 92px;
    height: 92px;
}

/* ✕ — positioned deep inside the folded flap */
.lightbox__close span {
    position: absolute;
    bottom: 23%;
    left: 23%;
    transform: translate(-50%, 50%);
    font-size: 15px;
    font-family: var(--font-body, sans-serif);
    font-weight: 700;
    color: rgba(60, 50, 40, 0.08); /* Very subtle base color */
    opacity: 1; /* Always visible but faint */
    text-shadow: 
        0px -1px 1px rgba(0, 0, 0, 0.05),
        0px  1px 1px rgba(255, 255, 255, 0.5); /* Faint letterpress indent */
    z-index: 3;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox__close:hover span {
    color: rgba(60, 50, 40, 0.15); /* Jemná farba priehlbiny / tieňa v papieri */
    transform: translate(-50%, 50%) scale(1.15);
    /* Efekt vyrytia (Letterpress): vnútorný horný tieň a spodný odlesk svetla */
    text-shadow: 
        0px -1px 1px rgba(0, 0, 0, 0.12),
        0px  1px 1px rgba(255, 255, 255, 0.9);
}

.lightbox__close:active span {
    transform: translate(-50%, 50%) scale(1.05);
    transition-duration: 0.15s;
}

/*
  ERASER: Mimics the dark lightbox overlay behind the corner. 
  By hiding the parent's white corner, it gives the illusion 
  the corner has actually physically peeled away.
*/
.lightbox__close::before {
    display: none;
}

/*
  THE FLAP: A mathematically perfect peeled page.
  Maps the top-right corner to the bottom-left seamlessly.
*/
.lightbox__close::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    
    /* Rounding the new bottom-left tip acts as the curled edge of the paper */
    border-bottom-left-radius: 20px;
    
    /* Volumetric shading for 3D realism */
    background: linear-gradient(
        225deg,
        transparent 47.5%,
        #ffffff 49%,           /* Sharp edge rim light */
        #b2b2b2 51.5%,         /* Deep shadow in the inner fold */
        #e0e0e0 57%,           /* Soft mid-tone rolling outward */
        #ffffff 80%,           /* Curve specular peak */
        #f6f6f6 100%           /* Flat tip of the corner */
    );
    
    /* True drop shadow falling out onto the document beneath */
    filter: drop-shadow(-3px 3px 6px rgba(0, 0, 0, 0.35)) 
            drop-shadow(-6px 6px 14px rgba(0, 0, 0, 0.15));
    z-index: 2;
    transition: filter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-bottom-left-radius 0.4s ease,
                background 0.4s ease;
}

.lightbox__close:hover::after {
    border-bottom-left-radius: 26px; /* Flattens slightly as it pulls larger */
    background: linear-gradient(
        225deg,
        transparent 47.5%,
        #ffffff 49%,           /* Sharp edge rim light */
        #b2b2b2 51.5%,         /* Deep shadow in the inner fold */
        #e0e0e0 57%,           /* Soft mid-tone rolling outward */
        #ffffff 80%,           /* Curve specular peak */
        #f6f6f6 100%           /* Flat tip of the corner */
    );
    filter: drop-shadow(-5px 5px 12px rgba(0, 0, 0, 0.45)) 
            drop-shadow(-10px 10px 24px rgba(0, 0, 0, 0.25));
}

.lightbox__close:active::after {
    filter: drop-shadow(-2px 2px 4px rgba(0, 0, 0, 0.40));
    transition-duration: 0.15s;
}

.lightbox__nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.25);
    background: transparent;
    color: #fff;
    font-size: var(--text-xl);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}
.lightbox__nav:hover { background: rgba(255,255,255,.15); }
.lightbox__nav--prev { left: var(--space-4); }
.lightbox__nav--next { right: var(--space-4); }

@keyframes paper-breeze {
    0%, 100% { width: 58px; height: 58px; }
    50% { width: 62px; height: 62px; }
}

@keyframes paper-clip-breeze {
    0%, 100% { clip-path: polygon(0 0, calc(100% - 58px) 0, 100% 58px, 100% 100%, 0 100%); }
    50% { clip-path: polygon(0 0, calc(100% - 62px) 0, 100% 62px, 100% 100%, 0 100%); }
}

@keyframes paper-flap {
    0%, 100% { border-bottom-left-radius: 20px; filter: drop-shadow(-3px 3px 6px rgba(0, 0, 0, 0.35)) drop-shadow(-6px 6px 14px rgba(0, 0, 0, 0.15)); }
    50% { border-bottom-left-radius: 22px; filter: drop-shadow(-4px 4px 8px rgba(0, 0, 0, 0.38)) drop-shadow(-7px 7px 18px rgba(0, 0, 0, 0.18)); }
}

@media (max-width: 991.98px) {
    .lightbox__inner {
        padding: var(--space-4);
        clip-path: polygon(0 0, calc(100% - 58px) 0, 100% 58px, 100% 100%, 0 100%);
    }

    .lightbox__inner:has(.lightbox__close:hover) {
        clip-path: polygon(0 0, calc(100% - 70px) 0, 100% 70px, 100% 100%, 0 100%);
    }

    .lightbox__close {
        width: 58px;
        height: 58px;
    }

    .lightbox__close:hover {
        width: 70px;
        height: 70px;
    }

    .lightbox__close span {
        font-size: 13px;
    }

    .lightbox__close:hover span {
        transform: translate(-50%, 50%) scale(1.15);
    }
}

/* Animations isolated ONLY for touch devices */
@media (max-width: 991.98px) and (hover: none) and (pointer: coarse) {
    .lightbox__inner {
        animation: paper-clip-breeze 3.5s ease-in-out infinite;
        will-change: clip-path; /* Hardware acceleration to reduce stuttering */
    }

    .lightbox__inner:has(.lightbox__close:hover) {
        animation: none;
    }

    .lightbox__close {
        /* Mobile-only pulsing animation to indicate interactivity / flapping page */
        animation: paper-breeze 3.5s ease-in-out infinite;
        will-change: width, height;
    }

    .lightbox__close::after {
        animation: paper-flap 3.5s ease-in-out infinite;
        will-change: border-radius, filter;
    }

    .lightbox__close:hover,
    .lightbox__close:hover::after {
        animation: none;
    }
}

@media (max-width: 991.98px) {
    .lightbox {
        padding: var(--space-2);
    }

    .lightbox__inner--detail {
        max-height: calc(100svh - var(--space-4));
        border-radius: var(--radius-lg);
        border-top-right-radius: 0;
    }

    .lightbox__inner {
        border-top-right-radius: 0;
    }

    .lightbox-detail {
        grid-template-columns: 1fr;
        min-height: 0;
        gap: 0;
        overflow-y: auto;
    }

    .lightbox-detail::-webkit-scrollbar {
        width: 4px;
    }

    .lightbox-detail::-webkit-scrollbar-track {
        margin-top: 70px;
        background: transparent;
    }

    .lightbox-detail::-webkit-scrollbar-thumb {
        background: rgba(26, 24, 20, 0.22);
        border-radius: 2px;
    }

    .lightbox-detail__media-column {
        grid-template-rows: auto auto;
        gap: var(--space-4);
        padding: var(--space-4);
        min-height: 0;
        box-shadow: none !important; /* Reset knižnej väzby pre mobilný stack */
    }

    .lightbox-detail__sidebar {
        border-left: none;
        border-top: 1px solid var(--color-border);
        padding: var(--space-6);
        overflow-y: visible;
        background: var(--color-surface) !important; /* Reset knižnej väzby pre mobilný stack */
        box-shadow: none !important; /* Reset knižnej väzby pre mobilný stack */
    }

    .lightbox-detail__hero {
        min-height: clamp(40svh, 50vh, 60vh);
        padding: 0;
        border-radius: var(--radius-md);
    }

    .lightbox__img--detail {
        max-height: 100%;
    }

    .lightbox-detail__gallery-card {
        flex: 0 0 clamp(100px, 20vw, 140px);
    }

    .lightbox__inner--preview-only {
        height: 100svh;
        max-height: 100svh;
        border-radius: 0;
        overflow: hidden;
    }

    .lightbox-preview-only__hero {
        flex: 1;
        min-height: 0;
        padding: var(--space-2);
    }

    .lightbox__img--preview {
        max-height: calc(100svh - var(--space-16));
    }

    .lightbox-preview-only__gallery-wrapper {
        padding: var(--space-2);
    }

    .lightbox-preview-only__gallery-card {
        flex: 0 0 clamp(70px, 18vw, 90px);
    }
}

@media (max-width: 640px) {
    .lightbox {
        padding: var(--space-2);
    }

    .lightbox__inner--detail {
        border-radius: var(--radius-md);
        border-top-right-radius: 0;
        max-height: calc(100svh - var(--space-4));
    }

    .lightbox__inner {
        border-radius: var(--radius-md);
        border-top-right-radius: 0;
    }

    .lightbox-detail {
        gap: 0;
        overflow-y: auto;
    }

    .lightbox-detail::-webkit-scrollbar {
        width: 4px;
    }

    .lightbox-detail::-webkit-scrollbar-track {
        margin-top: 70px;
        background: transparent;
    }

    .lightbox-detail::-webkit-scrollbar-thumb {
        background: rgba(26, 24, 20, 0.22);
        border-radius: 2px;
    }

    .lightbox-detail__media-column,
    .lightbox-detail__sidebar {
        padding: var(--space-4);
        overflow-y: visible;
        background: var(--color-surface) !important;
        box-shadow: none !important;
    }

    .lightbox-detail__gallery-card {
        flex: 0 0 clamp(80px, 25vw, 100px);
        padding: 0;
        gap: var(--space-1);
    }

    .lightbox-detail__gallery-card img {
        aspect-ratio: 1;
        border-radius: var(--radius-sm);
    }

    .lightbox-detail__gallery-card span {
        font-size: 10px;
    }

    .lightbox-detail__lead {
        font-size: var(--text-base);
        max-width: none;
    }

    .lightbox-detail__title {
        font-size: clamp(1.8rem, 8vw, 2.4rem);
        line-height: 1;
    }

    .lightbox-detail__hero {
        min-height: clamp(40svh, 50vh, 60svh);
        padding: 0;
        border-radius: var(--radius-sm);
    }

    .lightbox__img--detail {
        max-height: 100%;
    }

    .lightbox__inner--preview-only {
        border-radius: var(--radius-md);
        border-top-right-radius: 0;
        max-height: calc(100svh - var(--space-4));
    }

    .lightbox-preview-only__hero {
        padding: var(--space-2);
    }

    .lightbox__img--preview {
        max-height: calc(100svh - var(--space-14));
    }

    .lightbox-preview-only__gallery-wrapper {
        padding: var(--space-2);
    }

    .lightbox-preview-only__gallery-card {
        flex: 0 0 clamp(60px, 22vw, 80px);
    }

    .lightbox-detail__author-card {
        padding: var(--space-4) 0;
    }

    .lightbox-detail__author-photo,
    .lightbox-detail__author-photo-image {
        width: 64px;
        height: 64px;
        margin-right: var(--space-3);
    }

    .lightbox__nav {
        width: 36px;
        height: 36px;
    }

    .lightbox__nav--prev { left: var(--space-2); }
    .lightbox__nav--next { right: var(--space-2); }
}

/* Lightbox image container with watermark overlay */
.lightbox__img-container {
    position: relative;
    display: inline-block;
    line-height: 0;
    max-width: 100%;
    max-height: 100%;
}

.lightbox__img-container--detail {
    display: inline-block;
}

.lightbox__img {
    display: block;
    max-width: 100%;
    max-height: 85svh;
    object-fit: contain;
    position: relative;
    z-index: 0;
}

.lightbox__img--detail {
    max-width: 100%;
    max-height: 100%;
}

.lightbox__watermark {
    position: absolute;
    top: var(--wm-top, auto);
    left: var(--wm-left, auto);
    bottom: var(--wm-bottom, var(--space-4));
    right: var(--wm-right, var(--space-4));
    font-family: var(--font-display);
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.46);
    pointer-events: none;
    user-select: none;
    letter-spacing: 0.05em;
    font-weight: 300;
    z-index: 1;
    mix-blend-mode: normal;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.28),
        0 0 1px rgba(255, 255, 255, 0.4);
}

/* 10. Social section ──────────────────────────────────────── */
.social-section {
    text-align: center;
    padding-block: var(--space-24);
    padding-bottom: 0;
}

.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    margin-top: var(--space-8);
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    letter-spacing: 0.04em;
    transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}
.social-link:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.social-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.social-email {
    margin-top: var(--space-6);
    display: grid;
    justify-items: center;
    gap: var(--space-2);
}

.social-email__label {
    font-size: var(--text-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.social-email__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    letter-spacing: 0.04em;
    transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.social-email__link:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.social-email__icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Sticker ─────────────────────────────────────────────── */
.social-section__sticker {
    display: flex;
    justify-content: center;
    margin-top: var(--space-6);
}
.social-section__sticker img {
    max-width: 16rem;
    height: auto;
}

.not-found-sticker {
    display: flex;
    justify-content: center;
}
.not-found-sticker img {
    max-width: 22rem;
    height: auto;
}

/* ── Leaning stickers ─────────────────────────────────────── */
.gallery-section-wrapper {
    position: relative;
}

.gallery-section-wrapper--has-stickers {
    overflow: visible;
}

.leaning-sticker {
    position: absolute;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.85;
}
.leaning-sticker--left {
    left: 0;
}
.leaning-sticker--right {
    right: 0;
}
.leaning-sticker img {
    max-width: clamp(4rem, 6vw, 7rem);
    height: auto;
    display: block;
}

/* Show stickers only when there's enough side space (> 768px viewport) */
@media (max-width: 1400px) {
    .leaning-sticker {
        display: none;
    }
}

/* ── Sticker ─────────────────────────────────────────────── */
.about-section__sticker {
    display: flex;
    justify-content: center;
    margin-top: var(--space-6);
}
.about-section__sticker img {
    max-width: 16rem;
    height: auto;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (min-width: 640px) {
    .about-section__portrait-scene {
        width: min(78vw, 500px);
    }

    .about-section__photo-wrap {
        width: 260px;
        height: 260px;
    }
}

@media (max-width: 480px) {
    .about-section__portrait-scene {
        width: min(98vw, 380px);
    }

    .about-section__portrait-scene::before {
        inset: 24%;
        filter: blur(16px);
    }

    .about-section__photo-wrap {
        width: 180px;
        height: 180px;
    }
}

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .particle,
    .orbit-ring,
    .orbit-counter,
    .doodle {
        animation: none !important;
    }
}

.about-section__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
    max-width: 720px;
    margin-inline: auto;
    text-align: center;
}

.about-section__heading {
    font-family: var(--font-display);
    font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
    font-weight: 300;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-4);
}

/* ── Portrait scene ─────────────────────────────────────── */
.about-section__portrait-scene {
    position: relative;
    display: grid;
    place-items: center;
    width: min(88vw, 460px);
    aspect-ratio: 1;
    margin-inline: auto;
    isolation: isolate;
    overflow: visible;
}

/* Soft glow behind the photo */
.about-section__portrait-scene::before {
    content: "";
    position: absolute;
    inset: 22%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.45) 55%, rgba(255, 255, 255, 0) 76%),
        radial-gradient(circle at 35% 35%, rgba(216, 181, 151, 0.18), transparent 50%);
    filter: blur(22px);
    z-index: 0;
}

/* SVG orbit stage */
.about-section__orbit-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    z-index: 1;
    pointer-events: none;
}

/* ── Floating particles ─────────────────────────────────── */
.particle {
    animation: particle-float var(--p-dur, 4s) ease-in-out infinite;
    animation-delay: var(--p-delay, 0s);
    will-change: transform, opacity;
}

@keyframes particle-float {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.55; }
    50% { transform: translateY(-8px) scale(1.3); opacity: 1; }
}

/* ── Orbit rings ────────────────────────────────────────── */
.orbit-ring {
    transform-origin: 0 0;
    will-change: transform;
}

.orbit-ring--cw {
    animation: orbit-cw var(--dur, 30s) linear infinite;
}

.orbit-ring--ccw {
    animation: orbit-ccw var(--dur, 30s) linear infinite;
}

@keyframes orbit-cw {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes orbit-ccw {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}

/* ── Orbit items (positioned at angle + radius) ─────────── */
.orbit-item {
    position: absolute;
    transform: rotate(var(--angle, 0deg)) translateX(var(--r, 150px));
}

/* Counter-rotation keeps doodles upright while orbiting */
.orbit-counter {
    transform-origin: 0 0;
    animation: orbit-counter var(--dur, 30s) linear infinite;
}

.orbit-ring--cw .orbit-counter {
    animation-name: orbit-counter-cw;
}

.orbit-ring--ccw .orbit-counter {
    animation-name: orbit-counter-ccw;
}

@keyframes orbit-counter-cw {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}

@keyframes orbit-counter-ccw {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Doodle bobbing (gentle up/down + slight scale) ─────── */
.doodle {
    animation: doodle-bob var(--bob-dur, 3s) ease-in-out infinite;
    transform-origin: center center;
    will-change: transform;
}

@keyframes doodle-bob {
    0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
    30% { transform: translateY(-4px) scale(1.04) rotate(1.5deg); }
    70% { transform: translateY(2px) scale(0.97) rotate(-1deg); }
}

/* ── Photo wrap ─────────────────────────────────────────── */
.about-section__photo-wrap {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow:
        0 0 0 1px rgba(200, 149, 108, 0.15),
        0 0 0 6px rgba(255, 251, 246, 0.7),
        0 18px 42px rgba(41, 33, 24, 0.14),
        0 6px 16px rgba(41, 33, 24, 0.08);
    border: 3px solid rgba(255, 251, 246, 0.96);
    position: relative;
    z-index: 3;
    background: var(--color-surface);
    will-change: transform;
    transform-style: preserve-3d;
    transition: box-shadow 0.35s ease, transform 0.1s linear;
    cursor: default;
    --shine-x: 50%;
    --shine-y: 50%;
    --shine-opacity: 0;
}

/* Specular-shine overlay - clipped to the circle by overflow:hidden */
.about-section__photo-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(
        circle at var(--shine-x) var(--shine-y),
        rgba(255, 255, 255, 0.55) 0%,
        rgba(255, 255, 255, 0.18) 30%,
        rgba(255, 255, 255, 0.04) 60%,
        transparent 80%
    );
    opacity: var(--shine-opacity);
    pointer-events: none;
    z-index: 4;
    mix-blend-mode: screen;
}

/* Subtle depth shadow when tilted */
.about-section__photo-wrap:hover {
    box-shadow:
        0 0 0 1px rgba(200, 149, 108, 0.22),
        0 0 0 7px rgba(255, 251, 246, 0.75),
        0 26px 52px rgba(41, 33, 24, 0.20),
        0 8px 20px rgba(41, 33, 24, 0.12);
}

.about-section__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* ── Bio text ───────────────────────────────────────────── */
.about-section__bio {
    font-family: var(--font-body);
    font-size: clamp(var(--text-base), 1.2vw, var(--text-lg));
    line-height: 1.8;
    color: var(--color-text-muted);
    max-width: 620px;
}

.about-section__bio p  { margin-bottom: var(--space-4); }
.about-section__bio p:last-child { margin-bottom: 0; }
.about-section__bio h2 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: var(--space-3);
}
.about-section__bio h3 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: var(--space-2);
}
.about-section__bio strong { color: var(--color-text); font-weight: 600; }
.about-section__bio em     { font-style: italic; }
.about-section__bio hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin-block: var(--space-6);
}
.about-section__bio a {
    color: var(--color-accent);
    border-bottom: 1px solid currentColor;
    transition: color var(--transition-fast);
}
.about-section__bio a:hover { color: var(--color-accent-dark); }

/* ── Sticker ─────────────────────────────────────────────── */
.about-section__sticker {
    display: flex;
    justify-content: center;
    margin-top: var(--space-6);
}
.about-section__sticker img {
    max-width: 16rem;
    height: auto;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (min-width: 640px) {
    .about-section__portrait-scene {
        width: min(78vw, 500px);
    }

    .about-section__photo-wrap {
        width: 260px;
        height: 260px;
    }
}

@media (max-width: 480px) {
    .about-section__portrait-scene {
        width: min(98vw, 380px);
    }

    .about-section__portrait-scene::before {
        inset: 24%;
        filter: blur(16px);
    }

    .about-section__photo-wrap {
        width: 180px;
        height: 180px;
    }
}

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .particle,
    .orbit-ring,
    .orbit-counter,
    .doodle {
        animation: none !important;
    }
}

.about-section__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
    max-width: 720px;
    margin-inline: auto;
    text-align: center;
}

.about-section__heading {
    font-family: var(--font-display);
    font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
    font-weight: 300;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-4);
}

.about-section__portrait-scene {
    position: relative;
    display: grid;
    place-items: center;
    width: min(78vw, 390px);
    aspect-ratio: 1;
    margin-inline: auto;
    isolation: isolate;
    overflow: visible;
}

.about-section__portrait-scene::before {
    content: "";
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.4) 58%, rgba(255, 255, 255, 0) 78%),
        radial-gradient(circle at 30% 30%, rgba(216, 181, 151, 0.24), transparent 55%);
    filter: blur(18px);
    z-index: 0;
}

.about-section__orbit-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    z-index: 1;
    pointer-events: none;
}

.about-section__trail-poly {
    stroke: #4a4a4a;
    stroke-width: 2.65;
    stroke-opacity: 0.5;
    animation: about-trail-fade 26s ease-in-out infinite;
    will-change: opacity, stroke-opacity;
}

.about-section__satellite-blink {
    animation: about-satellite-blink 3.2s ease-in-out infinite;
}

.about-section__sun-lap {
    transform-origin: 0 0;
    animation: about-orbit-rotate 52s linear infinite;
    will-change: transform;
}

.about-section__satellite-spin {
    transform-origin: 0 0;
    animation: about-orbit-rotate 26s linear infinite;
    will-change: transform;
}

.about-section__plane-lap {
    transform-origin: 0 0;
    animation: about-orbit-rotate 19s linear infinite;
    will-change: transform;
}

/* Povrch: rôzne periody a smery, mierne posunuté polomery v SVG – menej zrážok */
.about-section__ground-lap {
    transform-origin: 0 0;
}

.about-section__ground-lap--0 { animation: about-orbit-rotate 37s linear infinite; --lap-march: 10.5s; }
.about-section__ground-lap--1 { animation: about-orbit-rotate-reverse 44s linear infinite; animation-delay: -3s; --lap-march: 13.2s; }
.about-section__ground-lap--2 { animation: about-orbit-rotate 31s linear infinite; animation-delay: -11s; --lap-march: 11.4s; }
.about-section__ground-lap--3 { animation: about-orbit-rotate-reverse 49s linear infinite; animation-delay: -6s; --lap-march: 14.1s; }
.about-section__ground-lap--4 { animation: about-orbit-rotate 42s linear infinite; animation-delay: -18s; --lap-march: 10.8s; }
.about-section__ground-lap--5 { animation: about-orbit-rotate-reverse 35s linear infinite; animation-delay: -2s; --lap-march: 12.6s; }
.about-section__ground-lap--6 { animation: about-orbit-rotate 46s linear infinite; animation-delay: -14s; --lap-march: 11.1s; }
.about-section__ground-lap--7 { animation: about-orbit-rotate-reverse 39s linear infinite; animation-delay: -8s; --lap-march: 13.5s; }
.about-section__ground-lap--8 { animation: about-orbit-rotate 33s linear infinite; animation-delay: -21s; --lap-march: 10.2s; }
.about-section__ground-lap--9 { animation: about-orbit-rotate-reverse 51s linear infinite; animation-delay: -5s; --lap-march: 12.9s; }

/* Každý samostatný ťah má vlastnú fázu „march“ – nebeží ako jedna zlúčená čiara */
.about-section__sketch-strokes {
    --stroke-count: 1;
}

.about-section__sketch-path {
    fill: none;
    stroke: #424242;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 7 16;
    stroke-dashoffset: 0;
    opacity: 0.64;
}

.about-section__sketch-march {
    animation-name: about-sketch-march;
    animation-duration: var(--lap-march, 12s);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-delay: calc(
        var(--lap-march, 12s) / max(var(--stroke-count, 1), 1) * var(--stroke-i, 0) * -1
    );
}

.about-section__sky-sketch {
    fill: none;
    stroke: #404040;
    stroke-width: 2.05;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 7 16;
    stroke-dashoffset: 0;
    opacity: 0.62;
}

.about-section__sun-ray-seg {
    fill: none;
    stroke: #404040;
    stroke-width: 2.05;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 7 16;
    stroke-dashoffset: 0;
    opacity: 0.62;
    animation-name: about-sketch-march, about-sun-ray-pulse;
    animation-duration: var(--lap-march, 18s), 5.5s;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
    animation-direction: normal, alternate;
    animation-delay: calc(
            var(--lap-march, 18s) / max(var(--stroke-count, 1), 1) * var(--stroke-i, 0) * -1
        ),
        0s;
}

.about-section__sun-disk {
    animation-name: about-sketch-march, about-sun-disk-pulse;
    animation-duration: var(--lap-march, 20s), 5.5s;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
    animation-direction: normal, alternate;
    animation-delay: calc(
            var(--lap-march, 20s) / max(var(--stroke-count, 1), 1) * var(--stroke-i, 0) * -1
        ),
        0s;
}

.about-section__sky-sketch--plane {
    stroke-width: 2;
    opacity: 0.6;
}

.about-section__photo-wrap {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    margin-inline: auto;
    box-shadow:
        0 0 0 1px rgba(200, 149, 108, 0.12),
        0 18px 38px rgba(41, 33, 24, 0.16),
        0 8px 18px rgba(41, 33, 24, 0.09);
    border: 4px solid rgba(255, 251, 246, 0.96);
    position: relative;
    z-index: 3;
    background: var(--color-surface);
}

@media (min-width: 640px) {
    .about-section__portrait-scene {
        width: min(72vw, 450px);
    }

    .about-section__photo-wrap {
        width: 260px;
        height: 260px;
    }
}

@media (max-width: 480px) {
    .about-section__portrait-scene {
        width: min(94vw, 360px);
    }

    .about-section__portrait-scene::before {
        inset: 20%;
        filter: blur(14px);
    }
}

.about-section__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.about-section__bio {
    font-family: var(--font-body);
    font-size: clamp(var(--text-base), 1.2vw, var(--text-lg));
    line-height: 1.8;
    color: var(--color-text-muted);
    max-width: 620px;
}

.about-section__bio p  { margin-bottom: var(--space-4); }
.about-section__bio p:last-child { margin-bottom: 0; }
.about-section__bio h2 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: var(--space-3);
}
.about-section__bio h3 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: var(--space-2);
}
.about-section__bio strong { color: var(--color-text); font-weight: 600; }
.about-section__bio em     { font-style: italic; }
.about-section__bio hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin-block: var(--space-6);
}
.about-section__bio a {
    color: var(--color-accent);
    border-bottom: 1px solid currentColor;
    transition: color var(--transition-fast);
}
.about-section__bio a:hover { color: var(--color-accent-dark); }

@keyframes about-orbit-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes about-orbit-rotate-reverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes about-sketch-march {
    to { stroke-dashoffset: -120; }
}

@keyframes about-sun-ray-pulse {
    0%, 100% { stroke-opacity: 0.45; }
    50% { stroke-opacity: 0.92; }
}

@keyframes about-sun-disk-pulse {
    0%, 100% { stroke-opacity: 0.5; }
    50% { stroke-opacity: 0.88; }
}

/* Stopa slabne počas obehu a znova zosilní, keď je sonda späť v podobnej fáze */
@keyframes about-trail-fade {
    0%, 100% { stroke-opacity: 0.52; }
    24% { stroke-opacity: 0.38; }
    50% { stroke-opacity: 0.18; }
    76% { stroke-opacity: 0.42; }
}

@keyframes about-satellite-blink {
    0%, 100% { opacity: 1; }
    45% { opacity: 0.35; }
    50% { opacity: 0.28; }
    55% { opacity: 1; }
}

/* 18. Admin About Me photo preview ──────────────────────────── */
.about-admin-photo-preview {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.about-admin-photo-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 2px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

/* 19. Rich text editor (admin) ──────────────────────────────── */
.rte-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    margin-bottom: var(--space-2);
    padding: var(--space-2);
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.rte-btn {
    padding: var(--space-1) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
    min-width: 2rem;
    text-align: center;
}
.rte-btn:hover {
    background: var(--color-bg-subtle);
    border-color: var(--color-text-muted);
}
.rte-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.rte-separator {
    display: block;
    width: 1px;
    height: 22px;
    background: var(--color-border);
    margin-inline: var(--space-1);
    align-self: center;
    flex-shrink: 0;
}

.rte-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--color-border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    overflow: hidden;
}

@media (max-width: 640px) {
    .rte-split { grid-template-columns: 1fr; }
}

.rte-pane {
    display: flex;
    flex-direction: column;
}

.rte-pane + .rte-pane {
    border-left: 1px solid var(--color-border);
}

@media (max-width: 640px) {
    .rte-pane + .rte-pane {
        border-left: none;
        border-top: 1px solid var(--color-border);
    }
}

.rte-pane-label {
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding: var(--space-2) var(--space-3);
    background: var(--color-bg-subtle);
    border-bottom: 1px solid var(--color-border);
    margin: 0;
}

.rte-textarea {
    flex: 1;
    min-height: 260px;
    padding: var(--space-3) var(--space-4);
    border: none;
    resize: vertical;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-surface);
}
.rte-textarea:focus { outline: none; }

.rte-preview {
    flex: 1;
    min-height: 260px;
    padding: var(--space-4);
    background: var(--color-surface);
    overflow-y: auto;
    text-align: left;
}

/* Admin checkbox row */
.admin-checkbox-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    cursor: pointer;
    user-select: none;
}

.admin-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--color-accent);
    cursor: pointer;
    flex-shrink: 0;
}

.admin-subsection {
    margin-top: var(--space-4);
    /*padding: var(--space-5);*/
    border: 1px solid color-mix(in srgb, var(--color-border) 82%, #ffffff 18%);
    border-radius: 20px;
    background:
        radial-gradient(circle at 10% 10%, rgba(255,255,255,0.7), transparent 22%),
        linear-gradient(180deg, rgba(255,255,255,0.68), rgba(249,246,241,0.9));
    transition:
        opacity var(--transition-base),
        filter var(--transition-base),
        border-color var(--transition-base),
        background var(--transition-base);
}

.admin-subsection legend {
    padding-inline: var(--space-2);
    font-size: var(--text-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.admin-subsection--disabled {
    opacity: 0.5;
    filter: saturate(0.72);
    background:
        linear-gradient(180deg, rgba(248,246,242,0.72), rgba(242,239,233,0.82));
}

/* 20. Tag input (chip-style with suggestions) ───────────────── */
.tag-input-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    min-height: 44px;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    cursor: text;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.tag-input-wrap--focused {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(200,149,108,.18);
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px var(--space-3);
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: var(--text-xs);
    color: var(--color-text);
    white-space: nowrap;
    line-height: 1.6;
}

.tag-chip__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.tag-chip__remove:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.tag-input__field {
    flex: 1;
    min-width: 120px;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-text);
    line-height: 1.6;
    padding: 0;
}
.tag-input__field::placeholder { color: var(--color-text-muted); }

.tag-suggestions {
    list-style: none;
    margin: 2px 0 0;
    padding: var(--space-1) 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
    max-height: 180px;
    overflow-y: auto;
    z-index: 50;
    position: relative;
}
.tag-suggestions__item {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text);
    cursor: pointer;
    transition: background var(--transition-fast);
}
.tag-suggestions__item:hover {
    background: var(--color-bg-subtle);
    color: var(--color-accent);
}

.tag-suggestions__item--active {
    background: var(--color-bg-subtle);
    color: var(--color-accent);
}

/* 21. Admin layout & sidebar ────────────────────────────────── */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar-state {
    display: none;
}

.admin-sidebar-backdrop {
    display: none;
}

.admin-sidebar {
    width: 260px;
    min-width: 260px;
    min-height: 100vh;
    background: #1c1917;
    color: #e8e4df;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    z-index: var(--z-header);
}

.admin-sidebar__logo {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: var(--space-6);
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    color: #f2eeea;
}

.admin-sidebar__logo--header {
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.admin-sidebar__close {
    display: none;
    cursor: pointer;
    color: rgba(255,255,255,.5);
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
}
.admin-sidebar__close:hover {
    color: rgba(255,255,255,.8);
    background: rgba(255,255,255,.06);
}

.admin-sidebar__nav {
    list-style: none;
    margin: 0;
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.admin-sidebar__nav li {
    margin: 0;
    padding: 0;
}

.admin-sidebar__nav a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: rgba(255,255,255,.65);
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.admin-sidebar__nav a:hover {
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.9);
}
.admin-sidebar__nav a.active {
    background: rgba(200,149,108,.15);
    color: var(--color-accent);
    font-weight: 500;
}
.admin-sidebar__nav a svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.admin-content {
    flex: 1;
    min-width: 0;
    padding: var(--space-8) var(--space-12);
    background: var(--color-bg);
}

.admin-mobile-bar {
    display: none;
    align-items: center;
    gap: var(--space-3);
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-6);
    border-bottom: 1px solid var(--color-border);
}

.admin-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast);
}
.admin-sidebar-toggle:hover {
    color: var(--color-text);
}

/* Mobile styles */
@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        min-width: 280px;
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        z-index: calc(var(--z-header) + 10);
        box-shadow: var(--shadow-xl);
    }

    .admin-sidebar-state:checked ~ .admin-sidebar {
        transform: translateX(0);
    }

    .admin-sidebar-state:checked ~ .admin-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15,14,12,.5);
        z-index: calc(var(--z-header) + 5);
        pointer-events: auto;
    }

    .admin-sidebar__close {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .admin-content {
        padding: var(--space-4) var(--space-4);
    }

    .admin-mobile-bar {
        display: flex;
    }
}

/* 22. Admin page header ─────────────────────────────────────── */
.admin-page-header {
    margin-bottom: var(--space-8);
}

.admin-page-header h1 {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 400;
    margin: 0;
    color: var(--color-text);
}

/* 23. Admin form fields ─────────────────────────────────────── */
.admin-field {
    margin-bottom: var(--space-6);
}

.admin-field label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-2);
    color: var(--color-text);
}

.admin-field legend {
    font-size: var(--text-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-accent);
}

/* 24. Admin inputs ──────────────────────────────────────────── */
.admin-input {
    display: block;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    line-height: 1.5;
}

.admin-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(200,149,108,.18);
    outline: none;
}

.admin-input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.65;
}

textarea.admin-input {
    resize: vertical;
    min-height: 80px;
}

select.admin-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%236b6560' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    padding-right: calc(var(--space-4) + 20px);
    cursor: pointer;
}

/* 25. Admin upload zone ─────────────────────────────────────── */
.admin-upload-zone {
    position: relative;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-6);
    text-align: center;
    background: var(--color-bg-subtle);
    transition: border-color var(--transition-fast), background var(--transition-fast);
}
.admin-upload-zone:hover {
    border-color: var(--color-accent);
    background: rgba(200,149,108,.04);
}

.admin-upload-zone__input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.admin-upload-zone__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    pointer-events: none;
}

.admin-upload-zone__content strong {
    color: var(--color-text);
    font-size: var(--text-base);
}

/* 26. Admin buttons (legacy – prefer .btn variants) ─────────── */
.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-6);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 400;
    letter-spacing: 0.01em;
    border: 1px solid color-mix(in srgb, var(--color-border) 60%, #c8956c 40%);
    border-radius: 2px;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    text-decoration: none;
    line-height: 1.5;
}
.admin-btn:hover {
    background: color-mix(in srgb, var(--color-accent) 8%, transparent);
    border-color: color-mix(in srgb, var(--color-accent) 50%, var(--color-border) 50%);
    color: var(--color-accent-dark);
}

.admin-btn--primary {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    box-shadow: 0 1px 3px rgba(200,149,108,.3), inset 0 1px 0 rgba(255,255,255,.1);
}
.admin-btn--primary:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: #fff;
    box-shadow: 0 3px 10px rgba(200,149,108,.35), inset 0 1px 0 rgba(255,255,255,.1);
}

/* 27. Upload preview ────────────────────────────────────────── */
.upload-preview {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    margin-top: var(--space-3);
    margin-bottom: var(--space-2);
    background: var(--color-bg-subtle);
}

/* 28. Section sort list ─────────────────────────────────────── */
.section-sort-list {
    display: flex;
    flex-direction: column;
    max-width: 800px;
}

.section-sort-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: opacity var(--transition-fast), box-shadow var(--transition-fast);
}
.section-sort-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--color-text-muted);
}
.section-sort-item--dragging {
    opacity: 0.45;
}

.section-sort-item__handle {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
    cursor: grab;
    padding: 0 var(--space-1);
    user-select: none;
    letter-spacing: 2px;
    line-height: 1;
}
.section-sort-item__handle:active {
    cursor: grabbing;
}

.section-sort-item__main {
    flex: 1;
    min-width: 0;
}

/* 29. Buttons (admin + shared) ──────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.5;
    border: 1px solid color-mix(in srgb, var(--color-border) 60%, #c8956c 40%);
    border-radius: 2px;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    position: relative;
    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast),
        box-shadow var(--transition-fast);
}
.btn::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 3px;
    opacity: 0;
    transition: opacity var(--transition-fast);
    box-shadow: 0 0 0 1px var(--color-accent);
    pointer-events: none;
}
.btn:hover {
    background: color-mix(in srgb, var(--color-accent) 8%, transparent);
    border-color: color-mix(in srgb, var(--color-accent) 50%, var(--color-border) 50%);
    color: var(--color-accent-dark);
}
.btn:focus-visible {
    outline: none;
}
.btn:focus-visible::after {
    opacity: 1;
}
.btn:active {
    background: color-mix(in srgb, var(--color-accent) 12%, transparent);
}
.btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* Primary – warm terracotta accent */
.btn-primary {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    box-shadow: 0 1px 3px rgba(200,149,108,.3), inset 0 1px 0 rgba(255,255,255,.1);
}
.btn-primary:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: #fff;
    box-shadow: 0 3px 10px rgba(200,149,108,.35), inset 0 1px 0 rgba(255,255,255,.1);
}
.btn-primary:active {
    background: color-mix(in srgb, var(--color-accent-dark) 85%, #000 15%);
    border-color: color-mix(in srgb, var(--color-accent-dark) 80%, #000 20%);
    box-shadow: 0 1px 2px rgba(200,149,108,.2);
}
.btn-primary:focus-visible::after {
    box-shadow: 0 0 0 3px rgba(200,149,108,.35);
}

/* Outline – subtle warm border */
.btn-outline {
    background: transparent;
    border-color: var(--color-border);
    color: var(--color-text);
}
.btn-outline:hover {
    background: var(--color-bg-subtle);
    border-color: color-mix(in srgb, var(--color-accent) 40%, var(--color-border) 60%);
    color: var(--color-accent-dark);
}
.btn-outline:active {
    background: var(--color-border);
}

/* Danger – muted terracotta red */
.btn-danger {
    background: transparent;
    border-color: color-mix(in srgb, #dc2626 30%, var(--color-border) 70%);
    color: color-mix(in srgb, #dc2626 75%, #1a1814 25%);
}
.btn-danger:hover {
    background: color-mix(in srgb, #dc2626 6%, transparent);
    border-color: color-mix(in srgb, #dc2626 55%, var(--color-border) 45%);
    color: #b91c1c;
    box-shadow: 0 2px 6px rgba(220,38,38,.1);
}
.btn-danger:active {
    background: color-mix(in srgb, #dc2626 10%, transparent);
}
.btn-danger:focus-visible::after {
    box-shadow: 0 0 0 3px rgba(220,38,38,.2);
}

/* Small */
.btn-sm {
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    gap: var(--space-1);
}

/* Ghost – minimal, for icon-only or inline actions */
.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--color-text-muted);
    padding: var(--space-1) var(--space-2);
}
.btn-ghost:hover {
    background: var(--color-bg-subtle);
    border-color: transparent;
    color: var(--color-text);
}
.btn-ghost:active {
    background: var(--color-border);
}
.btn-ghost.btn-danger {
    color: color-mix(in srgb, #dc2626 75%, #1a1814 25%);
}
.btn-ghost.btn-danger:hover {
    background: color-mix(in srgb, #dc2626 6%, transparent);
    border-color: transparent;
    color: #b91c1c;
}

/* Icon-button – square, for purely iconic actions */
.btn-icon {
    padding: var(--space-1);
    min-width: 32px;
    min-height: 32px;
    aspect-ratio: 1;
    justify-content: center;
}

/* 30. Blazor error UI (shared) ─────────────────────────────── */
#blazor-error-ui {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.6rem 1.25rem;
    background: #fef9c3;
    color: #713f12;
    box-shadow: 0 -1px 3px rgba(0,0,0,.1);
    display: none;
    z-index: var(--z-toast);
    font-size: var(--text-sm);
}
#blazor-error-ui a.reload {
    color: inherit;
    text-decoration: underline;
    margin-left: var(--space-3);
}
#blazor-error-ui .dismiss {
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    cursor: pointer;
    padding: var(--space-1);
    font-size: var(--text-base);
    line-height: 1;
}

