:root {
    --background: #050816;
    --foreground: #ffffff;
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --glass: rgba(15, 23, 42, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-dark: rgba(2, 6, 23, 0.7);
    --card-bg: rgba(15, 23, 42, 0.6);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    /* Offset for fixed navbar */
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* iOS Tap Highlight Fix */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Custom Modern Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--secondary), var(--accent));
}

/* Loader Styles Premium */
#loader {
    position: fixed;
    inset: 0;
    background: #02040a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    overflow: hidden;
    transition: transform 1s cubic-bezier(0.85, 0, 0.15, 1), opacity 0.8s;
}

#loader::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1), transparent 70%);
    pointer-events: none;
}

.loader-grid-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
    pointer-events: none;
    mask-image: radial-gradient(circle at 50% 50%, black, transparent 80%);
}

#loader.fade-out {
    transform: translateY(-100%);
    opacity: 0;
}

.loader-content {
    position: relative;
    text-align: center;
    width: 400px;
    padding: 2rem;
    z-index: 2;
}

.loader-logo img {
    height: 100px;
    margin-bottom: 2.5rem;
    filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.5));
    /* Subtle breathing instead of floating */
    animation: loader-pulse 4s ease-in-out infinite;
}

.loader-branding {
    margin-bottom: 2.5rem;
}

.loader-main-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.3em;
    color: #fff;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.loader-sub-title {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5em;
    color: var(--primary);
    text-transform: uppercase;
    opacity: 0.8;
}

.loader-bar-container {
    height: 3px;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
}

.loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), transparent);
    background-size: 200% 100%;
    animation: loader-progress 2.5s cubic-bezier(0.65, 0, 0.35, 1) forwards,
        loader-shimmer 2s infinite linear;
}

.loader-status {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    animation: blink 1.5s infinite;
}

/* Loader Grid Background */
.loader-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(59, 130, 246, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
    pointer-events: none;
    z-index: -1;
}

.loader-logo img {
    height: 100px;
    margin-bottom: 2.5rem;
    filter: drop-shadow(0 0 40px rgba(59, 130, 246, 0.6));
    animation: loader-pulse 3s ease-in-out infinite;
}

.loader-branding {
    margin-bottom: 3rem;
}

.loader-main-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.3em;
    color: #fff;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

.loader-sub-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5em;
    color: var(--primary);
    text-transform: uppercase;
    opacity: 0.9;
}

.loader-bar-container {
    height: 4px;
    /* Slightly thicker */
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    /* Slightly clearer background */
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.loader-bar {
    height: 100%;
    width: 0%;
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary);
    position: relative;
    /* Faster and simpler animation */
    animation: loader-fill 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Glitch effect on the loading bar head */
.loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: #fff;
    filter: blur(4px);
    box-shadow: 0 0 10px #fff;
}

.loader-status {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.25em;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    animation: text-glitch-blink 2s infinite;
}

@keyframes loader-fill {
    0% {
        width: 0%;
    }

    20% {
        width: 40%;
    }

    50% {
        width: 60%;
    }

    80% {
        width: 90%;
    }

    100% {
        width: 100%;
    }
}

@keyframes text-glitch-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    52% {
        opacity: 0.2;
    }

    54% {
        opacity: 0.7;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

@keyframes loader-pulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.5));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 50px rgba(59, 130, 246, 0.8));
    }
}

@media (max-width: 768px) {
    .loader-content {
        width: 90%;
        /* Responsive width on mobile */
        padding: 1rem;
    }

    .loader-main-title {
        font-size: 1.1rem;
        /* Smaller font for mobile */
        letter-spacing: 0.2em;
    }

    .loader-sub-title {
        font-size: 0.6rem;
        letter-spacing: 0.3em;
    }

    .loader-logo img {
        height: 80px;
        /* Slightly smaller logo */
        margin-bottom: 2rem;
    }
}




/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    width: 0%;
    z-index: 10001;
    transition: width 0.1s ease-out;
}


/* Cinematic Noise Grain */
.noise-texture {
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    background-image: url("https://grainy-gradients.vercel.app/noise.svg");
    opacity: 0.04;
    z-index: 9999;
    pointer-events: none;
    animation: noise-anim 8s steps(10) infinite;
}

@keyframes noise-anim {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(-2%, -2%);
    }

    66% {
        transform: translate(2%, 2%);
    }
}

@media (max-width: 1024px) {
    .noise-texture {
        animation: none;
        opacity: 0.02;
    }
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    /* Prevent font scaling in landscape on iOS */
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    /* Modern mobile browser support */
}

/* Background Effects */
#mouse-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

@media (max-width: 1024px) {
    #mouse-glow {
        display: none;
    }
}

/* Starfield Effect */
.stars-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    animation: star-glow var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes star-glow {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: var(--opacity);
        transform: scale(1);
    }
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, #1a1f3d 0%, #0a0e27 100%);
}

.noise {
    position: fixed;
    inset: 0;
    opacity: 0.03;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 100;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.grid-pattern {
    position: fixed;
    inset: -100px;
    width: calc(100% + 200px);
    height: calc(100% + 200px);
    z-index: -1;
    background-image:
        linear-gradient(to right, rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    /* Offset grid so lines don't fall exactly on the center of the screen */
    background-position: 30px 30px;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
    /* Parallax effect variables */
    transform: translate3d(0, var(--scroll-y, 0), 0);
    pointer-events: none;
    will-change: transform;
}


.blob-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 1000px;
    height: 1000px;
    background: var(--primary);
    filter: blur(180px);
    opacity: 0.15;
    border-radius: 50%;
    animation: float-anim 20s infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.blob-1 {
    top: -20%;
    left: -10%;
    background: #7c3aed;
    opacity: 0.2;
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    background: #3b82f6;
    animation-delay: -5s;
    opacity: 0.15;
}

.blob-3 {
    top: 40%;
    left: 30%;
    width: 600px;
    height: 600px;
    background: #db2777;
    animation-delay: -10s;
    opacity: 0.1;
}

@keyframes float-anim {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(20px, 20px) scale(1.05);
        /* Much slower/subtle movement */
    }
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

body header.container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start !important;
    align-items: center;
    text-align: center;
    position: relative;
    padding-top: 18rem !important;
    /* Fixed definitive clearance */
    padding-bottom: 6rem;
    box-sizing: border-box;
    margin-top: 0 !important;
}

/* Typography */
h1 {
    font-size: clamp(3rem, 10vw, 7rem);
    line-height: 0.95;
    font-weight: 950;
    margin-bottom: 2rem;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    font-style: italic;
    background: linear-gradient(120deg, #fff 0%, #3b82f6 50%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine-holographic 4s linear infinite;
    filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.2));
}

/* Improved Accent Text with Holographic Effect */
.accent-text {
    background: linear-gradient(135deg, var(--primary) 0%, #60a5fa 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 60px rgba(59, 130, 246, 0.6);
    position: relative;
    display: inline-block;
    animation: pulse-glow 3s infinite alternate;
}

@keyframes pulse-glow {
    0% {
        text-shadow: 0 0 40px rgba(59, 130, 246, 0.4);
        filter: brightness(1);
    }

    100% {
        text-shadow: 0 0 80px rgba(59, 130, 246, 0.8);
        filter: brightness(1.2);
    }
}

h1 {
    font-size: clamp(3rem, 10vw, 7rem);
    line-height: 0.95;
    font-weight: 950;
    margin-bottom: 2rem;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    font-style: italic;
    background: linear-gradient(120deg, #fff 0%, var(--primary) 25%, #fff 50%, var(--secondary) 75%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine-holographic 6s linear infinite;
    filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.2));
}

@keyframes shine-holographic {
    to {
        background-position: 200% center;
    }
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3.5rem;
    max-width: 850px;
    line-height: 1.8;
}

.subtitle strong {
    color: #fff;
    font-weight: 800;
    display: block;
    margin-bottom: 1rem;
}

/* Glass Components */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 3rem;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.4s ease,
        box-shadow 0.6s ease;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    will-change: transform, border-color;
    contain: layout;
}

@media (max-width: 768px) {
    .glass-card {
        backdrop-filter: blur(12px) saturate(150%);
        -webkit-backdrop-filter: blur(12px) saturate(150%);
        padding: 2rem;
    }
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Clean Spotlight Effect */
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y),
            rgba(59, 130, 246, 0.1),
            transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 0;
}

.glass-card:hover::before {
    opacity: 1;
}

.glass-card>* {
    position: relative;
    z-index: 1;
}

.glass-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(59, 130, 246, 0.1);
}

/* Advanced Aurora Effect */
.glass-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg,
            transparent 0%,
            rgba(59, 130, 246, 0.05) 30%,
            rgba(139, 92, 246, 0.05) 60%,
            transparent 100%);
    background-size: 200% 200%;
    opacity: 0;
    transition: opacity 0.8s;
    pointer-events: none;
    z-index: 0;
}

.glass-card:hover::after {
    opacity: 1;
    animation: aurora-shift 4s fuid infinite;
}

@keyframes aurora-shift {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 100%;
    }

    100% {
        background-position: 0% 0%;
    }
}


/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-decoration: none;
    border-radius: 16px;
    font-weight: 900;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Glassy Shine Animation for Buttons */
.btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 100px;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
    transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.btn:hover::after {
    left: 150%;
}

.glow-on-hover:hover {
    box-shadow: 0 0 30px var(--primary-glow);
    transform: translateY(-3px) scale(1.02);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Sections */
section {
    padding: 8rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    font-style: italic;
    text-transform: uppercase;
    background: linear-gradient(to bottom, #fff, #64748b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

.service-card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), background 0.6s, border-color 0.6s;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Slightly clearer border initially */
}

.service-card:hover {
    transform: translateY(-10px) rotateX(2deg);
    background: linear-gradient(160deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.8));
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-color: rgba(59, 130, 246, 0.5);
    will-change: transform;
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.75rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 0;
    /* Removing margin-bottom in favor of gap in flex container */
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(-5deg);
    background: var(--primary);
    color: white;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
    border-color: transparent;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 800;
}

.service-card p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
}

/* Portfolio Layouts */
.portfolio-grid {
    display: flex;
    flex-direction: column;
    gap: 8rem;
    margin-top: 4rem;
}

.portfolio-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 5rem;
    align-items: center;
}

/* Browser Mockup System */
.browser-mockup {
    background: #1e293b;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-card:hover .browser-mockup {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(59, 130, 246, 0.3);
}

.browser-bar {
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.browser-dots {
    display: flex;
    gap: 6px;
}

.browser-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.browser-dots span:nth-child(1) {
    background: #ff5f56;
}

.browser-dots span:nth-child(2) {
    background: #ffbd2e;
}

.browser-dots span:nth-child(3) {
    background: #27c93f;
}

.browser-address {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    height: 18px;
    border-radius: 4px;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-family: monospace;
}

.browser-content {
    position: relative;
    background: #0f172a;
}

.browser-content iframe,
.browser-content img {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.iframe-preview {
    aspect-ratio: 16/9;
}

/* Portfolio Overlay Hint */
.browser-content::after {
    content: 'CLIQUEZ POUR EXPLORER';
    position: absolute;
    inset: 0;
    background: rgba(59, 130, 246, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    opacity: 0;
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 2;
}

.portfolio-card:hover .browser-content::after {
    opacity: 1;
}

.browser-mockup::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 3;
    opacity: 0.2;
}

.social-sidebar {
    position: fixed;
    left: 2rem;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.social-sidebar a {
    color: rgba(255, 255, 255, 0.3);
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-sidebar a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

.social-sidebar .line {
    width: 1px;
    height: 100px;
    background: linear-gradient(to top, var(--primary), transparent);
    margin-top: 1rem;
}

@media (max-width: 1200px) {
    .social-sidebar {
        display: none;
    }
}

/* Navbar Modernized */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    /* Reduced from 1.5rem for better space management */
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(10, 14, 39, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.navbar.scrolled {
    padding: 0.8rem 0;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo img {
    height: 55px;
    /* Reduced from 70px */
    width: auto;
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.4));
    transition: 0.3s;
}

.navbar.scrolled .navbar-logo img {
    height: 60px;
}

.navbar-links {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.navbar-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: 0.3s;
}

.navbar-links a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Hero Floating Effect */
header .glass-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    margin-top: 4rem;
    /* Additional safety margin to push it away from navbar */
}

header .glass-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 32px;
    padding: 1px;
    background: linear-gradient(135deg,
            transparent 0%,
            rgba(59, 130, 246, 0.4) 25%,
            rgba(139, 92, 246, 0.4) 50%,
            rgba(59, 130, 246, 0.4) 75%,
            transparent 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: rotate-border 4s linear infinite;
    background-size: 200% 200%;
}

@keyframes rotate-border {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 200% 200%;
    }
}


/* Professional Footer System */
.main-footer {
    padding: 8rem 0 4rem;
    background: var(--glass) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    margin-top: 10rem;
    position: relative;
    z-index: 10;
    /* Seamless transition mask */
    mask-image: linear-gradient(to bottom, transparent, black 15%);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%);
    border: none !important;
}

@media (max-width: 768px) {
    .main-footer {
        backdrop-filter: blur(12px) saturate(150%) !important;
        -webkit-backdrop-filter: blur(12px) saturate(150%) !important;
        padding: 4rem 0 2rem;
        margin-top: 5rem;
    }
}

.main-footer .container {
    background: transparent !important;
    border: none !important;
    padding: 0 2rem;
}







.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand .footer-logo {
    height: 55px;
    width: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.3));
}

.footer-desc {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 350px;
}

.footer-social-link {
    color: rgba(255, 255, 255, 0.2);
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-block;
}

.footer-social-link:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

.footer-column h4 {
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    position: relative;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 20px;
    height: 2px;
    background: var(--primary);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 1.25rem;
}

.footer-links a,
.footer-links span {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.footer-links a:hover {
    color: #fff;
    transform: translateX(5px);
}

.footer-bottom {
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-legal {
    display: flex;
    gap: 4rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: 0.2s;
}

.footer-legal a:hover {
    color: var(--primary);
}

/* Status Pulse Animation */
.status-pulse {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    position: relative;
    display: inline-block;
}

.status-pulse::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: #10b981;
    opacity: 0.4;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(15px);
    /* Reduced from 30px for more stability */
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Typography & Titles Polish */
.section-title h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
}

/* Animations */
.spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.tech-tag {
    font-size: 0.7rem;
    padding: 0.45rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tech-tag:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
}

/* Badge */
.badge-coming-soon {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    padding: 0.6rem 1.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
    margin-bottom: 2rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Glow */
.glow-on-hover {
    position: relative;
    overflow: hidden;
}

.glow-on-hover::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    transform: translate(-100%, -100%);
    transition: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.glow-on-hover:hover::after {
    transform: translate(25%, 25%);
}

.step-indicator {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.step-indicator.active {
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary);
}

.step-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

/* Modal System */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    width: 100%;
    max-width: 850px;
    position: relative;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10;
}

.modal-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: rotate(90deg);
}

/* Calendar */
.calendar-widget {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.calendar-header h3 {
    font-size: 1.4rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
}

.calendar-day-head {
    text-align: center;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
    padding: 0.75rem 0;
    text-transform: uppercase;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-weight: 700;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
}

.calendar-day.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
    transform: scale(1.1);
}

.calendar-day.disabled {
    opacity: 0.05;
    cursor: not-allowed;
}

.calendar-day:hover:not(.disabled):not(.active) {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

/* Slots */
.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.25rem;
}

.slot {
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    text-align: center;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.slot:hover:not(.active) {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.08);
    transform: translateY(-3px);
}

.slot.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
    transform: scale(1.05);
}

@media (max-width: 968px) {
    .main-footer .container {
        padding: 3rem;
        border-radius: 32px;
        margin: 0 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .footer-brand .footer-logo {
        margin: 0 auto 2rem;
    }

    .footer-desc {
        margin: 0 auto;
    }

    .footer-socials {
        justify-content: center;
    }

    .portfolio-card {
        grid-template-columns: 1fr;
    }

    section {
        padding: 6rem 0;
    }
}

@media (max-width: 640px) {
    .mobile-toggle {
        display: block;
    }

    .navbar-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        height: 100svh;
        /* Short viewport height for mobile browsers */
        background: rgba(10, 14, 39, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
        border-left: 1px solid rgba(255, 255, 255, 0.05);
    }

    .navbar-links.active {
        right: 0;
        display: flex !important;
        box-shadow: -20px 0 60px rgba(0, 0, 0, 0.8);
    }

    .navbar-links a {
        font-size: 1.5rem;
        font-weight: 800;
        margin: 1.5rem 0;
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
}

/* FAQ System Enhanced */
.active-faq {
    border-color: var(--primary) !important;
    background: rgba(59, 130, 246, 0.05) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.1);
}

.active-faq .faq-content {
    max-height: 200px !important;
    padding-bottom: 1.5rem;
    opacity: 1 !important;
}

.faq-content {
    opacity: 0.5;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.active-faq i[data-lucide="chevron-down"] {
    transform: rotate(180deg);
    color: var(--primary);
}

.glass-card i[data-lucide="chevron-down"] {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: rgba(255, 255, 255, 0.3);
}

.faq-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.faq-item-header h4 {
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    transition: color 0.3s;
}

.active-faq h4 {
    color: #fff;
}

/* Section Title Decorative Line */
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin: 2rem auto 0;
    border-radius: 10px;
    opacity: 0.6;
}

/* Hero Enhanced Elements */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 0.5rem 1.25rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--primary);
    margin-bottom: 2.5rem;
}

.pulse-icon {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    animation: loader-pulse 2s infinite ease-in-out;
}

.tech-container {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.tech-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    animation: floating-chip 4s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

@keyframes floating-chip {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.tech-chip:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -5px rgba(59, 130, 246, 0.3);
    color: white;
}

.tech-chip i {
    width: 18px;
    height: 18px;
    color: var(--primary);
    transition: transform 0.4s ease;
}

.tech-chip:hover i {
    transform: rotate(360deg) scale(1.2);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

/* Stats System Premium */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.stat-card:hover {
    transform: translateY(-3px);
    /* Reduced movement */
    border-color: var(--primary-glow);
    background: rgba(15, 23, 42, 0.6);
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.1), transparent 70%);
    opacity: 0;
    transition: 0.4s;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
    font-size: 1.2rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.stat-card:hover .stat-icon {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    font-style: italic;
    background: linear-gradient(135deg, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Text Reveal Wave Effect */
.animate-text-reveal {
    background: linear-gradient(to right, #fff 50%, rgba(255, 255, 255, 0.1) 50%);
    background-size: 200% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background-position 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active .animate-text-reveal {
    background-position: 0 0;
}

/* Floating Tech Particles */
.tech-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    z-index: 10;
}

.process-number {
    font-size: 4rem;
    font-weight: 950;
    opacity: 0.05;
    position: absolute;
    top: 1rem;
    right: 2rem;
    font-style: italic;
    background: linear-gradient(135deg, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover .process-number {
    opacity: 0.2;
    transform: scale(1.1) translateX(-10px);
}

.process-connector-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(59, 130, 246, 0.2),
            rgba(139, 92, 246, 0.2),
            transparent);
    z-index: 1;
    pointer-events: none;
}

@media (max-width: 968px) {
    .process-connector-line {
        display: none;
    }
}


/* Digital Scanning Line */
.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom,
            transparent,
            rgba(59, 130, 246, 0.03) 50%,
            transparent 100%);
    animation: scan 8s linear infinite;
    pointer-events: none;
    z-index: 10002;
}

@keyframes scan {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100vh);
    }
}

