/* CSS Reset & Variables */
:root {
    --bg-color: #050505;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent-color: #dffe00;
    /* Vibrant acid yellow/green for contrast */
    --accent-glow: rgba(223, 254, 0, 0.4);
    --accent-alt: #7b2cbf;
    /* Deep purple */

    /* Pure Glassmorphism Tokens */
    --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-highlight: rgba(255, 255, 255, 0.4);
    --glass-blur: 16px;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
    --glass-inset: rgba(255, 255, 255, 0.2);

    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --font-main: 'Outfit', sans-serif;

    /* Spacing System - Millimetric Reset */
    --gap-section: 6rem;
    --gap-header-title: 0.75rem;
    --gap-header-content: 1.5rem;
    --gap-hero-internal: 0.5rem;
}

/* Light Mode Overrides */
.light-mode {
    --bg-color: #F8FAFC;
    --text-primary: #0F172A;
    --text-secondary: rgba(15, 23, 42, 0.7);
    --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.5) 100%);
    --accent-color: #4F46E5;
    /* Indigo Blue */
    --accent-glow: rgba(79, 70, 229, 0.1);
    --accent-alt: #9333EA;
    /* Electric Purple */
}

.light-mode .btn-primary {
    color: #ffffff !important;
}

.light-mode .timeline-date {
    color: var(--accent-color);
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.2);
    padding: 0.2rem 0.8rem;
    border-radius: 50px;
    font-weight: 700;
}

.light-mode .nav-container {
    background: rgba(240, 240, 245, 0.45) !important;
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.light-mode .nav-container a:not(.btn-primary-sm),
.light-mode .nav-container .logo {
    color: #1a1a1c !important;
}

.light-mode .theme-toggle {
    background: rgba(240, 240, 245, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
}

.light-mode .gradient-text {
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.light-mode .glass-bubble {
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.8) 0%, transparent 25%),
        radial-gradient(circle at 40% 40%, var(--accent-color) 0%, transparent 60%),
        radial-gradient(circle at 80% 80%, var(--accent-alt) 0%, transparent 70%),
        rgba(255, 255, 255, 0.4) !important;
    box-shadow: inset 10px 10px 30px rgba(255, 255, 255, 0.5), 0 20px 40px rgba(0, 0, 0, 0.05) !important;
}

.light-mode .badge::after,
.light-mode .service-card::after,
.light-mode .timeline-item::after {
    background: rgba(255, 255, 255, 0.9);
}

.light-mode .service-card:hover,
.light-mode .timeline-item:hover {
    background: rgba(255, 255, 255, 0.5);
}

.light-mode .orb-1 {
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 60%);
    opacity: 0.25;
}

.light-mode .orb-2 {
    background: radial-gradient(circle, var(--accent-alt) 0%, transparent 60%);
    opacity: 0.2;
}

.light-mode .orb-3 {
    background: radial-gradient(circle, #EC4899 0%, transparent 60%);
    opacity: 0.15;
}

/* Barbie Theme Override */
.theme-barbie {
    --bg-color: #ffe0e9;
    --text-primary: #d81b60;
    --accent-color: #ff4081;
    --accent-alt: #ff80ab;
    --text-secondary: #ad1457;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(216, 27, 96, 0.2);
    --accent-glow: rgba(255, 64, 129, 0.3);
}

/* Cyberpunk Theme Override */
.theme-cyberpunk {
    --bg-color: #000;
    --text-primary: #00ff00;
    --accent-color: #ff00ff;
    --accent-alt: #00ffff;
    --text-secondary: #00cc00;
    --glass-bg: rgba(0, 0, 0, 0.85);
    --glass-border: #00ff00;
    --glass-blur: 0px;
    --accent-glow: rgba(255, 0, 255, 0.4);
}

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

html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
    touch-action: pan-y; /* Impedisce lo scroll laterale accidentale */
}

/* Hard limit container for iOS bug fix */
.site-wrapper {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-y: auto;
    /* Ensure vertical scroll is allowed */
    position: relative;
}

::selection {
    background: var(--accent-color);
    color: #000;
}

