:root {
    /* DOMYŚLNY (CIEMNY) MOTYW */
    --bg-dark: #0b0e14;
    --bg-card: #151b26;
    --accent: #00e5ff;        /* Główny neon - Cyjan */
    --accent-sec: #7c3aed;    /* Akcent - Fiolet */
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Outfit', sans-serif;
    
    /* Zmienne pomocnicze do panelu */
    --panel-bg: rgba(21, 27, 38, 0.9);
    --panel-border: rgba(255, 255, 255, 0.1);
}

/* KLASA DLA TRYBU JASNEGO */
body.light-mode {
    --bg-dark: #f8fafc;       /* Jasny szary/biały */
    --bg-card: #ffffff;       /* Czysta biel dla kart */
    --accent: #0284c7;        /* Ciemniejszy błękit */
    --accent-sec: #6d28d9;    /* Ciemniejszy fiolet */
    --text-main: #0f172a;     /* Ciemny granat */
    --text-muted: #475569;    /* Szary tekst */
    
    --panel-bg: rgba(255, 255, 255, 0.9);
    --panel-border: rgba(0, 0, 0, 0.1);
}

/* SETUP BAZOWY I WCAG */
html {
    font-size: 100%;
    scroll-behavior: smooth;
    transition: font-size 0.3s ease;
}

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

/* Focus Ring */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 2px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* Skip Link */
.skip-link {
    position: absolute;
    top: -50px;
    left: 20px;
    background: var(--accent);
    color: var(--bg-dark);
    padding: 10px 15px;
    z-index: 1000;
    font-weight: bold;
    transition: top 0.3s;
    font-family: var(--font-display);
    border-radius: 0 0 5px 5px;
}
.skip-link:focus { top: 0; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section { padding: 80px 0; }

/* --- HEADER --- */
header {
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: #fff;
}
body.light-mode .logo { color: var(--text-main); }

.logo span { color: var(--text-muted); font-weight: 400; }

.contact-link {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-left: 20px;
}
.contact-link:hover { color: var(--accent); }

/* --- HERO --- */
.hero {
    min-height: 75vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Klasa pomocnicza (teraz bez animacji wejścia) */
.hero-animate {
    opacity: 1;
    transform: none;
}

.hero h2 {
    font-family: var(--font-display);
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
    background: rgba(0, 229, 255, 0.1);
    padding: 5px 12px;
    border-radius: 4px;
}

/* --- H1: TYLKO GRADIENT (BEZ WJAZDU) --- */
.hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 25px;
    
    /* Gradient */
    background: linear-gradient(
        90deg, 
        #ffffff 0%, 
        #94a3b8 20%, 
        var(--accent) 45%, 
        var(--accent-sec) 55%, 
        #94a3b8 80%, 
        #ffffff 100%
    );
    background-size: 300%;
    
    /* Przycięcie tła do tekstu */
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; 
    
    /* Glow */
    filter: drop-shadow(0 0 15px rgba(0, 229, 255, 0.3));
    
    /* Tylko animacja kolorów, bez przesuwania tekstu */
    animation: gradient-move 6s infinite linear;
}

body.light-mode .hero h1 {
    background: linear-gradient(
        90deg, 
        #0f172a 0%, 
        #475569 20%, 
        var(--accent) 45%, 
        var(--accent-sec) 55%, 
        #475569 80%, 
        #0f172a 100%
    );
    background-size: 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(2, 132, 199, 0.2));
}

@keyframes gradient-move {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.hero p {
    max-width: 650px;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.btn-glow {
    display: inline-block;
    padding: 12px 35px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-glow:hover {
    background: var(--accent);
    color: var(--bg-dark);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.4);
    transform: scale(1.05);
}

/* --- SEKCJE OGÓLNE --- */
.section-header {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 40px;
    border-left: 4px solid var(--accent);
    padding-left: 15px;
    color: var(--text-main);
}

/* --- GRID SKILLS --- */
.grid-skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.skill-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 8px;
    border-top: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s ease;
    border: 1px solid transparent;
}
body.light-mode .skill-card { border: 1px solid #e2e8f0; }

.skill-card:hover {
    transform: translateY(-5px);
    border-top: 1px solid var(--accent);
}

.skill-card h3 {
    color: var(--accent);
    margin-bottom: 10px;
    font-family: var(--font-display);
}

/* --- TIMELINE --- */
.timeline-item {
    border-left: 2px solid #2d3748;
    padding-left: 30px;
    margin-bottom: 40px;
    position: relative;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px; top: 5px;
    width: 10px; height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
}

.job-title { font-size: 1.2rem; font-weight: 700; color: var(--text-main); display: block;}
.job-place { color: var(--accent); font-family: var(--font-display); font-size: 0.9rem; margin-bottom: 10px; display: block;}
.job-desc { color: var(--text-muted); font-size: 0.95rem; }
.job-desc li { margin-bottom: 5px; }

/* --- PROJEKTY --- */
.project-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: border 0.3s;
}
body.light-mode .project-card { border: 1px solid #e2e8f0; }
.project-card:hover { border-color: var(--accent); }

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.project-title { font-family: var(--font-display); font-size: 1.4rem; color: var(--text-main); }
.tech-tag { 
    font-size: 0.75rem; 
    padding: 4px 8px; 
    background: rgba(124, 58, 237, 0.2); 
    color: var(--accent-sec); 
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
    font-family: var(--font-display);
}
.project-desc { color: var(--text-muted); margin-bottom: 15px; }
.project-list { color: var(--text-main); margin-left: 20px; font-size: 0.95rem; }

.link-arrow { color: var(--accent); font-size: 0.9rem; font-weight: 600; }

footer {
    text-align: center;
    padding: 50px 0;
    border-top: 1px solid #2d3748;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- PANEL A11Y STYLES (SIDEBAR) --- */
.a11y-panel {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--panel-border);
    padding: 10px 8px;
    border-radius: 30px;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: 0.3s;
}

.a11y-btn {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-display);
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.2s;
}

.a11y-btn:hover {
    background: var(--accent);
    color: var(--bg-dark);
    transform: scale(1.1);
}

.a11y-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Pixel Perfect: Znaki + i - */
#btn-font-down::after,
#btn-font-up::after {
    position: absolute;
    font-size: 0.7rem;
    top: 6px;
    right: 6px;
    font-weight: 800;
    line-height: 1;
}

#btn-font-down::after { content: '-'; }
#btn-font-up::after { content: '+'; }

/* Separator */
.divider {
    width: 20px;
    height: 1px;
    background: var(--text-muted);
    opacity: 0.3;
    margin: 2px 0;
}

/* Ikony */
.light-mode .icon-sun { display: none; }
.light-mode .icon-moon { display: block; }
.icon-sun { display: block; }
.icon-moon { display: none; }

/* --- MOBILE --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    header { flex-direction: column; gap: 15px; align-items: flex-start; }
    .contact-link { margin: 5px 0; margin-left: 0; display: block; }
    .logo { margin-bottom: 10px; }
    
    .a11y-panel {
        top: auto;
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
        flex-direction: row;
        padding: 8px 15px;
        border-radius: 50px;
        width: max-content;
        gap: 10px;
    }
    .divider { width: 1px; height: 20px; margin: 0 2px; }
}
