/* ================================================================================= */
/* ||||||||||||||||||||||| POCZĄTEK PLIKU CSS - POPRAWIONA WERSJA 3.0 ||||||||||||||||||||||| */
/* ================================================================================= */

/* ================================================================================= */
/* |||||||||||||||||| SEKCJA 1: ZMIENNE CSS I STYLE PODSTAWOWE |||||||||||||||||||| */
/* ================================================================================= */
:root {
    --background-color: #050a09;
    --accent-color: #00ff9b;
    --primary-text-color: #e0e0e0;
    --glow-color: rgba(0, 255, 155, 0.5);
    --card-background: rgba(10, 25, 22, 0.6);
    --border-color: rgba(0, 255, 155, 0.3);
}

* { 
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
}

html { 
    scroll-behavior: smooth; 
    cursor: default; 
}

body { 
    font-family: 'Space Mono', monospace; 
    background-color: var(--background-color); 
    color: var(--primary-text-color); 
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"%3E%3Cg fill="none" stroke="%2300ff9b" stroke-opacity="0.07"%3E%3Cpath d="M0 50 L50 0 L100 50 L50 100 Z"/%3E%3Cpath d="M0 25 L25 0"/%3E%3Cpath d="M75 0 L100 25"/%3E%3Cpath d="M100 75 L75 100"/%3E%3Cpath d="M25 100 L0 75"/%3E%3Cpath d="M50 50 L25 25"/%3E%3Cpath d="M50 50 L75 25"/%3E%3Cpath d="M50 50 L75 75"/%3E%3Cpath d="M50 50 L25 75"/%3E%3C/g%3E%3C/svg%3E');
}

/* ================================================================================= */
/* |||||||||||| SEKCJA 2: ELEMENTY UI/UX (PRELOADER, KURSOR, TŁO) |||||||||||||| */
/* ================================================================================= */
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--background-color); z-index: 10001; display: flex; justify-content: center; align-items: center; opacity: 1; transition: opacity 0.5s ease-in-out; }
#preloader.is-hidden { opacity: 0; pointer-events: none; }
.preloader-container { position: relative; width: 250px; height: 250px; display: flex; justify-content: center; align-items: center; }
.preloader-dashed-circle { position: absolute; width: 100%; height: 100%; animation: rotate 30s linear infinite; }
.preloader-icon-container { animation: float 4s ease-in-out infinite; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; }

/* Domyślnie kursor jest ukryty na wszystkich urządzeniach */
.cursor-dot, .cursor-outline {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    transition: transform 0.2s ease-out;
}

/* Pokazujemy kursor tylko, gdy strona ma klasę .no-touch (czyli na PC) */
html.no-touch .cursor-dot,
html.no-touch .cursor-outline {
    display: block;
}

/* Style indywidualne dla kropki i obramowania */
.cursor-dot { 
    width: 8px; 
    height: 8px; 
    background-color: var(--accent-color); 
    transform: translate(-50%, -50%); 
}

.cursor-outline { 
    width: 30px; 
    height: 30px; 
    border: 2px solid var(--accent-color); 
    opacity: 0.5; 
}
.page-transition { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: var(--background-color); z-index: 10000; opacity: 1; pointer-events: none; transition: opacity 0.5s ease-in-out; }
.page-transition.is-hidden { opacity: 0; }

#background-decor { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
.decor-shape { position: absolute; opacity: 0; animation: fadeInOut 15s infinite; }
.shape-plus::before, .shape-plus::after { content: ''; position: absolute; background-color: var(--accent-color); opacity: 0.5; }
.shape-plus::before { width: 10px; height: 2px; top: 4px; left: 0; }
.shape-plus::after { width: 2px; height: 10px; top: 0; left: 4px; }
.shape-circle { width: 8px; height: 8px; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 50%; }

.fade-in-element { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in-element.is-visible { opacity: 1; transform: translateY(0); }

/* ================================================================================= */
/* ||||||||||||||||||||||||| SEKCJA 3: NAWIGACJA GŁÓWNA ||||||||||||||||||||||||| */
.main-nav { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    padding: 15px 50px; 
    display: flex; 
    justify-content: space-between;
    align-items: center; 
    background-color: rgba(5, 10, 9, 0.8); 
    backdrop-filter: blur(10px); 
    z-index: 1000; 
    border-bottom: 1px solid rgba(0, 255, 155, 0.2); 
}
.nav-logo { font-weight: 700; letter-spacing: 0.2em; }

.nav-links-container {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
    margin-right: 30px;
}

.nav-links-container ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 30px; }
.main-nav a { color: var(--primary-text-color); text-decoration: none; font-weight: bold; transition: color 0.3s; }
.main-nav a:hover { color: var(--accent-color); }

.nav-toggle { display: none; background: none; border: none; padding: 0; cursor: pointer; z-index: 1001; }
.hamburger { display: block; width: 25px; height: 2px; background-color: var(--primary-text-color); position: relative; transition: transform 0.3s; }
.hamburger::before, .hamburger::after { content: ''; position: absolute; left: 0; width: 100%; height: 2px; background-color: var(--primary-text-color); transition: transform 0.3s, top 0.3s, bottom 0.3s; }
.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }
.nav-toggle.is-active .hamburger { background-color: transparent; }
.nav-toggle.is-active .hamburger::before { top: 0; transform: rotate(45deg); }
.nav-toggle.is-active .hamburger::after { bottom: 0; transform: rotate(-45deg); }

.lang-switch { 
    display: flex; gap: 5px; 
    background-color: rgba(10, 25, 22, 0.8); 
    padding: 5px; 
    border-radius: 20px; 
    border: 1px solid var(--border-color); 
}
.lang-btn { background: none; border: none; color: var(--primary-text-color); font-family: 'Space Mono', monospace; font-weight: bold; padding: 5px 15px; border-radius: 20px; cursor: pointer; transition: all 0.3s ease; }
.lang-btn.active { background-color: var(--accent-color); color: var(--background-color); }
.lang-btn:not(.active):hover { background-color: rgba(0, 255, 155, 0.2); }

/* ================================================================================= */
/* ||||||||||||||||||||||||||||| SEKCJA 4: HERO ||||||||||||||||||||||||||||| */
/* ================================================================================= */
/* ========================================================== */
/* |||||||||||||||||| SEKCJA HERO |||||||||||||||||| */
/* ========================================================== */

.hero-section { 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    text-align: center; 
    height: 100vh; 
    padding: 0 20px; 
}

.hero-content .animation-container { 
    position: relative; 
    width: 200px; 
    height: 150px; 
    margin: 0 auto 2rem; 
    animation: float 8s ease-in-out infinite; 
}

.hero-section h1 { 
    font-size: 2.5rem; 
    max-width: 800px; 
    margin: 0 auto 2rem; 
    line-height: 1.4; 
}

/* --- POCZĄTEK POPRAWKI --- */

/* Domyślnie (na telefonach) ukrywamy znacznik nowej linii */
.hero-section h1 br {
    display: none;
}

/* Pokazujemy znacznik nowej linii tylko na komputerach (ekrany szersze niż 768px) */
@media (min-width: 769px) {
    .hero-section h1 br {
        display: block;
    }
}
/* --- KONIEC POPRAWKI --- */


.cta-buttons { 
    margin-top: 30px; 
    display: flex; 
    justify-content: center; 
    gap: 20px; 
}

.btn { 
    text-decoration: none; 
    padding: 12px 24px; 
    border-radius: 5px; 
    font-weight: bold; 
    transition: all 0.3s ease; 
}

.btn-primary { 
    background-color: var(--accent-color); 
    color: var(--background-color); 
    box-shadow: 0 0 15px var(--glow-color); 
}

.btn-primary:hover { 
    transform: translateY(-3px) scale(1.05); 
    box-shadow: 0 0 25px var(--glow-color); 
}

.btn-secondary { 
    border: 2px solid var(--accent-color); 
    color: var(--primary-text-color); 
}

.btn-secondary:hover { 
    background-color: var(--accent-color); 
    color: var(--background-color); 
    box-shadow: 0 0 25px var(--glow-color); 
}

