@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* Custom Styles */
/* Body styles are handled by Tailwind classes in index.html */

/* Glass Navigation - No longer used, kept for legacy */
.glass-nav {
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

html.dark .glass-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(78, 74, 255, 0.3);
}

html.dark .glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.text-gradient {
    background: linear-gradient(135deg, #1e1b4b 0%, #2563eb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

html.dark .text-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #2563eb 100%);
}

.text-gradient-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

html.dark .text-gradient-primary {
    background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
}

/* Grid Background */
.grid-bg {
    background-size: 50px 50px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

html.dark .grid-bg {
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f9fafb;
}

html.dark ::-webkit-scrollbar-track {
    background: #050505;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

html.dark ::-webkit-scrollbar-thumb {
    background: #262626;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4e4aff;
}

/* Spotlight Effect */
.spotlight {
    background: radial-gradient(600px circle at var(--x) var(--y), rgba(37, 99, 235, 0.05), transparent 40%);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

html.dark .spotlight {
    background: radial-gradient(600px circle at var(--x) var(--y), rgba(37, 99, 235, 0.08), transparent 40%);
}

/* Swiper Customization */
.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
}

.swiper-pagination-bullet-active {
    background: #4e4aff !important;
    width: 20px !important;
    border-radius: 5px !important;
    transition: all 0.3s ease !important;
}

/* Bento Grid Micro-interactions */
.bento-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 40px -10px rgba(78, 74, 255, 0.15);
    border-color: rgba(78, 74, 255, 0.3);
}

.code-typing {
    border-right: 2px solid #4e4aff;
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: #4e4aff
    }
}

.floating-icon {
    animation: float-icon 3s ease-in-out infinite;
}

@keyframes float-icon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.pulse-ring {
    position: absolute;
    border-radius: 50%;
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.33);
        opacity: 1;
    }

    80%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.path-anim {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: dash 3s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: 0;
    }
}

/* Tech Stack Styles */
.tech-card {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

html.dark .tech-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tech-card:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-5px);
    border-color: rgba(78, 74, 255, 0.3);
}

html.dark .tech-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.tech-icon {
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.tech-card:hover .tech-icon {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Tooltip */
.tool-tip {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.tech-card:hover .tool-tip {
    opacity: 1;
    transform: translateY(0);
}

/* Animation Delays */
.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Mobile Menu Animation */
#mobile-menu.menu-open {
    max-height: 400px;
    opacity: 1;
    visibility: visible;
}

#mobile-menu .mobile-link {
    transition: all 0.3s ease;
    transition-delay: calc(var(--delay, 0) * 50ms);
}

#mobile-menu.menu-open .mobile-link {
    transform: translateY(0);
    opacity: 1;
}

/* Shimmer Animation */
@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.animate-shimmer {
    animation: shimmer 1.5s infinite;
}

/* ============================================
   ORBITAL TECH STACK ANIMATION
   ============================================ */

/* Orbit Container Animation */
.orbit-inner {
    animation: rotate-orbit 30s linear infinite;
}

.orbit-outer {
    animation: rotate-orbit 45s linear infinite reverse;
}

@keyframes rotate-orbit {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Position items on orbit using CSS custom properties */
.orbit-item {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: rotate(var(--angle)) translateX(var(--radius)) rotate(calc(-1 * var(--angle)));
    margin-left: -24px;
    margin-top: -24px;
}

/* Counter-rotate icons so they stay upright */
.orbit-inner .orbit-item {
    animation: counter-rotate 30s linear infinite;
}

.orbit-outer .orbit-item {
    animation: counter-rotate 45s linear infinite reverse;
}

@keyframes counter-rotate {
    from {
        transform: rotate(var(--angle)) translateX(var(--radius)) rotate(calc(-1 * var(--angle)));
    }

    to {
        transform: rotate(calc(var(--angle) + 360deg)) translateX(var(--radius)) rotate(calc(-1 * (var(--angle) + 360deg)));
    }
}

/* Tech Icon Styling */
.tech-orbit-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

html.dark .tech-orbit-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tech-orbit-icon:hover {
    background: rgba(78, 74, 255, 0.15);
    border-color: rgba(78, 74, 255, 0.4);
    transform: scale(1.2);
    box-shadow: 0 0 30px rgba(78, 74, 255, 0.3);
}

.tech-orbit-icon img {
    transition: all 0.3s ease;
    filter: grayscale(30%);
}

.tech-orbit-icon:hover img {
    filter: grayscale(0%);
    transform: scale(1.1);
}

/* Tooltip */
.tech-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(78, 74, 255, 0.3);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.tech-orbit-icon:hover .tech-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: -35px;
}

/* Pause animation on hover for better interaction */
.orbit-inner:hover,
.orbit-outer:hover {
    animation-play-state: paused;
}

.orbit-inner:hover .orbit-item,
.orbit-outer:hover .orbit-item {
    animation-play-state: paused;
}

/* Responsive adjustments */
@media (max-width: 768px) {

    .orbit-inner,
    .orbit-outer {
        display: none;
    }

    .orbit-item {
        --radius: 100px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .orbit-item {
        --radius: 150px;
    }
}

/* Blob animation for hero */
@keyframes blob {

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

    25% {
        transform: translate(20px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    75% {
        transform: translate(30px, 10px) scale(1.05);
    }
}

.animate-blob {
    animation: blob 8s ease-in-out infinite;
}

/* ============================================
   CONSTELLATION NETWORK TECH STACK
   ============================================ */

/* Tech Node Container */
.tech-node {
    z-index: 20;
}

/* Tech Node Icon Box*/
/* ============================================
   TECH MARQUEE SYSTEM
   ============================================ */

.tech-marquee-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    position: relative;
    padding: 20px 0;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.tech-marquee-row {
    display: flex;
    gap: 20px;
    width: max-content;
    flex-shrink: 0;
}

.marquee-left {
    animation: marquee-left 40s linear infinite;
}

.marquee-right {
    animation: marquee-right 40s linear infinite;
}

.tech-marquee-wrapper:hover .tech-marquee-row {
    animation-play-state: paused;
}

@keyframes marquee-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 16px));
    }
}

@keyframes marquee-right {
    0% {
        transform: translateX(calc(-50% - 16px));
    }

    100% {
        transform: translateX(0);
    }
}

/* Premium Tech Card Styling */
.tech-item-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 22px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    min-width: 110px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

html.dark .tech-item-card {
    background: rgba(10, 10, 18, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
}

.tech-item-card:hover {
    background: #fff;
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.1);
}

html.dark .tech-item-card:hover {
    background: rgba(15, 15, 30, 0.8);
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.2);
}

.tech-item-card .tech-icon-container {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.tech-item-card:hover .tech-icon-container {
    transform: scale(1.1);
}

.tech-item-card .tech-name {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    z-index: 2;
    letter-spacing: -0.01em;
}

html.dark .tech-item-card .tech-name {
    color: #f1f5f9;
}

.tech-glow-layer {
    position: absolute;
    inset: -20px;
    opacity: 0;
    filter: blur(25px);
    transition: opacity 0.5s ease;
    z-index: 1;
}

.tech-item-card:hover .tech-glow-layer {
    opacity: 0.15;
}

html.dark .tech-item-card:hover .tech-glow-layer {
    opacity: 0.25;
}

/* Responsive constraints */
@media (max-width: 768px) {
    .tech-marquee-wrapper {
        gap: 16px;
    }

    .tech-item-card {
        padding: 12px 20px;
        min-width: 180px;
        gap: 16px;
    }

    .tech-item-card .tech-name {
        font-size: 14px;
    }

    .tech-item-card .tech-icon-container {
        width: 36px;
        height: 36px;
    }

    .marquee-left,
    .marquee-right {
        animation-duration: 25s;
    }
}

/* ============================================
   HOW WE WORK - CARD STICKING (Uses Tailwind)
   ============================================ */
/* Pure Tailwind - no custom CSS needed */

/* ============================================
   PREMIUM SMOOTH SCROLLING (LENIS)
   ============================================ */
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;
}


/* ============================================
   PREMIUM CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}

html.dark ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #2563eb, #6366f1);
    border-radius: 20px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #1d4ed8, #4f46e5);
    background-clip: content-box;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #2563eb transparent;
}


.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}


/* ============================================
   HERO GLITCH & TYPING EFFECTS
   ============================================ */

/* ============================================
   PREMIUM SMOOTH GLITCH TYPING
   ============================================ */

.smooth-glitch {
    position: relative;
    display: inline-block;
}

.smooth-glitch-active {
    animation: smooth-sub-glitch 0.2s linear infinite;
}

.smooth-glitch-active::before,
.smooth-glitch-active::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
}

.smooth-glitch-active::before {
    left: 2px;
    text-shadow: -1px 0 rgba(37, 99, 235, 0.8);
    /* Brand Primary */
    clip: rect(24px, 550px, 90px, 0);
    animation: smooth-glitch-anim-1 0.2s infinite linear alternate-reverse;
}

.smooth-glitch-active::after {
    left: -2px;
    text-shadow: -1px 0 rgba(14, 165, 233, 0.8);
    /* Brand Accent / Cyan */
    clip: rect(85px, 550px, 140px, 0);
    animation: smooth-glitch-anim-2 0.2s infinite linear alternate-reverse;
}

@keyframes smooth-sub-glitch {
    0% {
        transform: skew(0deg);
    }

    20% {
        transform: skew(-0.5deg);
    }

    40% {
        transform: skew(0.5deg);
    }

    60% {
        transform: skew(0deg);
    }

    80% {
        transform: skew(0.5deg);
    }

    100% {
        transform: skew(0deg);
    }
}

@keyframes smooth-glitch-anim-1 {
    0% {
        clip: rect(20px, 9999px, 80px, 0);
    }

    100% {
        clip: rect(60px, 9999px, 10px, 0);
    }
}

@keyframes smooth-glitch-anim-2 {
    0% {
        clip: rect(60px, 9999px, 20px, 0);
    }

    100% {
        clip: rect(10px, 9999px, 80px, 0);
    }
}

/* ============================================
   PREMIUM HERO SECTION REDESIGN
   ============================================ */

.hero-premium-badge {
    padding: 6px 16px;
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 100px;
    backdrop-filter: blur(8px);
}

html.dark .hero-premium-badge {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.hero-text-highlight {
    display: inline-block;
    padding: 0.1em 0.4em;
    line-height: 1;
}

.btn-hero-primary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 36px;
    background: #2563EB;
    color: #fff;
    font-weight: 700;
    border-radius: 100px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.3);
    overflow: hidden;
}

html.dark .btn-hero-primary {
    background: #2563EB;
    color: #fff;
    box-shadow: 0 10px 30px -5px rgba(37, 99, 235, 0.4);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.3);
}

html.dark .btn-hero-primary:hover {
    box-shadow: 0 15px 40px -5px rgba(255, 255, 255, 0.2);
}

.btn-hero-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-hero-primary:hover::after {
    transform: translateX(100%);
}

.btn-hero-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 36px;
    background: #fff;
    color: #000;
    font-weight: 700;
    border-radius: 100px;
    border: 1px solid rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

html.dark .btn-hero-secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.1);
}

.btn-hero-secondary:hover {
    background: #f9fafb;
    border-color: rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

html.dark .btn-hero-secondary:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.2);
}

.hero-curved-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f7faff 50%, #fcfdff 100%);
}

html.dark .hero-curved-background {
    background: linear-gradient(135deg, #050505 0%, #080a18 50%, #050505 100%);
}

.subtle-grid-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: 
        linear-gradient(to right, rgba(37, 99, 235, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(37, 99, 235, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at center, black, transparent 90%);
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 90%);
}

.hero-curved-background::before {
    content: '';
    position: absolute;
    bottom: -5%;
    left: -5%;
    width: 65%;
    height: 65%;
    background: radial-gradient(circle at 0 100%, rgba(37, 99, 235, 0.07) 0%, transparent 70%);
    filter: blur(50px);
}

.hero-curved-background::after {
    content: '';
    position: absolute;
    bottom: -5%;
    right: -5%;
    width: 65%;
    height: 65%;
    background: radial-gradient(circle at 100% 100%, rgba(37, 99, 235, 0.07) 0%, transparent 70%);
    filter: blur(50px);
}

html.dark .hero-curved-background::before {
    background: radial-gradient(circle at 0 100%, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
}

html.dark .hero-curved-background::after {
    background: radial-gradient(circle at 100% 100%, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
}

/* ============================================
   CREATIVE ENHANCEMENTS: INTERACTIVE GLOW & TAGS
   ============================================ */

.hero-interactive-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(37, 99, 235, 0.05),
        transparent 80%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
}

#home:hover .hero-interactive-glow {
    opacity: 1;
}

html.dark .hero-interactive-glow {
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(37, 99, 235, 0.1),
        transparent 80%
    );
}

@media (max-width: 768px) {
    .floating-tags-container {
        display: none;
    }
}

.hero-ai-input-wrapper {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
}

html.dark .hero-ai-input-wrapper {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.hero-ai-input-wrapper input {
    outline: none !important;
    box-shadow: none !important;
}

/* AI MODAL ANIMATIONS */
#ai-chat-modal.active {
    display: flex;
}

#ai-chat-modal.active #ai-modal-content {
    animation: modal-spin-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modal-spin-in {
    0% { transform: scale(0.9) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

#ai-chat-history::-webkit-scrollbar {
    width: 4px;
}
#ai-chat-history::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.2);
    border-radius: 10px;
}

/* FLOATING AI WIDGET */
/* FLOATING AI WIDGET */
#floating-ai-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: scale(0.5) translateY(20px);
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html.dark #floating-ai-widget {
    background: #111;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

#floating-ai-widget.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

/* Morphing Effects */
.ai-morph-particle {
    position: fixed;
    z-index: 1001;
    width: 32px;
    height: 32px;
    background: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
    pointer-events: none;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: scale(0);
}

.ai-morph-particle.active {
    opacity: 1;
    transform: scale(1.2);
}

@keyframes widget-pop {
    0% { transform: scale(0.5) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

#floating-ai-widget::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--brand-primary), transparent, var(--brand-primary));
    border-radius: inherit;
    z-index: -1;
    opacity: 0.3;
    animation: border-rotate 4s linear infinite;
}

@keyframes border-rotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* ============================================
   TECH CIRCUITS LAYER
   ============================================ */

.tech-circuits-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.tech-circuit {
    position: absolute;
    color: rgba(37, 99, 235, 0.15); /* Increased opacity for light mode */
    transition: all 0.5s ease;
}

html.dark .tech-circuit {
    color: rgba(255, 255, 255, 0.1); /* Increased opacity for dark mode */
}

.tech-circuit-left {
    top: 15%;
    left: -20px; /* Moved more on-screen */
    animation: circuit-float-left 25s infinite alternate ease-in-out;
}

.tech-circuit-mid-left {
    animation: circuit-float-right 35s infinite alternate-reverse ease-in-out;
}

.tech-circuit-mid-right {
    animation: circuit-float-left 40s infinite alternate-reverse ease-in-out;
}

.tech-circuit-right {
    bottom: 15%;
    right: -20px; /* Moved more on-screen */
    animation: circuit-float-right 30s infinite alternate ease-in-out;
}

.node-pulse {
    animation: node-pulse-anim 4s infinite alternate ease-in-out;
}

@keyframes circuit-float-left {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(30px, 20px) rotate(3deg); }
}

@keyframes circuit-float-right {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-30px, -20px) rotate(-3deg); }
}

@keyframes node-pulse-anim {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.4); }
}

@media (max-width: 768px) {
    .tech-circuits-layer {
        display: none;
    }
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: currentColor;
    margin-left: 4px;
    vertical-align: middle;
    animation: cursor-blink 0.8s infinite;
}

@keyframes cursor-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}


/* ============================================
   MINIMALIST PREMIUM HERO REFINEMENT
   ============================================ */

/* Faint Noise Texture Overlay */
.noise-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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");
}

/* Enhanced Glassmorphism */
.premium-glass {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07) !important;
}

html.dark .premium-glass {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2) !important;
}

