:root {
    --bg: #0f0f0f;
    --bg2: #1a1a1a;
    --text: #e1e1e1;
    --accent: #3bd1ff;
    --card: #181818;
    --border: #2a2a2a;
    --dim-text: #bbb;
}

body {
    margin: 0;
    background: var(--bg);
    font-family: 'Segoe UI', Arial, sans-serif;
    color: var(--text);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 800px;
    margin: auto;
    padding: 20px;
}

/* Language Switcher */
.lang-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
    background: rgba(24, 24, 24, 0.85);
    padding: 8px;
    border-radius: 30px;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.lang-btn {
    background: none;
    border: none;
    color: var(--dim-text);
    cursor: pointer;
    font-weight: bold;
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 20px;
    transition: 0.3s;
}

.lang-btn.active {
    background: var(--accent);
    color: #000;
}

/* Header */
header {
    text-align: center;
    padding: 80px 20px 40px;
    border-bottom: 1px solid var(--border);
}

header h1 { margin: 0; font-size: 2.5rem; }
.subtitle { color: var(--accent); font-weight: bold; margin-top: 10px; }
.back-link { display: block; margin-top: 20px; color: var(--dim-text); text-decoration: none; font-size: 0.9rem; }
.back-link:hover { color: var(--accent); }

/* --- Style dla zdjęcia w headerze (skopiowane ze strony głównej) --- */
.header-photo {
    margin: 0 auto 24px; /* Wyśrodkowanie i margines na dole */
    width: 140px;
    height: 140px;
    border-radius: 50%; /* Okrąg */
    overflow: hidden; /* Przycięcie zdjęcia do okręgu */
    border: 2px solid rgba(59, 209, 255, 0.35); /* Błękitna ramka */
    box-shadow: 0 0 0 1px rgba(59, 209, 255, 0.12); /* Lekki cień */
}

.header-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Wypełnienie bez deformacji */
    display: block;
}

/* Timeline Core */
.timeline-section { margin: 50px 0; }
.instruction { font-size: 0.8rem; color: var(--dim-text); text-align: center; margin-bottom: 30px; }

.timeline {
    position: relative;
    border-left: 2px solid var(--border);
    margin-left: 20px;
    padding-left: 30px;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
    cursor: pointer;
    background: var(--card);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:hover { border-color: var(--accent); transform: translateX(5px); }

.timeline-item::before {
    content: "";
    position: absolute;
    left: -41px;
    top: 28px;
    width: 20px;
    height: 2px;
    background: var(--border);
}

.timeline-date { font-size: 0.85rem; color: var(--accent); font-weight: bold; }
.timeline-content h3 { margin: 5px 0; font-size: 1.2rem; }
.company { display: block; font-style: italic; color: var(--dim-text); font-size: 0.95rem; }

/* Details Toggle */
.details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
}

.timeline-item.active .details {
    max-height: 600px;
    opacity: 1;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

/* Grid layout */
.grid-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 40px 0;
}

.box {
    background: var(--card);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 4px;
    background: var(--bg);
    border: 1px solid var(--border);
}

.tag.cert { border-color: var(--accent); color: var(--accent); }

/* CTA Section */
.cta-section {
    text-align: center;
    margin: 60px 0;
    padding: 40px 20px;
    background: linear-gradient(145deg, #161616, #0f0f0f);
    border: 1px solid var(--accent);
    border-radius: 12px;
}

.btn-hire {
    display: inline-block;
    background: var(--accent);
    color: #000;
    text-decoration: none;
    padding: 16px 40px;
    font-weight: bold;
    border-radius: 50px;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 20px;
}

.btn-hire:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(59, 209, 255, 0.4);
}

@media (max-width: 600px) {
    .grid-sections { grid-template-columns: 1fr; }
    .lang-switcher { top: auto; bottom: 20px; right: 50%; transform: translateX(50%); }
    header h1 { font-size: 1.8rem; }
}

/* Styl dla sekcji z odznaką AI w CV */
/* Nowa sekcja na siatkę odznak */
/* Kontener główny dla wszystkich odznak */
.badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

/* 1. Zamieniamy KAŻDY link w sztywne, bezpieczne dla Safari pudełko o wymiarach 60x60px */
.badge-link {
    text-decoration: none;
    display: flex;         /* Zmiana na flex, żeby idealnie wycentrować obrazek w kwadracie */
    width: 60px;           /* Sztywna szerokość – Safari online ją zabetonuje */
    height: 60px;          /* Sztywna wysokość – Safari online ją zabetonuje */
    align-items: center;
    justify-content: center;
    flex-shrink: 0;        /* Bezwzględny zakaz deformacji pudełka we Flexboxie */
}

/* 2. KAŻDY obrazek w środku słucha teraz wyłącznie granic swojego linku-pudełka */
.cv-badge {
    max-width: 100%;       /* Obrazek nie ma prawa wyjść poza 60px szerokości linku */
    max-height: 100%;      /* Obrazek nie ma prawa wyjść poza 60px wysokości linku */
    object-fit: contain;   /* Zachowuje proporcje i ładnie wpisuje się w ramki */
    transition: transform 0.2s ease, filter 0.2s ease;
    filter: drop-shadow(0 0 6px rgba(59, 209, 255, 0.1));
}

/* 3. Efekt hover przypisujemy do rodzica (linku), żeby animacja obrazka była stabilna */
.badge-link:hover .cv-badge {
    transform: scale(1.08);
    filter: drop-shadow(0 0 12px rgba(59, 209, 255, 0.35));
}

/* Baza dla tooltipa */
.badge-link {
    position: relative; /* Wymagane, by tooltip pozycjonował się względem linku */
}

/* Tworzenie dymka tekstowego */
.badge-link::after {
    content: attr(data-tooltip); /* Wyciąga tekst z atrybutu HTML */
    position: absolute;
    bottom: 125%; /* Pokazuje się nad odznaką */
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: rgba(24, 24, 24, 0.95);
    color: var(--text);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--accent);
    font-size: 0.75rem;
    white-space: nowrap; /* Blokuje łamanie linii textu */
    opacity: 0;
    pointer-events: none; /* Żeby dymek nie przechwytywał kursora */
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    z-index: 1010;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Wyświetlanie tooltipa na desktopie (Hover) */
@media (hover: hover) {
    .badge-link:hover::after {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

/* Klasa pomocnicza dla urządzeń mobilnych (zarządzana przez JS) */
.badge-link.show-tooltip::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}