:root {
    --bg-color: #121212;
    --bg-alt: #1a1a1a;
    --text-main: #f4f4f4;
    --text-muted: #aaaaaa;
    --accent: #ffffff;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden; 
    width: 100%; 
}

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

nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #222;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--accent);
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 300;
    font-size: 0.9rem;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 5px;
}

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

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero {
    height: 35vh; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    margin-top: 40px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 15px;
    letter-spacing: 1px;
    animation: fadeInUp 1s ease-out forwards;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0; 
    animation: fadeInUp 1s ease-out 0.4s forwards; 
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.section {
    padding: 80px 5vw;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

#portfolio {
    padding-top: 10px;
}

.subpage-section {
    padding-top: 150px; 
}

.dark-bg {
    background-color: var(--bg-alt);
    max-width: 100%;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 60px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.category-description {
    text-align: center;
    max-width: 800px;
    margin: -30px auto 50px auto;
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 300;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center; 
}

.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    aspect-ratio: 3 / 2;
    display: block;
    cursor: pointer;
    width: 100%;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    background-color: #2a2a2a;
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.4s ease;
}

.category-overlay span {
    color: var(--text-main);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 400;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 25px;
    transition: all 0.4s ease;
}

.category-card:hover img {
    transform: scale(1.06);
}

.category-card:hover .category-overlay {
    background-color: rgba(0, 0, 0, 0.3);
}

.category-card:hover .category-overlay span {
    background-color: var(--accent);
    color: var(--bg-color);
    border-color: var(--accent);
}

/* --- STANDARDOWA GALERIA (POZIOMA) --- */
.grid-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
    gap: 20px;
    width: 100%;
    margin: 0 auto;
    justify-content: center; 
}

.img-wrapper {
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 3 / 2;
    width: 100%;
}

.grid-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    background-color: #2a2a2a;
}

.grid-gallery img:hover {
    transform: scale(1.04);
}

/* --- GALERIA PIONOWA (SHOW-BIZ) --- */
.vertical-gallery {
    /* Wymuszenie równego podziału na 3 kolumny na dużych ekranach */
    grid-template-columns: repeat(3, 1fr); 
}

.vertical-gallery .img-wrapper {
    /* Proporcje pionowe 2:3 */
    aspect-ratio: 2 / 3; 
}

/* -------------------------------- */

.about-container {
    display: flex;
    gap: 60px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.about-image {
    flex: 1;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 4/5;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #2a2a2a;
}

.about-text {
    flex: 1.2;
    font-size: 1.1rem;
    font-weight: 300;
}

.about-text p {
    margin-bottom: 20px;
    color: #ccc;
}

.publications-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.pub-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--bg-alt);
    color: var(--text-main);
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #333;
    transition: all 0.3s;
    word-break: break-word; 
}

.pub-link:hover {
    background: #222;
    border-color: #555;
    transform: translateY(-2px);
}

.text-center {
    text-align: center;
}

.contact-desc {
    margin-bottom: 40px;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.contact-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    width: 100%;
}

.btn {
    padding: 15px 40px;
    background: var(--accent);
    color: var(--bg-color);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background 0.3s;
    border: 2px solid var(--accent);
    text-align: center;
    display: inline-block;
}

.btn:hover {
    background: transparent;
    color: var(--accent);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
}

.social-icons a {
    color: var(--text-main);
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: var(--accent);
    transform: translateY(-5px);
}

.subcategory {
    margin-bottom: 80px;
}

.subcategory:last-of-type {
    margin-bottom: 0;
}

.subcategory-title {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 12px;
    display: inline-block;
}

footer {
    text-align: center;
    padding: 40px 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 1px solid #222;
    margin-top: 50px;
}

/* ========================================= */
/* RESPONSYWNOŚĆ (TABLETY I TELEFONY)  */
/* ========================================= */

@media (max-width: 992px) {
    .categories-grid, .grid-gallery {
        grid-template-columns: 1fr !important;
        max-width: 600px; 
        margin: 0 auto !important;
    }
    .about-container {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    nav { 
        flex-direction: column; 
        padding: 15px 10px;
        gap: 15px;
    }
    .nav-links { 
        display: flex; 
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    .nav-links a {
        font-size: 0.8rem;
    }

    .hero { 
        height: auto; 
        padding: 140px 20px 40px 20px; 
        margin-top: 0;
    }
    .hero h1 { 
        font-size: 2.2rem; 
    }
    .hero p {
        font-size: 1rem;
    }
    
    .section { 
        padding: 50px 15px; 
    }
    .subpage-section {
        padding-top: 140px; 
    }
    .section-title { 
        font-size: 2rem; 
        margin-bottom: 40px; 
    }
    .category-description {
        font-size: 1rem;
        padding: 0 5px;
    }
    
    .categories-grid, .grid-gallery { 
        max-width: 100% !important; 
    }

    .about-container { 
        flex-direction: column; 
        text-align: center; 
        gap: 30px; 
    }
    .about-image { 
        max-width: 100%; 
        margin: 0 auto; 
        width: 100%; 
    }
    .about-text p {
        text-align: center; 
    }
    
    .pub-link {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px;
    }
    
    .contact-links { 
        flex-direction: column; 
        gap: 15px; 
    }
    .btn { 
        width: 100%; 
    }
}