/* Geometric Brand Label v2 */
.brand-label-v2 {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid #2563eb;
    border-radius: 12px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

/* Refined Tech Pulse: Twinkling Intersections */
.tech-pulses {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
    mask-image: radial-gradient(circle at center, black 50%, transparent 100%);
}

.tech-pulse {
    position: absolute;
    width: 2.5px;
    height: 2.5px;
    background: #2563eb;
    border-radius: 50%;
    box-shadow: 0 0 8px #2563eb, 0 0 15px #2563eb;
    opacity: 0;
    animation: tech-twinkle 6s ease-in-out infinite;
}

@keyframes tech-twinkle {

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

    50% {
        transform: scale(1.3);
        opacity: 0.8;
    }
}

/* Shorter Streak alternative */
.tech-streak {
    position: absolute;
    width: 120px;
    height: 1.2px;
    background: linear-gradient(90deg, transparent, #2563eb, transparent);
    opacity: 0;
    animation: tech-slide 10s linear infinite;
}

@keyframes tech-slide {
    0% {
        transform: translateX(-150%) translateY(0);
        opacity: 0;
    }

    20% {
        opacity: 0.5;
    }

    80% {
        opacity: 0.5;
    }

    100% {
        transform: translateX(100vw) translateY(0);
        opacity: 0;
    }
}

/* Testimonial Showcase: Clean V3 */
.testimonial-showcase {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .testimonial-showcase {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.testimonial-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: sticky;
    top: 100px;
}

@media (max-width: 1024px) {
    .testimonial-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 1rem;
        position: static;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .testimonial-nav::-webkit-scrollbar {
        display: none;
    }
}

.testimonial-tab {
    padding: 1.25rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
    transition: all 0.3s ease;
    cursor: pointer;
}

.testimonial-tab:hover {
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 1024px) {
    .testimonial-tab {
        min-width: 200px;
    }
}

.testimonial-tab.active {
    background: rgba(37, 99, 235, 0.05);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: inset 0 0 10px rgba(37, 99, 235, 0.05);
}

.testimonial-showcase-card {
    background: #0a0a14;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    display: none;
    animation: testimonialCleanFade 0.5s ease forwards;
    color: #ffffff;
    /* Force white text */
}

.testimonial-showcase-card h4 {
    color: #ffffff !important;
}

.testimonial-showcase-card p {
    color: rgba(255, 255, 255, 0.6) !important;
}

.testimonial-showcase-card blockquote {
    color: rgba(255, 255, 255, 0.9) !important;
}

.testimonial-showcase-card.active {
    display: block;
}

@media (max-width: 640px) {
    .testimonial-showcase-card {
        padding: 1.25rem;
        border-radius: 16px;
    }
}

@keyframes testimonialCleanFade {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service Showcase V4: Full-Section Dark Creative Showcase */
.services-section-dark {
    background-color: #030308;
    position: relative;
    overflow: hidden;
}

/* Atmospheric Mesh Glows */
.mesh-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    filter: blur(80px);
    z-index: 1;
    pointer-events: none;
    animation: meshPulse 10s infinite alternate;
}

@keyframes meshPulse {
    0% {
        transform: translate(-10%, -10%) scale(1);
        opacity: 0.3;
    }

    100% {
        transform: translate(10%, 10%) scale(1.2);
        opacity: 0.6;
    }
}

.service-v3-container {
    position: relative;
    z-index: 10;
    max-width: 1240px;
    margin: 0 auto;
}

/* Redesigned Floating Pill Tabs */
.service-nav-v4 {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.5rem;
    border-radius: 100px;
    margin-bottom: 4rem;
    backdrop-filter: blur(10px);
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    gap: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .service-nav-v4 {
        padding: 0.25rem;
        width: 100%;
        border-radius: 12px;
    }
    
    .service-v3-tab {
        scroll-snap-align: start;
        flex: 0 0 auto;
    }
}

.service-nav-v4::-webkit-scrollbar {
    display: none;
}

.service-v3-tab {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.65);
    /* Increased contrast from 0.4 */
    font-weight: 600;
    font-size: 0.9375rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .service-v3-tab {
        padding: 0.6rem 1.25rem;
        font-size: 0.85rem;
    }
}

.service-v3-tab .tab-icon {
    width: 1.25rem;
    height: 1.25rem;
    opacity: 0.55;
    /* Increased contrast from 0.3 */
    transition: all 0.4s ease;
}

.service-v3-tab:hover {
    color: rgba(255, 255, 255, 0.9);
}

.service-v3-tab.active {
    background: #2563eb;
    color: #ffffff !important;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
}

.service-v3-tab.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #2563eb;
    border-radius: 50%;
}

.service-v3-tab.active .tab-icon {
    opacity: 1;
    color: #ffffff;
    transform: scale(1.1);
}

/* V4 Content Card refinement: Full-Bleed Illustration Design */
.service-v3-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 0;
    /* Full bleed right */
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    backdrop-filter: blur(20px);
    height: 380px;
    /* Fixed height for desktop */
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

@media (max-width: 768px) {
    .service-v3-card {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
        padding-bottom: 2rem;
    }
}

.service-v3-card:hover {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 35px 70px -15px rgba(0, 0, 0, 0.6);
}

.service-v3-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(37, 99, 235, 0.03), transparent);
    z-index: 1;
    pointer-events: none;
}

