/* =====================================
   VARIABLES & RESET
   ===================================== */
:root {
    /* Colors — Professional Dark Theme */
    --primary-color: #FF9900; /* accent orange */
    --secondary-color: #22D3EE; /* cyan accent */
    --accent-color: #FF9900;
    --dark-bg: #0f1115;
    --dark-surface: #121621;
    --dark-card: #161A24;
    --light-bg: #ffffff;
    --light-surface: #f8f8f8;
    --text-primary: #E6E6E9;
    --text-secondary: #A7B0C0;
    --text-dark: #0f1115;
    --border-color: rgba(230, 230, 233, 0.12);

    /* Gradients (subtle only) */
    --gradient-primary: linear-gradient(90deg, #FF9900 0%, #22D3EE 100%);
    --gradient-accent: linear-gradient(90deg, rgba(255,153,0,0.2), rgba(34,211,238,0.2));
    --gradient-mesh: none;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    --spacing-2xl: 8rem;

    /* Typography */
    --font-primary: 'Inter', 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    --font-display: 'Inter', 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Shadows — soft and modern */
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 16px 36px rgba(0, 0, 0, 0.40);
    --shadow-glow: 0 0 20px rgba(255, 153, 0, 0.25);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    --transition-spring: 300ms cubic-bezier(.2,.8,.2,1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-tap-highlight-color: rgba(255, 153, 0, 0.2);
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    background-color: var(--light-bg);
    background-image: none;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

body::before { display: none; }

/* Safari mobile fix */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
}

/* Touch optimization */
a, button, input, textarea, select {
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2);
    touch-action: manipulation;
}

/* Prevent input zoom on iOS */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* =====================================
   PRELOADER
   ===================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(18, 22, 33, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

/* Nascondi l'header durante il preloader */
#preloader ~ #navbar {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#preloader.loaded ~ #navbar {
    opacity: 1 !important;
    visibility: visible !important;
}

.loader-container {
    text-align: center;
}

.loader-logo {
    width: 180px;
    height: 180px;
    margin: 0 auto 3rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

/* 3D Spinner */
.loader { 
     position: relative; 
     width: 120px; 
     height: 14px; 
     border-radius: 0 0 15px 15px; 
     background-color: #3e494d; 
     box-shadow: 0 -1px 4px #5d6063 inset; 
     animation: panex 0.5s linear alternate infinite; 
     transform-origin: 170px 0; 
     z-index: 10; 
     perspective: 300px; 
     margin: 20px auto;
     display: inline-block;
 } 
 .loader::before { 
   content: ''; 
   position: absolute; 
   left: calc( 100% - 2px); 
   top: 0; 
   z-index: -2; 
   height: 10px; 
   width: 70px; 
   border-radius: 0 4px 4px 0; 
   background-repeat: no-repeat; 
   background-image: linear-gradient(#6c4924, #4b2d21), linear-gradient(#4d5457 24px, transparent 0), linear-gradient(#9f9e9e 24px, transparent 0); 
   background-size: 50px 10px , 4px 8px , 24px 4px; 
   background-position: right center , 17px center , 0px center; 
 } 
   .loader::after { 
     content: ''; 
     position: absolute; 
     left: 50%; 
     top: 0; 
     z-index: -2; 
     transform: translate(-50% , -20px) rotate3d(75, -2, 3, 78deg); 
     width: 55px; 
     height: 53px; 
     background: #fff; 
     background-image: 
     radial-gradient(circle 3px , #fff6 90%, transparent 10%), 
     radial-gradient(circle 12px , #ffc400 90%, transparent 10%), 
     radial-gradient(circle 12px , #ffae00 100%, transparent 0); 
     background-repeat: no-repeat; 
     background-position: -4px -6px , -2px -2px , -1px -1px; 
     box-shadow: -2px -3px #0002 inset, 0 0 4px #0003 inset; 
     border-radius: 47% 36% 50% 50% / 49% 45% 42% 44%; 
     animation: eggRst 1s ease-out infinite; 
   } 
 
 @keyframes eggRst { 
   0% ,  100%{  transform: translate(-50%, -20px) rotate3d(90, 0, 0, 90deg); opacity: 0; } 
   10% , 90% {  transform: translate(-50%, -30px) rotate3d(90, 0, 0, 90deg); opacity: 1; } 
   25%  {transform:  translate(-50% , -40px) rotate3d(85, 17, 2, 70deg) } 
   75% {transform:  translate(-50% , -40px) rotate3d(75, -3, 2, 70deg) } 
   50% {transform:  translate(-55% , -50px) rotate3d(75, -8, 3, 50deg) } 
 } 
 @keyframes panex { 
   0%{  transform: rotate(-5deg)  } 
   100%{  transform: rotate(10deg)  } 
 }

@keyframes swing {
    50% {
        transform: rotate(-3deg);
    }
}

@keyframes steamLarge {
    0% {
        stroke-dashoffset: 13;
        opacity: .6;
    }
    100% {
        stroke-dashoffset: 39;
        opacity: 0;
    }
}

@keyframes steamSmall {
    10% {
        stroke-dashoffset: 9;
        opacity: .6;
    }
    80% {
        stroke-dashoffset: 27;
        opacity: 0;
    }
    100% {
        stroke-dashoffset: 27;
        opacity: 0;
    }
}

.spinner > div {
    background-color: var(--clr-alpha);
    height: 100%;
    position: absolute;
    width: 100%;
    border: 2.5px solid var(--clr);
    box-shadow: none;
}

.spinner div:nth-of-type(1) {
    transform: translateZ(-35.2px) rotateY(180deg);
}

.spinner div:nth-of-type(2) {
    transform: rotateY(-270deg) translateX(50%);
    transform-origin: top right;
}

.spinner div:nth-of-type(3) {
    transform: rotateY(270deg) translateX(-50%);
    transform-origin: center left;
}

.spinner div:nth-of-type(4) {
    transform: rotateX(90deg) translateY(-50%);
    transform-origin: top center;
}

.spinner div:nth-of-type(5) {
    transform: rotateX(-90deg) translateY(50%);
    transform-origin: bottom center;
}

.spinner div:nth-of-type(6) {
    transform: translateZ(35.2px);
}

@keyframes spinner {
    0% {
        transform: rotate(45deg) rotateX(-25deg) rotateY(25deg);
    }
    50% {
        transform: rotate(45deg) rotateX(-385deg) rotateY(25deg);
    }
    100% {
        transform: rotate(45deg) rotateX(-385deg) rotateY(385deg);
    }
}

/* =====================================
   NAVIGATION
   ===================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 10000;
    transition: background var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
    border-bottom: none;
    overflow: visible;
    box-shadow: none;
}

.navbar.scrolled {
    padding: 0;
    background: rgba(18, 22, 33, 0.85);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10001;
    overflow: visible;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-container {
    position: relative;
    padding: 6px 10px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    transition: border-color var(--transition-base), transform var(--transition-base);
    box-shadow: none;
}

.logo-container:hover {
    border-color: rgba(255, 153, 0, 0.5);
    transform: translateY(-1px);
}

.logo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.15), rgba(255, 165, 0, 0.15));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.logo-link {
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    transition: color var(--transition-base);
}

.logo-image {
    height: 60px;
    width: auto;
    transition: transform var(--transition-base), filter var(--transition-base);
    filter: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.logo-link:hover .logo-image {
    transform: translateY(-1px) scale(1.02);
    filter: drop-shadow(0 0 0 rgba(0,0,0,0));
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
    text-shadow: none;
    text-transform: none;
    letter-spacing: 0.2px;
    font-size: 15px;
    padding: 8px 0;
    background: transparent;
    border: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0%;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mantieni contrasto quando la navbar è scrolled (sfondo scuro) */
.navbar.scrolled .nav-link {
    color: var(--primary-color);
}
.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.theme-toggle {
    background: none;
    border: none;
    color: #c0c0d0;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color var(--transition-base);
}

.theme-toggle:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 10002;
    gap: 5px;
    background: none;
    border: none;
    padding: 0;
}

.hamburger span {
    width: 26px;
    height: 3px;
    background: var(--text-secondary);
    margin: 0;
    transition: transform var(--transition-base), opacity var(--transition-base);
    border-radius: 3px;
    box-shadow: none;
    border: none;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* =====================================
   HERO SECTION
   ===================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    position: relative;
    overflow: hidden;
    padding: 8rem 2rem 1.5rem;
    background-color: #ffffff;
    opacity: 1;
}

/* Media Queries Responsive per Hero Section */
@media (max-width: 767px) {
    .hero {
        min-height: 100vh;
        background-color: #fff;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero {
        background-size: cover;
        background-position: center 45%;
        min-height: 100vh;
    }
}

@media (min-width: 1024px) {
    .hero {
        background-size: contain;
        background-position: center 50%;
        min-height: 100vh;
        background-color: #fff;
    }
}

.hero-bg {
    display: none;
}

.hero-gradient {
    display: none;
}

.hero-mesh {
    display: none;
}

@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-5%, 5%); }
    50% { transform: translate(5%, -5%); }
    75% { transform: translate(-5%, -5%); }
}

@keyframes meshFloat {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(1deg); }
    50% { transform: scale(1) rotate(-1deg); }
    75% { transform: scale(0.95) rotate(1deg); }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.hero-text {
    animation: fadeInUp 1s ease;
    max-width: 800px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 153, 0, 0.1);
    border: 1px solid rgba(255, 153, 0, 0.3);
    border-radius: 50px;
    margin-bottom: 2rem;
}

.badge-text {
    font-size: 0.85rem;
    color: var(--primary-color);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.hero-title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 1rem;
    position: relative;
    letter-spacing: -0.02em;
    color: #fff;
    background: linear-gradient(90deg, #ffffff 0%, #FF9900 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glitch {
    position: relative;
    text-shadow: 0 0 10px rgba(255, 153, 0, 0.5);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch:hover::before {
    animation: glitch-1 0.3s ease infinite;
    color: #FFA500;
    opacity: 0.8;
    z-index: -1;
}

.glitch:hover::after {
    animation: glitch-2 0.3s ease infinite;
    color: #FF9900;
    opacity: 0.8;
    z-index: -2;
}

@keyframes glitch-1 {
    0% { clip-path: inset(20% 0 30% 0); transform: translate(-2px, 2px); }
    20% { clip-path: inset(50% 0 20% 0); transform: translate(2px, -2px); }
    40% { clip-path: inset(80% 0 5% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(10% 0 60% 0); transform: translate(2px, -2px); }
    80% { clip-path: inset(40% 0 40% 0); transform: translate(-2px, 2px); }
    100% { clip-path: inset(60% 0 20% 0); transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
    0% { clip-path: inset(60% 0 20% 0); transform: translate(2px, -2px); }
    20% { clip-path: inset(30% 0 50% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(10% 0 80% 0); transform: translate(2px, -2px); }
    60% { clip-path: inset(50% 0 30% 0); transform: translate(-2px, 2px); }
    80% { clip-path: inset(20% 0 60% 0); transform: translate(2px, -2px); }
    100% { clip-path: inset(40% 0 40% 0); transform: translate(-2px, 2px); }
}

.gradient-text { color: inherit; text-shadow: none; }

.hero-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: transparent;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
    justify-content: center;
}

.hero .btn {
    padding: 0.8rem 1.5rem !important;
    font-size: 0.9rem !important;
    border-width: 2px !important;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8) !important;
}

.hero .btn:hover {
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8) !important;
    transform: translateY(-2px) !important;
}

.btn {
    padding: 0.9rem 1.6rem;
    border-radius: 0;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: none;
    position: relative;
    overflow: visible;
    background: #ffffff;
    color: #1a1a1a !important;
    border: 2px solid #1a1a1a;
    cursor: pointer;
    text-shadow: none;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
}

.btn:hover,
.btn:active {
    transform: none;
    background: #ffffff;
    border-color: #1a1a1a;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8);
}

.btn-primary {
    background: #ffffff;
    color: #1a1a1a !important;
    border: 2px solid #1a1a1a;
    text-shadow: none;
}

.btn-primary:hover,
.btn-primary:active {
    background: #ffffff;
    border-color: #1a1a1a;
}

.btn-glass {
    background: #ffffff;
    border: 2px solid #1a1a1a;
    color: #1a1a1a !important;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
}

.btn-glass:hover { background: #ffffff; border-color: #1a1a1a; box-shadow: 5px 5px 0px rgba(0,0,0,0.8); }

.btn-outline {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border: 2px solid #1a1a1a;
    filter: none;
    text-shadow: none;
    box-shadow: 3px 3px 0px rgba(0,0,0,0.8);
}

.btn-outline:hover,
.btn-outline:active {
    color: #1a1a1a !important;
    background: #ffffff;
    border-color: #1a1a1a;
    box-shadow: 5px 5px 0px rgba(0,0,0,0.8);
}

/* Bottone Contattami nella hero */
.hero .btn-outline {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border: 2px solid #1a1a1a !important;
    text-shadow: none !important;
    box-shadow: 3px 3px 0px rgba(0,0,0,0.8) !important;
}

.hero .btn-outline:hover,
.hero .btn-outline:active {
    background: #ffffff !important;
    border-color: #1a1a1a !important;
    box-shadow: 5px 5px 0px rgba(0,0,0,0.8) !important;
}

.hero-scroll {
    margin-top: 2rem;
}

/* =====================================
   SECTIONS
   ===================================== */
section {
    padding: var(--spacing-2xl) 0;
    position: relative;
    background-color: transparent;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    background: #ffffff;
    padding: 1.5rem;
    position: relative;
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: clamp(300px, 90vw, 720px);
    border: 2px solid #1a1a1a;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.8);
    border-radius: 0;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--transition-base), transform var(--transition-base);
}

.section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none; /* Rimuove l'overlay per intestazioni pulite e coerenti */
}

.section-header > * {
    position: relative;
    z-index: 1;
}

.section-header.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes popUp {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.section-tag {
    font-family: var(--font-mono);
    color: var(--primary-color);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.9;
}

.section-title {
    font-size: clamp(2.25rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
    font-family: var(--font-primary);
    color: #1a1a1a;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-wrap: balance;
    text-shadow: none;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    text-shadow: none;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.7;
    letter-spacing: 0.01em;
    text-wrap: pretty;
}

/* =====================================
   ABOUT SECTION
   ===================================== */
.about {
    background: transparent;
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 153, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
    max-width: 400px;
    margin: 2rem auto 0 auto;
}

.image-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.image-frame {
    position: relative;
    width: 320px;
    height: 200px;
    margin: 0 auto;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.image-frame:hover img {
    transform: scale(1.05);
}

.image-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.deco-circle {
    position: absolute;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
}

.circle-1 {
    width: 100px;
    height: 100px;
    top: -20px;
    right: -20px;
    animation: rotate 10s linear infinite;
}

.circle-2 {
    width: 60px;
    height: 60px;
    bottom: -10px;
    left: -10px;
    animation: rotate 8s linear infinite reverse;
}

.deco-dots {
    position: absolute;
    bottom: 20px;
    right: -60px;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, var(--primary-color) 2px, transparent 2px);
    background-size: 20px 20px;
    opacity: 0.2;
}

.about-text {
    padding-left: 2rem;
}

.about-greeting {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.about-bio {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #1a1a1a;
    margin-bottom: 2rem;
}

.about-bio strong {
    color: #1a1a1a;
    font-weight: 700;
}

.about-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 3rem 0;
}

.detail-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 0;
    border: 2px solid #1a1a1a;
    transition: none;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
}

.detail-item:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8);
}

.detail-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.detail-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #1a1a1a;
}

