/* ========================================= */
/* --- 1. RESET I STYLE BAZOWE --- */
/* ========================================= */

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

html, body {
    height: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body {
    background-repeat: no-repeat;
    background-position: center center;
    background-size: auto;
    position: relative;
    font-family: 'Montserrat', sans-serif;
    color: #333;
    margin: 0;
}

/* Tło z efektem Parallax */
body::before {
    content: '';
    position: fixed;
    top: -20px;
    left: -20px;
    width: 120%;
    height: 120%;
    background-image: url('images/tlo3.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    filter: blur(5px);
    z-index: -1;
    transform: scale(1.05); 
}

/* ========================================= */
/* --- 2. ULTRA-CLEAN GLASS (EFEKT SZKŁA) --- */
/* ========================================= */

.glass-effect {
    position: relative;
    background: rgba(255, 255, 255, 0.01); 
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(8px);
    
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.4);
    
    /* Fix na mruganie w Chrome */
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: transform, backdrop-filter;
    overflow: hidden;
}

.glass-effect::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.0) 100%);
}

/* ========================================= */
/* --- 3. NAWIGACJA (Pill Nav) --- */
/* ========================================= */

:root {
    --nav-base: #000000;       
    --nav-pill-text: #ffffff;  
    --nav-hover-text: #ffffff; 
    --nav-h: 50px;
}

.pill-nav-container {
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 100;
    pointer-events: none; 
}

.pill-nav {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Logo */
.pill-logo {
    width: var(--nav-h);
    height: var(--nav-h);
    border-radius: 50%;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s;
}
.pill-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 2;
}
.pill-logo:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.08);
}

/* Menu Items */
.pill-nav-items {
    height: var(--nav-h);
    display: flex;
    align-items: center;
}
.pill-list {
    list-style: none;
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    height: 100%;
}
.pill-list li { height: 100%; }

/* Guzik Menu */
.pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 30px;
    color: var(--nav-pill-text);
    text-decoration: none;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s;
}
.pill:hover, .pill.is-active {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08); 
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.hover-circle {
    position: absolute;
    left: 50%;
    bottom: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2; 
    pointer-events: none;
    transform: translate(-50%, 0) scale(0);
}
.label-stack { position: relative; z-index: 5; }
.pill-label, .pill-label-hover { display: block; line-height: 14px; text-align: center; }
.pill-label-hover {
    color: var(--nav-hover-text);
    position: absolute;
    top: 0; left: 0; width: 100%;
    transform: translateY(20px); opacity: 0;
}

/* Mobile Menu */
.mobile-menu-button {
    width: var(--nav-h);
    height: var(--nav-h);
    border-radius: 50%;
    border: none;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}
.hamburger-line {
    width: 18px; height: 2px; background: #fff; border-radius: 1px; position: relative; z-index: 2;
}
.mobile-menu-popover {
    display: none;
    position: absolute; top: 70px; right: 20px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px; padding: 10px; width: 220px;
    z-index: 999;
}
.mobile-menu-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; }
.mobile-menu-link { display: block; padding: 12px 15px; text-decoration: none; color: #fff; background: transparent; border-radius: 10px; text-align: center; }

@media (max-width: 768px) {
    .pill-nav-items { display: none; }
    .mobile-menu-button { display: flex; }
    .pill-nav-container { justify-content: space-between; padding: 0 20px; }
}

/* ========================================= */
/* --- 4. SEKCJA INTRO I LAYOUTY --- */
/* ========================================= */

.intro {
    flex: 1;                /* Klucz: Rozpycha się, zajmując wolne miejsce między menu a stopką */
    display: flex;
    justify-content: center;
    align-items: center;    /* Na stronie głównej wyśrodkuje, na innych nadpiszemy */
    padding: 100px 20px 40px; /* Padding dół 40px, żeby nie kleiło się do stopki */
    box-sizing: border-box;
    width: 100%;
}

/* KARTA STANDARDOWA (Index) */
.main_content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 60px;
    position: relative;
    z-index: 1;
    border-radius: 60px;
    padding: 60px;
    width: 90%;
    max-width: 1100px;
    transition: transform 0.3s ease;
}

/* ZDJĘCIE - AVATAR */
.profile-photo {
    flex-shrink: 0;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.4); 
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.05), 0 20px 40px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
    transition: transform 0.4s ease;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; background: rgba(255, 255, 255, 0.075);}
.profile-photo:hover { transform: scale(1.03); }

