/* ==========================================================================
   PSP XMB PORTFOLIO — stylesheet główny
   Inspiracja: classic PSP XMB (Cross Media Bar).
   Dark cinematic + glassmorphism + premium motion.
   ========================================================================== */

/* Inter + Space Grotesk (OFL), tylko latin / latin-ext — bez render-blocking Google CSS */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 500;
    font-display: swap;
    src: url("../fonts/inter-latin-ext-1Br77OV.woff2") format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 500;
    font-display: swap;
    src: url("../fonts/inter-latin-Gz7AlRl.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url("../fonts/space-grotesk-latin-ext-NXGsJlG.woff2") format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url("../fonts/space-grotesk-latin-Dr-cltI.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Design tokens ---------- */
:root {
    /* Kolory bazowe */
    --black: #000000;
    --charcoal: #111111;
    --graphite: #1A1A1A;

    /* Akcenty — autentyczne PSP (August blue, najbardziej ikoniczny) */
    --psp-blue: #0C76C0;
    --cyan: #00D4FF;
    --orange: #FF6A00;
    --silver: #C0C0C0;
    --white: #FFFFFF;

    /* Glassmorphism */
    --glass: rgba(255, 255, 255, 0.05);
    --glass-strong: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* Typografia */
    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;

    /* Skala — autentyczne PSP: ease-out, płynne (nie spring bounce) */
    --ease-spring: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
    --radius: 12px;
    --radius-sm: 8px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* ---------- Custom scrollbary — styl PSP XMB ---------- */
/* Webkit (Chrome / Edge / Safari) */
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
*::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}
*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(12, 118, 192, 0.6), rgba(12, 118, 192, 0.3));
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(12, 118, 192, 0.9), rgba(0, 212, 255, 0.6));
    background-clip: padding-box;
}
*::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0.3);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(12, 118, 192, 0.5) rgba(0, 0, 0, 0.3);
}

body {
    margin: 0;
    /* Autentyczny PSP: vertical gradient navy → black, tint PSP blue */
    background-color: #000510;
    background-image: linear-gradient(180deg, #0a1a2a 0%, #000510 100%);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}

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

a {
    color: var(--cyan);
    text-decoration: none;
    transition: color 0.3s var(--ease-soft);
}
a:hover { color: var(--psp-blue); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.1;
    margin: 0 0 0.5em;
    letter-spacing: -0.01em;
    /* Subtelny text-shadow jak w PSP dla czytelności nad falami */
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

ul, ol { margin: 0; padding: 0; list-style: none; }

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: rgba(0, 112, 255, 0.15);
    color: var(--cyan);
    padding: 0.1em 0.4em;
    border-radius: 4px;
}

/* ---------- Waves canvas ---------- */
.waves-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
    contain: layout paint;
    transform: translateZ(0);
    filter: blur(8px);
}
@media (max-width: 768px) {
    .waves-canvas {
        filter: blur(5px);
        opacity: 0.5;
    }
}

/* ---------- Cursor glow ---------- */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 112, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
    transform: translate3d(-9999px, -9999px, 0);
    mix-blend-mode: screen;
    contain: layout paint;
}

/* ---------- Flash messages ---------- */
.flash-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    max-width: 380px;
}
.flash {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    background: var(--glass-strong);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    color: var(--white);
    font-size: 0.95rem;
    box-shadow: var(--glass-shadow);
    animation: flash-in 0.5s var(--ease-spring) both;
}
.flash--success { border-left: 3px solid var(--psp-blue); }
.flash--error { border-left: 3px solid var(--orange); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* ---------- Typografia ---------- */
.h-display {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--white) 0%, var(--silver) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ui-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--psp-blue);
    margin: 0 0 1.5rem;
}

.section-sub {
    color: rgba(255,255,255,0.6);
    margin-bottom: 2.5rem;
    max-width: 56ch;
}

