/* Zmienne kolorów dla spójności - tryb jasny */
:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --text: #34495e;
    --background: #f9f9f9;
    --card-bg: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
    --header-bg: linear-gradient(135deg, #2c3e50 0%, #2c3e50 100%);
    --footer-bg: #2c3e50;
}

/* Zmienne kolorów dla trybu ciemnego */
body.dark-mode {
    --primary: #3498db;
    --secondary: #2ecc71;
    --accent: #e74c3c;
    --light: #34495e;
    --dark: #1a1a1a;
    --text: #ecf0f1;
    --background: #2c3e50;
    --card-bg: #34495e;
    --shadow: rgba(0, 0, 0, 0.3);
    --header-bg: linear-gradient(135deg, #1a1a1a 0%, #2c3e50 100%);
    --footer-bg: #1a1a1a;
}

/* Reset i podstawowe style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Animacje */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    from, to {
        border-color: transparent;
    }

    50% {
        border-color: var(--secondary);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(30deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(30deg);
    }
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.slide-in-left {
    opacity: 0;
    animation: slideInLeft 0.8s ease forwards;
}

.slide-in-right {
    opacity: 0;
    animation: slideInRight 0.8s ease forwards;
}

.slide-in-up {
    opacity: 0;
    animation: slideInUp 0.8s ease forwards;
}

.scale-in {
    opacity: 0;
    animation: scaleIn 0.8s ease forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

.animate {
    opacity: 1;
}

.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--secondary);
    white-space: nowrap;
    margin: 0 auto;
    animation: typewriter 3s steps(40, end), blink 0.8s step-end infinite;
}

/* Przycisk przełączania trybu */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

    .theme-toggle:hover {
        transform: scale(1.1) rotate(180deg);
        background: var(--primary);
    }

/* Header i nawigacja */
header {
    background: var(--header-bg);
    color: white;
    padding: 2rem 0;
    position: relative;
    box-shadow: 0 4px 12px var(--shadow);
}

.header-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    position: relative;
    z-index: 1;
}

    .header-content::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: -1;
        opacity: 0;
        transition: opacity 0.5s ease;
    }

    .header-content:hover::after {
        opacity: 1;
    }

.profile-image {
    flex-shrink: 0;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--light);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

    .profile-img:hover {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }

.profile-info {
    flex: 1;
    min-width: 300px;
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

body.dark-mode header h1 {
    text-shadow: 0 0 15px rgba(52, 152, 219, 0.5);
}

.tagline {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--light);
    font-weight: 300;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 1rem;
}

    .contact-info a {
        color: var(--light);
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 5px;
        transition: all 0.3s ease;
    }

        .contact-info a:hover {
            color: var(--secondary);
            transform: translateY(-2px);
        }

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

    .social-links a {
        color: white;
        font-size: 1.5rem;
        transition: all 0.3s ease;
    }

        .social-links a:hover {
            color: var(--secondary);
            transform: translateY(-3px);
        }

/* Sekcje ogólne */
.section {
    padding: 3rem 0;
    border-bottom: 1px solid var(--light);
}

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

body.dark-mode .section-title {
    text-shadow: 0 0 15px rgba(52, 152, 219, 0.5);
}

.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    margin: 10px auto;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.section-title:hover:after {
    width: 100px;
}

/* Poprawki dla sekcji About Me */
.about-content {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .about-content::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 5px;
        height: 100%;
        background: var(--secondary);
        transition: all 0.3s ease;
    }

    .about-content:hover::before {
        width: 8px;
        background: var(--accent);
    }

    .about-content p {
        font-size: 1.1rem;
        line-height: 1.8;
        margin-bottom: 0;
        position: relative;
        z-index: 1;
    }

    .about-content:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px var(--shadow);
    }

/* Karty umiejętności */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.skill-category {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px var(--shadow);
    transition: all 0.3s ease;
    opacity: 0;
    position: relative;
    overflow: hidden;
}

    .skill-category::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient( to bottom right, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) );
        transform: rotate(30deg);
        z-index: 0;
        transition: all 0.5s ease;
        opacity: 0;
    }

    .skill-category:hover::before {
        opacity: 1;
        animation: shimmer 2s infinite linear;
    }

    .skill-category:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px var(--shadow);
    }

.skill-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.skill-icon {
    font-size: 2rem;
    margin-right: 15px;
    color: var(--secondary);
    transition: all 0.5s ease;
}

    .skill-icon:hover {
        transform: rotate(360deg) scale(1.2);
    }