/* Custom Cursor */
@media (pointer: fine) {

    body,
    a,
    button,
    .theme-toggle,
    .service-card,
    .timeline-item {
        cursor: none !important;
    }

    .cursor-dot,
    .cursor-outline {
        position: fixed;
        top: 0;
        left: 0;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        z-index: 9999;
        pointer-events: none;
        transition: transform 0.1s ease-out, opacity 0.3s ease;
    }

    .cursor-dot {
        width: 8px;
        height: 8px;
        background-color: var(--accent-color);
        z-index: 10000;
    }

    .cursor-progress {
        position: fixed;
        top: 0;
        left: 0;
        transform: translate(-50%, -50%);
        z-index: 9999;
        pointer-events: none;
        transition: transform 0.1s ease-out;
    }

    .cursor-progress-circle {
        stroke: var(--accent-color);
        stroke-dasharray: 113;
        stroke-dashoffset: 113;
        transition: stroke-dashoffset 0.1s ease-out, stroke 0.3s ease;
    }

    .cursor-progress.hover-active {
        transform: translate(-50%, -50%) scale(1.5);
    }
}

@media (pointer: coarse) {

    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}

/* Background Animated Orbs */
.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-alt) 0%, transparent 75%);
    top: -10%;
    left: -10%;
    opacity: 0.8;
}

.orb-2 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(223, 254, 0, 0.25) 0%, transparent 75%);
    top: 40%;
    right: -20%;
    animation-delay: -5s;
    opacity: 0.7;
}

.orb-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 150, 255, 0.3) 0%, transparent 75%);
    bottom: 5%;
    /* Changed from negative to slightly positive or zero */
    left: 20%;
    animation-delay: -10s;
    opacity: 0.7;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

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

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 800;
    /* Extra bold as requested */
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.accent {
    color: var(--accent-color);
}

/* Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), inset 1px 1px 2px var(--glass-inset);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Texture Layer for Glass */
.glass-panel::before,
.nav-container::after,
.side-actions-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    /* Reduced for a cleaner look */
    pointer-events: none;
    mix-blend-mode: overlay;
}

.w-100 {
    width: 100%;
}

.mt-4 {
    margin-top: 0 !important;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-primary-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    font-family: var(--font-main);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 20px rgba(223, 254, 0, 0.2);
}

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

.btn-secondary {
    color: var(--text-primary);
}

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

.btn-primary-sm {
    padding: 0.6rem 1.5rem;
    background: var(--text-primary);
    color: var(--bg-color);
    font-size: 0.9rem;
}

.btn-primary-sm:hover {
    background: var(--accent-color);
}

/* Navigation (iOS 16+ Glassmorphism Top Dynamic Nav) */
.glass-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.nav-container {
    background: rgba(10, 10, 12, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.6rem 0.6rem 2rem;
    box-shadow: var(--glass-shadow), inset 1px 1px 2px var(--glass-inset);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    position: relative;
    /* Removed overflow: hidden to allow breakout */
}

/* White rotating light for the nav menu - sharpen border */
/* Removed rotating light effect */

/* Glassmorphism Mask with Grain Texture */
.nav-container::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    mix-blend-mode: overlay;
    pointer-events: none;
    border-radius: inherit;
    overflow: hidden;
}

/* Clean overlay to ensure text readability without losing transparency */
.nav-container>* {
    position: relative;
    z-index: 10;
}

.light-mode .nav-container::after {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 0, 0, 0.08);
}