/* ---------- Glassmorphism ---------- */
.glass {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    /* Subtelny metallic highlight */
    position: relative;
}
.glass::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.9rem 1.8rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.4s var(--ease-spring);
}
.btn--primary {
    background: var(--orange);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(255, 106, 0, 0.3);
}
.btn--primary:hover {
    background: #FF8533;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 106, 0, 0.5);
    color: var(--white);
}
.btn--ghost {
    background: var(--glass);
    backdrop-filter: blur(12px);
    color: var(--white);
    border-color: var(--glass-border);
}
.btn--ghost:hover {
    background: var(--glass-strong);
    border-color: var(--psp-blue);
    color: var(--cyan);
    transform: translateY(-2px);
}
.btn--small { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn--block { display: block; width: 100%; }

/* ---------- XMB Menu (stan MENU — pełnoekranowy overlay) ---------- */
.xmb-menu {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding: 2rem;
    /* animacja wyjścia menu — autentyczne PSP ease-out, nie spring bounce */
    transition: opacity 0.35s var(--ease-soft), transform 0.35s var(--ease-soft);
}
.xmb-menu.is-hidden {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

.xmb-menu__header {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
}
.xmb-menu__title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--white) 0%, var(--silver) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 60px rgba(12, 118, 192, 0.3);
    margin: 0;
}
.xmb-menu__hint {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    font-style: italic;
    text-align: center;
}

/* Tekst zostaje w HTML dla crawlerów, zero miejsca na ekranie. */
.seo-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- XMB Stage (wrapper track + bubble) ---------- */
.xmb-stage {
    position: relative;
    width: min(44rem, calc(100% - 1rem));
    display: flex;
    justify-content: center;
}

/* ---------- Focus bubble — świetlisty selektor sunący między ikonami ---------- */
.xmb-bubble {
    position: absolute;
    top: 0; left: 0;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(12, 118, 192, 0.35) 0%, rgba(12, 118, 192, 0.1) 50%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    /* Płynne przesuwanie — autentyczne PSP ease-out */
    transition: transform 0.35s var(--ease-soft), opacity 0.3s var(--ease-soft);
    will-change: transform;
}
.xmb-bubble::after {
    content: '';
    position: absolute;
    inset: 20%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
}

/* ---------- XMB Track — 6 równych kolumn, ikony na siatce niezależnie od długości etykiety ---------- */
.xmb-track {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
    align-items: start;
    position: relative;
    z-index: 1;
}
.xmb-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
    cursor: pointer;
    opacity: 0.4;
    user-select: none;
    color: rgba(255, 255, 255, 0.85);
    padding: 0.5rem 0.25rem;
    position: relative;
    z-index: 1;
    transition: opacity 0.3s var(--ease-soft);
}
.xmb-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.9);
    transform: scale(0.65);
    transform-origin: center center;
    position: relative;
    z-index: 1;
    transition: transform 0.35s var(--ease-soft);
}
.xmb-item__icon .icon { width: 100%; height: 100%; }
.xmb-item__label {
    display: block;
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    line-height: 1.3;
    text-align: center;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    overflow-wrap: break-word;
}

/* Hover = soft preview (mysz też przesuwa focus przez controller) */
.xmb-item:hover {
    opacity: 0.8;
    color: var(--white);
}
.xmb-item:hover .xmb-item__icon {
    transform: scale(0.85);
}

/* FOCUSED — ikona pod bubblem (keyboard / hover / click) */
.xmb-item.is-focused {
    opacity: 1;
    color: var(--white);
}
.xmb-item.is-focused .xmb-item__icon {
    transform: scale(1);
    /* Glow white jak w PSP (Sony: "icons glow white when selected") */
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 14px rgba(12, 118, 192, 0.7));
    color: var(--white);
}
.xmb-item.is-focused .xmb-item__label {
    color: var(--white);
}

/* ACTIVE — sekcja otwarta (oznaczenie w menu) */
.xmb-item.is-active {
    opacity: 1;
}

@media (max-width: 768px) {
    .xmb-stage { width: calc(100% - 0.5rem); }
    .xmb-item { gap: 0.5rem; padding: 0.35rem 0.1rem; }
    .xmb-item__icon { width: 36px; height: 36px; }
    .xmb-item__label { font-size: 0.58rem; letter-spacing: 0.04em; }
    .xmb-bubble { width: 70px; height: 70px; }
}

/* ---------- XMB Content / Sections (stan SECTION) ---------- */
.xmb-content {
    position: fixed;
    inset: 0;
    z-index: 30;
    overflow-y: auto;
    padding: 2rem clamp(1.5rem, 5vw, 5rem) 4rem;
    /* domyślnie ukryte — scale 0 → 1 ease-out (autentyczne PSP, nie spring) */
    opacity: 0;
    transform: scale(0.4);
    pointer-events: none;
    transition: opacity 0.35s var(--ease-soft), transform 0.35s var(--ease-soft);
}
.xmb-content.is-open {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.xmb-section { display: none; }
.xmb-section.is-active { display: block; }
/* Contact: wyśrodkuj pionowo gdy mieści się w viewport */
.xmb-section#section-contact.is-active {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    justify-content: center;
}
/* Pozwól na scroll gdy contact nie mieści się (np. błędy walidacji) */
.xmb-content:has(#section-contact.is-active) {
    overflow-y: auto;
}