.detail-item p {
    font-size: 0.85rem;
    color: #1a1a1a;
}

.about-cta {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 2px solid #1a1a1a;
    border-radius: 50%;
    color: #1a1a1a;
    transition: all var(--transition-base);
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
}

.social-link:hover {
    background: var(--primary-color);
    border: 2px solid #1a1a1a;
    color: white;
    transform: translateY(-2px) rotate(360deg);
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8);
}

/* =====================================
   SKILLS SECTION
   ===================================== */
.skills {
    background: transparent;
}

.skills-categories {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.skill-category {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    border: 2px solid #1a1a1a;
    box-shadow: var(--shadow-md);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #1a1a1a;
}

.category-title i {
    color: var(--primary-color);
}

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

.skill-card {
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 0;
    border: 2px solid #1a1a1a;
    transition: none;
    cursor: pointer;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
}

.skill-card:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.skill-info h4 {
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.skill-level {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.level-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    width: 0;
    transition: width 1.5s ease;
}

.skill-card:hover .level-bar {
    animation: fillBar 1s ease forwards;
}

@keyframes fillBar {
    from { width: 0; }
}

/* =====================================
   PROJECTS SECTION
   ===================================== */
.projects {
    background: transparent;
}

.projects-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: #ffffff;
    border: 2px solid #1a1a1a;
    color: #1a1a1a;
    border-radius: 0;
    cursor: pointer;
    transition: none;
    font-family: inherit;
    font-size: 0.9rem;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
}

.filter-btn:hover {
    background: #ffffff;
    color: #1a1a1a;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8);
}

.filter-btn.active {
    background: var(--gradient-primary);
    border: 2px solid #1a1a1a;
    color: white;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8);
}

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