/* ================================================================================= */
/* |||||||||||||||||||||||| SEKCJA 5: STYLE OGÓLNE SEKCJI ||||||||||||||||||||||||| */
/* ================================================================================= */
.content-section { padding: 120px 50px; border-top: 1px solid rgba(0, 255, 155, 0.2); scroll-margin-top: 80px; }
.content-section h2 { font-size: 2.8rem; text-align: center; margin-bottom: 80px; color: var(--accent-color); text-transform: uppercase; letter-spacing: 0.2em; }

/* ================================================================================= */
/* |||||||||||||||||| SEKCJA 6: PRZEGLĄD PROJEKTÓW (KARTY) ||||||||||||||||||||| */
/* ================================================================================= */
.project-cards-container { display: flex; justify-content: center; flex-wrap: nowrap; gap: 30px; }
.card { background-color: var(--card-background); border: 1px solid var(--border-color); backdrop-filter: blur(5px); border-radius: 10px; width: 300px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card:hover { transform: translateY(-10px); box-shadow: 0 0 25px var(--glow-color); }
.card-content { padding: 25px; text-align: left; }
.card h3 { color: var(--accent-color); margin-top: 0; }
.card p { font-size: 0.9rem; min-height: 40px; margin-bottom: 1rem; }
.progress-bar-container { width: 100%; height: 10px; background-color: rgba(0, 255, 155, 0.1); border-radius: 5px; margin: 15px 0; }
/* [ZMIANA] Poprawka wyświetlania procentów w pasku postępu */
.progress-bar { 
    width: 0; 
    height: 100%; 
    background-color: var(--accent-color); 
    border-radius: 5px; 
    box-shadow: 0 0 10px var(--glow-color); 
    transition: width 1s ease-out;
    position: relative;
    overflow: visible;
}
.progress-bar span { 
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    margin-left: 8px;
    color: var(--primary-text-color);
    font-weight: bold;
    font-size: 0.7rem;
}
.btn.btn-card { display: block; width: 100%; text-align: center; text-decoration: none; padding: 10px 0; border-bottom: 1px solid rgba(0, 255, 155, 0.5); color: var(--primary-text-color); font-weight: bold; border-radius: 0; transition: color 0.3s; }
.btn.btn-card:hover { color: var(--accent-color); background-color: transparent; }

/* ================================================================================= */
/* ||||||||||||||| SEKCJA 7: STUDIA PRZYPADKÓW (STICKY LAYOUT) ||||||||||||||| */
/* ================================================================================= */
.case-studies-section .project-item {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    backdrop-filter: blur(5px);
    display: flex;
    gap: 40px;
    align-items: center;
    /* [ZMIANA] Usunięto wyśrodkowanie, aby umożliwić układ "zygzak" */
    margin-bottom: 60px;
    max-width: 1200px;
}

/* [ZMIANA] Nowe reguły dla układu "zygzak" */
.case-studies-section .project-item:not(.project-item--reversed) {
    margin-left: auto;
    margin-right: 0;
}
.case-studies-section .project-item--reversed {
    margin-left: 0;
    margin-right: auto;
    flex-direction: row-reverse;
}

.case-studies-section .project-image,
.case-studies-section .project-info {
    width: 50%;
    flex-shrink: 0;
    text-align: left;
    padding: 0 30px; /* Ta linijka dodaje odstęp po lewej i prawej stronie */
}


.project-image {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
}

.project-info { text-align: left; }
.project-info .project-status { display: inline-block; padding: 5px 10px; background-color: var(--accent-color); color: var(--background-color); border-radius: 5px; font-weight: bold; margin-bottom: 1rem; }
.project-info h3 { font-size: 2.5rem; margin-top: 0; color: var(--accent-color); }
.project-info h4 { font-size: 1.2rem; color: var(--accent-color); margin-top: 1.5rem; margin-bottom: 0.5rem; }
.project-info .btn-card { display: inline-block; margin-top: 15px; padding: 10px 24px; border-radius: 5px; background-color: transparent; border: 1px solid var(--accent-color); color: var(--accent-color); font-weight: bold; transition: all 0.3s ease; }
.project-info .btn-card:hover { background-color: var(--accent-color); color: var(--background-color); box-shadow: 0 0 20px var(--glow-color); }

/* ================================================================================= */
/* ||||||||||||||||||||||||||| SEKCJE 8-11: POZOSTAŁE ||||||||||||||||||||||||| */
/* ================================================================================= */
/* [ZMIANA] Zwiększenie szerokości i zmiana liczby kolumn w sekcji kompetencji */
.competencies-container { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 30px; 
    max-width: 1200px; /* Zwiększona szerokość */
    margin: 0 auto;
}
.competency-card { background-color: var(--card-background); border: 1px solid var(--border-color); padding: 30px; border-radius: 10px; text-align: left; }
.competency-card h4 { margin-top: 0; font-size: 1.5rem; color: var(--accent-color); }
.about-me-content { display: flex; align-items: center; gap: 50px; text-align: left; }
.profile-pic { width: 150px; height: 150px; border-radius: 50%; border: 3px solid var(--accent-color); object-fit: cover; }
.about-me-text h3 { font-size: 1.8rem; color: var(--accent-color); }
.about-me-text p { max-width: 600px; }
/* Style dla sekcji kontaktowej na komputerach */
/* ========================================================== */
/* |||||||||||||||||| SEKCJA KONTAKT |||||||||||||||||| */
/* ========================================================== */

/* Style dla komputerów (domyślne) - UKŁAD DWUKOLUMNOWY */
.contact-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 50px;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-text-wrapper, .contact-form {
    width: 48%; /* Szerokość dla każdej z dwóch kolumn */
}

.contact-text-wrapper {
    text-align: left; /* Wyrównanie tekstu w lewej kolumnie */
}

/* Style dla telefonów komórkowych (ekrany do 768px szerokości) */
@media (max-width: 768px) {
    .contact-container {
        flex-direction: column; /* Zmiana na UKŁAD JEDNOKOLUMNOWY */
        align-items: center;   /* Wyśrodkowanie kolumny */
        gap: 40px;
    }

    .contact-text-wrapper, .contact-form {
        width: 100%; /* Kolumny zajmują całą szerokość */
        text-align: center; /* Tekst jest wyśrodkowany */
    }
       .project-cards-container {
        flex-direction: column; /* Układa karty w jednej kolumnie */
        align-items: center;    /* Wyśrodkowuje karty w tej kolumnie */
    }
}
/* [ZMIANA] Poprawki wyrównania tekstu w sekcji kontaktowej */
.contact-intro { text-align: left; }
.contact-intro h3 { font-size: 1.8rem; color: var(--accent-color); margin-top: 0; }
.contact-intro p { max-width: 600px; opacity: 0.8; }
.contact-form { width: 100%; max-width: 700px; display: flex; flex-direction: column; gap: 15px; }
.contact-info { text-align: left; margin-top: 20px; }
.contact-info .social-links { text-align: center; } /* Przywrócenie centrowania dla ikon */

input, textarea { background-color: rgba(10, 25, 22, 0.8); border: 1px solid var(--border-color); border-radius: 5px; padding: 15px; color: var(--primary-text-color); font-family: 'Space Mono', monospace; font-size: 1rem; width: 100%; }
textarea { resize: vertical; }
.form-group { position: relative; margin-bottom: 10px; }
.form-group .visually-hidden { display: none; }
.error-message { color: #ff5555; font-size: 0.8rem; font-weight: bold; display: block; margin-top: 5px; text-align: left; height: 1em; }
input.invalid, textarea.invalid { border-color: #ff5555 !important; box-shadow: 0 0 10px rgba(255, 85, 85, 0.5); }
.contact-form button[type="submit"] { padding: 15px 24px; font-size: 1.1rem; border: none; width: 100%; }
.footer { text-align: center; padding: 40px 20px; background-color: #000; border-top: 1px solid var(--accent-color); }
.logo-footer { font-size: 1.8rem; font-weight: 700; letter-spacing: 0.6em; text-transform: uppercase; padding-left: 0.6em; margin-bottom: 20px; }
.footer-links { margin-bottom: 20px; }
.footer-links a { color: var(--primary-text-color); text-decoration: none; opacity: 0.7; transition: opacity 0.3s, color 0.3s; }
.footer-links a:hover { color: var(--accent-color); opacity: 1; }
.social-links { margin-top: 1rem; }
.social-links a { display: inline-block; color: var(--primary-text-color); text-decoration: none; margin: 0 15px; font-size: 1.5rem; transition: color 0.3s; }
.social-links a:hover { color: var(--accent-color); }
.main-logo-img { width: 200px; height: auto; filter: brightness(0) saturate(100%) invert(84%) sepia(51%) saturate(2258%) hue-rotate(93deg) brightness(101%) contrast(101%); }
/* ================================================================================= */
/* ||||||||||||||||||| SEKCJA 12: MEDIA QUERIES (RESPONSYWNOŚĆ) ||||||||||||||||||| */
/* ================================================================================= */
@media (max-width: 768px) {
    .animation-container, 
    .preloader-icon-container {
        animation: none;
    }
    #background-decor, .cursor-dot, .cursor-outline {
        display: none !important;
    }

    .main-nav { 
        padding: 15px 20px; 
        justify-content: space-between;
    }

    .main-nav .lang-switch { 
        display: flex;
        order: 2;
        margin-left: auto;
        margin-right: 10px;
    }

    .nav-toggle { 
        display: block; 
        order: 3;
    }

    .nav-links-container { 
        position: fixed; 
        top: 0; 
        right: -100%;
        width: 100%; 
        height: 100vh; 
        background-color: var(--background-color); 
        display: flex; 
        justify-content: center; 
        align-items: center; 
        transition: right 0.5s ease-in-out; 
        flex-grow: 0;
        margin-right: 0;
    }
    .nav-links-container.is-visible { right: 0; }
    .main-nav ul { flex-direction: column; gap: 40px; text-align: center; }
    .main-nav ul a { font-size: 2rem; }
    
    .hero-section h1 { font-size: 2rem; }
    .cta-buttons { flex-direction: column; gap: 15px; }
    
    .content-section { padding: 80px 20px; }
    .content-section h2 { font-size: 2.2rem; margin-bottom: 50px; }
    
    .case-studies-section .project-item,
    .case-studies-section .project-item--reversed {
        flex-direction: column;
        padding: 20px;
        /* [ZMIANA] Resetowanie marginesów dla widoku mobilnego */
        margin-left: auto;
        margin-right: auto;
    }
    .case-studies-section .project-image,
    .case-studies-section .project-info {
        width: 100%;
    }
    /* [ZMIANA] Poprawka wyświetlania przyciętych obrazów na mobile */
    .project-image { 
        height: 200px;
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* [ZMIANA] Ustawienie jednej kolumny dla kompetencji na mobile */
    .competencies-container {
        grid-template-columns: 1fr;
    }

    .about-me-content { flex-direction: column; gap: 30px; text-align: center; }

    .footer {
        overflow-x: hidden;
    }
    .logo-footer {
        font-size: 1.2rem;
        letter-spacing: 0.3em;
        padding-left: 0.3em;
        word-wrap: break-word;
    }
    /* Style dla sekcji Kontakt na telefonach */
    .contact-container {
        flex-direction: column;
        align-items: center;
    }

    .contact-text-wrapper, .contact-form {
        width: 100%;
        text-align: center;
    }
    /* Skalowanie sekcji Studia Przypadków do 80% na komputerach */
@media (min-width: 769px) {
    .case-studies-section {
        zoom: 0.8;
    }
}
}

/* ================================================================================= */
/* |||||||||||||||||||||||| SEKCJA 13: ANIMACJE (KEYFRAMES) ||||||||||||||||||||||||| */
/* ================================================================================= */
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
@keyframes fadeInOut { 0%, 100% { opacity: 0; } 50% { opacity: 0.6; } }

/* ================================================================================= */
/* ||||||||||||||||||||||||||||| KONIEC PLIKU CSS ||||||||||||||||||||||||||||||| */
/* ================================================================================= */