@media (scripting: none) {
    .xmb-menu {
        position: relative;
        inset: auto;
    }
    .xmb-content {
        position: relative;
        inset: auto;
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }
    .xmb-section,
    .xmb-section#section-contact.is-active {
        display: block;
    }
}

/* ---------- Back to menu button ---------- */
.back-to-menu-btn {
    position: relative;
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    margin-bottom: 1rem;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s var(--ease-soft);
    flex-shrink: 0;
}
.back-to-menu-btn:hover {
    border-color: var(--psp-blue);
    color: var(--cyan);
    transform: translateX(-4px);
}
.back-to-menu-btn .icon { width: 18px; height: 18px; }

/* ---------- Icon base (SVG inline) ---------- */
.icon {
    display: block;
    color: inherit;
}

/* ---------- Contact links icons ---------- */
.contact-link__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--psp-blue);
    flex-shrink: 0;
}
.contact-link__icon .icon { width: 100%; height: 100%; }

/* ---------- Tech category title icons ---------- */
.tech-category__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tech-category__title .icon {
    width: 18px;
    height: 18px;
    color: var(--psp-blue);
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* ---------- Hero ---------- */
.hero-tagline {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: rgba(255,255,255,0.7);
    max-width: 52ch;
    margin: 1.5rem 0 2.5rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }
.xmb-hint {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    font-style: italic;
}

/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
    padding: 2.5rem;
    align-items: center;
}
.about-text p { color: rgba(255,255,255,0.8); margin-bottom: 1rem; }
.about-stats { display: grid; gap: 1.5rem; }
.stat { text-align: center; }
.stat__num {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--psp-blue);
}
.stat__label { font-size: 0.85rem; color: rgba(255,255,255,0.6); }

@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- About extra (edukacja, certyfikaty, języki) ---------- */
.about-extra {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.about-card { padding: 1.75rem; }
.about-card__title {
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    color: var(--psp-blue);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
    text-transform: uppercase;
}
.about-card__body {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}
.about-card__list {
    display: grid;
    gap: 0.5rem;
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
}
.about-card__list li::before {
    content: '▹ ';
    color: var(--psp-blue);
}
.muted { color: rgba(255,255,255,0.5); font-size: 0.85em; }

/* ---------- Projects ---------- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}
.project-card {
    overflow: hidden;
    transition: transform 0.4s var(--ease-spring), box-shadow 0.4s var(--ease-soft);
}
.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 112, 255, 0.2);
}
.project-card__media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--graphite);
    position: relative;
}
.project-card__count {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    color: var(--white);
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}
.project-card__media img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 6s var(--ease-soft), filter 0.3s var(--ease-soft);
    cursor: pointer;
}
.project-card__media img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}
.project-card:hover .project-card__media img { transform: scale(1.05); }
.project-card__media--placeholder {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--graphite), rgba(0, 112, 255, 0.2));
}
.project-card__media--placeholder span {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    color: rgba(255,255,255,0.2);
}
.project-card__body { padding: 1.5rem 1.75rem 2rem; }
.badge-featured {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 0.5rem;
}
.project-card__title { font-size: 1.4rem; margin-bottom: 0.5rem; }
.project-card__desc { color: rgba(255,255,255,0.7); font-size: 0.95rem; margin-bottom: 1rem; }
.project-card__tech {
    display: flex; flex-wrap: wrap; gap: 0.4rem;
    margin-bottom: 1.25rem;
}
.project-card__tech li {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: rgba(0, 112, 255, 0.15);
    border: 1px solid rgba(0, 112, 255, 0.3);
    border-radius: 20px;
    color: var(--cyan);
}
.project-card__links { display: flex; gap: 0.75rem; }

.empty-state {
    padding: 3rem;
    text-align: center;
    color: rgba(255,255,255,0.5);
}

/* ---------- Experience timeline ---------- */
.timeline { max-width: 800px; }
.timeline-item {
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    transition: transform 0.4s var(--ease-spring);
}
.timeline-item:hover { transform: translateX(8px); }
.timeline-item__period {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--psp-blue);
    text-transform: uppercase;
}
.timeline-item__role { font-size: 1.4rem; margin: 0.5rem 0 0.25rem; }
.timeline-item__company { color: var(--cyan); font-size: 0.95rem; margin: 0 0 0.75rem; }
.timeline-item__desc { color: rgba(255,255,255,0.7); margin: 0; }

