/* --- STYLE CSS --- */
:root {
    --bg-color: #ffffff;
    --text-main: #111111;
    --text-light: #666666;
    --gap: 4px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
}

/* HEADER */
header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 60px 50px;
    background: #fff;
}

.brand-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.3s;
}

.brand-link:hover {
    opacity: 0.7;
}

.brand h1 {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.brand span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 5px;
    font-weight: 300;
}

/* NAWIGACJA */
nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--text-main);
}

/* GALERIA */
main {
    padding: 0 4px;
    margin-bottom: 80px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
}

.art-piece {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background-color: #f0f0f0;
    overflow: hidden;
    cursor: pointer;
}

.art-piece img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.art-piece:hover img {
    transform: scale(1.03);
}

/* Nakładka z tytułem */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay span {
    color: #fff;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.art-piece:hover .overlay {
    opacity: 1;
}

/* STOPKA */
footer {
    padding: 40px;
    text-align: center;
    border-top: 1px solid #f4f4f4;
    color: #888;
    font-size: 0.8rem;
}

footer a {
    color: #000;
    text-decoration: none;
}

/* MODAL (Lightbox) */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    /* Solid white background - no gallery visible behind */
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    /* Pozwala przewijać jeśli opis jest długi */
}

/* Kontener wewnątrz modala */
.modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    margin: auto;
    padding: 20px 0;
}

.modal-content {
    max-height: 80vh;
    max-width: 100%;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* Opis pod zdjęciem w modalu */
#modalCaption {
    margin-top: 20px;
    text-align: center;
    max-width: 700px;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

#modalCaption h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#modalCaption p {
    font-weight: 300;
    color: #555;
    white-space: pre-wrap;
    /* Zachowuje entery z pliku txt */
}

.close-btn {
    position: fixed;
    top: 25px;
    right: 35px;
    font-size: 40px;
    color: #111;
    cursor: pointer;
    font-weight: 300;
    z-index: 10000;
}

/* RWD */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    header {
        padding: 40px 30px;
    }
}

@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 30px 20px;
    }

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

    .modal-content {
        max-height: 60vh;
    }

    /* Mniejsze zdjęcie na telefonie, żeby tekst się zmieścił */
}

/* --- DODATKOWE STYLE FORMULARZA --- */
#contact {
    padding: 60px 4px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    margin-top: 60px;
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-container h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.contact-container p {
    color: var(--text-light);
    margin-bottom: 30px;
}

.contact-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #111;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: #111;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: #333;
}

.messages {
    max-width: 600px;
    margin: 20px auto;
    padding: 0 20px;
}

.message {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.message.success {
    background: #d4edda;
    color: #155724;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
}

/* Hide gallery when modal is open */
body.modal-open main,
body.modal-open footer,
body.modal-open header {
    visibility: hidden;
}

/* ABOUT PAGE */
.about-page {
    max-width: 900px;
    margin: 60px auto 100px;
    padding: 0 40px;
}

.about-header {
    text-align: center;
    margin-bottom: 60px;
}

.about-header h1 {
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: -1px;
    margin-bottom: 30px;
}

.profile-image {
    max-width: 400px;
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.about-page section {
    margin: 50px 0;
}

.about-page h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.bio-content,
.education-content,
.exhibitions-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    font-weight: 300;
}

.social-section {
    margin: 60px 0 40px;
    padding: 40px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.social-section h2 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    text-transform: none;
    border: none;
    padding: 0;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-block;
    padding: 12px 30px;
    background: #f8f8f8;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}

.social-link:hover {
    background: #111;
    color: #fff;
    border-color: #111;
    transform: translateY(-2px);
}

.about-footer {
    margin-top: 80px;
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid #f0f0f0;
}

.last-updated {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #111;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: background 0.3s;
    border-radius: 4px;
}

.cta-button:hover {
    background: #333;
}

/* RWD for About Page */
@media (max-width: 768px) {
    .about-page {
        padding: 0 20px;
        margin: 40px auto 60px;
    }

    .about-header h1 {
        font-size: 2rem;
    }

    .profile-image {
        max-width: 100%;
    }

    .about-page h2 {
        font-size: 1.3rem;
    }
}