body {
    background-color: #1E191F;
    color: #F9EFF0;
    overflow-x: hidden;
}

.glass-nav {
    background: rgba(5, 15, 36, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.text-glow {
    text-shadow: 0 0 30px rgba(0, 163, 255, 0.3);
}

.mobile-menu-overlay {
    background: rgba(5, 15, 36, 0.95);
    backdrop-filter: blur(16px);
}

.tracking-ultra-tight {
    letter-spacing: 0.02em;
}

.outline-text {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    color: transparent;
}

video {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    will-change: transform;
}

/* LENIS REQUIRED CSS */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

.hero-title-container {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
    will-change: transform;
}

.hero-title {
    font-size: 12vw;
    line-height: 1.0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 95vw;
}

.hero-line {
    display: block;
    width: 100%;
    text-align: center;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .hero-title {
        line-height: 0.9;
        max-width: 90vw;
    }

    .hero-line-1 {
        font-size: 9.8vw;
        letter-spacing: -0.01em;
    }

    .hero-line-2 {
        font-size: 11.2vw;
        /* Larger font to match character count difference */
        letter-spacing: -0.01em;
    }
}

/* Essential for perfect overlap with object-cover video */
.mask-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    mask-image: url('../assets/images/HeroPersonNoBG.png');
    -webkit-mask-image: url('../assets/images/HeroPersonNoBG.png');
    mask-size: cover;
    -webkit-mask-size: cover;
    mask-position: center;
    -webkit-mask-position: center;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    /* GPU promotion for compositing performance */
    transform: translateZ(0) scale(1.01);
    -webkit-transform: translateZ(0) scale(1.01);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}

/* Solid title: Subtracted mask (Shows text everywhere EXCEPT the person) */
.layer-solid {
    mask-image: url('../assets/images/HeroPersonNoBG.png'), linear-gradient(black, black);
    -webkit-mask-image: url('../assets/images/HeroPersonNoBG.png'), linear-gradient(black, black);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 1;
}

/* Outlined title: Standard mask (Shows outline ONLY inside the person) */
.layer-outline {
    mask-image: url('../assets/images/HeroPersonNoBG.png');
    -webkit-mask-image: url('../assets/images/HeroPersonNoBG.png');
    z-index: 2;
}

/* Hero performance containment */
#home {
    contain: layout style paint;
}

.outline-text-effect {
    -webkit-text-stroke: 1px #F9EFF0;
    -webkit-text-stroke-width: 2.2px !important;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    font-weight: 400;
    /* Ensure we use the font's natural weight */
}

.badge-pill {
    background: #2E62FD;
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(46, 98, 253, 0.4);
}

.bg-dots {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4000 4000' fill='rgba(255, 255, 255, 0.05)'%3E%3Cg transform='translate(1600, 1600)'%3E%3Cpolygon points='400 136.97 209.84 246.76 209.84 351.43 400 241.64 499.51 299.09 499.51 414.01 209.84 581.25 209.84 663.03 400 663.03 400 576.12 590.16 466.34 590.16 246.76 400 136.97'/%3E%3Cpolygon points='400 257.35 209.84 367.14 209.84 466.34 209.84 565.54 400 455.75 400 257.35'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 150px 150px;
    background-repeat: repeat;
}

.bg-dots-dark {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4000 4000' fill='rgba(30, 25, 31, 0.04)'%3E%3Cg transform='translate(1600, 1600)'%3E%3Cpolygon points='400 136.97 209.84 246.76 209.84 351.43 400 241.64 499.51 299.09 499.51 414.01 209.84 581.25 209.84 663.03 400 663.03 400 576.12 590.16 466.34 590.16 246.76 400 136.97'/%3E%3Cpolygon points='400 257.35 209.84 367.14 209.84 466.34 209.84 565.54 400 455.75 400 257.35'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 150px 150px;
    background-repeat: repeat;
}

.clip-corner {
    clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 40px, 100% 100%, 40px 100%, 0 calc(100% - 40px));
    border-radius: 0 !important;
}

.clip-corner-sm {
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
    border-radius: 0 !important;
}

.clip-all-corners {
    clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
    border-radius: 0 !important;
}

.clip-tr-corner {
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
    border-radius: 0 !important;
}

.clip-tr-corner-nav {
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    border-radius: 0 !important;
}

/* Fix for 1px sub-pixel line between sections */
#contact {
    margin-top: -1px;
}

.jules-link:hover {
    color: #FED653;
    /* pauze-yellow */
    transition: color 0.3s ease;
}

/* Performance Optimizations */
.service-card,
.project-card,
.reveal-text,
.manifesto-line,
.char {
    will-change: transform, opacity;
}

/* Ensure stacking context for glass elements */
.glass-nav,
.mobile-menu-overlay {
    z-index: 50;
    transform: translateZ(0);
}

/* Navigation Themes */
.nav-theme-container {
    transition: background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.nav-light-theme {
    background-color: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

.nav-light-theme .nav-link {
    color: rgba(30, 25, 31, 0.4) !important;
}

.nav-light-theme .nav-link:hover,
.nav-light-theme .nav-link.active {
    color: rgba(30, 25, 31, 1) !important;
}

/* Ensure active link text is ALWAYS dark regardless of theme because of the yellow indicator */
.nav-link.active {
    color: #1c181c !important;
    opacity: 1 !important;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Custom Breathe Animation */
@keyframes breathe {

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

    50% {
        transform: scale(1.6);
        opacity: 1;
        box-shadow: 0 0 10px rgba(254, 214, 83, 0.4);
    }
}

.animate-breathe {
    animation: breathe 2.5s infinite ease-in-out;
}