/* ==========================================================================
   Portfolio – style
   Tokeny, nawigacja, hero, kafelki, stopka i strona "O mnie" są przeniesione 1:1
   ze starego styles.css (wygląd bez zmian). Nowe są: galeria (4 układy), lightbox,
   pasek narzędzi, nawigacja między albumami i przejścia między stronami.
   ========================================================================== */

:root {
    --primary: #111827;
    --secondary: #0f766e;
    --accent: #ef4444;
    --text: #111827;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-soft: #f8fafc;
    --overlay: rgba(0, 0, 0, 0.55);
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.15);
    --radius: 18px;
    --gap: 6px;                 /* odstęp między zdjęciami w galerii */
    --row-h: 260px;             /* docelowa wysokość rzędu w układzie "Rzędy" */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

body.has-lightbox-open { overflow: hidden; }

[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--secondary); outline-offset: 3px; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 1rem; top: -4rem; z-index: 3000;
    background: #fff; color: #111; padding: 0.6rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

.container { width: min(1200px, 92vw); margin: 0 auto; }

/* Płynne przejścia między stronami (Chrome/Edge/Safari 18+; pozostałe przeglądarki ignorują). */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    html { scroll-behavior: auto; }
}

/* ---------- nawigacja ---------- */
.navbar {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    view-transition-name: navbar;
}

.route-home .navbar {
    position: fixed; top: 0; left: 0; right: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.15) 70%, rgba(0, 0, 0, 0) 100%);
    border-bottom: none; backdrop-filter: none;
}