.project-card {
    background: #ffffff;
    border-radius: 0;
    overflow: hidden;
    transition: none;
    cursor: pointer;
    border: 2px solid #1a1a1a;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8);
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.project-image img,
.project-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-image img,
.project-card:hover .project-video {
    transform: scale(1.1);
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

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

.overlay-content {
    display: flex;
    gap: 1rem;
}

.project-link,
.project-github {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    transition: all var(--transition-base);
    text-decoration: none;
}

.project-link:hover,
.project-github:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-category {
    color: var(--primary-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-title {
    font-size: 1.5rem;
    margin: 0.5rem 0 1rem;
    color: #ffffff;
}

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

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

.tech-tag {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 153, 0, 0.1);
    border: 1px solid rgba(255, 153, 0, 0.3);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.projects-cta {
    text-align: center;
    margin-top: 4rem;
}

/* =====================================
   DESIGN SECTION
   ===================================== */
.design {
    background: transparent;
}

.design-showcase {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

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

.design-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    background: var(--dark-card);
    border: 1px solid var(--border-color);
}

.design-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.design-wrapper {
    position: relative;
    height: 300px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.design-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    background: var(--dark-surface);
}

.design-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    background: var(--dark-surface);
}

.gomme-nuove-zoom .design-wrapper img {
    transform: scale(1.5);
}

.design-item:hover .design-wrapper img {
    transform: scale(1.1);
}

.design-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(180deg, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.55) 100%);
    transform: translateY(100%);
    transition: transform var(--transition-base);
}

.design-item:hover .design-info {
    transform: translateY(0);
}

.design-info h3 {
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.design-info p {
    color: #ffffff;
    font-size: 0.9rem;
}

.design-process {
    background: var(--dark-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.process-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #1a1a1a;
}

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

.process-step {
    text-align: center;
    padding: 2rem;
    background: #ffffff;
    border-radius: 0;
    transition: none;
    border: 2px solid #1a1a1a;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
}

.process-step:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8);
}

.step-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    font-size: 2rem;
    color: white;
}