html.dark .service-v3-card {
    border-color: rgba(255, 255, 255, 0.05);
}

/* Internal padding for text only */
.service-v3-content {
    position: relative;
    padding: 2.5rem;
    height: 100%;
}

@media (max-width: 768px) {
    .service-v3-content {
        padding: 1.5rem;
        height: auto;
    }
}

/* Full bleed image container */
.service-illustration-wrap {
    position: relative;
    height: 100%;
    z-index: 2;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    /* Subtle dark base */
}

@media (max-width: 768px) {
    .service-illustration-wrap {
        height: 220px;
        order: -1; /* Image on top for mobile */
    }
}

.service-v3-content-layer {
    position: absolute;
    inset: 2.5rem;
    opacity: 0;
    transform: scale(0.98);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    will-change: opacity, transform;
    z-index: 5;
}

@media (max-width: 768px) {
    .service-v3-content-layer {
        position: relative;
        inset: 0;
        opacity: 0;
        display: none; /* Hide all by default, JS shows active */
        transform: none;
    }

    .service-v3-content-layer.active {
        display: flex;
        opacity: 1;
    }
}

.service-v3-illustration-layer {
    position: absolute;
    inset: 0;
    /* Fully fills the illustration wrap */
    opacity: 0;
    transform: scale(1.05);
    /* Slight zoom by default */
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: opacity, transform;
}

@media (max-width: 768px) {
    .service-v3-illustration-layer {
        display: none;
        transform: none;
    }
    .service-v3-illustration-layer.active {
        display: flex;
    }
}

.service-v3-illustration-layer img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    /* Fill edge to edge */
}

.service-v3-content-layer.active,
.service-v3-illustration-layer.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.service-v3-content h3 {
    color: #ffffff;
    font-size: 2.25rem !important;
    /* Restored size */
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 800;
}

@media (max-width: 768px) {
    .service-v3-content h3 {
        font-size: 1.75rem !important;
    }
}

.service-v3-content p {
    color: #d1d5db;
    /* Gray 300 for much better contrast */
    font-size: 1.125rem !important;
    /* Restored size */
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.learn-more-v3 {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.75rem;
    background: #2563eb;
    color: #ffffff !important;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: fit-content;
    /* Prevent full-width stretch */
}

.learn-more-v3:hover {
    background: #1d4ed8;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px -8px rgba(37, 99, 235, 0.5);
    gap: 1rem;
}

.learn-more-v3 i,
.learn-more-v3 span {
    transition: transform 0.3s ease;
}

.learn-more-v3:active {
    transform: translateY(-1px) scale(0.98);
}

.illustration-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    filter: blur(50px);
    z-index: -1;
}

/* Trust Pill Styles */
.trust-pill {
    padding: 6px 14px;
    border-radius: 99px;
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.1);
    transition: all 0.3s ease;
}

html.dark .trust-pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.trust-pill:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
    transform: translateY(-2px);
}

/* Button Refinement: Inner Highlight */
.btn-premium-primary {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 20px -10px rgba(37, 99, 235, 0.4);
}

/* Subtle Dot & Grid Backgrounds */
.subtle-dot-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image: radial-gradient(circle, rgba(37, 99, 235, 0.1) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
}

.subtle-grid-lines {
    position: absolute;
    inset: 0;
    z-index: 2;
    background-image:
        linear-gradient(to right, rgba(37, 99, 235, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(37, 99, 235, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}


/* Smart Navbar: Forced Dark Styling for Dark Sections */
#navbar.navbar-force-dark #nav-card {
    background: #0A0A0A !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.4s ease;
}

#navbar.navbar-force-dark #nav-card .text-xl,
#navbar.navbar-force-dark #nav-card .text-sm,
#navbar.navbar-force-dark #nav-card .text-gray-900,
#navbar.navbar-force-dark #nav-card span:not(.text-brand-primary) {
    color: #ffffff !important;
}

#navbar.navbar-force-dark #nav-card .text-gray-600,
#navbar.navbar-force-dark #nav-card .text-gray-400 {
    color: #9ca3af !important;
}