/* ---------- Skills (XMB cross layout) ----------
   Góra: poziomy pasek kategorii z bubble (jak PSP XMB)
   Dół:  po kliknięciu w kategorię → pionowa lista skillów */
.skills-xmb {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* --- Kategorie (górny pasek) --- */
.skills-categories-stage {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}
.skills-bubble {
    position: absolute;
    top: 0; left: 0;
    width: 110px; height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(12, 118, 192, 0.35) 0%, rgba(12, 118, 192, 0.1) 50%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: transform 0.35s var(--ease-soft), opacity 0.3s var(--ease-soft);
    will-change: transform;
}
.skills-categories {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(1.25rem, 2.5vw, 2rem);
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.skill-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    opacity: 0.4;
    transform: scale(0.7);
    transition: opacity 0.3s var(--ease-soft), transform 0.35s var(--ease-soft), filter 0.3s var(--ease-soft);
    user-select: none;
    color: rgba(255, 255, 255, 0.85);
    padding: 0.5rem;
    position: relative;
    z-index: 1;
}
.skill-cat-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    color: rgba(255, 255, 255, 0.9);
    transition: filter 0.3s var(--ease-soft), color 0.3s var(--ease-soft);
}
.skill-cat-item__icon .icon { width: 100%; height: 100%; }
.skill-cat-item__label {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.skill-cat-item:hover {
    opacity: 0.8;
    transform: scale(0.85);
}
.skill-cat-item.is-focused {
    opacity: 1;
    transform: scale(1);
    color: var(--white);
}
.skill-cat-item.is-focused .skill-cat-item__icon {
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 14px rgba(12, 118, 192, 0.7));
    color: var(--white);
}
.skill-cat-item.is-focused .skill-cat-item__label {
    color: var(--white);
}

/* --- Panele skillów (dół) --- */
.skills-panels {
    position: relative;
    min-height: 200px;
}
.skill-panel {
    /* Ukryte: zwinięte od góry, absolutnie pozycjonowane żeby nie pchać layoutu */
    position: absolute;
    top: 0; left: 0; right: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-15px);
    pointer-events: none;
    transition: max-height 0.45s var(--ease-soft), opacity 0.35s var(--ease-soft), transform 0.45s var(--ease-soft);
}
.skill-panel.is-active {
    /* Rozwinięte: z góry na dół */
    position: relative;
    max-height: 1200px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.skill-panel__list {
    display: grid;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}
.skill-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.4s var(--ease-soft), transform 0.4s var(--ease-soft);
}
/* Staggered reveal skilli gdy panel jest aktywny */
.skill-panel.is-active .skill-item {
    opacity: 1;
    transform: none;
}
.skill-panel.is-active .skill-item:nth-child(1) { transition-delay: 0.15s; }
.skill-panel.is-active .skill-item:nth-child(2) { transition-delay: 0.22s; }
.skill-panel.is-active .skill-item:nth-child(3) { transition-delay: 0.29s; }
.skill-panel.is-active .skill-item:nth-child(4) { transition-delay: 0.36s; }
.skill-panel.is-active .skill-item:nth-child(5) { transition-delay: 0.43s; }
.skill-panel.is-active .skill-item:nth-child(6) { transition-delay: 0.50s; }
.skill-panel.is-active .skill-item:nth-child(7) { transition-delay: 0.57s; }
.skill-panel.is-active .skill-item:nth-child(8) { transition-delay: 0.64s; }
.skill-item__name {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
    font-weight: 400;
}
.skill-item__bar {
    display: block;
    width: 160px;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}
.skill-item__fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--psp-blue), var(--cyan));
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(12, 118, 192, 0.5);
    width: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.8s var(--ease-soft);
}
.skill-panel.is-active .skill-item__fill {
    transform: scaleX(var(--fill, 0));
}
.skill-item__level {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.78rem;
    font-family: var(--font-mono);
    min-width: 3ch;
    text-align: right;
}

@media (max-width: 640px) {
    .skill-item { grid-template-columns: 1fr auto; gap: 0.5rem; }
    .skill-item__bar { grid-column: 1 / -1; width: 100%; }
    .skill-cat-item__icon { width: 44px; height: 44px; }
    .skills-bubble { width: 88px; height: 88px; }
}

/* ---------- Tech Stack (carousel kołowy — koło lewo, karta prawo) ---------- */
.tech-carousel {
    position: relative;
    padding: 2rem 0;
}

