/* --- KONFIGURACJA ZMIENNYCH --- */
:root {
    --bg-color: #050505;
    --text-color: #f0f0f0;
    --accent-color: #00f2ff;
    --accent-color2: #eee8aa;
    --accent-glow: rgba(0, 242, 255, 0.3);
    --accent-glow2: rgba(238, 232, 170, 0.3);
    --glass-bg: rgba(15, 15, 15, 0.6); /* Mocniejsze tło, by panel był widoczny */
    --glass-border: rgba(255, 255, 255, 0.12);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- RESET I PODSTAWY --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; height: 100%; }

body { 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    font-family: 'Space Grotesk', sans-serif; 
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- TŁO PARALLAX I GRAIN --- */
#bg-canvas { 
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    z-index: -2; 
    pointer-events: none;
}

.wow-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -3; background: #050505;
}

.grain {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.04; pointer-events: none; z-index: 2;
}

/* --- NAWIGACJA --- */
nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1rem 2.5rem; 
    position: sticky; 
    top: -1px; 
    margin: 25px auto 0 auto;
    width: 90%; 
    max-width: 1100px; 
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
}

nav.is-pinned {
    margin-top: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0 0 20px 20px;
    border-left: none; 
    border-right: none; 
    border-top: none;
}

.logo { font-weight: 700; font-size: 1.5rem; letter-spacing: 2px; }
.highlight { color: var(--accent-color); text-shadow: 0 0 10px var(--accent-glow); }
.highlight2 { color: var(--accent-color2); text-shadow: 0 0 10px var(--accent-glow2); }
nav ul { display: flex; list-style: none; gap: 2.5rem; }
nav a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: var(--transition);
    opacity: 0.7; /* Lekko przygaszone na start */
    outline: none;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

    /* Stan po najechaniu i gdy link jest aktywny/kliknięty */
    nav a:hover,
    nav a:focus,
    nav a:active {
        color: var(--accent-color2);
        opacity: 1;
        text-shadow: 0 0 12px var(--accent-glow), 0 0 20px var(--accent-glow2);
        transform: translateY(-1px); /* Delikatny ruch w górę przy interakcji */
        text-decoration: none !important;
    }

    footer a,
    footer a:hover,
    footer a:focus,
    footer a:active,
    footer a:visited {
        text-decoration: none !important;
    }
    /* --- HERO SECTION - ABSOLUTNE WYŚRODKOWANIE --- */
    .hero {
        height: 100vh;
        width: 100%;
        margin-top: -80px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center; /* Centrowanie w pionie */
        position: relative;
        z-index: 10;
    }

        .hero .content {
            width: 90%;
            max-width: 900px;
            padding: 5rem 3rem;
            text-align: center;
            /* Styl Twojego "Kwadratu" */
            background: var(--glass-bg);
            backdrop-filter: blur(25px);
            -webkit-backdrop-filter: blur(25px);
            border: 1px solid var(--glass-border);
            border-radius: 40px;
            box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            /* Efekt parallax dla samego panelu (jeśli JS go wspiera) */
            transform: translateZ(0);
        }

        .hero h1 {
            font-size: clamp(1.8rem, 5vw, 3.2rem);
            line-height: 1.2;
            margin-bottom: 2rem;
            min-height: 2.4em;
        }

    .typewriter-text {
        color: var(--accent-color);
        text-shadow: 0 0 15px var(--accent-glow);
    }

    .cursor {
        display: inline-block;
        width: 3px;
        background-color: var(--accent-color2);
        margin-left: 8px;
        animation: blink 1s infinite;
    }

    @keyframes blink {
        50% {
            opacity: 0;
        }
    }

    .hero p {
        font-size: clamp(1rem, 2vw, 1.1rem);
        opacity: 0.7;
        margin-bottom: 3rem;
        max-width: 650px;
        line-height: 140%
    }

    .logo-style {
        font-weight: 700;
        letter-spacing: 2px;
        opacity: 1;
    }
    /* --- PRZYCISKI --- */
    .buttons {
        display: flex;
        gap: 1.5rem;
        justify-content: center;
    }

    .cta-btn {
        padding: 1rem 2.5rem;
        border-radius: 50px;
        cursor: pointer;
        font-weight: 600;
        text-decoration: none;
        transition: var(--transition);
        text-transform: uppercase;
        font-size: 0.85rem;
        position: relative;
        overflow: hidden;
        border: none;
    }

    .primary {
        background: var(--accent-color2);
        color: #000 !important;
    }

    .primary::before {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
        transition: left 0.6s ease;
    }

    .primary:hover {
        box-shadow: 0 0 20px var(--accent-glow2), 0 0 40px var(--accent-glow2), 0 0 60px var(--accent-glow2);
        transform: translateY(-3px);
    }

    .primary:hover::before {
        left: 100%;
    }

    .secondary {
        background: transparent;
        border: 1px solid var(--accent-color2);
        color: var(--text-color);
    }

    .secondary:hover {
        background: rgba(238, 232, 170, 0.1);
        box-shadow: 0 0 15px var(--accent-glow2);
        transform: translateY(-3px);
    }
    /* --- KARTY Z PŁYNEM (STAŁE 50% -> HOVER 90%) --- */
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 120px 20px;
        flex: 1;
        position: relative;
        z-index: 1;
    }

    .section-title {
        text-align: center;
        font-size: clamp(2.2rem, 4vw, 2.8rem);
        margin-bottom: 5rem;
    }

    .grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* Zawsze 3 kolumny */
        gap: 2.5rem;
        align-items: stretch;
    }

    @media (max-width: 1024px) {
        .grid {
            grid-template-columns: repeat(2, 1fr); /* 2 kolumny na tabletach */
        }
    }

    @media (max-width: 768px) {
        .grid {
            grid-template-columns: 1fr; /* 1 kolumna na mobile */
        }
    }

    .tech-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start; /* Zmienione z center */
        text-align: center;
        padding: 3.5rem 2rem;
        min-height: 380px;
        height: 100%; /* Wszystkie karty tej samej wysokości */
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--glass-border);
        position: relative;
        overflow: hidden;
        z-index: 10; /* Zwiększony z-index */
        transition: var(--transition);
    }

        .tech-card::before {
            content: "";
            position: absolute;
            left: -50%;
            width: 200%;
            height: 200%;
            background: rgba(0, 242, 255, 0.15);
            border-radius: 43%;
            z-index: -1;
            animation: rotateLiquid 12s linear infinite;
            top: 50%; /* Wypełnienie do połowy */
            transition: top 1s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .tech-card::after {
            content: "";
            position: absolute;
            left: -45%;
            width: 200%;
            height: 200%;
            background: rgba(0, 242, 255, 0.08);
            border-radius: 40%;
            z-index: -1;
            animation: rotateLiquid 18s linear infinite reverse;
            top: 52%;
            transition: top 1.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .tech-card:hover::before {
            top: -10%;
        }

        .tech-card:hover::after {
            top: -8%;
        }

    @keyframes rotateLiquid {
        from {
            transform: rotate(0deg);
        }

        to {
            transform: rotate(360deg);
        }
    }

    .tech-card:hover {
        transform: translateY(-10px);
        border-color: var(--accent-color);
        box-shadow: 0 20px 40px var(--accent-glow);
    }

    .tech-tag {
        margin-bottom: 1.5rem;
        background: #eee8aa;
        color: #050505;
        padding: 4px 12px;
        border-radius: 4px;
        font-size: 0.75rem;
        text-transform: uppercase;
        border: 1px solid #050505;
        position: relative;
        z-index: 2;
    }

    .icon {
        font-size: 3.2rem;
        margin-bottom: 1.5rem;
        color: var(--accent-color);
        position: relative;
        z-index: 2;
    }

    .tech-card h3 {
        margin-bottom: 1rem;
        font-size: 1.7rem;
        color: #fff;
        position: relative;
        z-index: 2;
    }

    .tech-card p {
        opacity: 0.85;
        font-size: 1rem;
        position: relative;
        z-index: 2;
    }
    /* --- KONTAKT (SYMETRYCZNE ODSTĘPY) --- */
    .contact-wrapper {
        max-width: 750px;
        margin: 0 auto;
        padding: 3rem 2.5rem;
        background: var(--glass-bg);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border: 1px solid var(--glass-border);
        border-radius: 24px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }

    .contact-form {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }

    .input-group {
        width: 100%;
    }

        .input-group input, .input-group textarea {
            width: 100%;
            padding: 1.2rem;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid var(--glass-border);
            border-radius: 15px;
            color: #fff;
            font-family: inherit;
            transition: var(--transition);
        }

            .input-group input:focus, .input-group textarea:focus {
                outline: none;
                border-color: var(--accent-color);
                box-shadow: 0 0 20px var(--accent-glow);
            }

    .contact-form .cta-btn {
        margin-top: 1rem;
        padding: 1rem 3rem;
        border-radius: 50px;
        background: var(--accent-color2);
        color: #000;
        font-weight: 600;
        border: none;
        cursor: pointer;
        text-transform: uppercase;
        transition: var(--transition);
        position: relative;
        overflow: hidden;
    }

    .contact-form .cta-btn::before {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
        transition: left 0.6s ease;
    }

        .contact-form .cta-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 0 20px var(--accent-glow2), 0 0 40px var(--accent-glow2), 0 10px 30px rgba(238, 232, 170, 0.4);
        }

        .contact-form .cta-btn:hover::before {
            left: 100%;
        }
    /* --- STOPKA (STATIC - POJAWIA SIĘ NA KOŃCU STRONY) --- */
    footer {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0.8rem 2rem;
        margin: 0 auto 0 auto;
        width: 100%; /* Pełna szerokość ekranu */
        max-width: 100%;
        background: var(--glass-bg);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border: 1px solid var(--glass-border);
        border-left: none;
        border-right: none;
        border-bottom: none;
        border-radius: 20px 20px 0 0; /* Tylko górne rogi zaokrąglone */

        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
        font-size: 0.85rem;
        z-index: 1000;
    }

        footer strong {
            color: var(--accent-color);
            margin-left: 0px;
        }

    .white {
        color: var(--text-color);
        margin-left: 0px;
        text-decoration: none;
    }

    .blue {
        color: var(--accent-color);
        margin-right: 0px;
        text-decoration: none;
    }

    @media (max-width: 768px) {
        nav {
            padding: 1rem;
            width: 95%;
        }

            nav ul {
                display: none;
            }

        .hero .content {
            padding: 3rem 1.5rem;
        }

        footer {
            border-radius: 0;
            padding: 0.8rem 1rem;
        }

        .buttons {
            flex-direction: column;
        }
    }
