:root {
    --primary-color: #00d2ff;
    --secondary-color: #3a7bd5;
    --accent-purple: #9C27B0;
    --accent-teal: #008080;
    --bg-color: #0a0a0a;
    --bg-secondary: #121212;
    --text-color: #ffffff;
    --text-secondary: #e0e0e0; /* Zwiększony kontrast z #cccccc */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;

    /* Scroll Animation Variables */
    --scale-start: 0.5;
    --scale-end: 1.001;
    /* prettier-ignore */
    --ease-elastic: linear(
        0, 0.186 2.1%, 0.778 7.2%, 1.027 9.7%, 1.133, 1.212, 1.264, 1.292 15.4%,
        1.296, 1.294, 1.285, 1.269 18.9%, 1.219 20.9%, 1.062 25.8%, 0.995 28.3%,
        0.944 31.1%, 0.93, 0.921, 0.92 35.7%, 0.926, 0.94 39.7%, 1.001 47%, 1.014,
        1.021 52.4%, 1.02 56.4%, 1 65.5%, 0.994 70.7%, 1.001 88.4%, 1
    );
    --ease-bounce-out: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Scroll Animation Keyframes */
@keyframes trigger { to { --animate: true; } }
@keyframes pop { from { transform: scale(var(--scale-start)); } to { transform: scale(var(--scale-end)); } }
@keyframes pop-back { from { transform: scale(var(--scale-end)); } to { transform: scale(var(--scale-start)); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Apply Scroll Animations to Cards */
@supports (animation-timeline: view()) {
    .glass-card, .project-card, .contact-card {
        animation: trigger steps(1) both, fade linear both;
        animation-timeline: view();
        animation-range: entry 20% contain 40%;
    }

    @container style(--animate: true) {
        .glass-card, .project-card, .contact-card {
            animation: pop 600ms var(--ease-elastic) forwards;
        }
    }
    
    /* Also animate section titles */
    .section-title {
            animation: trigger steps(1) both, fade linear both;
            animation-timeline: view();
            animation-range: entry 10% contain 30%;
    }
        @container style(--animate: true) {
        .section-title {
            animation: pop 600ms var(--ease-elastic) forwards;
        }
    }
}

/* Logo Styles (Static) */
svg .svg-elem-1, svg .svg-elem-2, svg .svg-elem-3, svg .svg-elem-4, svg .svg-elem-5, svg .svg-elem-6, svg .svg-elem-7, svg .svg-elem-8, svg .svg-elem-9, svg .svg-elem-10, svg .svg-elem-11 {
    fill: rgb(255, 255, 255);
    stroke: none;
}


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

html {
    scroll-behavior: smooth;
}

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

/* Global Responsive Image Rule */
img {
    max-width: 100%;
    height: auto;
}

/* Global Text Overflow Handling */
p, li {
    word-break: break-word; /* Prevents overflow for long unbroken words */
}

/* Skip to Content Link (Accessibility) */
.skip-to-content {
    position: absolute;
    top: -9999px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: #000;
    padding: 1rem 2rem;
    z-index: 10000;
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 10px 10px;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 0;
}

/* Animated Background */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    z-index: -2;
    filter: blur(150px);
    will-change: transform;
    pointer-events: none;
}

body::before {
    width: 60vmax;
    height: 60vmax;
    top: -30vmax;
    left: -30vmax;
    background: radial-gradient(circle, var(--primary-color), transparent 70%);
    animation: float1 25s ease-in-out infinite;
}

body::after {
    width: 50vmax;
    height: 50vmax;
    bottom: -25vmax;
    right: -25vmax;
    background: radial-gradient(circle, var(--accent-purple), transparent 70%);
    animation: float2 30s ease-in-out infinite;
}

@keyframes float1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(100px, -100px) scale(1.2);
    }
}

@keyframes float2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-100px, 100px) scale(1.3);
    }
}

/* Intro Overlay */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-color) 0%, #1a1a2e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: all 1s cubic-bezier(0.77, 0, 0.175, 1);
}

#intro-overlay.hidden {
    opacity: 0;
    transform: scale(5);
    filter: blur(20px);
    pointer-events: none;
}

.logo-container {
    width: 80%;
    max-width: 600px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

.intro-logo {
    width: 100%;
    height: auto;
    stroke: var(--primary-color);
    stroke-width: 2px;
    filter: drop-shadow(0 0 30px rgba(0, 210, 255, 0.5));
}

/* Main Content */
#main-content {
    opacity: 0;
    transition: opacity 1s ease-in;
}

#main-content.visible {
    opacity: 1;
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.glass-nav:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.nav-logo img {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

.nav-logo:hover img {
    transform: rotate(360deg);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.btn-small {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 210, 255, 0.5);
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 120px 20px 60px;
}

.hero-content {
    max-width: 900px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-wrap: balance;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-purple));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
    will-change: background-position; /* Optymalizacja wydajności animacji */
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 6px 25px rgba(0, 210, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 40px rgba(0, 210, 255, 0.6);
    filter: brightness(1.15);
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--text-color);
    border: 2px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Services Section */
#services {
    padding: 120px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-purple));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 210, 255, 0.2);
    border-color: rgba(0, 210, 255, 0.3);
}

.glass-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.glass-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.glass-card h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.glass-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Portfolio Section */
#portfolio {
    padding: 120px 20px;
}

.portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
}

.project-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 70px rgba(156, 39, 176, 0.3);
}

.project-image {
    width: 100%;
    max-height: 250px; /* Nowe: maksymalna wysokość */
    object-fit: contain; /* Nowe: zachowuje proporcje */
    padding: 20px; /* Nowe: odstępy */
    transition: transform 0.4s ease;
    display: flex; /* Nowe: dla centrowania */
    align-items: center; /* Nowe: centrowanie w pionie */
    justify-content: center; /* Nowe: centrowanie w poziomie */
}

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

.project-info {
    padding: 2rem;
}

.project-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-info h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: gap 0.3s ease;
}

.project-link:hover {
    gap: 1rem;
}

/* Contact Section */
#contact {
    padding: 120px 20px;
    text-align: center;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0.05;
    z-index: -1;
}

.contact-card h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
}

.contact-email {
    display: inline-block;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.contact-email:hover {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(0, 210, 255, 0.5);
}

/* Contact Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.glass-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 12px;
    color: white;
    font-family: var(--font-main);
    transition: all 0.3s ease;
    font-size: 1rem;
}

.glass-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Form Status Messages */
.form-status {
    margin-top: 1rem;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
    text-align: center;
}

.form-status.success {
    display: block;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4CAF50;
    color: #4CAF50;
}

.form-status.error {
    display: block;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #F44336;
    color: #F44336;
}

/* Text Change Animation */
@keyframes textFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-text-change {
    animation: textFadeIn 0.4s ease-out forwards;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 990; /* Poniżej overlayu, ale powyżej treści */
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.3);
}

/* Footer */
footer {
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    background: rgba(10, 10, 10, 0.8);
    display: flex; /* New: Flexbox for centering */
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-content {
    max-width: 1200px;
    width: 100%; /* Ensure full width within container */
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap; /* Allow wrapping */
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations */
.glass-card.reveal:nth-child(1) {
    transition-delay: 0.1s;
}

.glass-card.reveal:nth-child(2) {
    transition-delay: 0.2s;
}

.glass-card.reveal:nth-child(3) {
    transition-delay: 0.3s;
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    width: 30px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 5px;
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 5px;
    transition: all 0.3s ease;
    left: 0;
}

.hamburger::before {
    top: -10px;
}

.hamburger::after {
    top: 10px;
}

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    transform: rotate(45deg) translate(7px, 7px);
}

.nav-toggle.active .hamburger::after {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Responsive Design */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        width: 100%;
        position: relative;
    }

    .nav-toggle {
        display: block;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -120vw; /* Move further off-screen */
        width: 100%;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        gap: 2rem;
        font-size: 1.5rem;
        visibility: hidden; /* Hide when closed */
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    }

    .nav-menu.active {
        right: 0;
        visibility: visible;
    }
    
    /* Hide Skip Link on mobile */
    .skip-to-content {
        display: none !important;
    }

    .glass-nav {
        padding: 1rem 1.5rem;
    }

    #hero {
        padding-top: 100px;
    }

    .services-grid,
    .project-showcase {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .glass-nav {
        width: 95%;
        padding: 0.8rem 1rem;
    }

    .nav-logo {
        font-size: 1.2rem;
    }

    .nav-logo img {
        width: 32px;
        height: 32px;
    }
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.lang-switcher button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
    font-size: 1.5rem;
    line-height: 1;
}

.lang-switcher button:hover {
    color: var(--primary-text-color);
    transform: scale(1.1);
}

.lang-switcher button.active {
    color: var(--primary-color); /* Using primary-color from index.html vars */
    transform: scale(1.1);
}

/* --- Styles for Text/Legal Pages (MankaSoft) --- */

.content-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.glass-text-box {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 3rem;
}

.glass-text-box h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-text-box h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.glass-text-box p, 
.glass-text-box li {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.glass-text-box ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.glass-text-box a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.glass-text-box a:hover {
    text-decoration: underline;
    filter: brightness(1.2);
}

/* Fix for navbar z-index on legal pages if needed */
body.legal-page main {
    padding-top: 120px;
    min-height: 100vh;
}

/* --- GPU Fallback Mode (No Acceleration) --- */
body.no-gpu::before,
body.no-gpu::after {
    display: none; /* Kill heavy animated gradients */
}

body.no-gpu {
    background: #0a0a0a; /* Solid dark background */
    background-image: radial-gradient(circle at 50% 50%, #111, #0a0a0a); /* Static simple gradient */
}

body.no-gpu .glass-nav,
body.no-gpu .glass-card,
body.no-gpu .project-card,
body.no-gpu .contact-card,
body.no-gpu .glass-text-box,
body.no-gpu .glass-input,
body.no-gpu .btn-secondary {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(20, 20, 20, 0.95); /* Solid fallback for glass elements */
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
}

body.no-gpu .gradient-text {
    background: none;
    -webkit-text-fill-color: var(--primary-color);
    color: var(--primary-color);
    animation: none; /* Stop text gradient animation */
}

/* Fix intro lag on weak hardware */
body.no-gpu #intro-overlay {
    background: #0a0a0a; /* Remove gradient for better performance */
}

body.no-gpu #intro-overlay.hidden {
    transform: none !important; /* Remove massive scaling calculation */
    filter: none !important; /* DISABLE BLUR - critical fix */
    opacity: 0;
}