.nav-container.menu-open {
    overflow: visible !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn-primary-sm) {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-links a:not(.btn-primary-sm):hover {
    color: var(--text-primary);
}

/* Theme Toggle Pill Switch */
.theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    width: 68px;
    height: 34px;
    display: flex;
    align-items: center;
    padding: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.light-mode .theme-toggle {
    background: rgba(230, 230, 230, 0.8);
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.toggle-slider {
    width: 28px;
    height: 28px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.light-mode .toggle-slider {
    transform: translateX(34px);
    background: #FFB700;
    /* Warm sun orange */
    box-shadow: 0 2px 10px rgba(255, 183, 0, 0.3);
}

.theme-toggle i {
    font-size: 1.1rem;
    position: absolute;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Icon Animation Logic (Sunset/Sunrise effect) */
.theme-toggle .ph-moon {
    color: #000;
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-toggle .ph-sun {
    color: #fff;
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
    /* Hidden and rotated like it's below horizon */
}

/* Transitions: Light Mode Active */
.light-mode .theme-toggle .ph-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
    /* Sunset effect for moon */
}

.light-mode .theme-toggle .ph-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    /* Sun rises */
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Side Actions Bar (Small right menu) - Now Bottom Left Globally */
.side-actions-bar {
    position: fixed;
    left: 30px;
    bottom: 30px;
    right: auto;
    top: auto;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 8px;
    background: transparent;
    border-radius: 100px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    opacity: 1 !important;
    transform: translateY(0);
    overflow: hidden;
    border: none;
}

/* Colored rotating glow for side bar - subtle */
/* Removed rotating light effect */

/* Glass Layer for Side Bar */
.side-actions-bar::after {
    content: '';
    position: absolute;
    inset: 1px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: -1;
    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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.08;
    mix-blend-mode: overlay;
}

.light-mode .side-actions-bar::after {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(0, 0, 0, 0.08);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 1100;
    /* Higher than nav-links z-index */
}

.contact {
    padding: var(--gap-section) 5% 0;
    position: relative;
    z-index: 10;
}

/* Sections */
section {
    min-height: 100vh;
    padding: 4rem 5% 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Hero Section */
.hero {
    flex-direction: row;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    gap: 2rem;
    position: relative;
    z-index: 10;
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    z-index: 10;
}

.hero-title {
    font-size: clamp(2.2rem, 3.5vw + 1rem, 4.2rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    font-weight: 800;
    color: var(--text-primary);
    display: block;
    white-space: normal;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.hero-title br {
    content: "";
    display: block;
    margin-bottom: 0;
}

.badge {
    position: relative;
    padding: 0.8rem 1.5rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    z-index: 1;
    width: fit-content;
    margin-bottom: 0.8rem;
}

.light-mode .badge {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1c;
    border-color: rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.hero-cta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0;
    flex-wrap: wrap;
}

/* Abstract 3D Glass Bubble */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    height: 40vh;
    min-height: 300px;
}

.glass-bubble-container { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    pointer-events: none; 
    z-index: -5; 
    overflow: hidden; 
}

.glow-shadow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(223, 254, 0, 0.4) 0%, transparent 60%);
    filter: blur(40px);
    transform: scale(1.1) translateY(20px);
    opacity: 0.6;
    z-index: 0;
}

/* Clean organic bubble look */
.glass-bubble {
    position: absolute;
    top: 15vh;
    right: 5vw;
    width: 40vw;
    max-width: 500px;
    aspect-ratio: 1/1;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    
    /* Il trucco Apple: Livelli multipli di background nativo senza filtri blur */
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.6) 0%, transparent 25%), /* Riflesso luce */
        radial-gradient(circle at 40% 40%, var(--accent-color) 0%, transparent 60%), /* Luce principale */
        radial-gradient(circle at 80% 80%, var(--accent-alt) 0%, transparent 70%), /* Luce secondaria */
        rgba(20, 20, 25, 0.4); /* Base scura vetro */
        
    box-shadow: 
        inset 10px 10px 30px rgba(255, 255, 255, 0.15),
        inset -10px -10px 30px rgba(0, 0, 0, 0.8);
        
    will-change: transform, opacity;
    transform-origin: center center;
    z-index: 2;
    
    /* Manteniamo solo il morphing del bordo, leggerissimo per la GPU */
    animation: morphWatery 8s ease-in-out infinite alternate;
}

.glass-bubble-container:hover .glass-bubble {
    animation-duration: 1.5s;
    box-shadow: inset 10px 10px 30px rgba(255, 255, 255, 0.2),
        inset -10px -10px 30px rgba(0, 0, 0, 0.6);
}


@keyframes floatingBubble {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    100% {
        transform: translateY(-70px) rotate(25deg) scale(1.05);
    }
}

@keyframes morphWatery {
    0% { border-radius: 45% 55% 42% 58% / 55% 45% 55% 45%; }
    25% { border-radius: 55% 45% 55% 45% / 45% 55% 45% 55%; }
    50% { border-radius: 48% 52% 48% 52% / 52% 48% 52% 48%; }
    75% { border-radius: 52% 48% 55% 45% / 48% 52% 45% 55%; }
    100% { border-radius: 45% 55% 42% 58% / 55% 45% 55% 45%; }
}


/* Services Section */


.services {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.section-header {
    text-align: center;
    margin-bottom: 1.5rem !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.section-header h2 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
}

.section-header p {
    color: var(--text-secondary);
    max-width: 600px;
    font-size: 1.1rem;
    margin-top: 0.5rem !important;
}

.mobile-experience-slider {
    min-height: 550px;
}

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

.service-card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    border-radius: 30px;
    z-index: 1;
    /* For gradient logic */
}

/* Dynamic gradient for service cards */
.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg,
            transparent 0%,
            var(--accent-color) 20%,
            var(--accent-alt) 50%,
            var(--accent-color) 80%,
            transparent 100%);
    animation: rotateBadgeGlow 10s linear infinite;
    z-index: -1;
    opacity: 0;
    filter: blur(25px);
    transition: opacity 0.4s ease;
}

