        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html, body {
        overflow-x: hidden;
        }

        .modal {
        display: none;           
        position: fixed;
        inset: 0;               
        width: 100%;
        max-width: 100%;
        overflow: hidden;       
        }

        .modal.active {
        display: flex;           
        align-items: center;
        justify-content: center;
        }

        .modal-content {
        max-width: min(900px, calc(100vw - 32px));
        width: calc(100% - 32px);
        box-sizing: border-box;
        overflow-x: hidden;
        }

        .modal-description {
        overflow-wrap: anywhere;
        word-break: break-word;
        }

        :root {
            --bg-primary: #111827;
            --bg-secondary: #1f2937;
            --text-primary: #ffffff;
            --text-secondary: #9ca3af;
            --accent: #ef4444;
            --accent-hover: #dc2626;
            --border-color: #374151;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            line-height: 1.6;
            overflow-x: hidden;
            scroll-behavior: smooth;
        }

        /* Navigation */
        .nav {
            position: absolute;
            top: 100vh;
            left: 20px;
            background: rgba(17, 24, 39, 0.9);
            backdrop-filter: blur(10px);
            z-index: 1000;
            border: 1px solid var(--border-color);
            border-radius: 50px;
            padding: 0;
            overflow: hidden; 
        }


        .nav.sticky {
            position: fixed;
            top: 20px;
            left: 20px;
        }

        .nav-container {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 0;
        }

        .nav-logo {
            display: none;
        }

        .nav-links {
            display: flex;
            gap: 0.5rem;
            list-style: none;
            margin: 0;
        }

       .nav-links a {
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.3s ease;
            padding: 1rem 1.5rem;
            border-radius: 0; 
            font-size: 0.9rem;
            font-weight: 500;
            position: relative; 
        }

        .nav-links a:hover,
        .nav-links a.active {
            color: var(--text-primary);
            background: var(--accent); 
            border: none; 
        }

        .nav-links a:first-child {
            border-radius: 50px 0 0 50px;
        }

        .nav-links a:last-child {
            border-radius: 0 50px 50px 0;
        }

        .nav-links a:first-child:last-child {
            border-radius: 50px; 
        }

        /* Hero Section */
        .hero {
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
        }

        .hero-bg {
            position: absolute;
            inset: 0;
            opacity: 0.2;
        }

        .geometric-bg {
            position: absolute;
            inset: 0;
            overflow: hidden;
        }

        /* Bouncing Balls Animation */
        .bouncing-ball {
            position: absolute;
            border-radius: 50%;
            background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.9), rgba(139, 92, 246, 0.6));
            box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
            transition: all 0.2s ease-out;
            cursor: pointer;
        }

        .bouncing-ball:hover {
            transform: scale(1.3);
            box-shadow: 0 0 40px rgba(239, 68, 68, 0.8);
        }

        .bouncing-ball.accelerated {
            box-shadow: 0 0 30px rgba(239, 68, 68, 0.6);
            background: radial-gradient(circle at 30% 30%, rgba(239, 68, 68, 0.9), rgba(245, 158, 11, 0.6));
        }

        .bouncing-ball.slow {
            background: radial-gradient(circle at 30% 30%, rgba(16, 185, 129, 0.8), rgba(59, 130, 246, 0.5));
            box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
        }


        .ripple {
            position: absolute;
            border: 2px solid rgba(239, 68, 68, 0.3);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            pointer-events: none;
            animation: rippleExpand 1s ease-out;
        }

        @keyframes rippleExpand {
            0% {
                width: 0px;
                height: 0px;
                opacity: 1;
            }
            100% {
                width: 300px;
                height: 300px;
                opacity: 0;
            }
        }

        .hero-content {
            text-align: center;
            z-index: 10;
            max-width: 800px;
            padding: 0 2rem;
        }

        .hero-title {
            font-size: clamp(3rem, 8vw, 6rem);
            font-weight: bold;
            margin-bottom: 2rem;
            background: linear-gradient(45deg, #ffffff, #3b82f6, #ef4444);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: titleGlow 3s ease-in-out infinite alternate;
        }

        @keyframes titleGlow {
            from { filter: brightness(1); }
            to { filter: brightness(1.2); }
        }

        .hero-subtitle {
            font-size: clamp(1.2rem, 3vw, 2rem);
            color: var(--text-secondary);
            margin-bottom: 3rem;
        }

        .cta-button {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 1rem 2rem;
            border: 2px solid var(--accent);
            color: var(--accent);
            text-decoration: none;
            font-size: 1.1rem;
            font-weight: 600;
            transition: all 0.3s ease;
            background: transparent;
            cursor: pointer;
        }

        .cta-button:hover {
            background: var(--accent);
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
        }

        /* Sections */
        .section {
            min-height: 100vh;
             padding: 5rem 2rem 1rem 2rem; 
            max-width: 1200px;
            margin: 0 auto;
        }

        #about.section {
            min-height: unset; 
        }

        .section-title {
            font-size: clamp(2.5rem, 6vw, 4rem);
            font-weight: bold;
            text-align: center;
            margin-bottom: 4rem;
            position: relative;
        }

        .section-title::after {
            content: '';
            display: block;
            width: 80px;
            height: 4px;
            background: var(--accent);
            margin: 1rem auto;
        }

        /* About Section */
        .about-content {
            max-width: 800px;
            margin: 0 auto;
            text-align: center;
        }

        .about-text {
            font-size: 1.1rem;
            color: var(--text-secondary);
            line-height: 1.8;
            margin-bottom: 2rem;
        }

        /* New Snake Animation Skills */
        .snake-skills {
            margin-top: 1rem;
            height: 360px;
            position: relative;
            overflow: hidden;
            width: 100vw;
            margin-left: calc(-50vw + 50%);
            margin-bottom: 0.2rem;
        }

        .snake-container {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            animation: moveSnake 16s linear infinite;
            filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.5)); /* <-- DODANE */
        }

        @keyframes moveSnake {
            from { transform: translateX(100vw) translateY(-50%); }
            to { transform: translateX(-100vw) translateY(-50%); }
        }

        .snake {
            display: flex;
            align-items: center;
            position: relative;
        }

        /* Głowa węża (obraz PNG obrócony w lewo) */
        .snake-head {
            width: 120px;
            height: 120px;
            margin-right: -20px;
            z-index: 10;
            transform: rotate(90deg);
            position: relative;
        }

        .snake-head img {
            width: 100%;
            height: 100%;
            position: relative;
            z-index: 10;
            object-fit: contain;
        }

        /* Biały prostokąt pod okiem */
        .snake-head::before {
            content: '';
            position: absolute;
            width: 68px;      /* szerokość na oba oczy */
            height: 24px;      /* cienki prostokąt */
            background: white;
            top: 25%;         /* pod oczami */
            left: 23%;        /* wycentrowany pod oczami */
            z-index: 9;      /* nad obrazkiem */
            transform: none;
        }

        /* Ciało węża na czerwono */
        .snake-body {
            display: flex;
            align-items: center;
        }

        .body-segment {
            min-width: 100px;
            padding: 0 18px;
            height: 60px;
            margin-left: -5px;
            position: relative;
            background: linear-gradient(135deg, #ef5533, #dc2626);
            border: 2px solid #991b1b;
            border-radius: 30px;
            animation: wave 2s infinite ease-in-out;
            animation-delay: calc(var(--i) * 0.15s);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #1f2937;
            font-weight: 700;
            font-size: 0.9rem;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
            box-shadow: 
                0 3px 8px rgba(0, 0, 0, 0.3),
                inset 0 -2px 4px rgba(0, 0, 0, 0.2);
            overflow: visible;
        }

        .body-segment:hover {
            transform: scale(1.05);
            background: linear-gradient(135deg, #f97316, #ef4444);
            box-shadow: 
                0 4px 12px rgba(0, 0, 0, 0.4),
                inset 0 -2px 4px rgba(0, 0, 0, 0.3);
        }

        /* Eleganckie wzory na segmentach */
        .body-segment::before {
            content: '';
            position: absolute;
            top: 8px;
            left: 50%;
            transform: translateX(-50%);
            width: 90px;
            height: 4px;
            background: linear-gradient(90deg, 
                transparent 0%, 
                rgba(248, 113, 113, 0.8) 10%, 
                rgba(255, 255, 255, 0.9) 30%, 
                rgba(255, 255, 255, 1) 50%, 
                rgba(255, 255, 255, 0.9) 70%, 
                rgba(248, 113, 113, 0.8) 90%, 
                transparent 100%);
            border-radius: 3px;
            z-index: 1;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        }

        .body-segment::after {
            content: '';
            position: absolute;
            bottom: 8px;
            left: 50%;
            transform: translateX(-50%);
            width: 70px;
            height: 2px;
            background: linear-gradient(90deg, 
                transparent 0%, 
                rgba(127, 29, 29, 0.6) 20%, 
                rgba(127, 29, 29, 0.9) 50%, 
                rgba(127, 29, 29, 0.6) 80%, 
                transparent 100%);
            border-radius: 2px;
            z-index: 1;
        }

        .body-segment .skill-text {
            position: relative;
            z-index: 2;
            color: #ffffff;
            font-weight: 600;
            font-size: 0.9rem;
            text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
            letter-spacing: 0.5px;
            white-space: nowrap;
            text-align: center;
            line-height: 1.2;
        }

        /* Animacja falowania - bardziej widoczna */
        @keyframes wave {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-20px); }
        }

        @media (max-width: 768px) {
            .snake-head { width: 90px; height: 90px; }

            .snake-head::before {
            content: '';
            position: absolute;
            width: 50px;      /* szerokość na oba oczy */
            height: 24px;      /* cienki prostokąt */
            background: white;
            top: 25%;         /* pod oczami */
            left: 23%;        /* wycentrowany pod oczami */
            z-index: 9;      /* nad obrazkiem */
            transform: none;
        }

            .body-segment { 
                min-width: 75px;
                padding: 0 12px;
                height: 45px; 
                font-size: 0.7rem;
            }
            .body-segment .skill-text { 
                font-size: 0.65rem; 
                letter-spacing: 0.3px;
            }
            .body-segment::before {
                width: 65px;
                height: 3px;
                top: 6px;
            }
            .body-segment::after {
                width: 50px;
                height: 1px;
                bottom: 6px;
            }
        }

        .skills-title {
            text-align: center;
            font-size: 1.5rem;
            color: var(--text-primary);
            margin-bottom: 2rem;
            font-weight: 700;
        }

        .skills-title::after {
            content: '';
            display: block;
            width: 80px;
            height: 3px;
            background: linear-gradient(90deg, var(--accent), #8b5cf6);
            margin: 1rem auto;
        }

        /* Projects Section */
        .projects-list {
            max-width: 1000px;
            margin: 0 auto;
            space-y: 3rem;
        }

        .project-item {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 4rem;
            align-items: center;
            margin-bottom: 5rem;
            padding: 2rem 0;
            border-bottom: 1px solid var(--border-color);
        }

        .project-item:last-child {
            border-bottom: none;
        }

        .project-item.reverse {
            direction: rtl;
        }

        .project-item.reverse * {
            direction: ltr;
        }

        .project-info {
            space-y: 1rem;
        }

        .project-visual {
            height: 300px;
            background: linear-gradient(135deg, #3b82f6, #8b5cf6);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 4rem;
            position: relative;
            overflow: hidden;
            transition: transform 0.3s ease;
        }

        .project-visual:hover {
            transform: scale(1.05);
        }

        .project-visual.gradient-1 { background: linear-gradient(135deg, #3b82f6, #8b5cf6); }
        .project-visual.gradient-2 { background: linear-gradient(135deg, #10b981, #3b82f6); }
        .project-visual.gradient-3 { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
        .project-visual.gradient-4 { background: linear-gradient(135deg, #f59e0b, #ef4444); }

        .project-name {
            font-size: 2.5rem;
            font-weight: bold;
            color: var(--text-primary);
            margin-bottom: 1rem;
            background: linear-gradient(45deg, var(--text-primary), var(--accent));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .project-short-desc {
            font-size: 1.1rem;
            color: var(--text-secondary);
            line-height: 1.6;
            margin-bottom: 2rem;
        }

        .learn-more-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 1rem 2rem;
            background: transparent;
            border: 2px solid var(--accent);
            color: var(--accent);
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .learn-more-btn:hover {
            background: var(--accent);
            color: white;
            transform: translateX(10px);
        }

        /* Modal */
        .modal {
            display: none;
            position: fixed;
            z-index: 2000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(5px);
        }

        .modal.active {
            display: flex;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .modal-content {
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            padding: 3rem;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            position: relative;
            animation: slideUp 0.3s ease;
        }

        @keyframes slideUp {
            from { transform: translateY(50px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        .modal-close {
            position: absolute;
            top: 1rem;
            right: 1rem;
            background: none;
            border: none;
            font-size: 2rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: color 0.3s ease;
        }

        .modal-close:hover {
            color: var(--accent);
        }

        .modal-title {
            font-size: 2rem;
            font-weight: bold;
            color: var(--accent);
            margin-bottom: 1rem;
        }

        .modal-description {
            color: var(--text-secondary);
            line-height: 1.8;
            margin-bottom: 2rem;
        }

        .modal-tech {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 2rem;
        }

        .modal-tech-tag {
            background: rgba(239, 68, 68, 0.2);
            border: 1px solid var(--accent);
            padding: 0.5rem 1rem;
            font-size: 0.9rem;
            color: var(--accent);
        }

        .modal-links {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .modal-link {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 1rem 2rem;
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .modal-link.primary {
            background: var(--accent);
            color: white;
        }

        .modal-link.primary:hover {
            background: var(--accent-hover);
            transform: translateY(-2px);
        }

        .modal-link.secondary {
            border: 1px solid var(--accent);
            color: var(--accent);
        }

        .modal-link.secondary:hover {
            background: var(--accent);
            color: white;
        }

        /* Contact Section */
        .contact-form {
            max-width: 600px;
            margin: 0 auto;
        }

        .form-group {
            margin-bottom: 2rem;
        }

        .form-input {
            width: 100%;
            padding: 1rem 1.5rem;
            background: rgba(31, 41, 55, 0.5);
            border: 1px solid var(--border-color);
            color: var(--text-primary);
            font-size: 1rem;
            transition: border-color 0.3s ease;
        }

        .form-input:focus {
            outline: none;
            border-color: var(--accent);
        }

        .form-input::placeholder {
            color: var(--text-secondary);
        }

        .form-textarea {
            min-height: 150px;
            resize: vertical;
        }

        .submit-button {
            display: block;
            width: 200px;
            margin: 2rem auto 0;
            padding: 1rem 2rem;
            background: var(--accent);
            color: white;
            border: none;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .submit-button:hover {
            background: var(--accent-hover);
            transform: translateY(-2px);
        }

        .contact-info {
            text-align: center;
            margin-top: 4rem;
        }

        .contact-description {
            font-size: 1.2rem;
            color: var(--text-secondary);
            margin-bottom: 3rem;
            line-height: 1.6;
        }

        .social-links {
            display: flex;
            justify-content: center;
            gap: 2rem;
            margin: 3rem 0;
        }

        .social-link {
            color: var(--text-secondary);
            font-size: 1.5rem;
            transition: color 0.3s ease;
        }

        .social-link:hover {
            color: var(--text-primary);
        }

        .back-to-top {
            width: 50px;
            height: 50px;
            background: var(--accent);
            color: white;
            border: none;
            font-size: 1.2rem;
            cursor: pointer;
            transition: background 0.3s ease;
            margin: 2rem auto;
            display: block;
        }

        .back-to-top:hover {
            background: var(--accent-hover);
        }

        .footer-text {
            color: var(--text-secondary);
            text-align: center;
            margin-top: 2rem;
            font-size: 0.9rem;
        }

        /* Cookie Banner */
        .cookie-banner {
            position: fixed;
            bottom: -200px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 9999;
            width: min(600px, calc(100vw - 2rem));
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 1.2rem 1.5rem;
            box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
            transition: bottom 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .cookie-banner.show {
            bottom: 1.5rem;
        }

        .cookie-content {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .cookie-icon {
            font-size: 2rem;
            flex-shrink: 0;
        }

        .cookie-text {
            flex: 1;
            font-size: 0.85rem;
            color: var(--text-secondary);
            line-height: 1.5;
        }

        .cookie-text strong {
            color: var(--text-primary);
            display: block;
            margin-bottom: 0.2rem;
        }

        .cookie-link {
            color: var(--accent);
            text-decoration: none;
        }

        .cookie-link:hover {
            text-decoration: underline;
        }

        .cookie-accept-btn {
            flex-shrink: 0;
            padding: 0.6rem 1.4rem;
            background: var(--accent);
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.3s ease, transform 0.2s ease;
        }

        .cookie-accept-btn:hover {
            background: var(--accent-hover);
            transform: translateY(-1px);
        }

        @media (max-width: 500px) {
            .cookie-content {
                flex-wrap: wrap;
            }
            .cookie-accept-btn {
                width: 100%;
                text-align: center;
            }
        }


        /* Responsive */
        @media (max-width: 768px) {
            .nav-links {
                display: none;
            }

            .about-content {
                text-align: center;
            }

            .projects-grid {
                grid-template-columns: 1fr;
            }

            .project-item {
                grid-template-columns: 1fr;
                gap: 2rem;
                text-align: center;
            }

            .project-item.reverse {
                direction: ltr;
            }

            .project-links {
                flex-direction: column;
            }

            .skills-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }
