/* ---------- ZMIENNE CSS ---------- */
:root {
    --bg-color: #f4f4f9;
    --text-color: #333;
    --container-bg: #fff;
    --card-bg: #e4dcf5; /* dla experience-item */
    --skill-bg: #4B0082; /* dla skills-list li */
    --shadow-color: rgba(0,0,0,0.1);
    --primary-color: #4B0082;
    --secondary-color: #6a0dad;
    --accent-color: #8b00ff;
    --link-color: #2c3e50;
    --hover-gradient: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #eee;
    --container-bg: #1e1e1e;
    --card-bg: #2a2a2a; /* ciemne tło kart */
    --skill-bg: #6a0dad; /* ciemniejszy fiolet dla umiejętności */
    --shadow-color: rgba(0,0,0,0.5);
    --link-color: #dda0ff;
}

/* Gradient tylko dla nagłówków profilowych w dark mode */
.profile-header h3 {
    color: var(--primary-color);
    font-style: italic;
    text-align: center;
    margin-top: 5px;
}

body.dark-mode .profile-header h3 {
    background: linear-gradient(90deg, #e9d2ff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
body.dark-mode h3 {
    background: linear-gradient(90deg, #e9d2ff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- PODSTAWOWE ---------- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background-color: var(--container-bg);
    border-radius: 12px;
    box-shadow: 0 4px 10px var(--shadow-color);
    transition: background-color 0.3s, box-shadow 0.3s;
}

/* ---------- TYPOGRAFIA ---------- */
h1 {
    color: var(--link-color);
    text-align: center;
}

h2 {
    color: var(--link-color);
    margin-bottom: 10px;
}

h3 {
    color: var(--primary-color);
    font-style: italic;
    text-align: center;
    margin-top: 5px;
}

/* ---------- PROFIL ---------- */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.profile-header img {
    width: 200px;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
}

.profile-info {
    flex: 1;
    min-width: 250px;
}

.profile-info p {
    margin-bottom: 15px;
    line-height: 1.5;
}

/* ---------- SEKCJE ---------- */
.section {
    margin-bottom: 30px;
}

.experience, .skills {
    margin-left: 20px;
}

.experience-item {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 10px;
    background: var(--card-bg);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.experience-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.experience-item h3 {
    margin: 0;
    font-size: 1.1em;
    color: var(--primary-color);
}

.experience-item p, .experience-item ul {
    margin: 5px 0;
}

/* ---------- UMIEJĘTNOŚCI ---------- */
.skills-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.skills-list li {
    background-color: var(--skill-bg);
    color: #fff;
    padding: 5px 10px;
    margin: 5px;
    border-radius: 8px;
    font-size: 0.9em;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    cursor: default;
    will-change: transform, background;
}

.skills-list li:hover {
    background: var(--hover-gradient);
    transform: translateY(-3px);
}

/* ---------- KONTAKT ---------- */
.contact {
    margin-top: 20px;
    text-align: center;
}

.contact a {
    text-decoration: none;
}

/* ---------- PRZYCISK POWROT ---------- */
.back-button-animated,
.contact-form button.back-button-animated,
a.back-button-animated {
    all: unset;
    display: inline-block;
    padding: 12px 28px;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    border-radius: 12px;
    background: var(--hover-gradient);
    box-shadow: 0 4px 15px rgba(107, 0, 255, 0.4);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    line-height: 1.2;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.back-button-animated:hover,
.contact-form button.back-button-animated:hover,
a.back-button-animated:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(107, 0, 255, 0.5);
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
}

.back-button-animated .arrow,
a.back-button-animated .arrow {
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.back-button-animated:hover .arrow,
a.back-button-animated:hover .arrow {
    transform: translateX(-5px);
}

/* ---------- PRZYCISK DARK MODE ---------- */
.dark-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    padding: 10px 15px;
    font-size: 1.2em;
    border: none;
    border-radius: 10px;
    background-color: var(--primary-color);
    color: #fff;
    cursor: pointer;
    transition: background 0.3s;
}
.dark-toggle:hover {
    background-color: var(--secondary-color);
}

/* ---------- FORMULARZ ---------- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #ccc;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(139,0,255,0.3);
    transform: translateY(-2px) scale(1.02);
    outline: none;
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
    background-color: #3a3a3a;
    border-color: var(--accent-color);
    color: #fff;
}

/* ---------- KONTAKT PRZYCISKI ---------- */
.contact-buttons {
    text-align: center;
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

/* ---------- RESPONSYWNOŚĆ ---------- */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
    }
    .profile-info {
        text-align: center;
    }
    .experience, .skills {
        margin-left: 0;
    }
    .skills-list {
        justify-content: center;
    }
    .contact-form {
        gap: 12px;
    }
    .back-button-animated,
    .contact-form button.back-button-animated,
    a.back-button-animated {
        width: 100%;
        margin-bottom: 0px;
        text-align: center;
        box-sizing: border-box;
    }
    .contact-buttons {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .dark-toggle {
        top: 30px;
        right: 10px;
    }
}

/* ---------- PRZEJŚCIE MOTYWU ---------- */
body.theme-transition {
    transition: background-color 0.5s ease, color 0.5s ease;
}

body.theme-transition .container {
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

body.theme-transition .experience-item {
    transition: transform 0.5s ease, box-shadow 0.5s ease, background 0.5s ease;
}

body.theme-transition .skills-list li {
    transition: background 0.5s ease, transform 0.5s ease;
}

body.theme-transition .back-button-animated,
body.theme-transition .contact-form button.back-button-animated,
body.theme-transition a.back-button-animated {
    transition: all 0.5s ease;
}

body.theme-transition .contact-form input,
body.theme-transition .contact-form textarea {
    transition: all 0.5s ease;
}

body.theme-transition .dark-toggle {
    transition: background 0.5s ease;
}