/* Layout: koło + karta obok siebie. Na starcie koło jest wyśrodkowane (karta ukryta, zero szerokości). */
.tech-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    min-height: 420px;
}
@media (max-width: 900px) {
    .tech-layout { flex-direction: column; gap: 2rem; }
}

/* --- Lewa strona: koło (domyślnie wyśrodkowane, gdy karta się pojawi — przesuwa się w lewo) --- */
.tech-circle-side {
    position: relative;
    flex-shrink: 0;
    width: 340px;
    height: 340px;
    transition: transform 0.5s var(--ease-soft);
}
.tech-circle-side.is-shifted {
    transform: translateX(-60px);
}
@media (max-width: 900px) {
    .tech-circle-side.is-shifted { transform: none; }
}
@media (max-width: 640px) {
    .tech-circle-side { width: 280px; height: 280px; }
}

/* Okrąg z kategoriami (kręci się) — wypełnia cały .tech-circle-side */
.tech-circle {
    position: absolute;
    inset: 0;
    --rotation: 0deg;
    transition: transform 0.6s var(--ease-soft);
    transform: rotate(var(--rotation));
}

/* Środek okręgu — osobny overlay, NIE dziedziczy rotacji koła.
   Pozycjonowany absolutnie na środku .tech-circle-side (który się nie kręci). */
.tech-circle__center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 120px; height: 120px;
    border-radius: 50%;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 0 40px rgba(12, 118, 192, 0.15);
}

/* --- Prawa strona: karta (domyślnie niewidoczna, zero szerokości) --- */
.tech-card-side {
    flex: 0 0 auto;
    width: 0;
    opacity: 0;
    overflow: visible;
    pointer-events: none;
    transition: width 0.5s var(--ease-soft), opacity 0.45s var(--ease-soft), margin-left 0.5s var(--ease-soft);
}
.tech-card-side.is-open {
    width: 420px;
    opacity: 1;
    pointer-events: auto;
}
@media (max-width: 900px) {
    .tech-card-side { width: 100% !important; }
}

/* Okrąg z kategoriami — style i środek zdefiniowane wyżej przy .tech-circle-side */

/* Kategoria na okręgu */
.tech-circle-hint {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    transition: opacity 0.3s var(--ease-soft);
}
.tech-circle-hint.is-hidden { opacity: 0; }

/* Kategoria na okręgu */
.tech-circle-item {
    position: absolute;
    top: 50%; left: 50%;
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.6);
    opacity: 0.7;
    /* Pozycjonowanie na okręgu + kompensacja rotacji koła */
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-150px) rotate(calc(-1 * var(--angle))) rotate(calc(-1 * var(--rotation)));
    transition: opacity 0.3s var(--ease-soft), color 0.3s var(--ease-soft);
    z-index: 2;
}
@media (max-width: 640px) {
    .tech-circle-item {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-120px) rotate(calc(-1 * var(--angle))) rotate(calc(-1 * var(--rotation)));
    }
}
.tech-circle-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    transition: filter 0.3s var(--ease-soft);
}
.tech-circle-item__icon .icon { width: 100%; height: 100%; }
.tech-circle-item__label {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.tech-circle-item:hover {
    opacity: 1;
    color: var(--white);
}
.tech-circle-item:hover .tech-circle-item__icon {
    filter: drop-shadow(0 0 6px rgba(12, 118, 192, 0.7));
}
.tech-circle-item.is-active {
    opacity: 1;
    color: var(--white);
}
.tech-circle-item.is-active .tech-circle-item__icon {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 14px rgba(12, 118, 192, 0.7));
}
.tech-circle-item.is-active .tech-circle-item__label {
    color: var(--white);
}