/* --- MOBILE OPTIMIZATIONS --- */
@media (max-width: 768px) {

    /* Navbar & Hero Fixes */
    .hero-badge {
        margin-top: 6rem;
        /* Push badge down on mobile */
        width: auto;
        justify-content: center;
        margin-bottom: 2rem;
    }

    header.container {
        padding-top: 12rem !important;
        /* Keep substantial space on mobile too */
    }

    .glass-card {
        padding: 2rem !important;
        /* Reduce padding on mobile cards */
    }

    h1 {
        font-size: 2.25rem !important;
        /* Optimized for small screens */
        margin-bottom: 1.5rem;
    }

    .tech-container {
        gap: 0.5rem;
    }

    .tech-chip {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }

    /* Prevent text selection on buttons for better touch feel */
    .btn,
    .tech-chip,
    .slot,
    .project-box {
        user-select: none;
        -webkit-user-select: none;
    }

    /* Modal Booking Fixes */
    .modal {
        padding: 0 !important;
        align-items: flex-end;
        /* Sheet-like behavior on mobile */
    }

    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 24px 24px 0 0 !important;
        padding: 1.5rem !important;
        margin-bottom: 0;
    }

    .calendar-widget {
        max-width: 100%;
    }

    .calendar-grid {
        gap: 0.25rem;
    }

    .calendar-day-head {
        font-size: 0.7rem;
        padding: 0.5rem 0;
    }

    .calendar-day {
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .slots-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns for time slots on mobile */
        gap: 0.75rem;
    }

    /* Footer Fixes */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-brand .footer-logo,
    .footer-bottom {
        justify-content: center;
    }

    .footer-links li {
        justify-content: center;
    }

    /* Contact Form & Booking Mobile Fixes */
    .booking-container {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
    }

    .booking-container .glass-card {
        padding: 1.5rem !important;
        width: 100% !important;
        /* Ensure full width */
        box-sizing: border-box;
    }

    /* Project Type Selector Mobile Fix */
    .project-selector {
        grid-template-columns: 1fr 1fr !important;
        /* Force 2 columns max on mobile for better readability */
        gap: 0.5rem !important;
    }

    .project-option .project-box {
        padding: 0.75rem 0.5rem !important;
        /* Smaller padding */
    }

    .project-box i {
        width: 16px !important;
        height: 16px !important;
    }

    .project-box span {
        font-size: 0.7rem !important;
    }

    /* Browser Mockup Mobile Fix */
    .browser-mockup {
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
        border-radius: 12px;
        margin-bottom: 2rem;
    }

    .browser-content {
        width: 100%;
        overflow: hidden;
    }

    .browser-content img {
        width: 100% !important;
        height: auto !important;
        display: block;
        object-fit: contain;
        /* Ensure full image is visible */
    }

    .portfolio-card {
        padding: 1rem !important;
        gap: 2rem !important;
    }

    .portfolio-card:nth-child(even) {
        flex-direction: column !important;
        /* Reset staggered layout on mobile */
    }

    /* Smoother scrolling on iOS */
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Digital Glitch Shine for Titles */
h2.animate-text-reveal {
    position: relative;
}

h2.animate-text-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
    transform: translateX(-100%);
    transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.reveal.active h2.animate-text-reveal::after {
    animation: text-glitch-shine 2s 1s ease-out forwards;
}

@keyframes text-glitch-shine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Text Reveal Wave Effect */
.animate-text-reveal {
    background: linear-gradient(to right, #fff 50%, rgba(255, 255, 255, 0.1) 50%);
    background-size: 200% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background-position 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active .animate-text-reveal {
    background-position: 0 0;
}