/* CSS Variables */
:root {
    --bg-color: #050505;
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    
    /* Neon Colors */
    --neon-blue: #00f3ff;
    --neon-purple: #bc13fe;
    --neon-pink: #ff007f;
    
    /* Gradients */
    --grad-primary: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    --grad-secondary: linear-gradient(90deg, var(--neon-pink), var(--neon-purple), var(--neon-blue));
    
    /* Glassmorphism */
    --glass-bg: rgba(20, 20, 25, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

/* Reset & BaseStyles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

/* 3D Background */
#vanta-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.8) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Typography elements */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
}

.gradient-text {
    background: var(--grad-secondary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    background-size: 200% auto;
    animation: shine 5s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 100;
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
    color: #fff;
}

.logo .highlight {
    color: var(--neon-blue);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:not(.btn-glow)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--grad-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover:not(.btn-glow)::after {
    width: 100%;
}

/* Buttons */
.btn-glow {
    display: inline-block;
    padding: 8px 24px;
    border-radius: 30px;
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue) !important;
    position: relative;
    overflow: hidden;
    /* Wymusza poprawne przycinanie w Safari przy animacjach transformacji */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
    transition: all 0.3s;
    z-index: 1;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--neon-blue);
    z-index: -1;
    transition: transform 0.4s ease;
    transform: scaleX(0);
    transform-origin: right;
    /* Usunięto border-radius: inherit; żeby uniknąć wykrzywiania podczas skalowania sztywniejącego rogi */
}

.btn-glow:hover {
    color: #000 !important;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

.btn-glow:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    border-radius: 5px;
    background: var(--grad-primary);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 2px; left: 2px; right: 2px; bottom: 2px;
    background: var(--bg-color);
    z-index: -1;
    border-radius: 3px;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(188, 19, 254, 0.4);
}

.btn-primary:hover::before {
    opacity: 0.2;
}

/* Glassmorphism Cards */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Sections */
.sect {
    min-height: 100vh;
    padding: 120px 30px 60px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* 1. Hero Section */
.hero {
    align-items: center;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 900px;
    z-index: 2;
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 30px;
    color: var(--neon-blue);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 30px;
    text-shadow: 0 0 40px rgba(188, 19, 254, 0.3);
}

.hero .subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 15px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--neon-blue);
    border-radius: 50%;
    animation: scroll 2s infinite ease-in-out;
}

@keyframes scroll {
    0% { top: 6px; opacity: 1; }
    100% { top: 24px; opacity: 0; }
}

/* 2. About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text .lead {
    font-size: 1.5rem;
    font-weight: 300;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.5;
}

.about-text p:not(.lead) {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.features-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.card {
    padding: 30px 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: var(--grad-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 243, 255, 0.3);
}

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

.icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgba(188, 19, 254, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--neon-purple);
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* 3. Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.portfolio-item {
    padding: 15px;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(188, 19, 254, 0.4);
    box-shadow: 0 20px 40px rgba(20, 20, 20, 0.8), 0 0 20px rgba(188, 19, 254, 0.2);
}

.portfolio-image {
    width: 100%;
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.hologram-effect {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,243,255,0.2) 0%, rgba(188,19,254,0.2) 100%);
    mix-blend-mode: color;
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 1;
}

.portfolio-item:hover .hologram-effect {
    opacity: 1;
}

.portfolio-content {
    padding: 20px 10px 10px;
}

.portfolio-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.portfolio-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tags span {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    color: var(--neon-blue);
}

/* 4. Contact Section */
.contact {
    text-align: center;
}

.contact-box {
    max-width: 700px;
    margin: 0 auto;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.glowing-orb {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: var(--neon-purple);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    z-index: -1;
}

.contact-box h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.contact-box p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.input-group {
    position: relative;
    text-align: left;
}

.input-group input, 
.input-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

.input-group input:focus, 
.input-group textarea:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
}

.input-group label {
    position: absolute;
    left: 20px;
    top: 15px;
    color: var(--text-muted);
    transition: all 0.3s ease;
    pointer-events: none;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
    top: -10px;
    left: 15px;
    font-size: 0.8rem;
    background: var(--bg-color);
    padding: 0 5px;
    color: var(--neon-blue);
}

.btn-glow-large {
    margin-top: 10px;
    width: 100%;
    justify-content: center;
    border-radius: 8px;
    padding: 18px;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 40px 30px;
    background: rgba(5,5,5,0.9);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: var(--text-muted);
    transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
    color: var(--neon-pink);
    transform: translateY(-3px);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%) !important;
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.4) !important;
    border: none !important;
    color: white !important;
}

/* Animations & Interactivity */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.visible {
    opacity: 1 !important;
    transform: translate(0, 0) !important;
}

/* Responsive */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .features-cards {
        grid-template-columns: 1fr;
    }
    
    .sect {
        padding: 100px 20px 40px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .contact-box {
        padding: 40px 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* 5. Cookie Banner & Privacy Modal */
.hidden {
    display: none !important;
}

.privacy-link {
    color: var(--neon-blue);
    text-decoration: none;
    margin-left: 10px;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.privacy-link:hover {
    color: var(--neon-pink);
}

.cookie-banner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    padding: 25px;
    z-index: 9999;
    border-radius: 20px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { transform: translate(-50%, 100px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
}

.cookie-content p {
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.5;
}

.cookie-btns {
    display: flex;
    gap: 15px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    padding: 40px;
    border-radius: 24px;
    overflow-y: auto;
    z-index: 1;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.modal-header h2 {
    font-size: 2rem;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
}

.policy-body {
    text-align: left;
}

.policy-body section {
    margin-bottom: 25px;
}

.policy-body h3 {
    color: var(--neon-blue);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.policy-body p {
    color: var(--text-muted);
    line-height: 1.6;
}