/* --- Karta z technologiami (wewnątrz .tech-card-side) --- */
.tech-card {
    position: relative;
    padding: 2rem;
    background: var(--glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: 0 0 60px rgba(12, 118, 192, 0.15), var(--glass-shadow);
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.4s var(--ease-soft), transform 0.45s var(--ease-spring);
}
.tech-card.is-visible {
    opacity: 1;
    transform: scale(1);
}
.tech-card.is-swapping {
    opacity: 0.3;
    transform: scale(0.97);
    transition: opacity 0.15s var(--ease-soft), transform 0.15s var(--ease-soft);
}
.tech-card__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: rgba(255,255,255,0.6);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s var(--ease-soft);
}
.tech-card__close:hover {
    background: rgba(12, 118, 192, 0.2);
    color: var(--white);
    border-color: var(--psp-blue);
}
.tech-card__title {
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    color: var(--psp-blue);
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
}
.tech-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tech-chip {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.6rem 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: all 0.3s var(--ease-soft);
    cursor: default;
}
.tech-chip:hover {
    background: rgba(12, 118, 192, 0.12);
    border-color: rgba(12, 118, 192, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(12, 118, 192, 0.2);
}
.tech-chip__name {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.88rem;
    font-weight: 500;
}
.tech-chip__desc {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.72rem;
    line-height: 1.3;
}

/* ---------- Contact ---------- */
/* Wypełnia dostępną wysokość sekcji bez generowania scrollbara */
.section-inner--contact {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem 0;
}
.h-display--md { font-size: clamp(2rem, 4.5vw, 3.2rem) !important; margin-bottom: 0.5rem; }

.contact-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 2rem;
    flex: 1;
    min-height: 0;
    align-items: stretch;
}
.contact-form-wrap {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.contact-form--compact {
    display: grid;
    gap: 1rem;
    height: 100%;
    align-content: center;
}
.form-row { display: grid; gap: 0.35rem; }

/* Imię + email w jednej linii */
.form-row--inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-cell { display: grid; gap: 0.35rem; }

.form-label {
    font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em;
    color: var(--psp-blue); text-transform: uppercase;
}
.form-field {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-family: var(--font-body); font-size: 0.92rem;
    color: var(--white);
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    transition: border-color 0.3s var(--ease-soft), box-shadow 0.3s var(--ease-soft);
}
.form-field:focus {
    outline: none;
    border-color: var(--psp-blue);
    box-shadow: 0 0 0 2px rgba(12, 118, 192, 0.15);
}
.form-field--textarea {
    resize: none;
    min-height: 90px;
    flex: 1;
}
.form-field--select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230C76C0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 16px;
    padding-right: 2.5rem;
    border-radius: 12px;
}
.form-field--select option {
    background: #0a1a2a;
    color: var(--white);
    padding: 0.5rem;
    border-radius: 8px;
    margin: 4px;
}
.form-field--select option:checked {
    background: rgba(12, 118, 192, 0.3);
    color: var(--cyan);
}
.form-row--consent { margin-top: 0.15rem; }
.consent {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.8rem; color: rgba(255,255,255,0.7); line-height: 1.5;
}

/* Custom checkbox — PSP style */
.form-consent-checkbox {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
    margin: 0;
}
.consent__box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    /* Wyrównanie środka checkboxa ze środkiem pierwszej linii tekstu:
       line-height 1.5 × 0.8rem = 19.2px → (19.2 - 20) / 2 ≈ -0.4px
       Dodajemy +1px na optyczne wyśrodkowanie z literami (cap-height). */
    margin-top: calc((0.8rem * 1.5 - 20px) / 2 + 1px);
    background: rgba(255,255,255,0.05);
    border: 1.5px solid var(--glass-border);
    border-radius: 5px;
    transition: all 0.3s var(--ease-soft);
    flex-shrink: 0;
}
.consent__box::after {
    content: '';
    width: 10px; height: 10px;
    background: var(--psp-blue);
    border-radius: 2px;
    transform: scale(0);
    transition: transform 0.25s var(--ease-spring);
    box-shadow: 0 0 8px var(--psp-blue);
}
.consent input:checked + .consent__box {
    border-color: var(--psp-blue);
    background: rgba(12, 118, 192, 0.1);
}
.consent input:checked + .consent__box::after {
    transform: scale(1);
}
.consent input:focus-visible + .consent__box {
    box-shadow: 0 0 0 3px rgba(12, 118, 192, 0.3);
}
/* Stan błędu checkboxa — czerwona ramka (zgodnie z resztą pól) */
.form-row--consent.has-error .consent__box {
    border-color: #FF4444;
    box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.15);
}

/* Błędy walidacji — czerwone z ikoną */
.invalid-feedback {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #FF4444;
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: 0.25rem;
    padding: 0.35rem 0.6rem;
    background: rgba(255, 68, 68, 0.08);
    border-left: 2px solid #FF4444;
    border-radius: 4px;
    animation: error-in 0.3s var(--ease-soft) both;
}
.invalid-feedback::before {
    content: '⚠';
    font-size: 0.9rem;
}
@keyframes error-in {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: none; }
}

/* Pole z błędem — czerwona ramka */
.form-field.is-invalid,
.form-row.has-error .form-field {
    border-color: #FF4444 !important;
    box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.15) !important;
}