#navbar.navbar-force-dark #nav-card a:hover {
    color: #ffffff !important;
}

#navbar.navbar-force-dark #nav-card .text-brand-primary {
    color: #3b82f6 !important;
}

#navbar.navbar-force-dark #nav-card .border-gray-200 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   NAVBAR SCROLL SHRINK ANIMATION
   ============================================ */
#navbar.navbar-scrolled {
    top: 16px;
    /* Matches initial top-4 gap */
}

#navbar.navbar-scrolled .navbar-container {
    max-width: 68rem;
    /* Subtle shrink from max-w-6xl (72rem) */
    transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

#navbar.navbar-scrolled #nav-card {
    height: 68px;
    padding-left: 2rem;
    /* Increased to avoid curve overlap */
    padding-right: 1.5rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    border-color: rgba(37, 99, 235, 0.15);
}

html.dark #navbar.navbar-scrolled #nav-card {
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
}

#navbar.navbar-scrolled #nav-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
}

/* Force dark style must win even on scrolled */
#navbar.navbar-force-dark #nav-card {
    background: #0A0A0A !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
}

/* Shrink logo slightly */
#navbar.navbar-scrolled #nav-card img {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Smooth nav link spacing on shrink */
#navbar.navbar-scrolled #nav-links {
    gap: 1.25rem;
    /* Tighter spacing */
    transition: gap 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

@media (max-width: 768px) {
    #navbar.navbar-scrolled .navbar-container {
        max-width: 100%;
    }

    #navbar.navbar-scrolled #nav-card {
        height: 64px;
    }
}