.service-card:hover::before {
    opacity: 0.4;
}

.service-card::after {
    content: '';
    position: absolute;
    inset: 1px;
    background: rgba(15, 15, 18, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 30px;
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.card-glow {
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    background-image:
        radial-gradient(circle, var(--accent-glow) 0%, transparent 70%),
        url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0H0v20h20V0zM1 19V1h18v18H1z' fill='%23ffffff' fill-opacity='0.05'/%3E%3C/svg%3E");
    border-radius: 50%;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;

    /* X-Ray / Wireframe Masking logic */
    -webkit-mask-image: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), black 0%, transparent 100%);
    mask-image: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), black 0%, transparent 100%);
}

.service-card:hover .card-glow {
    opacity: 1;
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--text-primary);
}

.service-card h3 {
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-secondary);
    flex-grow: 1;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags span {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* About Section */
.about {
    position: relative;
    z-index: 10;
}

.about-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 5rem;
    align-items: center;
    position: relative;
    z-index: 10;
}

.about-image {
    flex: 1;
    aspect-ratio: 4/5;
    border-radius: 30px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-placeholder {
    font-size: 10rem;
    color: rgba(255, 255, 255, 0.1);
}

.floating-badge {
    position: absolute;
    padding: 0.8rem 1.5rem;
    border-radius: 100px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: floatingObj 4s ease-in-out infinite alternate;
}

.badge-1 {
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}

.badge-2 {
    bottom: 20%;
    right: -10%;
    animation-delay: -2s;
}

@keyframes floatingObj {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-15px);
    }
}

.about-content {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-content h2 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
}

.lead {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--accent-color);
}

.about-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.stats-row {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stat-item {
    flex: 1;
    padding: 1.5rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-primary);
}

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