/* ---------- Przycisk submit — animacja wysyłania ---------- */
.contact-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: background 0.3s var(--ease-soft), transform 0.2s var(--ease-spring), opacity 0.2s var(--ease-soft);
}

/* Elementy wewnątrz przycisku: domyślnie ukryte, włączane przez stany */
.contact-submit__icon,
.contact-submit__spinner,
.contact-submit__check {
    display: none;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
}
.contact-submit__icon svg,
.contact-submit__check svg {
    width: 100%;
    height: 100%;
}

/* Stan wysyłania — pokaż spinner + zablokuj */
.contact-submit.is-sending {
    opacity: 0.85;
    cursor: wait;
    pointer-events: none;
}
.contact-submit.is-sending .contact-submit__icon { display: none; }
.contact-submit.is-sending .contact-submit__spinner { display: inline-block; }

/* Spinner — koło obracające się (PSP blue) */
.contact-submit__spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: contact-spin 0.7s linear infinite;
}
@keyframes contact-spin {
    to { transform: rotate(360deg); }
}

/* Stan sukcesu — pokaż checkmark, zielone tło, pulse */
.contact-submit.is-success {
    background: #16A34A !important;
    box-shadow: 0 0 24px rgba(22, 163, 74, 0.5);
    animation: contact-pop 0.4s var(--ease-spring);
}
.contact-submit.is-success .contact-submit__icon,
.contact-submit.is-success .contact-submit__spinner { display: none; }
.contact-submit.is-success .contact-submit__check { display: inline-flex; }
.contact-submit__check {
    color: #fff;
    animation: contact-check-in 0.4s var(--ease-spring) both;
}
@keyframes contact-check-in {
    0%   { transform: scale(0) rotate(-30deg); opacity: 0; }
    60%  { transform: scale(1.2) rotate(0deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes contact-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.04); }
    100% { transform: scale(1); }
}

/* Stan błędu — potrząśnięcie */
.contact-submit.is-error {
    animation: contact-shake 0.4s var(--ease-soft);
    background: #FF4444 !important;
}
@keyframes contact-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* ---------- Toast potwierdzenia ---------- */
.contact-toast {
    animation: flash-in 0.4s var(--ease-spring) both;
}
.contact-toast.is-leaving {
    animation: toast-out 0.4s var(--ease-soft) forwards;
}
@keyframes toast-out {
    to { opacity: 0; transform: translateX(20px); }
}

.contact-links {
    display: grid;
    gap: 0.75rem;
    align-content: start;
}
.contact-link {
    display: flex; align-items: center; gap: 0.9rem;
    padding: 0.85rem 1.1rem;
    color: var(--white);
    transition: transform 0.3s var(--ease-spring), border-color 0.3s var(--ease-soft);
}
.contact-link:hover {
    transform: translateX(8px);
    border-color: var(--psp-blue);
    color: var(--cyan);
}
.contact-link__label { font-weight: 500; font-size: 0.92rem; }

/* Wariant z przyciskiem kopiowania — label zajmuje resztę szerokości */
.contact-link--copy .contact-link__label {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* ---------- Reveal: label → wartość na hover (Email / Telefon) ---------- */
.contact-link__label--reveal {
    position: relative;
    display: inline-block;
    /* Wysokość stała — oba teksty w tym samym boxie */
    height: 1.4em;
}
.reveal-text,
.reveal-value {
    display: block;
    transition: opacity 0.3s var(--ease-soft), transform 0.3s var(--ease-soft);
}
/* Domyślnie: widać label, wartość ukryta */
.reveal-text {
    opacity: 1;
    transform: translateY(0);
}
.reveal-value {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(6px);
    overflow-wrap: anywhere;
}
/* Na hover/focus karty: crossfade — label znika, wartość wjeżdża */
.contact-link--reveal:hover .reveal-text,
.contact-link--reveal:focus-within .reveal-text {
    opacity: 0;
    transform: translateY(-6px);
}
.contact-link--reveal:hover .reveal-value,
.contact-link--reveal:focus-within .reveal-value {
    opacity: 1;
    transform: translateY(0);
}

/* Przycisk „Kopiuj" — PSP style */
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    margin-left: auto;
    background: rgba(12, 118, 192, 0.12);
    border: 1px solid rgba(12, 118, 192, 0.3);
    border-radius: var(--radius-sm);
    color: var(--cyan);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s var(--ease-soft);
}

/* Wariant download (CV) — strzałka w dół po prawej */
.contact-link--download {
    position: relative;
}
.download-arrow {
    margin-left: auto;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cyan);
    line-height: 1;
    transition: transform 0.3s var(--ease-spring);
}
.contact-link--download:hover .download-arrow {
    transform: translateY(3px);
    animation: download-bounce 0.6s var(--ease-spring);
}
@keyframes download-bounce {
    0%, 100% { transform: translateY(3px); }
    50% { transform: translateY(6px); }
}
.copy-btn .icon {
    width: 0.9rem;
    height: 0.9rem;
}
.copy-btn:hover {
    background: rgba(12, 118, 192, 0.25);
    border-color: var(--psp-blue);
    color: var(--white);
}
/* Stan „Skopiowano!" — zielony */
.copy-btn.is-copied {
    background: rgba(22, 163, 74, 0.2);
    border-color: #16A34A;
    color: #4ADE80;
    animation: copy-pop 0.3s var(--ease-spring);
}
@keyframes copy-pop {
    0%   { transform: scale(0.95); }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; }
    .form-row--inline { grid-template-columns: 1fr; }
    .section-inner--contact { height: auto; }

    /* Na mobile nie ma hover — pokaż wartość od razu, ukryj label */
    .reveal-text { opacity: 0; }
    .reveal-value { opacity: 1; transform: translateY(0); }
}

/* Touch devices bez hover (iPad, telefony) — wartość widoczna od razu */
@media (hover: none) {
    .reveal-text { opacity: 0; }
    .reveal-value { opacity: 1; transform: translateY(0); }
}

/* ---------- Gallery Lightbox (PSP style) ---------- */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s var(--ease-soft);
}
.gallery-lightbox.is-open { opacity: 1; }

.gallery-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 5, 16, 0.92);
    backdrop-filter: blur(8px);
}

.gallery-lightbox__image {
    position: relative;
    z-index: 2;
    max-width: 88vw;
    max-height: 82vh;
    border-radius: var(--radius);
    box-shadow: 0 0 80px rgba(12, 118, 192, 0.3), 0 20px 60px rgba(0,0,0,0.6);
    transition: opacity 0.2s var(--ease-soft), transform 0.3s var(--ease-spring);
}
.gallery-lightbox__image.is-loading {
    opacity: 0.3;
    transform: scale(0.97);
}

.gallery-lightbox__close {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    z-index: 10;
    width: 44px; height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--white);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s var(--ease-soft);
}
.gallery-lightbox__close:hover {
    background: rgba(12, 118, 192, 0.3);
    border-color: var(--psp-blue);
    transform: rotate(90deg);
}

.gallery-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 56px; height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--white);
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s var(--ease-soft);
}
.gallery-lightbox__nav--prev { left: 1.5rem; }
.gallery-lightbox__nav--next { right: 1.5rem; }
.gallery-lightbox__nav:hover {
    background: rgba(12, 118, 192, 0.3);
    border-color: var(--psp-blue);
    transform: translateY(-50%) scale(1.1);
}

.gallery-lightbox__counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    padding: 0.4rem 1rem;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: rgba(255,255,255,0.8);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .gallery-lightbox__nav { width: 44px; height: 44px; font-size: 1.6rem; }
    .gallery-lightbox__nav--prev { left: 0.5rem; }
    .gallery-lightbox__nav--next { right: 0.5rem; }
    .gallery-lightbox__close { top: 0.75rem; right: 0.75rem; width: 36px; height: 36px; font-size: 1.4rem; }
}

/* ---------- Scroll reveal (tylko gdy JS działa) ---------- */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms var(--ease-soft), transform 600ms var(--ease-soft);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Locale switch (PL / EN) ---------- */
.locale-switch {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
}
.locale-switch__sep {
    color: rgba(255, 255, 255, 0.28);
    font-size: 0.75rem;
}
.locale-switch__link {
    color: rgba(255, 255, 255, 0.45);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.5rem 0.15rem;
    border-bottom: 1px solid transparent;
    transition: color 150ms ease-out, border-color 150ms ease-out;
}
.locale-switch__link:hover {
    color: var(--white);
}
.locale-switch__link.is-active {
    color: var(--white);
    border-bottom-color: var(--psp-blue);
}
.locale-switch__link:focus-visible {
    outline: 2px solid var(--psp-blue);
    outline-offset: 4px;
}

@media (max-width: 640px) {
    .locale-switch {
        top: 0.75rem;
        right: 0.75rem;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .js [data-reveal] { opacity: 1; transform: none; }
    .waves-canvas, .cursor-glow { display: none; }
}