.route-home .nav-menu a,
.route-home .nav-right,
.route-home .nav-toggle { color: #fff; }
.route-home .nav-menu a::after { background: #fff; }
.route-home .nav-toggle { border-color: rgba(255, 255, 255, 0.6); }

/* Po przewinięciu poza hero przezroczysty pasek zamienia się w biały (sekcje pod hero są jasne). */
.route-home.nav-solid .navbar {
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.route-home.nav-solid .nav-menu a { color: var(--text); }
.route-home.nav-solid .nav-menu a::after { background: var(--accent); }
.route-home.nav-solid .nav-right { color: #334155; }
.route-home.nav-solid .nav-toggle { color: var(--text); border-color: rgba(15, 23, 42, 0.2); }
.navbar { transition: background-color .25s ease; }

.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; gap: 1rem; position: relative; }
.nav-left { display: flex; align-items: center; gap: 1.5rem; }
.nav-right { margin-left: auto; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem; color: #334155; }

.nav-toggle {
    display: none; border: 1px solid rgba(15, 23, 42, 0.2); background: transparent;
    padding: 0.5rem 0.85rem; border-radius: 999px; font-weight: 600; cursor: pointer; font: inherit;
}

.nav-menu { list-style: none; display: flex; align-items: center; gap: 1.5rem; }
.nav-menu a { font-weight: 500; color: var(--text); padding: 0.35rem 0.2rem; position: relative; }
.nav-menu a::after {
    content: ""; position: absolute; left: 0; bottom: -0.35rem; height: 2px; width: 0;
    background: var(--accent); transition: width 0.3s ease;
}
.nav-menu a:hover::after, .nav-menu a[aria-current="page"]::after { width: 100%; }

/* ---------- hero (strona główna – bez zmian wizualnych) ---------- */
.hero {
    position: relative; height: 100vh; height: 100svh;
    display: grid; place-items: center; color: #fff; overflow: hidden; flex-shrink: 0;
    background: #0d1525;
}
.hero--empty { background: linear-gradient(135deg, #0d1525, #1e293b); }

.hero-bg {
    position: absolute; inset: 0; display: block;
    opacity: 0; transition: opacity 0.8s ease;
}
.hero-bg img {
    width: 100%; height: 100%; max-width: none;
    object-fit: cover; object-position: center;
    background-size: cover; background-position: center;
}
.hero-bg.is-active { opacity: 1; }

.hero-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    border: none; background: rgba(10, 16, 28, 0.28); color: rgba(255, 255, 255, 0.82);
    width: 2.6rem; height: 2.6rem; border-radius: 999px; font-size: 1.35rem; line-height: 1;
    cursor: pointer; display: grid; place-items: center;
    transition: background 0.2s ease, color 0.2s ease;
}
.hero-nav--prev { left: 1rem; }
.hero-nav--next { right: 1rem; }
.hero-nav:hover, .hero-nav:focus-visible { background: rgba(10, 16, 28, 0.5); color: #fff; }

/* ---------- kafelki albumów ---------- */
.tiles-section { padding: 3rem 0 4rem; }
.tiles-section + .tiles-section { border-top: 1px solid rgba(15, 23, 42, 0.08); }
.tiles-header { margin-bottom: 2.5rem; }
.section-title { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 1rem; }
.section-title--light { color: #fff; }
.section-subtitle { color: #475569; max-width: 720px; margin-bottom: 2.5rem; }
.section-subtitle--light { color: rgba(255, 255, 255, 0.9); }

/* Pierwszy podgląd albumów: mozaika "bento".
   Kształty (xl / tall / sm / wide / pano) przydziela serwer tak, by siatka była zawsze pełna.
   Okładki "żyją": po najechaniu (lub na telefonie – gdy kafelek jest w kadrze) przechodzą przez kilka kadrów z albumu. */
.bento {
    --bento-row: clamp(150px, 17.5vw, 224px);
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: var(--bento-row); grid-auto-flow: dense;
    gap: 10px; max-width: 1200px; margin: 0 auto;
}
.tile { position: relative; display: block; overflow: hidden; border-radius: 16px; background: #e5e7eb; color: #fff; isolation: isolate;
    transition: opacity .45s ease, filter .45s ease; }
.tile--xl { grid-column: span 2; grid-row: span 2; }
.tile--tall { grid-row: span 2; }
.tile--wide { grid-column: span 2; }
.tile--pano { grid-column: span 4; grid-row: span 2; }

.tile__frames { position: absolute; inset: 0; z-index: -1; }
.tile__img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
    background-size: cover; background-position: center;
    opacity: 0; transform: scale(1.001);
    transition: opacity 1s ease, transform 7s cubic-bezier(.2, .6, .2, 1);
}
.tile__img.is-on { opacity: 1; }
.tile::after {                                   /* ciemniejszy dół pod tytułem */
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(5, 8, 15, 0) 52%, rgba(5, 8, 15, .78) 100%);
}
.tile__title {
    position: absolute; z-index: 1; left: 1.15rem; right: 1.15rem; bottom: 1rem;
    font-size: clamp(1rem, 1.35vw, 1.3rem); font-weight: 600; letter-spacing: .01em; line-height: 1.25;
    text-shadow: 0 1px 12px rgba(0, 0, 0, .5);
}
.tile--xl .tile__title, .tile--pano .tile__title { font-size: clamp(1.25rem, 2vw, 1.8rem); }
.tile__title::after {                            /* czerwona kreska rośnie przy najechaniu */
    content: ""; display: block; height: 2px; width: 1.4rem; margin-top: .45rem;
    background: var(--accent); transform-origin: left; transform: scaleX(.35); transition: transform .45s ease;
}
.tile:hover .tile__title::after, .tile:focus-visible .tile__title::after { transform: scaleX(1.7); }
.tile:focus-visible { outline-offset: -3px; outline-color: #fff; }

@media (hover: hover) {
    .tile:hover .tile__img.is-on { transform: scale(1.06); }
    /* "reflektor": najechany kafelek świeci, reszta opada w cień */
    .bento:has(.tile:hover) .tile:not(:hover) { opacity: .55; filter: saturate(.6) brightness(.85); }
}

/* Wejście kafelków przy przewijaniu (tylko przeglądarki z scroll-driven animations; reszta – bez animacji). */
@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        .tile { animation: tile-in linear backwards; animation-timeline: view(); animation-range: entry 0% entry 42%; }
        @keyframes tile-in { from { opacity: 0; transform: translateY(34px) scale(.975); } }
    }
}

.section-more-wrap { max-width: 1320px; margin: 1.75rem auto 0; text-align: right; }
.section-more { font-weight: 600; color: var(--secondary); border-bottom: 2px solid transparent; transition: border-color .2s; }
.section-more:hover { border-color: currentColor; }
.section-more--light { color: rgba(255, 255, 255, 0.9); }

/* ---------- nagłówki podstron ---------- */
.page-hero { background: var(--bg); padding: 4rem 0 1.5rem; }
.page-hero--not-found { min-height: 50vh; display: grid; align-items: center; }
.page-hero h1 { font-size: clamp(2rem, 3vw, 3rem); }
.page-hero p { color: var(--text-light); margin-top: 0.7rem; max-width: 720px; }
.eyebrow { color: var(--secondary); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.page-hero .eyebrow { margin: 0 0 .35rem; }
.eyebrow a:hover { text-decoration: underline; }
.album-meta { font-size: 0.95rem; letter-spacing: 0.02em; }

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.button {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.85rem 1.25rem; border-radius: 999px; font-weight: 700;
    transition: transform 0.2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: #fff; }

/* ---------- GALERIA ---------- */
.gallery-section { padding: 2rem 0 4rem; }
.gallery-section--all { padding-top: 0; }
.gallery-empty { color: var(--text-light); }

.gallery-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    margin-bottom: 1.1rem; flex-wrap: wrap;
}
.gallery-count { color: var(--text-light); font-size: 0.95rem; }

.layout-switch {
    display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px;
    background: var(--bg-soft); border: 1px solid rgba(15, 23, 42, 0.1);
}
.layout-btn {
    display: inline-flex; align-items: center; gap: 0.4rem; border: 0; background: transparent;
    color: var(--text-light); padding: 0.4rem 0.8rem; border-radius: 999px; cursor: pointer;
    font: inherit; font-size: 0.85rem; font-weight: 600; transition: background .2s, color .2s;
}
.layout-btn:hover { color: var(--text); }
.layout-btn[aria-pressed="true"] { background: var(--primary); color: #fff; }

.gallery { list-style: none; }
/* <picture> (wersja statyczna, AVIF) nie może zmieniać układu */
.g-item picture, .about-image picture, .tile__frames picture { display: contents; }

.g-item { position: relative; overflow: hidden; background: #0f172a; border-radius: 6px; }
.g-item a { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.g-item img {
    width: 100%; height: 100%; object-fit: cover;
    background-size: cover; background-position: center;   /* blur-up: mikro-podgląd z serwera */
    transition: transform 0.5s ease, opacity 0.4s ease;
}
.g-item { background-size: cover; background-position: center; }   /* mikro-podgląd (blur-up) leży pod zdjęciem */
.js .g-item img:not(.is-loaded) { opacity: 0; }                     /* zdjęcie wchodzi płynnie po wczytaniu */
.js .g-item img.is-loaded { opacity: 1; }
@media (hover: hover) { .g-item:hover img { transform: scale(1.03); } }

/* Układ 1: "Rzędy" – zdjęcia w rzędach bez przycinania (czyste CSS, wymiary z serwera => zero skoków układu). */
.gallery[data-layout="rows"] { display: flex; flex-wrap: wrap; gap: var(--gap); }
.gallery[data-layout="rows"]::after { content: ""; flex-grow: 100000; }
.gallery[data-layout="rows"] .g-item {
    aspect-ratio: var(--ar);
    flex-grow: calc(var(--ar) * 100);
    flex-basis: calc(var(--ar) * var(--row-h));
    min-width: 0;
}

/* Układ 2: "Mozaika" – kolumny o zmiennej wysokości. */
.gallery[data-layout="masonry"] { columns: 4 260px; column-gap: var(--gap); }
.gallery[data-layout="masonry"] .g-item { break-inside: avoid; margin-bottom: var(--gap); aspect-ratio: var(--ar); }

/* Układ 3: "Siatka" – równe kafelki 4:3 jak dotychczas. */
.gallery[data-layout="grid"] { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.gallery[data-layout="grid"] .g-item { aspect-ratio: 4 / 3; border-radius: 14px; }

/* Układ 4: "Kadry" – jedno zdjęcie pod drugim, w pełnej szerokości kolumny (dobre do reportaży). */
.gallery[data-layout="story"] { display: grid; gap: 1.25rem; max-width: 1100px; margin: 0 auto; }
.gallery[data-layout="story"] .g-item { aspect-ratio: var(--ar); max-height: 88vh; margin: 0 auto; width: min(100%, calc(88vh * var(--ar))); border-radius: 10px; }

.gallery-sentinel { height: 1px; }

.album-nav {
    display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center;
    margin-top: 3.5rem; padding-top: 1.75rem; border-top: 1px solid rgba(15, 23, 42, 0.1);
}
.album-nav__link { display: grid; gap: 0.1rem; transition: color .2s; }
.album-nav__link small { color: var(--text-light); text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; }
.album-nav__link span { font-weight: 600; }
.album-nav__link:hover span { color: var(--secondary); }
.album-nav__link--next { text-align: right; }
.album-nav__link--all { text-align: center; }

/* ---------- LIGHTBOX (natywny <dialog>) ---------- */
.lightbox {
    position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh;
    max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
    background: rgba(5, 8, 15, 0.985); color: #fff; overflow: hidden;
}
.lightbox:not([open]) { display: none; }
.lightbox::backdrop { background: transparent; }

.lb-stage { position: absolute; inset: 0 0 var(--lb-strip, 0px) 0; display: grid; place-items: center; touch-action: none; overflow: hidden; }
.lb-figure { margin: 0; position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.lb-img {
    max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
    user-select: none; -webkit-user-drag: none; will-change: transform;
    transition: opacity 0.25s ease;
    background-size: cover; background-position: center;
}
.lb-img.is-swapping { opacity: 0.35; }
.lb-stage.is-zoomed { cursor: grab; }
.lb-stage.is-dragging { cursor: grabbing; }

.lb-top, .lb-caption { position: absolute; left: 0; right: 0; z-index: 3; padding: 0.75rem 1rem; display: flex; align-items: center; gap: 0.5rem; transition: opacity .3s ease; }
.lb-top { top: 0; justify-content: space-between; background: linear-gradient(180deg, rgba(0,0,0,.6), transparent); padding-top: max(0.75rem, env(safe-area-inset-top)); }
.lb-caption { bottom: var(--lb-strip, 0px); background: linear-gradient(0deg, rgba(0,0,0,.6), transparent); font-size: .9rem; color: rgba(255,255,255,.85); flex-wrap: wrap; justify-content: center; text-align: center; padding-bottom: max(0.75rem, env(safe-area-inset-bottom)); pointer-events: none; }
.lb-caption a { pointer-events: auto; text-decoration: underline; text-underline-offset: 3px; }
.lb-caption .lb-exif { color: rgba(255,255,255,.6); font-size: .82rem; }
.lightbox.is-idle .lb-top, .lightbox.is-idle .lb-caption, .lightbox.is-idle .lb-arrow, .lightbox.is-idle .lb-strip { opacity: 0; pointer-events: none; }

.lb-counter { font-size: .9rem; color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; }
.lb-tools { display: flex; gap: .35rem; }
.lb-btn, .lb-arrow {
    border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; cursor: pointer;
    width: 2.6rem; height: 2.6rem; border-radius: 999px; display: inline-grid; place-items: center;
    font-size: 1.5rem; line-height: 1; transition: background .2s; text-decoration: none;
}
.lb-btn:hover, .lb-arrow:hover { background: rgba(255, 255, 255, 0.3); }
.lb-btn svg { width: 20px; height: 20px; }
.lb-btn[aria-pressed="true"] { background: rgba(255,255,255,.34); }
.lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; transition: opacity .3s, background .2s; }
.lb-arrow--prev { left: 1rem; }
.lb-arrow--next { right: 1rem; }

.lb-strip {
    position: absolute; left: 0; right: 0; bottom: 0; height: var(--lb-strip, 0px); z-index: 3;
    display: none; gap: 4px; padding: 6px 8px; overflow-x: auto; scrollbar-width: none;
    background: rgba(0,0,0,.55); transition: opacity .3s;
}
.lb-strip::-webkit-scrollbar { display: none; }
.lb-strip button { flex: 0 0 auto; height: 100%; aspect-ratio: 3 / 2; border: 0; padding: 0; border-radius: 4px; overflow: hidden; cursor: pointer; opacity: .5; outline-offset: 2px; background: #111; }
.lb-strip button[aria-current="true"] { opacity: 1; outline: 2px solid #fff; }
.lb-strip img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) and (min-height: 620px) { .lightbox { --lb-strip: 76px; } .lb-strip { display: flex; } }

.lb-progress { position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--accent); z-index: 4; }
.lightbox.is-playing .lb-progress { animation: lb-progress var(--lb-interval, 5s) linear; }
@keyframes lb-progress { from { width: 0; } to { width: 100%; } }

/* ---------- stopka ---------- */
.footer { background: #0f172a; color: rgba(255, 255, 255, 0.84); }
.footer-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.75rem; color: #fff; }
.footer-content { padding: 3rem 0 2rem; margin-top: 4rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer-contact p { margin-bottom: 0.35rem; }
.footer-social-icons { display: flex; gap: 1rem; align-items: center; }
.footer-email-icon {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--accent)); transition: all 0.3s ease; color: white;
}
.footer-email-icon:hover { background: linear-gradient(135deg, var(--accent), var(--secondary)); transform: translateY(-2px) scale(1.05); box-shadow: 0 6px 16px rgba(21, 128, 110, 0.3); }
.footer-email-icon svg { width: 20px; height: 20px; stroke: white; }
.footer-social-icon {
    display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.1); transition: all 0.3s ease; color: rgba(255, 255, 255, 0.84);
}
.footer-social-icon:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.1); color: #fff; }
.footer-social-icon svg { width: 18px; height: 18px; }
.footer p, .footer a { color: rgba(255, 255, 255, 0.75); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 2rem; padding: 1rem 0; text-align: center; font-size: 0.9rem; }

/* ---------- O mnie ---------- */
.about-section { padding: 4rem 0 6rem; background: var(--bg); }
.about-content { display: flex; gap: 3rem; max-width: 1200px; margin: 0 auto; align-items: center; }
.about-text-wrapper { display: flex; flex-direction: column; justify-content: center; gap: 2rem; flex: 2; min-width: 0; margin-top: 2.5rem; }
.about-intro { background: var(--bg); padding: 2rem; border-radius: var(--radius); box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08); border-left: 4px solid var(--secondary); }
.about-intro p { font-size: 1.1rem; line-height: 1.7; color: var(--text); }
.about-text { display: grid; gap: 2rem; }
.about-section-block { background: var(--bg); padding: 2rem; border-radius: var(--radius); box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.about-section-block:hover { transform: translateY(-2px); box-shadow: 0 15px 35px rgba(15, 23, 42, 0.12); }
.about-section-block p { line-height: 1.7; color: var(--text-light); font-size: 1rem; }
.about-section-block a { color: var(--secondary); font-weight: 600; }
.about-image-wrapper { position: relative; flex-shrink: 0; flex: 1; min-width: 0; }
.about-image { position: sticky; top: 2rem; }
.about-image img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 3/4; object-fit: cover; background-size: cover; }
.about-social-above-image { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1.5rem; }
.about-social-icon-large {
    display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.9); box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15); transition: all 0.3s ease;
    border: 1px solid rgba(15, 23, 42, 0.08); color: var(--text);
}
.about-social-icon-large:hover { background: var(--bg); transform: translateY(-3px) scale(1.05); box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2); }
.about-social-icon-large svg { width: 24px; height: 24px; }
.about-email-icon-large {
    display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--accent)); box-shadow: 0 6px 20px rgba(21, 128, 110, 0.3);
    transition: all 0.3s ease; color: white;
}
.about-email-icon-large:hover { background: linear-gradient(135deg, var(--accent), var(--secondary)); transform: translateY(-4px) scale(1.1); }
.about-email-icon-large svg { width: 28px; height: 28px; stroke: white; }

/* ---------- responsywność ---------- */
@media (max-width: 960px) {
    .nav-toggle { display: inline-flex; padding: 0.75rem 1rem; }
    .nav-menu {
        position: absolute; top: 100%; left: 0; right: 0; background: #fff;
        flex-direction: column; align-items: stretch; padding: 1.15rem 1.15rem 1.5rem; gap: 0.85rem;
        opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s ease;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08); z-index: 1002;
    }
    .nav-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
    .nav-menu a { display: block; width: 100%; padding: 0.85rem 0; }
    .route-home .nav-menu { background: rgba(0, 0, 0, 0.82); border-bottom: none; }
    .route-home.nav-solid .nav-menu { background: #fff; border-bottom: 1px solid rgba(15, 23, 42, 0.08); }
    .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); --bento-row: clamp(150px, 30vw, 240px); }
    .tile--tall, .tile--pano { grid-column: span 2; grid-row: span 1; }
    .tile--xl { grid-row: span 2; }
    .footer-content { margin-top: 3rem; padding: 2rem 1.15rem 1.5rem; flex-direction: column; align-items: stretch; }
    .footer-social-icons { gap: 0.75rem; }
    .footer-email-icon { width: 36px; height: 36px; }
    .footer-email-icon svg { width: 18px; height: 18px; }
    .footer-social-icon { width: 32px; height: 32px; }
    .footer-social-icon svg { width: 16px; height: 16px; }
    :root { --row-h: 210px; }
}