/* Certifications */
.certifications-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    max-width: 900px;
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.light-mode .cert-item {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

.cert-item i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.cert-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

/* Contact Section */
.contact {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 8rem;
}

.contact-card {
    padding: 4rem;
    border-radius: 40px;
    display: flex;
    gap: 4rem;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-info h2 {
    font-size: 2.5rem;
}

.contact-info p {
    color: var(--text-secondary);
}

.contact-list {
    list-style: none;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.contact-list i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.social-links {
    margin-top: auto;
    display: flex;
    gap: 1rem;
}

.glass-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.glass-icon:hover {
    background: var(--accent-color);
    color: #000;
    transform: translateY(-5px);
}

.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-details-only {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cta-message {
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--text-primary);
    text-align: center;
    max-width: 500px;
    font-weight: 500;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 1.2rem 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition-smooth);
    outline: none;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 4px rgba(223, 254, 0, 0.1);
}

.input-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
footer {
    padding: 1rem 5%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.footer-content p {
    color: var(--text-secondary);
}

/* Scroll Reveal Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--delay, 0s);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.active,
.reveal-left.active,
.reveal-right.active {
    opacity: 1;
    transform: translate(0);
}

/* Delay modifiers */
.reveal-up[style*="--delay"] {
    transition-delay: var(--delay, 0s);
}

/* 3D Experience Slider */
.slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto !important;
    perspective: 2000px;
    /* Strong perspective for 3D effect */
    padding: 2rem 0;
}

.experience-slider {
    position: relative;
    height: 450px;
    /* Fixed height for consistent 3D staging */
    width: 100%;
    transform-style: preserve-3d;
}

.slider-wrapper .timeline-item {
    position: absolute;
    padding: 2.5rem;
    top: 50%;
    left: 50%;
    width: 100%;
    max-width: 700px;
    margin: 0;
    transform: translate(-50%, -50%);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    backface-visibility: hidden;
    opacity: 0;
    pointer-events: none;
    padding: 3rem;
    /* More breathing room */
    min-height: 420px;
    /* Taller for detailed content */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Start from top to handle more text */
    text-align: left;
}

/* 3D Intersecting States */
.slider-wrapper .timeline-item.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) translateZ(200px);
    z-index: 10;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.slider-wrapper .timeline-item.prev {
    opacity: 0.6;
    pointer-events: auto;
    transform: translate(-95%, -50%) translateZ(0) rotateY(35deg) scale(0.9);
    z-index: 5;
}

.slider-wrapper .timeline-item.next {
    opacity: 0.6;
    pointer-events: auto;
    transform: translate(-5%, -50%) translateZ(0) rotateY(-35deg) scale(0.9);
    z-index: 5;
}

.slider-wrapper .timeline-item.hidden-left {
    transform: translate(-150%, -50%) translateZ(-300px) rotateY(45deg);
    opacity: 0;
}

.slider-wrapper .timeline-item.hidden-right {
    transform: translate(50%, -50%) translateZ(-300px) rotateY(-45deg);
    opacity: 0;
}

/* Intersecting effect highlight */
.slider-wrapper .timeline-item.prev::after,
.slider-wrapper .timeline-item.next::after {
    background: rgba(40, 40, 45, 0.95);
    /* Slightly darker for overlap contrast */
}

/* Nav Buttons */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 20;
    transition: var(--transition-smooth);
}

.slider-nav:hover {
    background: var(--accent-color);
    color: #000;
}

.slider-nav.prev {
    left: -20px;
}

.slider-nav.next {
    right: -20px;
}

