:root {
    --bg-color: #0b0b0e;
    --card-bg: #15151a;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #a855f7;
    --accent-hover: #c084fc;
    --border: #27272a;
    --font-mono: 'Fira Code', monospace;
    --font-sans: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Dzięki temu stopka zawsze będzie na dole */
}

/* --- Nawigacja --- */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.2rem 2rem; border-bottom: 1px solid var(--border);
    background: rgba(11, 11, 14, 0.95); position: fixed; top: 0; width: 100%; z-index: 100;
}
.logo { font-family: var(--font-mono); font-weight: bold; font-size: 1.1rem; color: var(--accent); }
.highlight { color: white; }

.nav-links { list-style: none; display: flex; gap: 25px; margin: 0; padding: 0; }
.nav-links li { 
    cursor: pointer; color: var(--text-muted); font-family: var(--font-mono); font-size: 0.9rem; transition: 0.3s; 
}
.nav-links li:hover, .nav-links li.active { color: var(--accent); }

/* --- Układ --- */
.content-wrapper { 
    margin-top: 80px; 
    padding: 2rem; 
    padding-bottom: 80px;
    flex: 1; /* Wypycha stopkę na dół */
}
.container { max-width: 1100px; margin: 0 auto; }
.hidden-view { display: none; }
.active-view { display: block; animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.section-title {
    font-family: var(--font-mono); color: var(--accent);
    border-bottom: 1px dashed var(--border); padding-bottom: 10px; margin-bottom: 30px;
}

/* --- Terminal --- */
#terminal-container {
    background: #0f0f12; border: 1px solid var(--border); border-radius: 8px;
    padding: 2rem; height: 70vh; overflow-y: auto;
    font-family: var(--font-mono); box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
#terminal-container::-webkit-scrollbar { width: 8px; }
#terminal-container::-webkit-scrollbar-thumb { background: #2e2e36; border-radius: 4px; }

.prompt { color: var(--accent); margin-right: 10px; font-weight: bold; }
.output-line { margin-bottom: 5px; white-space: pre-wrap; }
input { background: transparent; border: none; color: white; width: 60%; outline: none; font-family: inherit; font-size: 1rem; }

/* --- Sekcje O Mnie i Portfolio --- */
.about-content { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; }
.skills-box { background: var(--card-bg); padding: 20px; border-radius: 8px; border: 1px solid var(--border); }
.skills-box ul { list-style: none; padding: 0; }
.skills-box li { margin-bottom: 10px; color: var(--text-muted); }
.skills-box i { width: 25px; color: var(--accent); }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }
.project-card {
    background: var(--card-bg); border: 1px solid var(--border);
    padding: 25px; border-radius: 12px; transition: 0.3s; display: flex; flex-direction: column;
}
.project-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 5px 15px rgba(168, 85, 247, 0.1); }
.card-icon { font-size: 2rem; color: var(--accent); margin-bottom: 15px; }
.project-card h3 { margin: 0 0 10px 0; font-size: 1.2rem; }
.project-card .desc { color: var(--text-muted); font-size: 0.9rem; flex-grow: 1; margin-bottom: 20px;}
.tech-stack span { 
    background: rgba(168, 85, 247, 0.1); color: var(--accent-hover); 
    padding: 3px 8px; border-radius: 4px; font-size: 0.75rem; margin-right: 5px; font-family: var(--font-mono);
}
.btn-link { 
    margin-top: 20px; text-decoration: none; color: white; font-size: 0.9rem; 
    border-bottom: 1px dotted var(--accent); align-self: flex-start; 
}

/* --- Kontakt --- */
.contact-cards { display: flex; justify-content: center; gap: 20px; margin-top: 40px; }
.c-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 120px; height: 120px; background: var(--card-bg); border: 1px solid var(--border);
    border-radius: 12px; text-decoration: none; color: var(--text-muted); transition: 0.3s;
}
.c-card:hover { background: var(--accent); color: white; }
.c-card i { font-size: 2rem; margin-bottom: 10px; color: var(--accent); }
.c-card:hover i { color: white; }
.center-text { text-align: center; margin-top: 60px; }

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