.process-step h4 {
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.process-step p {
    color: #1a1a1a;
    font-size: 0.9rem;
}

/* =====================================
   CONTACT SECTION
   ===================================== */
.contact {
    background: transparent;
    padding-bottom: 6rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    padding: 2rem;
}

.info-intro {
    margin-bottom: 3rem;
}

.info-intro h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.info-intro p {
    color: #1a1a1a;
    line-height: 1.8;
}

.info-items {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.info-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 50%;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
}

.info-text h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.info-text a,
.info-text p {
    color: #1a1a1a;
    text-decoration: none;
    transition: color var(--transition-base);
}

.info-text a:hover {
    color: var(--primary-color);
}

.info-social h4 {
    margin-bottom: 1rem;
}

.contact-form {
    background: #ffffff;
    padding: 3rem;
    border-radius: 0;
    border: 2px solid #1a1a1a;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid #1a1a1a;
    color: #1a1a1a;
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 0;
    color: #1a1a1a;
    transition: all var(--transition-base);
    pointer-events: none;
}

.form-group input:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:valid ~ label,
.form-group select:focus ~ label,
.form-group select:valid ~ label {
    top: -0.5rem;
    font-size: 0.85rem;
    color: var(--primary-color);
}

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.form-group input:focus ~ .form-line,
.form-group textarea:focus ~ .form-line,
.form-group select:focus ~ .form-line {
    width: 100%;
}

.btn-submit {
    width: 100%;
    justify-content: center;
    margin-top: 2rem;
    font-size: 1.1rem;
}

.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    display: none;
}

.form-status.success {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
    display: block;
}

.form-status.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    display: block;
}

/* =====================================
   FOOTER
   ===================================== */