/* Mobile refinement for slider */
@media (max-width: 768px) {
    .experience-slider {
        height: 550px;
    }

    .slider-wrapper .timeline-item {
        padding: 2rem !important;
        width: 85%;
    }

    .service-card {
        padding: 2rem !important;
    }

    .slider-wrapper .timeline-item.prev {
        transform: translate(-105%, -50%) translateZ(-100px) rotateY(20deg) scale(0.8);
    }

    .slider-wrapper .timeline-item.next {
        transform: translate(5%, -50%) translateZ(-100px) rotateY(-20deg) scale(0.8);
    }

    .slider-nav {
        display: none;
        /* Dots are enough for mobile */
    }
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1rem !important;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.dot.active {
    background: var(--accent-color);
    width: 30px;
    border-radius: 10px;
}

.timeline-date {
    font-size: 1rem;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(223, 254, 0, 0.1);
    border-radius: 100px;
    border: 1px solid rgba(223, 254, 0, 0.2);
    width: fit-content;
}

.timeline-item h3 {
    font-size: 1.8rem;
    margin-top: 1rem;
    margin-bottom: 0.2rem;
}

.timeline-item h4 {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.timeline-item p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Testimonial Specific Styles */
.testimonial-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.testimonial-content .service-icon {
    width: 70px;
    height: 70px;
    font-size: 2.5rem;
    background: var(--accent-glow);
    color: var(--accent-color);
    border: none;
    margin-bottom: 0.5rem;
}

.testimonial-content p {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.7;
}

.testimonial-author {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Text alignment utilities */
.text-center {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 15vh;
    }

    .hero-content {
        align-items: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .about-container {
        flex-direction: column;
        gap: 3rem;
    }

    .contact-card {
        flex-direction: column;
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --gap-section: 4rem;
        --gap-header-content: 1rem;
    }

    body {
        line-height: 1.5;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        /* Full screen width */
        height: 100vh;
        background: rgba(15, 15, 15, 0.95);
        backdrop-filter: blur(40px) saturate(200%);
        -webkit-backdrop-filter: blur(40px) saturate(200%);
        display: none; /* Inizia nascosto per non creare overflow */
        visibility: hidden; /* Sicurezza extra anti-overflow */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transition: var(--transition-smooth);
        z-index: 1050;
        /* Above navbar but below toggle */
        border-left: none;
    }

    .light-mode .nav-links {
        background: rgba(245, 245, 247, 0.95);
        border-left: none;
    }

    .nav-links.active {
        right: 0;
        display: flex; /* Torna visibile quando attivo */
        visibility: visible;
    }

    .nav-links a:not(.btn-primary-sm) {
        font-size: 1.5rem;
        color: var(--text-primary);
    }

    .menu-toggle {
        display: block;
        z-index: 1002;
        position: relative;
    }

    section {
        padding: var(--gap-section) 5% 0;
    }

    .hero-content {
        margin-top: 0 !important;
        gap: 0 !important;
    }

    .badge {
        margin-bottom: 0.5rem !important;
    }

    .hero-title {
        line-height: 1.15;
        margin-bottom: 0.5rem !important;
    }

    .hero-subtitle {
        margin-bottom: 1.5rem !important;
    }

    .hero-cta {
        gap: 0.8rem !important;
    }

    .glass-bubble {
        left: 50% !important;
        right: auto !important;
        top: 110px !important; /* Posizionata sotto il menu e sopra il badge */
        width: 80vw !important;
        max-width: 400px !important;
        z-index: -1 !important;
        transform: translate3d(-50%, -50%, 0); /* Rimuginato !important per permettere a JS di aggiornare la scala/posizione */
        /* Fondamentale: rimuovere transizioni sul transform per evitare lag con il JS */
        transition: opacity 0.5s ease !important;
        will-change: transform;
    }

    .glass-bubble-container {
        z-index: -1 !important; /* Sempre DIETRO i contenuti */
        pointer-events: none !important;
        overflow: hidden !important;
        width: 100vw !important;
    }
    /* Protezione Layering Sezioni */
    .hero, .services, .tech-stack, .about, .contact, .experiences, .vision-console {
        position: relative !important;
        z-index: 10 !important;
    }

    /* NATIVE HORIZONTAL SLIDER (App-Experience) */
    .bento-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0 10% 2rem 10% !important;
        gap: 0; /* Rimozione gap per usare il margin sulle card */
        margin: 0;
    }

    .bento-grid .service-card {
        flex: 0 0 85% !important;
        max-width: none !important;
        scroll-snap-align: center !important;
        margin: 0 10px !important;
    }

    .bento-grid::-webkit-scrollbar {
        display: none !important;
    }

    .bento-grid {
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
    }

    /* Slider Mobile Safeguard */
    .experience-slider {
        min-height: 550px !important;
    }

    .stats-row {
        flex-direction: column;
    }

    .floating-badge {
        display: none;
    }

    .terminal-trigger {
        right: 20px !important;
        left: auto !important;
        bottom: 20px !important;
        z-index: 2000;
    }

    .side-actions-bar {
        left: 20px !important;
        right: auto !important;
        bottom: 20px !important;
        top: auto !important;
        transform: none;
    }
}

/* Infinite Marquee */
.marquee-container {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem 0;
    overflow: hidden;
    transform: rotate(-2deg) scale(1.05);
    z-index: 50;
    position: relative;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .marquee-container {
        width: 100% !important;
        margin-left: 0 !important;
        transform: none !important;
        left: 0 !important;
    }
}

.light-mode .marquee-container {
    background: rgba(0, 0, 0, 0.03);
}

.marquee-content {
    display: inline-block;
    animation: marquee 30s linear infinite;
}

.marquee-content span {
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text-primary);
    padding-right: 2rem;
    letter-spacing: 2px;
}

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

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

/* Bento Grid Layout */
.bento-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    max-width: 1200px;
    margin: 0 auto;
}

.tech-stack {
    position: relative;
    z-index: 10;
}

.tech-stack .service-card {
    height: 100%;
}

.tech-stack .service-card .tags {
    margin-top: 1.5rem;
}

/* AI Terminal Easter Egg */
.terminal-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    left: auto;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    color: var(--accent-color);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    transition: var(--transition-smooth);
    box-shadow: var(--glass-shadow);
    padding: 0;
}