/* --- STOPKA --- */
/* --- STOPKA (NAPRAWIONA) --- */
footer {
    position: fixed;        /* Przykleja element do okna przeglądarki */
    bottom: 0;              /* Ustawia na samym dole */
    left: 0;
    width: 100%;            /* Rozciąga na całą szerokość */
    text-align: center;     /* Wyśrodkowuje tekst */
    
    background-color: var(--bg-color); /* Tło, żeby tekst pod spodem nie prześwitywał */
    border-top: 1px solid var(--border); /* Linia oddzielająca */
    
    padding: 15px;          /* Odstęp wewnątrz stopki */
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    z-index: 1000;          /* Gwarantuje, że stopka będzie "nad" innymi elementami */
}

/* --- EFEKTY CRT --- */
body::before {
    content: " "; display: block; position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 999; background-size: 100% 2px, 3px 100%; pointer-events: none;
}
.output-line, .prompt, h1, h3, p, li, span, i, footer {
    text-shadow: 0 0 2px rgba(168, 85, 247, 0.4);
}
/* --- RESPNSYWNOŚĆ (MOBILE FIX) --- */
/* --- RESPONSYWNOŚĆ (MOBILE FIX V2) --- */
@media screen and (max-width: 768px) {

    /* 1. PASEK NAWIGACJI - TOTALNA PRZEBUDOWA */
    .navbar {
        position: fixed;        /* Przyklejone do góry */
        top: 0;
        left: 0;
        width: 100%;
        height: auto;           /* Wysokość dopasuje się do zawartości */
        min-height: 60px;
        
        display: flex;
        flex-direction: column; /* Układ pionowy: Logo na górze, linki pod spodem */
        align-items: center;    /* Wyśrodkowanie */
        padding: 10px 0;
        
        background-color: var(--bg-color); /* Pełne tło, żeby treść nie prześwitywała */
        border-bottom: 1px solid var(--border);
        z-index: 9999;          /* Musi być NAD wszystkim innym */
    }

    .logo {
        margin-bottom: 10px;    /* Odstęp logo od linków */
        font-size: 1.1rem;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;        /* Pozwól przyciskom spadać do nowej linii */
        justify-content: center; /* Wyśrodkuj przyciski */
        gap: 8px;               /* Odstępy między kafelkami menu */
        width: 100%;
        padding: 0 10px;
    }

    .nav-links li {
        margin: 0;
        padding: 5px 10px;
        background: rgba(255, 255, 255, 0.05); /* Lekkie tło dla przycisków, żeby było widać gdzie klikać */
        border-radius: 4px;
        font-size: 0.8rem;      /* Mniejsza czcionka, żeby się zmieściły */
    }

    /* 2. TREŚĆ STRONY - ODSUNIĘCIE OD GÓRY */
    .content-wrapper {
        margin-top: 160px;      /* Duży margines, żeby menu nie zasłaniało terminala */
        padding: 15px;
        width: 100%;
        box-sizing: border-box; /* Żeby padding nie poszerzał strony */
        overflow-x: hidden;     /* Blokada przewijania na boki */
    }

    /* 3. TERMINAL - DOPASOWANIE SZEROKOŚCI */
    #terminal-container {
        width: 100%;
        max-width: 100%;
        height: 50vh;           /* Na telefonie terminal zajmuje połowę ekranu */
        font-size: 0.8rem;      /* Mniejsza czcionka w terminalu */
    }

    .input-line {
        flex-wrap: wrap;        /* Jeśli komenda jest długa, zawiń ją */
    }

    #cmd-input {
        width: 100%;            /* Pole wpisywania na całą szerokość */
    }

    /* 4. SEKCJE (ABOUT, PROJECTS) */
    .container {
        padding: 0;
        width: 100%;
    }

    .projects-grid {
        display: flex;
        flex-direction: column; /* Projekty jeden pod drugim */
        gap: 20px;
    }

    .about-content {
        display: flex;
        flex-direction: column;
    }
    
    /* Ukryj ozdobniki, które mogą psuć widok na mobile */
    .card-icon {
        display: none; 
    }
}