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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #222;
    background: #fff;
}

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

a {
    color: inherit;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.header__logo img {
    height: 46px;
    width: auto;
}

.nav {
    display: flex;
    gap: 36px;
}

.nav a {
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    color: #444;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    transition: border-color .2s, color .2s;
}

.nav a .lang-en {
    display: block;
    font-size: 11px;
    color: #999;
}

.section__title .lang-en {
    display: block;
    font-size: 15px;
    color: #888;
}

.nav a:hover,
.nav a.is-active {
    color: #000;
    border-bottom-color: #000;
}

.header__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
}

.header__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #222;
}

/* Slider */

.slider {
    position: relative;
    height: calc(100vh - 80px);
    min-height: 360px;
    max-height: 820px;
    overflow: hidden;
    background: #f2f2f2;
}

.slider__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.slider__slide.is-active {
    opacity: 1;
}

.slider__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider__slide figcaption {
    position: absolute;
    left: 20px;
    bottom: 20px;
    max-width: calc(100% - 140px);
    background: rgba(255, 255, 255, .9);
    padding: 8px 14px;
}

.slider__slide figcaption span {
    display: block;
}

.slider__slide .lang-pl {
    font-size: 15px;
    color: #222;
}

.slider__slide .lang-en {
    font-size: 13px;
    color: #777;
}

.slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    background: rgba(255, 255, 255, .8);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s;
}

.slider__arrow:hover {
    background: #fff;
}

.slider__arrow--prev {
    left: 20px;
}

.slider__arrow--next {
    right: 20px;
}

.slider__counter {
    position: absolute;
    right: 20px;
    bottom: 20px;
    background: rgba(255, 255, 255, .9);
    padding: 6px 12px;
    font-size: 13px;
    color: #444;
}

/* Sections */

.section {
    padding: 90px 0;
}

.section--alt {
    background: #fafafa;
}

.section__title {
    font-size: 24px;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 40px;
}

.about {
    display: grid;
    grid-template-columns: 1fr 5fr;
    gap: 60px 50px;
}

.about__label {
    text-align: right;
    font-size: 15px;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.5;
}

.about__label .lang-en {
    display: block;
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
}

.about__body {
    text-align: left;
    max-width: 820px;
}

.about__body .lang-en {
    margin-top: 16px;
    color: #777;
}

.quote {
    font-style: italic;
}

.quote footer {
    margin-top: 20px;
    font-style: normal;
    font-size: 14px;
    color: #555;
}

.quote footer .lang-en {
    color: #888;
}

/* Projects */

.tiles {
    --cols: 6;
    --gap: 10px;
    --width: min(100vw - 40px, 1160px);
    display: grid;
    grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
    grid-auto-rows: calc((var(--width) - (var(--cols) - 1) * var(--gap)) / var(--cols));
    grid-auto-flow: row dense;
    gap: var(--gap);
}

.tile {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: #eee;
}

.w1 { grid-column: span 1; }
.w2 { grid-column: span 2; }
.w3 { grid-column: span 3; }

.h1 { grid-row: span 1; }
.h2 { grid-row: span 2; }

.tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.tile:hover img {
    transform: scale(1.06);
}

.tile__caption {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    max-height: 65%;
    overflow: hidden;
    padding: 12px 14px;
    background: #fff;
    transform: translateY(-100%);
    transition: transform .35s ease;
}

.tile:hover .tile__caption {
    transform: translateY(0);
}

.tile__caption h3 {
    font-size: 14px;
    font-weight: bold;
    line-height: 1.35;
}

.tile__caption p {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.35;
    color: #777;
}

/* na ekranach dotykowych nie ma hovera - podpis widoczny zawsze */
@media (hover: none) {
    .tile__caption {
        transform: none;
    }
}

/* Contact */

.contact {
    display: flex;
    gap: 80px;
    flex-wrap: wrap;
}

.contact address {
    font-style: normal;
}

.contact a {
    text-decoration: none;
}

.contact a:hover {
    text-decoration: underline;
}

/* Footer */

.footer {
    border-top: 1px solid #eee;
    padding: 24px 0;
    font-size: 13px;
    color: #888;
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 24px;
}

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

.footer a:hover {
    text-decoration: underline;
}

/* Responsive */

@media (max-width: 1024px) {
    .tiles {
        --cols: 4;
    }

    .w3 { grid-column: span 2; }
}

@media (max-width: 700px) {
    html {
        scroll-padding-top: 64px;
    }

    .header__inner {
        height: 64px;
    }

    .header__logo img {
        height: 36px;
    }

    .header__toggle {
        display: flex;
    }

    .nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: #fff;
        border-bottom: 1px solid #eee;
    }

    .nav.is-open {
        display: flex;
    }

    .nav a {
        padding: 14px 20px;
        border-bottom: 1px solid #f2f2f2;
    }

    .slider {
        height: 60vh;
    }

    .slider__arrow {
        display: none;
    }

    .section {
        padding: 60px 0;
    }

    .about {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .about__label {
        text-align: left;
    }

    .about__body + .about__label {
        margin-top: 40px;
    }

    .tiles {
        --cols: 2;
    }

    .w2,
    .w3 { grid-column: span 2; }

    .contact {
        gap: 24px;
    }
}

@media (max-width: 400px) {
    .tiles {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .tile {
        grid-column: auto;
        grid-row: auto;
        aspect-ratio: 3 / 2;
    }
}