.footer {
    background: transparent;
    border-top: 2px solid #1a1a1a;
    padding: 3rem 0 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.footer-brand {
    text-align: center;
}

.footer-logo {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    cursor: pointer;
}

.footer-logo-card {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.15), rgba(255, 165, 0, 0.15));
    border: 2px solid rgba(255, 153, 0, 0.5);
    border-radius: 15px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.footer-logo-card:hover {
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.25), rgba(255, 165, 0, 0.25));
    border-color: rgba(255, 153, 0, 0.9);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 32px rgba(255, 153, 0, 0.5),
    0 0 40px rgba(255, 153, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.footer-logo-card:active {
    transform: translateY(-4px) scale(1.02);
}

.footer-logo-image {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    display: block;
}

.footer-logo-fallback {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: white;
    text-shadow: 0 0 10px rgba(255, 153, 0, 0.5);
}

.footer-tagline {
    color: #1a1a1a;
    font-size: 0.9rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.footer-column h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1a1a1a;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-column a {
    display: block;
    color: #1a1a1a;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color var(--transition-base);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 2px solid #1a1a1a;
}

.footer-bottom p {
    color: #1a1a1a;
    font-size: 0.9rem;
}

.heart {
    color: #ef4444;
    animation: heartbeat 1.5s ease infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: #1a1a1a;
    font-size: 1.2rem;
    transition: all var(--transition-base);
}

.footer-social a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* =====================================
   BACK TO TOP
   ===================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 999;
    box-shadow: 0 5px 15px rgba(255, 153, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 153, 0, 0.4);
}

/* =====================================
   ANIMATIONS
   ===================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

/* =====================================
   RESPONSIVE DESIGN
   ===================================== */

/* Extra large screens */
@media (min-width: 1920px) {
    .container {
        max-width: 1400px;
    }

    .hero-title {
        font-size: 5.5rem;
    }

    .hero-subtitle {
        font-size: 1.8rem;
    }

    .hero-description {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 4rem;
    }

    .btn {
        font-size: 1.1rem;
        padding: 1.2rem 2.5rem;
    }
}

/* Large tablets and small desktops */
@media (max-width: 1200px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-content {
        max-width: 100%;
    }
}

/* Tablets */
@media (max-width: 1024px) {
    :root {
        --spacing-xl: 4rem;
        --spacing-2xl: 6rem;
    }

    .hero {
        padding: 5rem 1.5rem 2rem;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-title {
        font-size: clamp(2.5rem, 6vw, 4rem);
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-text {
        padding-left: 0;
        text-align: center;
    }

    .about-details {
        grid-template-columns: 1fr 1fr;
    }

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

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .design-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    :root {
        --spacing-sm: 0.75rem;
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
        --spacing-2xl: 4rem;
    }

    body {
        background-size: 100px 100px;
    }

    .navbar {
        padding: 0;
    }

    .logo-image {
        height: 48px;
    }

    .nav-menu {
        position: fixed !important;
        left: -100% !important;
        top: 0 !important;
        bottom: 0 !important;
        flex-direction: column;
        background: #ffffff !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        width: 100% !important;
        max-width: none !important;
        height: 100vh !important;
        margin: 0 !important;
        text-align: left;
        transition: left 0.3s ease !important;
        padding: 80px 20px 40px 20px !important;
        border: none !important;
        box-shadow: none !important;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 10002;
    }

    .mobile-logo { display: none; }

    .mobile-logo-container { display: none; }

    .mobile-logo-container:hover { display: none; }

    .mobile-logo-image { display: none; }

    .mobile-logo-link:hover .mobile-logo-image { display: none; }

    /* Mostra il logo mobile quando il menu è attivo */
    .nav-menu.active .mobile-logo {
        display: block;
        position: absolute;
        top: 20px;
        left: 20px;
        z-index: 10004;
    }

    .nav-menu.active .mobile-logo-container {
        display: block;
    }

    .nav-menu.active .mobile-logo-image {
        display: block;
        width: 40px;
        height: 40px;
    }

    .nav-menu::before { content: none !important; display: none !important; }

    .nav-menu.active {
        left: 0 !important;
        display: flex !important;
    }

    body.menu-open .navbar {
        clip-path: none !important;
    }

    .nav-menu.active::before {
        z-index: 10003 !important;
    }

    body::after {
        content: '';
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.2);
        z-index: 9998;
        transition: left 0.4s ease;
        pointer-events: none;
    }

    body.menu-open::after {
        left: 0;
    }

    .nav-menu li {
        position: relative;
        padding: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu li::before {
        display: none;
    }

    .nav-menu .nav-link {
        color: #1a1a1a;
        font-family: 'Inter', sans-serif;
        font-size: 18px;
        font-weight: 600;
        text-shadow: none;
        padding: 16px 12px;
        display: block;
        text-transform: none;
        letter-spacing: 0.2px;
        border: none;
        min-height: 56px;
        display: flex;
        align-items: center;
        transition: background-color 0.2s ease;
    }

    .nav-menu .nav-link::after { display: none; }

    .nav-menu .nav-link:hover,
    .nav-menu .nav-link.active {
        color: #ffffff !important;
        background: var(--primary-color) !important;
        border: none;
        transform: translateX(8px);
    }

    .hamburger {
        display: flex;
        z-index: 10002;
    }

    .hero {
        min-height: 100vh;
        align-items: center;
        padding: 5rem 1rem 2rem;
        background-size: clamp(160px, 60vw, 280px);
        background-position: center 20%;
        justify-content: center;
    }

    .hero-bg {
        background-size: 150px 150px;
    }

    .hero-title {
        font-size: clamp(2.2rem, 9vw, 3.2rem);
        margin-bottom: 1rem;
        line-height: 1.15;
        letter-spacing: -0.01em;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
        margin-top: 1.5rem;
        margin-bottom: 2rem;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
        margin: 2rem 0;
    }

    .stat-item {
        align-items: center;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        margin-top: 2.5rem;
        margin-bottom: 2.5rem;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 54px;
        border-width: 2px !important;
        box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8) !important;
    }

    section {
        padding: 3rem 0;
    }

    .section-header {
    padding: 1rem;
    max-width: clamp(280px, 95vw, 600px);
    margin-bottom: 2.5rem;
}

    .section-title {
        font-size: clamp(28px, 6vw, 36px);
    }

    .section-subtitle {
        font-size: 16px;
    }

    .about-image {
        max-width: 280px;
        margin: 1.5rem auto 0 auto;
    }
    
    .image-frame {
        width: 240px;
        height: 150px;
    }

    .about-details {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-cta {
        flex-direction: column;
        gap: 1.5rem;
    }

    .skill-category {
        padding: 1.5rem;
    }

    .category-title {
        font-size: 1.2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .projects-filter {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .design-gallery {
        grid-template-columns: 1fr;
    }

    .process-steps {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 2rem 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .info-intro h3 {
        font-size: 1.5rem;
    }

    .footer-logo-card {
        padding: 1.2rem 1.5rem;
    }

    .footer-logo-image {
        height: 40px;
    }

    .footer-links {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 6rem 0.75rem 2rem;
        background-size: clamp(120px, 60vw, 200px);
        background-position: center 16%;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .hero-title {
        font-size: clamp(1.75rem, 10vw, 2.5rem);
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.9rem;
        margin-top: 3rem;
    }

    .hero-buttons {
        margin-top: 3.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.85rem;
    }

    .section-header {
        background-size: 100% 100%;
        padding: 30px 40px;
        min-width: 280px;
    }

    .section-title {
        font-size: clamp(24px, 5vw, 32px);
    }

    .section-tag {
        font-size: 0.8rem;
    }

    .section-subtitle {
        font-size: 14px;
    }

    .about-greeting {
        font-size: 1.3rem;
    }

    .about-bio {
        font-size: 1rem;
    }

    .detail-item {
        padding: 1rem;
    }

    .skill-card {
        padding: 1rem;
    }

    .project-card {
        border-radius: 15px;
    }

    .project-content {
        padding: 1.5rem;
    }

    .project-title {
        font-size: 1.3rem;
    }

    .tech-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }

    .contact-form {
        padding: 1.5rem 1rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 0.9rem;
    }

    .footer-logo-card {
        padding: 1rem 1.2rem;
        min-width: 100px;
    }

    .footer-logo-image {
        height: 35px;
    }

    .footer-tagline {
        font-size: 0.85rem;
    }

    .footer-column h4 {
        font-size: 0.85rem;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-buttons {
        gap: 0.75rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }
}

/* Landscape mode on mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 4rem 1rem 2rem;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .hero-stats {
        margin: 1.5rem 0;
        flex-direction: row;
        gap: 2rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .hero-buttons {
        margin-bottom: 2rem;
        flex-direction: row;
        width: auto;
    }

    .btn {
        width: auto;
        padding: 0.7rem 1.5rem;
    }

    section {
        padding: 2rem 0;
    }

    .navbar {
        padding: 0.75rem 0;
    }
}

/* Print styles */
@media print {
    .navbar,
    .hamburger,
    .back-to-top,
    .hero-buttons,
    .contact-form {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .hero {
        min-height: auto;
        page-break-after: always;
    }
}

/* =====================================
   UTILITIES
   ===================================== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Light Theme (Optional) */
body.light-theme {
    background-color: var(--light-bg);
    color: var(--text-dark);
}

body.light-theme .navbar {
    background: rgba(255, 255, 255, 0.8);
}

body.light-theme .hero {
    background: var(--light-bg);
}

body.light-theme .section {
    background: var(--light-surface);
}

body.light-theme .card {
    background: white;
    box-shadow: var(--shadow-md);
}

/* =====================================
   COOKIE CONSENT BANNER - GDPR COMPLIANT
   ===================================== */

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    backdrop-filter: none;
    border-top: 2px solid #1a1a1a;
    padding: 1.5rem 2rem;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 -3px 0 rgba(0, 0, 0, 0.8);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-banner-text h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-banner-text h3 i {
    color: var(--primary-color);
    font-size: 1.4rem;
}

.cookie-banner-text p {
    font-size: 0.95rem;
    color: #1a1a1a;
    line-height: 1.6;
    max-width: 800px;
}

.cookie-banner-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    border: 2px solid #1a1a1a;
    border-radius: 0;
    cursor: pointer;
    transition: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-family: var(--font-primary);
}

.cookie-btn-accept {
    background: #ffffff;
    color: #1a1a1a !important;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
}

.cookie-btn-accept:hover {
    background: #ffffff;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8);
}

.cookie-btn-reject {
    background: #ffffff;
    color: #1a1a1a !important;
    border: 2px solid #1a1a1a;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
}

.cookie-btn-reject:hover {
    background: #ffffff;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8);
}

.cookie-btn-settings {
    background: #ffffff;
    color: #1a1a1a !important;
    border: 2px solid #1a1a1a;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
}

.cookie-btn-settings:hover {
    background: #ffffff;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8);
}

.cookie-btn-primary {
    background: #ffffff;
    color: #1a1a1a !important;
    border: 2px solid #1a1a1a;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
}

.cookie-btn-primary:hover {
    background: #ffffff;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8);
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: none;
}

.cookie-modal-content {
    position: relative;
    background: #ffffff;
    backdrop-filter: none;
    border: 2px solid #1a1a1a;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.8);
    animation: modalSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid #1a1a1a;
}

.cookie-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-modal-header h3 i {
    color: #1a1a1a;
    font-size: 1.6rem;
}

.cookie-modal-close {
    background: #ffffff;
    border: 2px solid #1a1a1a;
    color: #1a1a1a;
    width: 40px;
    height: 40px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: none;
    font-size: 1.2rem;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.8);
}

.cookie-modal-close:hover {
    background: #ffffff;
    box-shadow: 5px 5px 0 rgba(0,0,0,0.8);
}

.cookie-modal-body {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 200px);
    color: #1a1a1a;
}

.cookie-modal-intro {
    font-size: 1rem;
    color: #1a1a1a;
    line-height: 1.6;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #ffffff;
    border-left: 3px solid #1a1a1a;
    border-radius: 0;
}

/* Cookie Categories */
.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #ffffff;
    border: 2px solid #1a1a1a;
    border-radius: 0;
    transition: none;
}

.cookie-category:hover {
    background: #ffffff;
    border-color: #1a1a1a;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.cookie-category-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-category-info i {
    font-size: 1.3rem;
    color: #1a1a1a;
}

.cookie-category-info i.cookie-required {
    color: #4ade80;
}

.cookie-category-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-required-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 0;
    border: 1px solid #1a1a1a;
    font-weight: 500;
}

.cookie-category-description {
    font-size: 0.9rem;
    color: #1a1a1a;
    line-height: 1.6;
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff;
    transition: none;
    border-radius: 28px;
    border: 2px solid #1a1a1a;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition-base);
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background: #1a1a1a;
    border-color: #1a1a1a;
}

input:checked + .cookie-slider:before {
    transform: translateX(28px);
}

input:disabled + .cookie-slider {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(74, 222, 128, 0.3);
    border-color: #4ade80;
}

/* Cookie Policy Links */
.cookie-policy-links {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 153, 0, 0.05);
    border-radius: 8px;
}

.cookie-policy-links p {
    font-size: 0.9rem;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-policy-links i {
    color: #1a1a1a;
}

.cookie-link {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    transition: none;
    border-bottom: 1px solid transparent;
}

.cookie-link:hover {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}

.cookie-modal-footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 2px solid #1a1a1a;
    background: #ffffff;
}

.cookie-modal-footer .cookie-btn {
    flex: 1;
    justify-content: center;
}

/* Responsive Cookie Banner */
@media (max-width: 1024px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-banner-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .cookie-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 1.25rem 1rem;
    }

    .cookie-banner-text h3 {
        font-size: 1rem;
    }

    .cookie-banner-text p {
        font-size: 0.85rem;
    }

    .cookie-banner-actions {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }

    .cookie-modal {
        padding: 1rem;
    }

    .cookie-modal-content {
        border-radius: 15px;
    }

    .cookie-modal-header {
        padding: 1.5rem;
    }

    .cookie-modal-header h3 {
        font-size: 1.2rem;
    }

    .cookie-modal-body {
        padding: 1.5rem;
    }

    .cookie-category {
        padding: 1rem;
    }

    .cookie-modal-footer {
        flex-direction: column;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .cookie-banner-text h3 {
        font-size: 0.95rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .cookie-modal-header h3 {
        font-size: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Security Notifications */
.security-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10002;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    font-family: 'Sora', sans-serif;
}

.security-notification.error {
    background: #f44336;
}

.security-notification.success {
    background: #4CAF50;
}

.security-notification.info {
    background: #2196F3;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-content i {
    font-size: 18px;
}

.notification-content span {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.notification-close:hover {
    background: rgba(255,255,255,0.2);
}

/* Enhanced Form Security Styles */
.contact-form input:invalid,
.contact-form textarea:invalid {
    border-color: #f44336;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

.contact-form input:valid,
.contact-form textarea:valid {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.form-security-indicator {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

.form-security-indicator.valid {
    color: #4CAF50;
}

.form-security-indicator.invalid {
    color: #f44336;
}

/* Rate Limiting Warning */
.rate-limit-warning {
    background: #ff9800;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
}

.rate-limit-warning.active {
    display: block;
}

/* Privacy Badge */
.privacy-badge {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(10px);
    transition: all 0.5s ease;
}

.privacy-badge i {
    color: #4CAF50;
    transition: all 0.5s ease;
}

.privacy-badge span {
    transition: opacity 0.5s ease, width 0.5s ease, margin 0.5s ease;
    overflow: hidden;
    white-space: nowrap;
}

.privacy-badge.icon-only {
    padding: 8px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    justify-content: center;
}

.privacy-badge.icon-only span {
    opacity: 0;
    width: 0;
    margin: 0;
}

@media (max-width: 768px) {
    .security-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
        top: 20px;
    }
    
    .privacy-badge {
        left: 10px;
        bottom: 10px;
    }
}

/* (rimosso) Hero SVG Text: non più utilizzato */

/* Chatbot FAQ */
.chatbot {
  position: fixed;
  bottom: 2rem; /* stessa posizione del back-to-top */
  right: 2rem; /* sostituisce il back-to-top */
  z-index: 10000;
}

.chatbot-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  color: #1a1a1a;
  background: #ffffff;
  border: 2px solid #1a1a1a;
  box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

.chatbot-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.8);
  background: #f3f3f3;
}

.chatbot-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 360px;
  max-height: 70dvh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 2px solid #1a1a1a;
  border-radius: 0;
  box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  opacity: 0;
  transform: scale(0.98) translateY(8px);
  pointer-events: none;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.chatbot.open .chatbot-panel {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #ffffff;
  border-bottom: 2px solid #1a1a1a;
}

.chatbot-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #1a1a1a;
  font-family: var(--font-mono);
  font-size: 14px;
}

.chatbot-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #1a1a1a;
  background: #ffffff;
  border: 2px solid #1a1a1a;
  transition: background var(--transition-base), color var(--transition-base), transform var(--transition-base);
}

.chatbot-close:hover {
  color: #ffffff;
  background: #1a1a1a;
  transform: translateY(-1px);
}

.chatbot-messages {
  padding: 14px;
  overflow-y: auto;
  scrollbar-width: thin;
  max-height: 100%;
}

.chatbot-message {
  display: flex;
  margin: 8px 0;
}

.chatbot-message .bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid #1a1a1a;
  box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
  font-size: 14px;
  line-height: 1.5;
}

.chatbot-message.bot .bubble {
  background: #f7f7f7;
  color: #1a1a1a;
}

.chatbot-message.user {
  justify-content: flex-end;
}

.chatbot-message.user .bubble {
  background: #ffffff;
  border-color: #1a1a1a;
  color: #1a1a1a;
}

.chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 2px 2px;
}

.chatbot-suggestions .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 9999px;
  border: 2px solid #1a1a1a;
  background: #ffffff;
  color: #1a1a1a;
  font-size: 12px;
  transition: transform var(--transition-fast), color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.chatbot-suggestions .chip:hover {
  color: #ffffff;
  background: #1a1a1a;
  transform: translateY(-1px);
}

.chatbot-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px 14px;
  border-top: 2px solid #1a1a1a;
}