.skill-category:hover .skill-icon {
    transform: scale(1.2) rotate(5deg);
}

.skill-title {
    font-size: 1.5rem;
    color: var(--primary);
}

.skill-items {
    list-style: none;
}

    .skill-items li {
        margin-bottom: 10px;
        padding-left: 5px;
        border-left: 3px solid var(--secondary);
        padding-left: 10px;
        transition: all 0.3s ease;
    }

        .skill-items li:hover {
            border-left: 3px solid var(--accent);
            padding-left: 15px;
        }

/* Projekty */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    opacity: 0;
}

    .project-card::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient( to bottom right, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) );
        transform: rotate(30deg);
        z-index: 0;
        transition: all 0.5s ease;
        opacity: 0;
    }

    .project-card:hover::before {
        opacity: 1;
        animation: shimmer 2s infinite linear;
    }

    .project-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px var(--shadow);
    }

    .project-card::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(46, 204, 113, 0.1) 100%);
        opacity: 0;
        transition: opacity 0.3s;
    }

    .project-card:hover::after {
        opacity: 1;
    }

.project-content {
    padding: 25px;
    position: relative;
    z-index: 1;
}

.project-title {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.project-card:hover .project-title {
    color: var(--secondary);
}

.project-desc {
    margin-bottom: 15px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tech-tag {
    background: var(--light);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

    .tech-tag:hover {
        background: var(--secondary);
        color: white;
        transform: translateY(-2px);
    }

.github-link {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.project-card:hover .github-link {
    transform: translateX(5px);
}

/* Edukacja i certyfikaty */
.education-item, .certificate-item {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px var(--shadow);
    transition: all 0.3s ease;
    opacity: 0;
    position: relative;
    overflow: hidden;
}

    .education-item::before, .certificate-item::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient( to bottom right, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) );
        transform: rotate(30deg);
        z-index: 0;
        transition: all 0.5s ease;
        opacity: 0;
    }

    .education-item:hover::before, .certificate-item:hover::before {
        opacity: 1;
        animation: shimmer 2s infinite linear;
    }

    .education-item:hover, .certificate-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px var(--shadow);
    }

.education-title, .certificate-title {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.education-period, .certificate-issuer {
    color: var(--secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

/* Języki i zainteresowania */
.languages-interests {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.language-item, .interest-item {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px var(--shadow);
    transition: all 0.3s ease;
    opacity: 0;
    position: relative;
    overflow: hidden;
}

    .language-item::before, .interest-item::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient( to bottom right, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) );
        transform: rotate(30deg);
        z-index: 0;
        transition: all 0.5s ease;
        opacity: 0;
    }

    .language-item:hover::before, .interest-item:hover::before {
        opacity: 1;
        animation: shimmer 2s infinite linear;
    }

    .language-item:hover, .interest-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px var(--shadow);
    }

.language-name, .interest-name {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 5px;
}

.language-level {
    color: var(--secondary);
}

.interests-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.interest-tag {
    background: var(--light);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: default;
}

    .interest-tag:hover {
        background: var(--secondary);
        color: white;
        transform: translateY(-2px);
    }

/* Przycisk Credly */
.credly-button {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .credly-button:hover {
        background: var(--primary);
        transform: translateY(-2px);
    }

/* Stopka */
footer {
    background: var(--footer-bg);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

    footer .fas.fa-heart {
        color: #e74c3c;
        animation: pulse 2s infinite;
    }

/* Ulepszenia wizualne dla całej strony */
body {
    background-attachment: fixed;
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%), radial-gradient(ellipse at top, rgba(52, 152, 219, 0.1) 0%, rgba(0, 0, 0, 0) 70%), radial-gradient(ellipse at bottom, rgba(46, 204, 113, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
}

    body.dark-mode {
        background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 100%), radial-gradient(ellipse at top, rgba(52, 152, 219, 0.1) 0%, rgba(0, 0, 0, 0) 70%), radial-gradient(ellipse at bottom, rgba(46, 204, 113, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    }

/* Responsywność */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .profile-info {
        margin-bottom: 2rem;
    }

    .contact-info {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    header h1 {
        font-size: 2.2rem;
    }

    .theme-toggle {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .profile-img {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 2rem 0;
    }

    .skill-category, .project-card, .education-item, .certificate-item {
        padding: 20px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .profile-img {
        width: 100px;
        height: 100px;
    }

    .about-content p {
        font-size: 1rem;
    }
}
