/* --- 1. RESET & FONDAMENTA --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Montserrat', sans-serif; 
}

html, body {
    max-width: 100%;
    overflow-x: hidden; /* Blocca lo scroll laterale */
    position: relative;
    background: #ffffff;
    color: #1a1a1a;
    scroll-behavior: smooth;
}

/* --- 2. HEADER & NAVIGAZIONE --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
    box-shadow: 0 1px 10px rgba(0,0,0,0.05);
}

.logo { 
    font-weight: 700; 
    letter-spacing: 2px; 
    color: #000; 
    text-decoration: none;
}

.nav-desktop a {
    text-decoration: none;
    color: #333;
    margin-left: 30px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
}

.nav-desktop a:hover { color: #555; }

/* Hamburger Menu */
.hamburger {
    display: none; /* Nascosto su desktop */
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 2100;
}

.hamburger span {
    width: 25px;
    height: 1px;
    background: #000;
    transition: 0.3s;
}

/* Sidebar Mobile */
.sidebar {
    position: fixed;
    top: 0;
    right: -100%; /* Parte da destra fuori schermo */
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 2000;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 100px 40px;
    box-shadow: -10px 0 20px rgba(0,0,0,0.05);
}

.sidebar.active { right: 0; }

.sidebar a {
    display: block;
    color: #000;
    text-decoration: none;
    margin-bottom: 30px;
    font-size: 1.1rem;
    text-transform: uppercase;
}

#menu-overlay {
    position: fixed;
    display: none;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
    backdrop-filter: blur(5px);
}

#menu-overlay.active { display: block; }

/* --- 3. SEZIONI HERO & CONTENUTI --- */
.hero-section {
    height: 70vh;
    background: url('img/hero-bg.jpg') center/cover no-repeat fixed;
    margin-top: 70px;
    position: relative;
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.3);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-text { color: white; text-align: center; padding: 0 20px; }

.hero-text h2 { 
    font-size: clamp(2rem, 5vw, 3.5rem); 
    font-weight: 300; 
    letter-spacing: 10px; 
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hero-text p {
    font-size: 1.1rem;
    font-weight: 700;
    color: #cfd7db;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0px 2px 4px rgba(0,0,0,0.3); 
}

.content-section { padding: 100px 10%; background: #fff; }
.container { max-width: 1200px; margin: 0 auto; }

h3 { font-size: 2.2rem; font-weight: 300; margin-bottom: 30px; line-height: 1.2; }
.label { 
    color: #219EBC;
    text-transform: uppercase; 
    font-size: 0.8rem; 
    font-weight: 700;
    letter-spacing: 2px; 
    display: block; 
    margin-bottom: 20px; 
}

p { font-size: 1.1rem; color: #6b7280; line-height: 1.6; }

/* --- 4. GRID & LAYOUT --- */
.grid-profile {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 80px;
    align-items: start;
}

.profile-stats {
    display: flex;
    flex-direction: column;
    gap: 30px;
    border-left: 1px solid #e0e0e0;
    padding-left: 40px;
}

.stat-item { display: flex; flex-direction: column; }
.stat-number { font-size: 1.8rem; font-weight: 700; color: #9CA3AF; letter-spacing: 2px; }
.stat-desc { font-size: 0.85rem; text-transform: uppercase; color: #555; letter-spacing: 1px; }

/* --- 5. PORTFOLIO & EFFETTI ZOOM --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.portfolio-item {
    display: block;
    position: relative;
    height: 500px;
    overflow: hidden;
    background-color: #000;
    text-decoration: none;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1), opacity 0.8s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
    opacity: 1;
    filter: brightness(0.8);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    z-index: 5;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    pointer-events: none;
}

.portfolio-overlay p:first-child {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    margin-bottom: 8px;
}

.portfolio-overlay p:last-child {
    color: #f2eeee !important;
    font-style: italic !important;
    font-weight: 300;
    font-size: 1.3rem;
}

/* --- 6. COMPETENZE (SKILL CARDS) --- */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.skill-card {
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 20px;
    transition: all 0.3s ease;
}

.skill-card:hover { border-color: #111; background: #fff; }

.skill-title {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 10px;
    color: #111;
}

/* --- 7. FOOTER --- */
footer .container {
    padding: 50px 0;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* --- 8. RESPONSIVE (MOBILE FIXES) --- */
@media (max-width: 900px) {
    header { padding: 0 20px; }
    .nav-desktop { display: none; }
    .hamburger { display: flex; }

    .grid-profile, .grid-2 { 
        grid-template-columns: 1fr; 
        gap: 40px; 
    }

    .profile-stats { 
        border-left: none; 
        border-top: 1px solid #e0e0e0; 
        padding-left: 0; 
        padding-top: 40px; 
    }

    .portfolio-grid { grid-template-columns: 1fr; }
    .portfolio-item { height: 350px !important; }

    footer .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .hero-text h2 { font-size: 1.8rem; letter-spacing: 5px; }
    .portfolio-item { height: 280px !important; }
}

.fade-in { animation: fadeIn 2s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
html {
  scroll-behavior: smooth;
}
.custom-privacy-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    padding: 2px 8px;
    background-color: #f0f4f8;
    border-radius: 4px;
    border: 1px solid #dce4ec;
    transition: all 0.2s ease-in-out;
    display: inline-block;
}

.custom-privacy-link:hover {
    background-color: #007bff;
    color: #ffffff !important;
    border-color: #0056b3;
}