/* --- Project Card V6 (Elevated Purist - Clean & Professional) --- */
.project-card-v6 {
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

html.dark .project-card-v6 {
    background: #0a0a18;
    border-color: rgba(255, 255, 255, 0.06);
}

.project-card-v6:hover {
    transform: translateY(-10px);
    border-color: var(--project-accent, #2563eb);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
}

html.dark .project-card-v6:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Subtle accent glow in background */
.project-card-v6::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--project-accent, #2563eb) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: -1;
    pointer-events: none;
}

.project-card-v6:hover::after {
    opacity: 0.03;
}

html.dark .project-card-v6:hover::after {
    opacity: 0.08;
}

.project-img-v6 {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.project-img-v6 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-card-v6:hover .project-img-v6 img {
    transform: scale(1.08);
}

.project-content-v6 {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.working-category-v6 {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--project-accent, #2563eb);
    margin-bottom: 0.75rem;
}

.project-title-v6 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

html.dark .project-title-v6 {
    color: #ffffff;
}

.project-desc-v6 {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 2rem;
}

html.dark .project-desc-v6 {
    color: #94a3b8;
}

.project-actions-v6 {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-case-link-v6 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

html.dark .project-case-link-v6 {
    color: #f1f5f9;
}

.project-case-link-v6:hover {
    color: var(--project-accent, #2563eb);
    gap: 0.75rem;
}

.project-visit-btn-v6 {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

html.dark .project-visit-btn-v6 {
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

.project-visit-btn-v6:hover {
    background: var(--project-accent, #2563eb);
    color: #ffffff;
    border-color: transparent;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 20px -5px var(--project-accent, #2563eb);
}

/* --- Project Card Overlay (Cinematic Hover Reveal) --- */
.project-card-overlay {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    cursor: pointer;
    isolation: isolate;
    border: 1px solid transparent;
    transition: border-color 0.4s ease, box-shadow 0.5s ease;
}

.project-card-overlay:hover {
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(37, 99, 235, 0.1);
}

.project-card-overlay__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1), filter 0.6s ease;
    will-change: transform;
}

.project-card-overlay:hover .project-card-overlay__img {
    transform: scale(1.08); /* Subtle zoom only */
}

.project-card-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.45) 30%, transparent 70%);
    transition: background 0.6s ease;
    pointer-events: none;
}

.project-card-overlay:hover::before {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.7) 45%, transparent 90%);
}

.project-card-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(37, 99, 235, 0.15), transparent);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.project-card-overlay:hover::after {
    opacity: 1;
}

.project-card-overlay__external {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-card-overlay:hover .project-card-overlay__external {
    opacity: 1;
    transform: translateY(0);
}

.project-card-overlay__external:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: scale(1.1) !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.project-card-overlay__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transform: translateY(20px);
}

.project-card-overlay:hover .project-card-overlay__content {
    transform: translateY(0);
}

.project-card-overlay__category {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #ffffff;
    background: #2563eb;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3px 10px;
    border-radius: 6px;
    width: fit-content;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0.15s;
}

.project-card-overlay:hover .project-card-overlay__category {
    opacity: 1;
    transform: translateY(0);
}

.project-card-overlay__title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
    margin-top: 8px;
    transform: translateY(-5px);
    /* Anchor near bottom */
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.project-card-overlay:hover .project-card-overlay__title {
    transform: translateY(-5px);
    margin-top: 10px;
}

.project-card-overlay__desc {
    font-size: 0.8925rem;
    color: rgba(255, 255, 255, 0.89);
    line-height: 1.5;
    margin-top: 4px;
    max-height: 60px;
    overflow: hidden;
    opacity: 0.85;
    transform: translateY(0);
    /* Default position within container */
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.project-card-overlay:hover .project-card-overlay__desc {
    opacity: 1;
    transform: translateY(0px);
}

.project-card-overlay__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    background: #2563eb;
    border: 1px solid #2563eb;
    padding: 7px 18px;
    border-radius: 99px;
    width: min-content;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0.2s;
    text-decoration: none;
}

.project-card-overlay:hover .project-card-overlay__cta {
    opacity: 1;
    transform: translateY(0);
}

.project-card-overlay__cta:hover {
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
    gap: 12px;
}

@media (max-width: 768px) {
    .project-card-overlay {
        aspect-ratio: 4 / 3;
        border-radius: 16px;
    }

    .project-card-overlay__content {
        padding: 1.25rem;
        transform: translateY(0) !important;
    }

    .project-card-overlay__title {
        font-size: 1.25rem;
        transform: translateY(0) !important;
        margin-top: 0;
    }

    .project-card-overlay__desc {
        font-size: 0.8125rem;
        transform: translateY(0) !important;
        line-clamp: 3;
        -webkit-line-clamp: 3;
        max-height: none;
        opacity: 1;
    }

    .project-card-overlay__category,
    .project-card-overlay__cta {
        opacity: 1;
        transform: translateY(0);
        margin-top: 10px;
    }

    .project-card-overlay__external {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   CASE STUDY CONTENT - Dynamic HTML Formatting
   ============================================ */
.case-study-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.case-study-content p:last-child {
    margin-bottom: 0;
}

.case-study-content strong,
.case-study-content b {
    font-weight: 700;
    color: #1e293b;
}

html.dark .case-study-content strong,
html.dark .case-study-content b {
    color: #e2e8f0;
}

.case-study-content h3,
.case-study-content h4 {
    font-weight: 700;
    color: #1e293b;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

html.dark .case-study-content h3,
html.dark .case-study-content h4 {
    color: #f1f5f9;
}

.case-study-content ul,
.case-study-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.case-study-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.case-study-content a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.case-study-content a:hover {
    color: #1d4ed8;
}

/* ============================================
   CREATIVE PRELOADER
   ============================================ */

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 1.2s cubic-bezier(0.85, 0, 0.15, 1);
}

.preloader.hide {
    transform: translateY(-100%);
}

.preloader-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-text {
    position: absolute;
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    letter-spacing: -0.02em;
}

.preloader-text.active {
    opacity: 1;
    transform: translateY(0);
}

.preloader-text.exit {
    opacity: 0;
    transform: translateY(-20px);
}

.preloader-logo {
    position: absolute;
    display: none;
    opacity: 0;
    transform: scale(0.9) translateY(10px);
    transition: all 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.preloader-logo.show {
    display: flex;
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Prevent scroll during preloader */
body.preloader-active {
    overflow: hidden !important;
}

.preloader-skip {
    position: absolute;
    top: 2rem;
    right: 2rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    z-index: 10001;
}

.preloader-skip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}