/* Preloader i spinner - bez zmian */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}
.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ff1b1b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Podstawowe style - bez zmian */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Poppins', sans-serif;
    background-color: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
}

/* Particles.js tło - bez zmian */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

/* Hero section - bez zmian */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Style ogólne sekcji - bez zmian */
.content-section {
    position: relative;
    z-index: 1;
    padding: 100px 20px;
    border-top: 1px solid rgba(255, 27, 27, 0.15);
    backdrop-filter: blur(10px);
}
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #ff1b1b;
}
h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}
.hero p {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
    max-width: 600px;
    color: rgba(255, 255, 255, 0.8);
}
nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* Przyciski CTA - bez zmian */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 2px solid transparent;
}
.cta-button:hover { transform: translateY(-3px); }
.cta-button { background-color: #ff1b1b; color: #ffffff; }
.cta-button.secondary {
    background-color: transparent;
    color: #ff1b1b;
    border-color: #ff1b1b;
}
.cta-button.secondary:hover { background-color: #ff1b1b; color: #ffffff; }
.cta-button.discord {
    background-color: #5865F2;
    border-color: #5865F2;
    color: #ffffff;
}

/* Tła dla sekcji - podmienione ID */
#umiejetnosci { /* Dawniej #uslugi */
    background:
        linear-gradient(to right, rgba(255, 27, 27, 0.07) 1px, transparent 1px) 0 0 / 50px 50px,
        linear-gradient(to bottom, rgba(255, 27, 27, 0.07) 1px, transparent 1px) 0 0 / 50px 50px,
        rgba(10, 10, 10, 0.75);
}
#projekty { /* Dawniej #realizacje */
    background:
        linear-gradient(135deg, rgba(255, 27, 27, 0.1) 0%, rgba(10, 10, 10, 0) 60%),
        rgba(10, 10, 10, 0.75);
}
#kontakt {
    text-align: center;
    background: 
        repeating-linear-gradient(0deg, rgba(255,27,27, 0.1) 1px, transparent 1px, transparent 40px),
        repeating-linear-gradient(90deg, rgba(255,27,27, 0.1) 1px, transparent 1px, transparent 40px),
        radial-gradient(ellipse at center, rgba(255, 27, 27, 0.2) 0%, transparent 70%),
        rgba(10, 10, 10, 0.75);
}

/* Karty umiejętności - bez zmian */
.service-card {
    background-color: rgba(20, 20, 20, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(255, 27, 27, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 40px 30px;
    text-align: center;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(255, 27, 27, 0.2);
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.service-card i {
    font-size: 3rem;
    color: #ff1b1b;
    margin-bottom: 1.5rem;
}
.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* NOWE/ZMODYFIKOWANE: Karty Projektów */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}
.project-item {
    background-color: rgba(20, 20, 20, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(255, 27, 27, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 40px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Aby przycisk był na dole */
}
.project-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(255, 27, 27, 0.2);
}
.project-icon {
    font-size: 3rem;
    color: #ff1b1b;
    margin-bottom: 1.5rem;
}
.project-item h3 {
    font-size: 1.7rem;
    margin-bottom: 1rem;
}
.project-item p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    flex-grow: 1; /* Aby tekst wypełnił przestrzeń */
}
.project-item .cta-button {
    margin: 0 auto; /* Wyśrodkowanie przycisku */
}

/* Reszta stylów - bez zmian */
.contact-section p {
    max-width: 600px;
    margin: 0 auto 30px auto;
}

#footer {
    position: relative;
    z-index: 1;
    padding: 60px 20px 40px 20px;
    text-align: center;
    background:
        repeating-linear-gradient(-45deg, transparent, transparent 15px, rgba(255, 27, 27, 0.05) 15px, rgba(255, 27, 27, 0.05) 16px),
        repeating-linear-gradient(45deg, transparent, transparent 15px, rgba(255, 27, 27, 0.05) 15px, rgba(255, 27, 27, 0.05) 16px),
        #080808;
    box-shadow: 0 -5px 20px rgba(255, 27, 27, 0.15);
}
.footer-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
}
.footer-nav a {
    color: #aaa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}
.footer-nav a:hover { color: #ff1b1b; }
#footer p {
    color: #888;
    font-size: 0.9rem;
}

.back-to-top {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background-color: #ff1b1b;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    background-color: #fff;
    color: #ff1b1b;
    transform: translateX(-50%) translateY(-3px);
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .hero p { font-size: 1rem; }
    .section-title { font-size: 2rem; }
    .projects-grid { grid-template-columns: 1fr; }
}