@media (max-width: 768px) {
    .about-text-wrapper { margin-top: 0; }
    .about-content { flex-direction: column; gap: 2rem; }
    .about-image { position: static; }
    .about-image img { max-width: 240px; margin: 0 auto; }
    .about-section { padding: 2rem 0 4rem; }
    .about-intro, .about-section-block { padding: 1.5rem; }
    .about-social-above-image { gap: 1rem; }
    .about-social-icon-large { width: 44px; height: 44px; }
    .about-social-icon-large svg { width: 20px; height: 20px; }
    .about-email-icon-large { width: 50px; height: 50px; }
    .about-email-icon-large svg { width: 24px; height: 24px; }
}

@media (max-width: 640px) {
    .hero { min-height: 75vh; min-height: 75svh; }
    .bento { grid-template-columns: 1fr; --bento-row: 62vw; gap: 8px; }
    .tile--xl, .tile--tall, .tile--wide, .tile--pano { grid-column: auto; grid-row: span 1; }
    :root { --row-h: 140px; --gap: 4px; }
    .gallery[data-layout="masonry"] { columns: 2; }
    .gallery[data-layout="grid"] .g-item { aspect-ratio: 3 / 4; }
    .layout-btn span { display: none; }
    .layout-btn { padding: 0.5rem 0.7rem; }
    .lb-arrow { display: none; }              /* na telefonie: gesty (przesunięcie, szczypanie, podwójne dotknięcie) */
    .footer-content { padding: 1.75rem 1rem 1.25rem; }
    .footer-bottom { padding-bottom: 1.75rem; }
    .hero-nav { width: 2.25rem; height: 2.25rem; font-size: 1.15rem; }
    .hero-nav--prev { left: 0.6rem; }
    .hero-nav--next { right: 0.6rem; }
    .album-nav { grid-template-columns: 1fr 1fr; }
    .album-nav__link--all { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