.chatbot-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 2px solid #1a1a1a;
  background: #ffffff;
  color: #1a1a1a;
}

.chatbot-input::placeholder { color: #555555; }

.chatbot-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #1a1a1a inset;
}

.chatbot-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #1a1a1a;
  color: #ffffff;
  border: 2px solid #1a1a1a;
  box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.chatbot-send:hover { transform: translateY(-1px); box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.8); }

@media (max-width: 768px) {
  .chatbot {
    right: 1.5rem; /* stessa posizione del back-to-top su mobile */
    bottom: 1.5rem;
  }
}

@media (max-width: 640px) {
  .chatbot-panel {
    right: 12px;
    bottom: 88px;
    width: calc(100% - 24px);
    max-height: 65dvh;
  }
}

/* Sostituzione: nasconde il bottone "Torna su" */
.back-to-top { display: none !important; }

/* =====================================
   MOBILE OPTIMIZATION
   ===================================== */

@media (max-width: 768px) {
  /* Typography adjustments */
  h1 {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
  }
  
  h2 {
    font-size: 2rem !important;
    line-height: 1.3 !important;
  }
  
  h3 {
    font-size: 1.5rem !important;
    line-height: 1.4 !important;
  }
  
  /* Spacing adjustments */
  .container {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }
  
  .section-padding {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  /* Navigation optimization */
  .nav-container {
    padding: 1rem !important;
  }
  
  .logo-image {
    height: 48px !important;
    width: auto !important;
    max-width: none !important;
  }
  
  /* Hero section adjustments */
  .hero-content h1 {
    font-size: 2.2rem !important;
    margin-bottom: 1rem !important;
  }
  
  .hero-content p {
    font-size: 1.1rem !important;
    margin-bottom: 2rem !important;
  }
  
  /* Button touch targets */
  .btn {
    min-height: 48px !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
  }

  /* Touch targets across UI */
  .filter-btn {
    min-height: 44px !important;
    padding: 0.8rem 1rem !important;
    font-size: 0.95rem !important;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    min-height: 44px !important;
    padding: 0.75rem 1rem !important;
  }
  
  /* Grid and layout optimizations */
  .grid-2,
  .grid-3,
  .grid-4,
  .projects-grid,
  .design-gallery,
  .skills-grid,
  .process-steps {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  
  /* Design section cards */
  .design-item {
    margin-bottom: 1.5rem !important;
  }
  
  .design-wrapper {
    aspect-ratio: 16 / 10 !important;
    height: auto !important;
  }
  
  /* Card spacing and media fit */
  .project-content,
  .skill-card,
  .design-wrapper { padding: 1.25rem !important; }
  
  .project-card img,
  .design-wrapper img,
  .project-video {
    width: 100% !important;
    height: auto !important;
  }
  
  /* Form optimizations */
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  input,
  textarea {
    font-size: 16px !important; /* Prevent zoom on iOS */
  }
}

@media (max-width: 480px) {
  /* Extra small devices */
  h1 {
    font-size: 2rem !important;
  }
  
  h2 {
    font-size: 1.75rem !important;
  }
  
  .hero-content h1 {
    font-size: 1.8rem !important;
  }
  
  .logo-image {
    height: 36px !important;
    width: auto !important;
  }
  
  /* Touch targets */
  .nav-toggle {
    width: 48px !important;
    height: 48px !important;
  }
  
  /* Section spacing */
  .section-padding {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  /* Compact grid gaps and card padding */
  .projects-grid,
  .design-gallery,
  .skills-grid,
  .process-steps { gap: 1.25rem !important; }
  
  .project-content { padding: 1rem !important; }
  
  .design-wrapper { aspect-ratio: 4 / 3 !important; }
}
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 1;
    pointer-events: none;
}

/* Adattamento a viewport mobili con unità dinamiche */
@supports (height: 100svh) {
  .hero { min-height: 100svh; }
  .hero-video { height: 100svh; }
}

@supports (height: 100dvh) {
  .hero { min-height: 100dvh; }
  .hero-video { height: 100dvh; }
}

/* Tuning padding della hero per diverse dimensioni */
@media (max-width: 768px) {
  .hero { padding: 6rem 1rem 1.5rem; }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .hero { padding: 7rem 2rem 1.5rem; }
}
