@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css');

body {
    background-color: #121212;
    color: #ffffff;
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
}

header {
    background-color: #1e1e1e;
    padding: 20px;
    text-align: center;
}

h1 {
    font-size: 2.5em;
    margin: 0;
}

section {
    padding: 50px 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease; /* Increased duration from 0.6s to 1s */
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

#welcome {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    background: linear-gradient(90deg, #121212, #1e1e1e);
    background-size: 200% 200%;
    animation: gradient-animation 6s infinite alternate; /* Add animation */
    color: #ffffff;
    text-align: left;
}

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

.welcome-container {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.welcome-text h1 {
    font-size: 2.5em;
    margin: 0;
}

.welcome-text h1 a {
    margin-left: 10px;
    color: #ffffff;
    font-size: 1.2em;
    text-decoration: none;
}

.welcome-text h1 a:hover {
    color: #00aced;
}

.welcome-text p {
    font-size: 1.2em;
    margin: 10px 0 0;
}

.poland-info {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    font-size: 1em;
    color: #ffffff;
}

.polish-flag {
    width: 20px;
    height: 15px;
    border: 1px solid #ffffff;
    border-radius: 2px;
}

.project {
    background: linear-gradient(90deg, #2a2a2a, #1e1e1e);
    background-size: 200% 200%;
    animation: gradient-animation 6s infinite alternate;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transform: perspective(1000px); /* Enable 3D perspective */
    transition: transform 0.6s ease; /* Smooth rotation */
}

.project:hover {
    transform: perspective(1000px) rotateY(360deg); /* Rotate around Y-axis */
}

.project::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.project:hover::before {
    opacity: 1;
}

.project h2, .project p, .project a {
    position: relative;
    z-index: 2;
}

.project h2 {
    font-size: 1.8em;
    margin: 0 0 10px;
}

.project p {
    font-size: 1em;
    line-height: 1.5;
    margin: 0;
    flex-grow: 1; /* Allow the description to take up available space */
}

.project a {
    margin-top: 10px;
    display: inline-block;
    color: #ffffff;
    text-decoration: underline;
}

a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #00aced; /* Same blue color as the icons */
}

#about, #services {
    padding: 50px 20px;
    text-align: center;
}

#about p, #services p {
    font-size: 1.1em;
    line-height: 1.6;
    margin: 10px 0;
}

.service {
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.service h3 {
    font-size: 1.5em;
    margin: 0 0 10px;
}

#certificates {
    padding: 50px 20px;
    text-align: center;
}

#certificates ul {
    list-style: none;
    padding: 0;
}

#certificates .list-group-item {
    border: none;
    margin: 10px 0;
}

footer {
    background: linear-gradient(90deg, #1e1e1e, #121212);
    background-size: 200% 200%;
    animation: gradient-animation 6s infinite alternate; /* Add animation */
    padding: 20px;
    text-align: center;
    color: #ffffff;
    margin-top: 50px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

footer.visible {
    opacity: 1;
    transform: translateY(0);
}

footer .social-media a {
    color: #ffffff;
    font-size: 1.5em;
    margin: 0 10px;
    text-decoration: none;
}

footer .social-media a:hover {
    color: #00aced;
}

/* Responsive Design */
@media (max-width: 768px) {
    .welcome-container {
        flex-direction: column;
        text-align: center;
    }

    .profile-photo {
        margin-bottom: 20px;
    }

    .service {
        padding: 15px;
    }

    footer .social-media a {
        display: block;
        margin: 5px 0;
    }
}

/* Blue animated dots for laptop responsiveness */
@media (min-width: 1024px) and (max-width: 1440px) {
    body::before,
    body::after {
        content: '';
        position: fixed;
        width: 15px;
        height: 15px;
        background-color: #00aced;
        border-radius: 50%;
        animation: floating-dots 3s infinite ease-in-out;
        z-index: 1000;
    }

    body::before {
        top: 20%;
        left: 10px;
        animation-delay: 0s;
    }

    body::after {
        top: 70%;
        right: 10px;
        animation-delay: 1.5s;
    }
}

@keyframes floating-dots {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(-10px);
        opacity: 0.7;
    }
}