/* TEKST */
.intro-text { flex: 1; text-align: left; color: #ffffff; display: flex; flex-direction: column; justify-content: center; z-index: 2; }
.intro-text h1 { font-size: 4rem; margin: 0 0 15px 0; font-weight: 700; letter-spacing: -1px; color: #ffffff; text-shadow: 0 2px 15px rgba(0,0,0,0.6); }
.intro-text p b { color: #f5f5f5; font-size: 1.4rem; font-weight: 500; display: inline-block; margin-bottom: 25px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.3); }
.intro-text p { font-size: 1.15rem; line-height: 1.8; color: #e6e6e6; margin: 0 0 15px 0; max-width: 600px; text-shadow: 0 1px 4px rgba(0,0,0,0.7); }

/* --- KARTA KOMPAKTOWA (Doświadczenie/Lista) --- */
.main_content.list-layout {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    padding: 30px 40px; /* Zmniejszony padding */
    height: 85vh; 
    max-height: 0px;
    min-height: 500px;
    border-radius: 40px;
}

/* Nagłówek w liście */
.content-header {
    text-align: center;
    flex-shrink: 0;
    padding-bottom: 10px;
    margin-bottom: 5px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.content-header h1 { font-size: 1.8rem; color: #fff; margin: 0; }
.content-header p { font-size: 0.85rem; color: #aaa; margin-top: 5px; }

/* Guziki Filtrowania */
.filter-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    flex-shrink: 0;
    margin-bottom: 10px;
}
.filter-btn {
    padding: 6px 14px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #ccc;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.filter-btn:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.filter-btn.active { background: rgba(255, 255, 255, 0.9); color: #000; border-color: #fff; }

/* Lista Przewijana */
.scroll-list-container {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    mask-image: linear-gradient(to bottom, transparent 0%, black 15px, black calc(100% - 15px), transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15px, black calc(100% - 15px), transparent 100%);
}
.scroll-list {
    height: 100%;
    overflow-y: auto;
    padding: 15px 5px;
    scrollbar-width: none; 
    -ms-overflow-style: none;
}
.scroll-list::-webkit-scrollbar { display: none; }

/* Element Listy (Compact) */
.list-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    margin-bottom: 8px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}
.list-item:hover { background: rgba(255, 255, 255, 0.08); transform: scale(1.01); }
.list-item h3 { color: #fff; font-size: 1.1rem; margin: 2px 0; }
.list-item .role { color: #8ecae6; font-weight: 600; font-size: 0.9rem; margin-bottom: 3px; }
.list-item .date { color: #999; font-size: 0.75rem; letter-spacing: 0.5px; margin-bottom: 2px; text-transform: uppercase; }
.list-item p { color: #ddd; font-size: 0.9rem; line-height: 1.4; margin-top: 5px; }

.list-item.hidden { display: none !important; }
.list-item.in-view { opacity: 1; transform: scale(1); }
.list-item:not(.in-view) { opacity: 0; transform: scale(0.95); }

/* --- MEDIA QUERIES --- */
@media (max-width: 900px) {
    .intro { height: auto; min-height: 100vh; overflow: visible; padding-top: 100px; padding-bottom: 40px; }
    .main_content {
        flex-direction: column; padding: 40px 20px; gap: 30px; text-align: center;
        background: rgba(20, 20, 20, 0.6); height: auto !important; max-height: none !important;
    }
    .profile-photo { width: 240px; height: 240px; margin: 0 auto; }
    .intro-text { text-align: center; align-items: center; }
    .intro-text h1 { font-size: 2.5rem; }
    .intro-text p b { margin: 0 auto 20px auto; }
    
    .scroll-list-container { overflow: visible; mask-image: none; -webkit-mask-image: none; }
    .scroll-list { padding: 0; overflow: visible; height: auto; }
}

/* ========================================= */
/* --- 5. STOPKA --- */
/* ========================================= */

footer {
    color: white; text-align: center; padding: 15px; width: 100%;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    z-index: 5; position: relative;
}
.footer-content { display: flex; justify-content: center; align-items: center; gap: 15px; flex-wrap: wrap; }
.social-icons { display: flex; gap: 10px; }
.social-icons a i { font-size: 20px; opacity: 0.7; transition: opacity 0.3s ease; }
.social-icons a:hover i { opacity: 1; }
.contact-info { white-space: normal; font-size: 0.9em; }
.contact-info a { color: white; text-decoration: underline; }
.copyright { font-size: 0.7em; color: #ddd; }

/* ========================================= */
/* --- 6. STYLE KALKULATORA I INNE (LEGACY) --- */
/* ========================================= */

.calculator-container {
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 700px;
    margin: 20px auto; 
    color: #333; 
}

.calculator-container h1 { font-size: 2em; color: #333; margin-bottom: 1em; text-align: center; }
.calculator-container p { margin-bottom: 15px; line-height: 1.5; }

.calculator-container input,
.calculator-container select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.calculator-container button {
    background-color: #433F3F; 
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px; 
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
}
.calculator-container button:hover { background-color: #2a2828; }

/* Tabele statystyczne (Dark Mode) */
#dataTable { 
    width: 100%; 
    border-collapse: collapse; 
    margin-bottom: 20px; 
    background: #2b2a2a; 
    color: white; /* Dodano dla czytelności */
}
#dataTable th, #dataTable td { border: 1px solid #ddd; padding: 8px; text-align: center; }
#dataTable th { background-color: #686767; }

/* ========================================= */
/* --- 7. MODYFIKACJE DLA STRON PRZEWIJANYCH (Doświadczenie itp.) --- */
/* ========================================= */

/* Nadpisujemy .intro tylko tam, gdzie dodaliśmy klasę .page-scroll */
.intro.page-scroll {
    height: auto !important;          /* Pozwalamy rosnąć */
    min-height: 100vh;
    align-items: flex-start;          /* Zaczynamy od góry, nie od środka */
    padding-top: 120px;               /* Miejsce na nawigację */
    padding-bottom: 40px;
}

/* Nadpisujemy kontener treści */
.intro.page-scroll .main_content.list-layout {
    height: auto !important;          /* Wysokość zależna od tekstu */
    max-height: none !important;      /* Usuwamy limit */
    overflow: visible !important;     /* Pokaż wszystko */
    margin-bottom: 20px;
}

/* Usuwamy wewnętrzny scroll listy, bo teraz scrolluje cała strona */
.intro.page-scroll .scroll-list-container {
    mask-image: none !important;
    -webkit-mask-image: none !important;
    overflow: visible !important;
}

.intro.page-scroll .scroll-list {
    overflow: visible !important;
    height: auto !important;
    padding: 0 10px; /* Lekki padding boczny */
}