.terminal-trigger span {
    position: absolute;
    font-family: monospace;
    font-size: 0.7rem;
    font-weight: bold;
    bottom: 12px;
}

.terminal-trigger:hover {
    transform: scale(1.1);
    border-color: var(--accent-color);
}

/* Section Spacing Optimization */
.contact {
    padding-top: 5rem;
}


/* AI Terminal / CLI Simulation */
.terminal-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%) scale(0.9);
    width: 600px;
    max-width: 90vw;
    height: 450px;
    max-height: 70vh;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
    background: rgba(10, 10, 12, 0.95);
    border-radius: 12px;
    overflow: hidden;
}

.terminal-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.terminal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-title {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.terminal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
}

.terminal-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.5;
}

.terminal-line {
    margin-bottom: 0.5rem;
    display: block;
}

.terminal-footer {
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-prompt {
    color: var(--accent-color);
    font-family: monospace;
    font-weight: bold;
}

#terminal-input {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    font-family: monospace;
    outline: none;
    font-size: 0.9rem;
}

#terminal-send {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 1.1rem;
}


/* --- Added Interactive Features --- */

/* Magic Word Interaction */
.magic-word {
    text-decoration: none; /* Removed underline for marquee items */
    cursor: help;
    transition: var(--transition-smooth);
    color: inherit;
    display: inline-block;
}

.magic-word:hover {
    color: var(--accent-color);
}

/* Magic Lens Skill Panel Styling */
.magic-lens {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: auto;
    min-width: 250px;
    height: auto;
    border-radius: 20px;
    opacity: 0;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.5rem;
    background: rgba(10, 10, 12, 0.9);
    
    /* Advanced Refraction Simulation */
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    
    /* Polished Glass Border & Shadow */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.6), 
        inset 0 0 10px rgba(255, 255, 255, 0.05);
    
    transition: 
        opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
        visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.1s linear;
    transform-origin: top left;
}

.magic-lens.active {
    opacity: 1;
    visibility: visible;
}

.lens-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lens-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lens-skills span {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Prompt Theme Container Styling */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.prompt-theme-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    font-family: 'Courier New', Courier, monospace;
    backdrop-filter: blur(5px);
}

.light-mode .prompt-theme-container {
    background: rgba(0, 0, 0, 0.05);
}

.prompt-prefix {
    color: var(--accent-color);
    margin-right: 0.8rem;
    font-weight: bold;
}

#theme-prompter {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    width: 220px;
    outline: none;
}

#theme-prompter::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Scramble Text Styles */
.scramble-char {
    color: var(--accent-color);
    opacity: 0.7;
    font-family: inherit;
}

/* Vision Console Styles */
.vision-console {
    display: flex;
    flex-direction: column;
    max-width: 1000px;
    margin: 2rem auto 4rem auto;
    padding: 0;
    overflow: hidden;
    text-align: left;
}

@media (min-width: 768px) {
    .vision-console {
        flex-direction: row;
    }
}

.console-left {
    flex: 1;
    background: rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.console-right {
    flex: 1.8;
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profile-meta h3 { font-size: 1.5rem; margin-bottom: 0.2rem; }
.role-badge { font-size: 0.85rem; color: var(--accent-color); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.meta-icon i { font-size: 2.5rem; color: var(--text-primary); margin-bottom: 1rem; opacity: 0.8; }

.cert-title { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); margin-bottom: 1rem; }
.cert-stack { display: flex; flex-direction: column; gap: 0.8rem; }
.cert-pill { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; color: var(--text-primary); opacity: 0.9; }
.cert-pill i { color: var(--accent-color); font-size: 1.1rem; }

.vision-title { 
    font-size: clamp(1.8rem, 2.5vw, 2.4rem); 
    font-weight: 700; 
    color: var(--text-primary); 
    margin-bottom: 1.5rem; 
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.vision-title .accent-word {
    color: var(--accent-color);
}
.console-right p { font-size: 1.05rem; line-height: 1.7; color: var(--text-secondary); margin-bottom: 1rem; }
.console-right p:last-child { margin-bottom: 0; }
.console-right strong { color: var(--text-primary); font-weight: 500; }


