/* 
   Premium Portfolio CSS for Domenico Lazzarato 
   Theme: Modern Dark Mode, Glassmorphism, Neon Accents
*/

:root {
    --bg-color: #050508;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b8;
    --accent-primary: #6366f1;   /* Indigo */
    --accent-secondary: #a855f7; /* Purple */
    --glass-bg: rgba(25, 25, 35, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(3rem, 5vw, 5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 3.5vw, 3.5rem); }
h3 { font-size: clamp(1.75rem, 2.5vw, 2.5rem); }
h4 { font-size: 1.25rem; }
p { color: var(--text-secondary); margin-bottom: 1.5rem; }

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

/* Layout Classes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6.25rem 0; /* 100px */
    position: relative;
    z-index: 1;
}

/* Glow Orbs */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    -webkit-filter: blur(100px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.15;
}
.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    top: -10%;
    left: -10%;
}
.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-secondary);
    bottom: -10%;
    right: -10%;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    display: inline-block;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 0;
    background: linear-gradient(135deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.8);
}

/* Header & Nav */
.glass-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 8, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -1px;
}

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

.main-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.main-nav a:hover {
    color: var(--accent-secondary);
}

/* Language Switcher */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 1rem;
    color: var(--text-secondary);
}

.lang-switcher a {
    color: var(--text-secondary);
}

.lang-switcher a:hover {
    color: var(--accent-secondary);
}

.lang-switcher .active {
    color: var(--accent-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
}
.btn-outline:hover {
    border-color: var(--accent-secondary);
}
.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
}

.hero-desc {
    font-size: 1.25rem;
    margin: 2rem 0;
    max-width: 650px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Stats Section */
.stats-section {
    padding: 6.25rem 0;
    background: rgba(2, 2, 4, 0.4);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    position: relative;
    z-index: 10;
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    color: var(--text-secondary);
}

/* Glass Cards (About) */
.grid {
    display: grid;
    gap: 2rem;
}

.cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent);
    opacity: 0;
    transition: var(--transition-smooth);
}

.glass-card:hover, .service-card:hover, .tech-tag:hover {
    transform: translateY(-5px);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 10px 40px rgba(168, 85, 247, 0.15);
}

.glass-card:hover::before {
    opacity: 1;
}

.glass-card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Services */
.bg-darker {
    background: rgba(2, 2, 4, 0.7);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.service-card {
    background: linear-gradient(145deg, rgba(25,25,35,0.6), rgba(15,15,20,0.8));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 150px; height: 150px;
    background: radial-gradient(circle, rgba(168,85,247,0.15) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.service-icon {
    width: 50px; height: 50px;
    background: rgba(99,102,241,0.1);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
}

.service-content h4 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}
.service-content p { margin-bottom: 0; }

/* Marquee */
.marquee-section {
    overflow: hidden;
}

.marquee-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.marquee-container {
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: 2rem;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    flex-shrink: 0;
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    min-width: 100%;
    animation: scroll-left 90s linear infinite;
}

.marquee-content.reverse {
    /* Entrambe le righe vanno nello stesso senso, la seconda leggermente più lenta per sfasamento */
    animation: scroll-left 110s linear infinite;
}

.tech-tag {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem 2.5rem;
    border-radius: 20px;
    font-size: 1.25rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition-smooth);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 160px;
    min-width: 200px;
}

img.tech-icon {
    width: 60px;
    height: 60px;
    filter: invert(1) drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

svg.tech-icon {
    width: 60px;
    height: 60px;
    color: #fff;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

@keyframes scroll-left {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-100% - 2rem)); }
}

@keyframes scroll-right {
    from { transform: translateX(calc(-100% - 2rem)); }
    to { transform: translateX(0); }
}

/* CTA Card */
.cta-card {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(25,25,35,0.8), rgba(99,102,241,0.1));
}

.cta-card h2 { margin-bottom: 1rem; }
.cta-card p { font-size: 1.125rem; }

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}
.footer-links a:hover { color: #fff; }
.copyright { font-size: 0.875rem; margin: 0; }

/* Animations & Utilities */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Responsive */
@media (max-width: 768px) {
    .main-nav { display: none; /* simple mobile version: hide nav links, keep btn */ }
    .hero-actions { flex-direction: column; }
    .btn { width: 100%; }
    .service-item:hover { transform: translateY(-5px); border-left: 1px solid var(--glass-border); border-bottom: 4px solid var(--accent-primary); }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.75rem; }
}
