/* ============================================================
   barb-rokoszak.neocities.org — shared site styles
   Font faces live in css/fonts.css (all self-hosted).
   ============================================================ */

:root {
    --font-pixel: 'PixelArial', 'Pixelify Sans', 'Courier New', monospace;
    --font-display: 'Press Start 2P', 'Pixelify Sans', 'Courier New', monospace;
    --ink: #ffffff;
    --paper: #000000;
    --muted: #a1a1a1;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--paper);
    color: var(--ink);
    font-family: var(--font-pixel);
    margin: 0;
    min-height: 100vh;
    line-height: 1.5;
}

a {
    color: var(--ink);
    text-decoration: none;
}

h1, h2, h3, p {
    margin: 0;
    padding: 0;
}

/* ---------- terminal-window page frame ---------- */

.page-wrap {
    max-width: 1500px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.page-container {
    border: 7px double #ffffff;
    border-radius: 5px;
    background-color: #000000;
    padding: 20px;
}

.main-header {
    border-bottom: 7px double #ffffff;
    padding: 18px 10px 20px;
    text-align: center;
}

/* Banner scales by WIDTH so headers stay readable on phones
   (old rule capped it at 15vh -> tiny strips on mobile) */
.site-title img {
    width: min(100%, 920px);
    height: auto;
    image-rendering: pixelated;
}

.back-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 50;
    background: #000;
    border: 3px double #fff;
    color: #fff;
    font-family: var(--font-pixel);
    font-size: 14px;
    letter-spacing: 2px;
    padding: 8px 14px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.back-link:hover {
    background: #fff;
    color: #000;
}

/* ---------- content blocks ---------- */

.content-card {
    border: 3px double #ffffff;
    padding: 18px;
    border-radius: 3px;
    margin-top: 20px;
}

.art-piece {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
}

.art-piece .description {
    flex: 1 1 280px;
}

.art-piece .showcase-image {
    flex: 1 1 300px;
}

.showcase-image img {
    width: 100%;
    display: block;
    height: auto;
}

.detail-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.detail-images img {
    width: 100px;
    height: auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
    align-items: stretch;
}

.gallery-item {
    text-align: center;
    display: flex;
    flex-direction: column;
}

.gallery-item img {
    width: 100%;
    height: auto;
    background: #101010;
}

.gallery-item h3 {
    font-size: 14px;
    margin-top: 8px;
    line-height: 1.4;
}

.gallery-item p {
    font-size: 12px;
    margin-top: 2px;
}

.description h1 {
    font-size: clamp(18px, 3.4vw, 25px);
    line-height: 1.5;
}

.description h2 {
    font-size: 15px;
    color: var(--muted);
}

.description p {
    font-size: 15px;
    line-height: 1.6;
}

/* ---------- lightbox ---------- */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.94);
    align-items: center;
    justify-content: center;
    padding: 24px 64px;
    cursor: zoom-out;
}

.lightbox.open {
    display: flex;
}

.lightbox-figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    max-height: 100%;
}

.lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 90px);
    border: 4px solid #fff;
    background: #000;
    image-rendering: pixelated;
    cursor: zoom-in;
    transform-origin: center center;
    will-change: transform;
    touch-action: none;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox.zoomed .lightbox-img {
    cursor: grab;
}

.lightbox.zoomed .lightbox-img:active {
    cursor: grabbing;
}

.lightbox-counter {
    color: #ffffff;
    font-family: var(--font-pixel);
    font-size: 14px;
    letter-spacing: 2px;
}

.lightbox-nav,
.lightbox-close {
    position: absolute;
    background: #000000;
    color: #ffffff;
    border: 3px double #ffffff;
    font-family: var(--font-pixel);
    font-size: 20px;
    line-height: 1;
    padding: 12px 16px;
    cursor: pointer;
    z-index: 101;
}

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

.lightbox-prev {
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close {
    top: 14px;
    right: 14px;
    font-size: 24px;
}

@media (max-width: 640px) {
    .lightbox {
        padding: 12px 52px;
    }

    .lightbox-nav {
        font-size: 15px;
        padding: 10px 12px;
    }
}

/* ---------- responsive ---------- */

@media (max-width: 768px) {
    .page-wrap {
        padding: 56px 8px 32px;
    }

    .page-container {
        padding: 12px;
    }

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

    .description h1 {
        font-size: 20px;
    }

    .back-link {
        font-size: 12px;
        padding: 6px 10px;
    }
}

@media (max-width: 420px) {
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .gallery-item h3 {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
