/* ============================================
   RESET & VARIABLES
   ============================================ */

:root {
    /* Light Theme Colors */
    --light-bg-primary: #ffffff;
    --light-bg-secondary: #f0f7f9;
    --light-bg-tertiary: #f5f5f5;
    --light-text-primary: #0f172a;
    --light-text-secondary: #475569;
    --light-text-tertiary: #94a3b8;
    --light-border: #e2e8f0;
    --light-shadow: rgba(0, 0, 0, 0.1);
    
    /* Dark Theme Colors - Nero */
    --dark-bg-primary: #000000;
    --dark-bg-secondary: #0a0a0a;
    --dark-bg-tertiary: #141414;
    --dark-text-primary: #f1f5f9;
    --dark-text-secondary: #cbd5e1;
    --dark-text-tertiary: #94a3b8;
    --dark-border: #1f1f1f;
    --dark-shadow: rgba(0, 0, 0, 0.5);
    
    /* Accent Colors - Palette da Color Hunt: #3F9AAE #79C9C5 #FFE2AF #F96E5B */
    /* Hero Colors - Teal/Arancione */
    --hero-accent-1: #3f9aae;
    --hero-accent-2: #79c9c5;
    --hero-accent-3: #f96e5b;
    
    /* About Colors - Teal/Giallo */
    --about-accent-1: #3f9aae;
    --about-accent-2: #79c9c5;
    --about-accent-3: #ffe2af;
    
    /* Skills Colors - Teal/Arancione */
    --skills-accent-1: #79c9c5;
    --skills-accent-2: #3f9aae;
    --skills-accent-3: #f96e5b;
    
    /* Projects Colors - Arancione/Giallo */
    --projects-accent-1: #f96e5b;
    --projects-accent-2: #ffe2af;
    --projects-accent-3: #3f9aae;
    
    /* Contact Colors - Teal/Arancione */
    --contact-accent-1: #3f9aae;
    --contact-accent-2: #79c9c5;
    --contact-accent-3: #f96e5b;
    
    /* Gradients per Sezioni - Usando tutti i colori della palette */
    --gradient-hero: linear-gradient(135deg, #3f9aae 0%, #79c9c5 50%, #f96e5b 100%);
    --gradient-about: linear-gradient(135deg, #3f9aae 0%, #79c9c5 50%, #ffe2af 100%);
    --gradient-skills: linear-gradient(135deg, #79c9c5 0%, #3f9aae 50%, #f96e5b 100%);
    --gradient-projects: linear-gradient(135deg, #f96e5b 0%, #ffe2af 50%, #3f9aae 100%);
    --gradient-contact: linear-gradient(135deg, #3f9aae 0%, #79c9c5 50%, #f96e5b 100%);
    
    /* Gradients Generali */
    --gradient-primary: var(--gradient-hero);
    --gradient-secondary: linear-gradient(135deg, #3f9aae 0%, #79c9c5 100%);
    --gradient-tertiary: linear-gradient(135deg, #f96e5b 0%, #ffe2af 100%);
    --gradient-text: linear-gradient(135deg, #3f9aae 0%, #79c9c5 50%, #f96e5b 100%);
    --gradient-mesh: radial-gradient(at 0% 0%, rgba(63, 154, 174, 0.3) 0px, transparent 50%),
                      radial-gradient(at 100% 0%, rgba(121, 201, 197, 0.3) 0px, transparent 50%),
                      radial-gradient(at 100% 100%, rgba(249, 110, 91, 0.3) 0px, transparent 50%),
                      radial-gradient(at 0% 100%, rgba(255, 226, 175, 0.2) 0px, transparent 50%);
    
    /* Typography */
    --font-primary: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Outfit', sans-serif;
    --font-display: 'Outfit', sans-serif;
    
    /* Spacing */
    --container-width: 1400px;
    --section-padding: 120px 0;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Dark Theme (Default) */
[data-theme="dark"] {
    --bg-primary: var(--dark-bg-primary);
    --bg-secondary: var(--dark-bg-secondary);
    --bg-tertiary: var(--dark-bg-tertiary);
    --text-primary: var(--dark-text-primary);
    --text-secondary: var(--dark-text-secondary);
    --text-tertiary: var(--dark-text-tertiary);
    --border: var(--dark-border);
    --shadow: var(--dark-shadow);
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: var(--light-bg-primary);
    --bg-secondary: var(--light-bg-secondary);
    --bg-tertiary: var(--light-bg-tertiary);
    --text-primary: var(--light-text-primary);
    --text-secondary: var(--light-text-secondary);
    --text-tertiary: var(--light-text-tertiary);
    --border: var(--light-border);
    --shadow: var(--light-shadow);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    scroll-padding-top: 80px; /* Offset per navbar fissa */
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.75;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
    font-weight: 400;
    letter-spacing: 0.01em;
}

[data-theme="dark"] body {
    background: radial-gradient(ellipse at top, rgba(63, 154, 174, 0.03) 0%, var(--bg-primary) 50%),
                radial-gradient(ellipse at bottom, rgba(121, 201, 197, 0.02) 0%, var(--bg-primary) 50%);
    background-color: var(--bg-primary);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

/* ============================================
   CURSOR EFFECTS
   ============================================ */

.cursor {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--hero-accent-1);
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.1s ease;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 2px solid var(--hero-accent-1);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.3s ease;
    opacity: 0.5;
}

/* ============================================
   THEME TOGGLE
   ============================================ */

.theme-toggle {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    box-shadow: 0 4px 20px var(--shadow);
    pointer-events: all;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    border-color: var(--hero-accent-1);
    box-shadow: 0 6px 30px rgba(63, 154, 174, 0.3);
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(var(--bg-primary-rgb), 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 999;
    transition: var(--transition-base);
    padding: 1.5rem 0;
}

.navbar.scrolled {
    padding: 1rem 0;
    box-shadow: 0 4px 30px var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a,
.logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: transform 0.3s ease;
}

.nav-brand a:hover,
.logo-link:hover {
    transform: scale(1.05);
}

.logo-text {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    text-decoration: none !important;
}

.nav-brand a .logo-text,
.footer-brand .logo-text {
    text-decoration: none !important;
}

.logo-bracket {
    color: var(--hero-accent-1);
}

.logo-name {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    transition: var(--transition-base);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    overflow: hidden;
    color: var(--hero-accent-1);
    transition: width 0.3s ease;
}

.nav-link:hover::before {
    width: 100%;
}

.nav-link:hover {
    color: var(--hero-accent-1);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition-base);
    border-radius: 3px;
}

.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(7px, -7px);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 100px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

/* Blog (pagine PHP): stesso mood della homepage */
.blog-page .blog-fixed-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.blog-page .blog-fixed-bg.hero-background {
    z-index: 0;
}

.blog-page .blog-main-wrap {
    position: relative;
    z-index: 1;
}

.blog-page .blog-section {
    padding-top: 7rem;
    padding-bottom: 5rem;
    min-height: 55vh;
}

.blog-page .blog-typing-stub {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nav-menu .nav-item-active .nav-link {
    color: #3f9aae;
}

.nav-menu .nav-item-active .nav-link::before {
    width: 100%;
}

[data-theme="light"] .nav-menu .nav-item-active .nav-link {
    color: #088395;
}

/* Lista articoli: card come link */
a.project-card.blog-post-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-post-card-visual {
    background: var(--gradient-projects);
    min-height: 140px;
    overflow: hidden;
}

.blog-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Paginazione lista blog */
.blog-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1rem;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.blog-pagination__pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-pagination__pages li {
    margin: 0;
    padding: 0;
}

.blog-pagination__num,
.blog-pagination__ellipsis {
    min-width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-display), sans-serif;
}

.blog-pagination__num {
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.blog-pagination__num:hover {
    border-color: #3f9aae;
    color: #3f9aae;
    background: rgba(63, 154, 174, 0.08);
}

.blog-pagination__num--current {
    border: 1px solid transparent;
    background: linear-gradient(135deg, rgba(63, 154, 174, 0.35), rgba(249, 110, 91, 0.25));
    color: var(--text-primary);
    cursor: default;
}

.blog-pagination__ellipsis {
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    min-width: 1.5rem;
    font-weight: 500;
}

.blog-pagination__nav {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #3f9aae;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.blog-pagination__nav:hover {
    border-color: #3f9aae;
    background: rgba(63, 154, 174, 0.08);
}

.blog-pagination__nav--disabled {
    color: var(--text-tertiary);
    border-color: var(--border);
    cursor: not-allowed;
    opacity: 0.55;
}

[data-theme="light"] .blog-pagination__num--current {
    background: linear-gradient(135deg, rgba(63, 154, 174, 0.2), rgba(249, 110, 91, 0.15));
}

/* Singolo articolo */
.blog-article-wrap {
    padding-top: 2rem;
}

.blog-article-inner {
    max-width: 760px;
    margin: 0 auto;
}

.blog-article-inner header {
    margin-bottom: 2rem;
}

.blog-article-cover {
    margin: 0 0 2.25rem;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.blog-article-cover img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
}

.blog-article-inner h1 {
    font-family: 'Outfit', var(--font-display), sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.blog-article-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-article-meta a {
    color: #3f9aae;
    text-decoration: none;
    font-weight: 600;
}

.blog-article-meta a:hover {
    text-decoration: underline;
}

.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: #3f9aae;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.blog-back-link:hover {
    text-decoration: underline;
}

.blog-article-body {
    color: var(--text-secondary);
    line-height: 1.85;
    font-size: 1.05rem;
}

.blog-article-body h2 {
    font-family: 'Outfit', var(--font-display), sans-serif;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    font-size: 1.35rem;
}

.blog-article-body h3 {
    font-family: 'Outfit', var(--font-display), sans-serif;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem;
    font-size: 1.1rem;
}

.blog-article-body p {
    margin-bottom: 1rem;
}

.blog-article-body ul,
.blog-article-body ol {
    margin: 1rem 0 1rem 1.25rem;
}

.blog-article-body li {
    margin-bottom: 0.5rem;
}

.blog-article-body strong {
    color: var(--text-primary);
}

.blog-article-body a {
    color: #3f9aae;
    text-decoration: underline;
}

[data-theme="light"] .blog-article-body a {
    color: #088395;
}

.blog-cta-box {
    margin: 2.5rem 0;
    padding: 1.5rem 1.75rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(63, 154, 174, 0.08) 0%, rgba(249, 110, 91, 0.06) 100%);
}

.blog-cta-box p {
    margin-bottom: 0.75rem;
}

.blog-cta-box p:last-child {
    margin-bottom: 0;
}

.blog-cta-box .blog-cta-lead {
    font-family: 'Outfit', var(--font-display), sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.blog-cta-box .blog-cta-link {
    display: inline-flex;
    align-items: center;
    margin-top: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #3f9aae, #f96e5b);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Sopra i link del corpo articolo (tema chiaro usa colore teal con maggiore specificità) */
.blog-article-body .blog-cta-box .blog-cta-link,
.blog-article-body .blog-cta-box .blog-cta-link:visited,
[data-theme="light"] .blog-article-body .blog-cta-box .blog-cta-link,
[data-theme="light"] .blog-article-body .blog-cta-box .blog-cta-link:visited {
    color: #fff;
    text-decoration: none;
}

.blog-cta-box .blog-cta-link:hover,
.blog-cta-box .blog-cta-link:focus-visible,
.blog-article-body .blog-cta-box .blog-cta-link:hover,
[data-theme="light"] .blog-article-body .blog-cta-box .blog-cta-link:hover {
    color: #fff;
    text-decoration: none;
}

.blog-cta-box .blog-cta-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(63, 154, 174, 0.35);
}

[data-theme="light"] .blog-cta-box {
    background: linear-gradient(135deg, rgba(63, 154, 174, 0.12) 0%, rgba(249, 110, 91, 0.08) 100%);
}

#particlesCanvas {
    width: 100%;
    height: 100%;
    opacity: 0.4;
}

.particles {
    --particle-color: var(--hero-accent-1);
}

.gradient-mesh {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-mesh);
    opacity: 0.4;
    animation: meshMove 20s infinite ease-in-out;
}

@keyframes meshMove {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(50px, -50px) scale(1.1);
    }
}

.hero-gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: floatOrb 15s infinite ease-in-out;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: #3f9aae;
    top: -300px;
    left: -300px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: #79c9c5;
    bottom: -250px;
    right: -250px;
    animation-delay: 5s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: #f96e5b;
    top: 50%;
    right: 10%;
    animation-delay: 10s;
}

@keyframes floatOrb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-greeting {
    display: block;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    animation: fadeIn 1s ease;
}

.hero-image {
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.hero-name {
    font-size: 5rem;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    display: block;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-family: var(--font-primary);
}

.line-wrapper {
    display: block;
    overflow: hidden;
}

.line {
    display: block;
    transform: translateY(100%);
    animation: slideUp 0.8s ease forwards;
}

.line:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title-wrapper {
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-family: var(--font-display);
}

.title-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.title-word:nth-child(1) {
    animation-delay: 0.4s;
}

.title-word:nth-child(2) {
    animation-delay: 0.6s;
}

.title-word:nth-child(3) {
    animation-delay: 0.8s;
}

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

.typing-text {
    color: var(--hero-accent-1);
    border-right: 2px solid var(--hero-accent-1);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }
    51%, 100% {
        border-color: var(--hero-accent-1);
    }
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Animazioni Hero */
.fade-in {
    animation: fadeIn 1s ease forwards;
    opacity: 0;
}

.slide-in-left {
    animation: slideInLeft 1s ease forwards;
    opacity: 0;
}

.slide-in-right {
    animation: slideInRight 1s ease forwards;
    opacity: 0;
}

.fade-in-delay {
    animation: fadeIn 1s ease 0.3s forwards;
    opacity: 0;
}

.fade-in-delay-2 {
    animation: fadeIn 1s ease 0.6s forwards;
    opacity: 0;
}

/* Assicura che i pulsanti siano visibili */
.hero-buttons .btn {
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-flex !important;
}

/* Override per garantire visibilità anche durante animazioni GSAP */
.hero-buttons .btn-primary,
.hero-buttons .btn-secondary {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-buttons {
    display: flex !important;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    position: relative;
    z-index: 10;
    visibility: visible !important;
    opacity: 1 !important;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.2rem 2.5rem;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-hero);
    color: white;
    box-shadow: 0 10px 30px rgba(63, 154, 174, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(63, 154, 174, 0.4);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--hero-accent-1);
    color: var(--hero-accent-1);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--hero-accent-1);
    color: var(--hero-accent-1);
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

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

@keyframes scroll {
    0% {
        opacity: 1;
        top: 8px;
    }
    100% {
        opacity: 0;
        top: 20px;
    }
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 600px;
}


.floating-card {
    position: absolute;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 40px var(--shadow);
    backdrop-filter: blur(10px);
    animation: floatCard 4s infinite ease-in-out;
}

.card-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3f9aae 0%, #79c9c5 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.card-2 .card-icon {
    background: linear-gradient(135deg, #79c9c5 0%, #f96e5b 100%);
}

.card-3 .card-icon {
    background: linear-gradient(135deg, #ffe2af 0%, #3f9aae 100%);
}

.card-content {
    display: flex;
    flex-direction: column;
}

.card-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.card-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-display);
}

.card-1 {
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: 0;
    animation-delay: 1.5s;
}

.card-3 {
    bottom: 20%;
    right: 20%;
    animation-delay: 3s;
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

.code-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 500px;
    margin: 0 auto;
}

.code-window {
    background: #0f172a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px var(--shadow);
    animation: slideInRight 1s ease;
}

[data-theme="dark"] .code-window {
    background: #0f172a;
    border-color: rgba(63, 154, 174, 0.2);
}

.code-header {
    background: #1e293b;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-theme="dark"] .code-header {
    background: #1e293b;
    border-bottom-color: rgba(63, 154, 174, 0.15);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red { background: #ef4444; }
.code-dot.yellow { background: #f59e0b; }
.code-dot.green { background: #10b981; }

.code-title {
    margin-left: 1rem;
    color: #94a3b8;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.code-content {
    padding: 2rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.8;
    color: #cbd5e1;
}

.code-class { color: #82aaff; }
.code-function { color: #c3e88d; }

.code-keyword { color: #c792ea; }
.code-class { color: #82aaff; }
.code-variable { color: #82aaff; }
.code-property { color: #ffcb6b; }
.code-function { color: #c3e88d; }
.code-string { color: #c3e88d; }

[data-theme="dark"] .code-keyword { color: #79c9c5; }
[data-theme="dark"] .code-variable { color: #3f9aae; }
[data-theme="dark"] .code-property { color: #ffe2af; }
[data-theme="dark"] .code-string { color: #f96e5b; }

/* ============================================
   SECTION STYLES
   ============================================ */

section {
    padding: var(--section-padding);
    position: relative;
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    margin-bottom: 5rem;
}

.section-number {
    font-size: 8rem;
    font-weight: 800;
    color: var(--text-tertiary);
    opacity: 0.2;
    line-height: 1;
    font-family: var(--font-mono);
}

.section-header-content {
    flex: 1;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    color: white;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#about .section-tag {
    background: var(--gradient-about);
}

#skills .section-tag {
    background: var(--gradient-skills);
}

#projects .section-tag {
    background: var(--gradient-projects);
}

#contact .section-tag {
    background: var(--gradient-contact);
}

#home .section-tag {
    background: var(--gradient-hero);
}

.section-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    font-family: var(--font-display);
}

.title-line {
    display: block;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    line-height: 1.8;
}

#projects .section-description {
    margin-top: -50px;
    max-width: 100%;
    width: 100%;
    margin-bottom: 30px;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about {
    background: linear-gradient(135deg, #f0f7f9 0%, #e8f4f6 50%, #f5f9fa 100%);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .about {
    background: var(--bg-secondary);
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(63, 154, 174, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(121, 201, 197, 0.1) 0%, transparent 50%);
    pointer-events: none;
}


.about-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: start;
}

.about-content-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}

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

.about-image-main {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 3/4;
    box-shadow: 0 20px 60px var(--shadow);
}

.about-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9) contrast(1.1);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.about-image-main:hover .about-main-img {
    transform: scale(1.05);
    filter: brightness(1) contrast(1.2);
}

.about-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-about);
    opacity: 0.15;
    mix-blend-mode: overlay;
    transition: opacity 0.5s ease;
}

.about-image-main:hover .about-image-overlay {
    opacity: 0.25;
}

.about-image-secondary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.about-secondary-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    filter: grayscale(20%) brightness(0.95);
    transition: transform 0.5s ease, filter 0.5s ease;
    box-shadow: 0 10px 30px var(--shadow);
}

.about-secondary-img:hover {
    transform: scale(1.05) translateY(-5px);
    filter: grayscale(0%) brightness(1);
    z-index: 1;
    position: relative;
}

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

.about-paragraph {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.9;
}

.about-paragraph strong {
    color: var(--about-accent-1);
    font-weight: 600;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.features-title {
    grid-column: 1 / -1;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
}

.feature-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3f9aae 0%, #79c9c5 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.feature-item:nth-child(2) .feature-icon {
    background: linear-gradient(135deg, #79c9c5 0%, #f96e5b 100%);
}

.feature-item:nth-child(3) .feature-icon {
    background: linear-gradient(135deg, #ffe2af 0%, #3f9aae 100%);
}

.feature-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

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

.about-stats {
    width: 100%;
    margin-top: 3rem;
    padding: 3rem 0;
    background: transparent;
}

.about-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    width: 100%;
}

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #3f9aae 0%, #79c9c5 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:nth-child(2)::before {
    background: linear-gradient(135deg, #79c9c5 0%, #f96e5b 100%);
}

.stat-card:nth-child(3)::before {
    background: linear-gradient(135deg, #ffe2af 0%, #3f9aae 100%);
}

.stat-card:nth-child(4)::before {
    background: linear-gradient(135deg, #f96e5b 0%, #79c9c5 100%);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px var(--shadow);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3f9aae 0%, #79c9c5 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #79c9c5 0%, #f96e5b 100%);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #ffe2af 0%, #3f9aae 100%);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #f96e5b 0%, #79c9c5 100%);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

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

/* ============================================
   SKILLS SECTION
   ============================================ */

.skills {
    background: linear-gradient(135deg, #f5f9fa 0%, #f0f7f9 50%, #eef5f7 100%);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .skills {
    background: var(--bg-secondary);
}

.skills::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(121, 201, 197, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(63, 154, 174, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

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

.skill-category-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.skill-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #79c9c5 0%, #3f9aae 100%);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.skill-category-card:nth-child(2)::before {
    background: linear-gradient(135deg, #3f9aae 0%, #f96e5b 100%);
}

.skill-category-card:nth-child(3)::before {
    background: linear-gradient(135deg, #ffe2af 0%, #79c9c5 100%);
}

.skill-category-card:hover::before {
    transform: scaleX(1);
}

.skill-category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px var(--shadow);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #79c9c5 0%, #3f9aae 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.skill-category-card:nth-child(2) .category-icon {
    background: linear-gradient(135deg, #3f9aae 0%, #f96e5b 100%);
}

.skill-category-card:nth-child(3) .category-icon {
    background: linear-gradient(135deg, #ffe2af 0%, #79c9c5 100%);
}

.category-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-chip {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: var(--transition-base);
    opacity: 0;
    transform: translateX(-20px);
}

.skill-chip.visible {
    opacity: 1;
    transform: translateX(0);
}

.skill-chip:hover {
    border-color: #3f9aae;
    transform: translateX(5px);
}

.skill-chip:nth-child(even):hover {
    border-color: #79c9c5;
}

.skill-chip:nth-child(3n):hover {
    border-color: #f96e5b;
}

.skill-name {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.skill-bar {
    flex: 2;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(135deg, #79c9c5 0%, #3f9aae 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-chip:nth-child(even) .skill-progress {
    background: linear-gradient(135deg, #3f9aae 0%, #f96e5b 100%);
}

.skill-chip:nth-child(3n) .skill-progress {
    background: linear-gradient(135deg, #ffe2af 0%, #79c9c5 100%);
}

.skill-percent {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    min-width: 45px;
    text-align: right;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
}

.tech-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tech-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: linear-gradient(135deg, #3f9aae 0%, #79c9c5 50%, #f96e5b 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    opacity: 0.1;
}

.tech-item:nth-child(even)::before {
    background: linear-gradient(135deg, #ffe2af 0%, #3f9aae 50%, #79c9c5 100%);
}

.tech-item:hover::before {
    width: 200px;
    height: 200px;
}

.tech-item:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: #3f9aae;
    box-shadow: 0 15px 40px rgba(63, 154, 174, 0.2);
}

.tech-item:nth-child(even):hover {
    border-color: #79c9c5;
    box-shadow: 0 15px 40px rgba(121, 201, 197, 0.2);
}

.tech-item:nth-child(3n):hover {
    border-color: #f96e5b;
    box-shadow: 0 15px 40px rgba(249, 110, 91, 0.2);
}

.tech-item i {
    font-size: 3rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--transition-base);
}

.tech-item span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   PROJECTS SECTION
   ============================================ */

.projects {
    background: linear-gradient(135deg, #fef5e7 0%, #faf8f5 50%, #f5f9fa 100%);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .projects {
    background: var(--bg-secondary);
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 20%, rgba(249, 110, 91, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 226, 175, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.project-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    transition: var(--transition-base);
    position: relative;
    content-visibility: auto;
    contain-intrinsic-size: 0 520px;
}

.project-card[data-url]:not([data-url=""]) {
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px var(--shadow);
}

.project-card-link {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 5;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.project-card-link i {
    font-size: 0.72rem;
}

.project-card:hover .project-card-link {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

[data-theme="light"] .project-card-link {
    background: rgba(255, 255, 255, 0.85);
    color: #0f172a;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .project-card:hover .project-card-link {
    opacity: 1;
}

.project-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg-tertiary);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    contain: paint;
}

.project-infographic {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(15,34,48,0.65) 100%);
    transition: all 0.5s ease;
    z-index: 1;
    position: relative;
}

.project-card:hover .project-image {
    transform: scale(1.06);
}

.project-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transition: all 0.4s ease;
}

.project-card:hover .project-icon {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.25);
}

/* Applica blur avanzati solo su device con hover reale */
@media (hover: hover) and (pointer: fine) {
    .project-infographic {
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }

    .project-card:hover .project-infographic {
        background: linear-gradient(180deg, rgba(0,0,0,0) 10%, rgba(15,34,48,0.8) 100%);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .project-icon {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
}

.project-graphic-type {
    display: none;
}

.project-graphic-chips {
    display: none;
}

.project-graphic-chips span {
    display: none;
}

/* Le immagini dei progetti vengono caricate in lazy via JS (data-bg) */
.project-image.loaded {
    animation: fadeInBg 0.4s ease;
}
@keyframes fadeInBg {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

.project-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: brightness(0.9) contrast(1.1);
    z-index: 0;
}

.project-card:hover .project-img {
    transform: scale(1.1);
    filter: brightness(1) contrast(1.2);
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 4rem;
    background: var(--gradient-projects);
    opacity: 0.1;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    transition: var(--transition-base);
}

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

.project-link {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f96e5b 0%, #ffe2af 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition-base);
}

.project-link:nth-child(2) {
    background: linear-gradient(135deg, #3f9aae 0%, #79c9c5 100%);
}

.project-link:hover {
    transform: scale(1.1) rotate(5deg);
}

.project-content {
    padding: 1.25rem 1.5rem;
}

.project-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.7rem;
    color: #f96e5b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.6rem;
}

.project-card:nth-child(2) .project-category {
    color: #3f9aae;
}

.project-card:nth-child(3) .project-category {
    color: #79c9c5;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.9rem;
}

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

.tag {
    padding: 0.4rem 0.8rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   CONTACT SECTION
   ============================================ */

/* Ancora #contact: offset navbar fissa + scroll corretto da link esterni */
#contact.contact {
    scroll-margin-top: 100px;
}

.contact {
    background: linear-gradient(135deg, #f0f7f9 0%, #f5f9fa 50%, #fef5e7 100%);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .contact {
    background: var(--bg-secondary);
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(63, 154, 174, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(121, 201, 197, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

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

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

.info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    transition: var(--transition-base);
}

.info-card:hover {
    transform: translateX(10px);
    border-color: #3f9aae;
    box-shadow: 0 10px 30px var(--shadow);
}

.info-card:nth-child(2):hover {
    border-color: #79c9c5;
}

.info-card:nth-child(3):hover {
    border-color: #f96e5b;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3f9aae 0%, #79c9c5 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-card:nth-child(2) .info-icon {
    background: linear-gradient(135deg, #79c9c5 0%, #f96e5b 100%);
}

.info-card:nth-child(3) .info-icon {
    background: linear-gradient(135deg, #ffe2af 0%, #3f9aae 100%);
}

.info-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

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

.social-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.social-item {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.social-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: linear-gradient(135deg, #3f9aae 0%, #79c9c5 50%, #f96e5b 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.social-item:nth-child(2)::before {
    background: linear-gradient(135deg, #79c9c5 0%, #f96e5b 50%, #ffe2af 100%);
}

.social-item:nth-child(3)::before {
    background: linear-gradient(135deg, #ffe2af 0%, #3f9aae 50%, #79c9c5 100%);
}

.social-item:nth-child(4)::before {
    background: linear-gradient(135deg, #f96e5b 0%, #79c9c5 50%, #3f9aae 100%);
}

.social-item:hover::before {
    width: 100%;
    height: 100%;
}

.social-item:hover {
    color: white;
    border-color: #3f9aae;
    transform: translateY(-5px);
    z-index: 1;
}

.social-item:nth-child(2):hover {
    border-color: #79c9c5;
}

.social-item:nth-child(3):hover {
    border-color: #f96e5b;
}

.social-item:nth-child(4):hover {
    border-color: #3f9aae;
}

.social-item i {
    position: relative;
    z-index: 1;
}

.contact-form {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem;
}

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

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3f9aae;
    box-shadow: 0 0 0 4px rgba(63, 154, 174, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
    font-family: var(--font-primary);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    margin-top: 0.2rem;
    cursor: pointer;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: #3f9aae;
}

.checkbox-label a {
    color: #3f9aae;
    text-decoration: underline;
    transition: var(--transition-base);
}

.checkbox-label a:hover {
    color: #79c9c5;
}

.checkbox-label input[type="checkbox"]:required:invalid {
    border-color: #ef4444;
}

.btn-submit {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

.form-message {
    margin-top: 1.5rem;
    padding: 1.2rem;
    border-radius: 12px;
    text-align: center;
    display: none;
    font-weight: 500;
}

.form-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    display: block;
}

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

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--bg-tertiary);
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}

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

.footer-links {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--hero-accent-1);
    transform: translateY(-2px);
}

.cookie-settings-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.cookie-settings-link:hover {
    color: var(--hero-accent-1);
    transform: translateY(-2px);
}

.footer-brand {
    margin-bottom: 1rem;
}

.footer-brand a,
.footer-brand .logo-text,
.footer-brand,
.footer-brand .logo-link {
    text-decoration: none !important;
    color: inherit;
    display: inline-block;
}

.footer-brand a:hover,
.footer-brand:hover,
.footer-brand .logo-link:hover {
    text-decoration: none !important;
}

.footer-text {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-text i {
    color: #f96e5b;
    animation: heartbeat 2s infinite;
}

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

.footer-piva {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.footer-copyright {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* ============================================
   WHATSAPP BUTTON
   ============================================ */

.whatsapp-button {
    display: none !important; /* temporaneamente nascosto */
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10003;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: var(--transition-base);
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-button.disabled {
    background: #94a3b8;
    cursor: not-allowed;
    animation: none;
}

.whatsapp-button.disabled:hover {
    transform: scale(1);
    box-shadow: 0 4px 20px rgba(148, 163, 184, 0.3);
}

.whatsapp-icon {
    color: white;
    font-size: 1.8rem;
}

.whatsapp-tooltip {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-base);
    box-shadow: 0 4px 20px var(--shadow);
}

.whatsapp-button:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateY(-5px);
}

.tooltip-text {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.tooltip-arrow {
    position: absolute;
    bottom: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transform: rotate(45deg);
}

@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6);
    }
}

/* WhatsApp Modal */
.whatsapp-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.whatsapp-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px var(--shadow);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.whatsapp-modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-display);
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition-base);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
    text-align: center;
}

.modal-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: white;
}

.modal-body p {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.modal-hours {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    display: inline-block;
}

.modal-hours.closed {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
}

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

.modal-footer .btn-primary {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.modal-footer .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.modal-footer .btn-primary:disabled {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    cursor: not-allowed;
    box-shadow: none;
}

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

@media (max-width: 1200px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 4rem;
        text-align: center;
    }
    
    .hero-visual {
        height: 400px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 968px) {
    .container {
        padding: 0 30px;
    }
    
    .hero-name {
        font-size: 3.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .section-number {
        font-size: 5rem;
    }
    
    .skills-showcase {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    #projects .section-description {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        flex-direction: column;
        background: var(--bg-primary);
        width: 100%;
        height: 100vh;
        padding: 100px 2rem 2rem;
        box-shadow: 0 0 50px var(--shadow);
        transition: var(--transition-base);
        border-right: 1px solid var(--border);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-name {
        font-size: 2.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-number {
        font-size: 4rem;
    }
    
    .floating-card {
        display: none;
    }
    
    .about-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    @media (max-width: 640px) {
        .about-stats-grid {
            grid-template-columns: 1fr;
        }
    }
    
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .social-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .theme-toggle {
        top: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-name {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .contact-form {
        padding: 2rem;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .section-number {
        font-size: 3rem;
    }
}

/* ============================================
   SPACE SHOOTER GAME - Durante lo scroll
   ============================================ */

.space-game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.space-game-container.active {
    opacity: 1;
    pointer-events: all;
}

/* Il pulsante start è sempre visibile quando il gioco non è attivo */

.space-game-container.active #spaceGameCanvas {
    pointer-events: all;
}

#spaceGameCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: transparent;
}

.game-hud {
    position: fixed;
    bottom: 100px;
    left: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    align-items: center;
    pointer-events: none;
}

/* Assicura che il theme toggle sia sempre sopra il gioco */
.theme-toggle {
    z-index: 10001 !important;
}

.hud-item {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(63, 154, 174, 0.3);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    min-width: auto;
    pointer-events: all;
}

.hud-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    white-space: nowrap;
}

.hud-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #3f9aae;
    font-family: var(--font-mono);
    white-space: nowrap;
}


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

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ============================================
   COOKIE BANNER
   ============================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 2px solid var(--border);
    padding: 1.5rem 2rem;
    z-index: 10002;
    box-shadow: 0 -4px 20px var(--shadow);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

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

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

.cookie-text {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 300px;
}

.cookie-text i {
    font-size: 2rem;
    color: var(--hero-accent-1);
}

.cookie-text p {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.cookie-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-link {
    color: var(--hero-accent-1);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.cookie-link:hover {
    text-decoration: underline;
}

.btn-sm {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

.game-start-btn {
    position: fixed;
    bottom: 30px;
    left: 20px;
    z-index: 10002;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #f96e5b;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-display);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 40px rgba(249, 110, 91, 0.4);
    pointer-events: all !important;
    animation: pulse 2s infinite ease-in-out;
    opacity: 1 !important;
    visibility: visible !important;
}

.game-start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 50px rgba(249, 110, 91, 0.6);
    background: #f96e5b;
    color: #fff;
}

.game-start-btn:active {
    transform: scale(0.98);
}

.game-start-btn i {
    color: #fff;
    font-size: 1.3rem;
    animation: float 3s infinite ease-in-out;
}

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

.game-start-btn span {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.space-game-container.active ~ .game-start-btn,
.game-start-btn.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.game-toggle-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-hero);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(63, 154, 174, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    pointer-events: all;
}

.game-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(63, 154, 174, 0.6);
}

.game-toggle-btn.active {
    background: linear-gradient(135deg, #f96e5b, #ffe2af);
    animation: pulse 2s infinite;
}

.game-toggle-btn.active::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    animation: ripple 1.5s infinite;
}

@media (max-width: 768px) {
    .game-hud {
        bottom: 80px;
        left: 10px;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .hud-item {
        padding: 0.4rem 0.6rem;
        min-width: auto;
    }
    
    .hud-label {
        font-size: 0.55rem;
    }
    
    .hud-value {
        font-size: 1rem;
    }
    
    .game-start-btn {
        bottom: 25px;
        left: 15px;
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        gap: 0.5rem;
    }
    
    .game-start-btn i {
        font-size: 1.1rem;
    }
    
    .game-toggle-btn {
        bottom: 10px;
        left: 10px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .cookie-text {
        flex-direction: column;
        align-items: flex-start;
        min-width: auto;
    }
    
    .cookie-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .cookie-actions .btn {
        flex: 1;
    }
}
