/* RESET DI BASE - rimuove margini/padding strani del browser */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* HEADER E NAVIGAZIONE */
header {
    background-color: #1a1a2e;
    padding: 20px 40px;
    position: sticky;
    top: 0;
    z-index: 100;

}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

.menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.menu a {
    color: white;
    text-decoration: none;
    font-size: 16px;
}

.menu a:hover {
    color: #4ecca3;
}
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.attivo span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}
.hamburger.attivo span:nth-child(2) {
    opacity: 0;
}
.hamburger.attivo span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}
/* SEZIONE HERO (Chi sono) */
.hero {
    background-color: #16213e;
    color: white;
    text-align: center;
    padding: 100px 20px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease-out forwards;
    animation-delay: 0.2s;
}

.hero p {
    font-size: 18px;
    color: #cccccc;
     opacity: 0;
    animation: fadeSlideUp 0.8s ease-out forwards;
    animation-delay: 0.5s;
}
.hero {
    background: linear-gradient(-45deg, #16213e, #0f3460, #1a1a2e, #16213e);
    background-size: 400% 400%;
    animation: gradientMove 12s ease infinite;
    color: white;
    text-align: center;
    padding: 100px 20px;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* SEZIONE COMPETENZE */
#competenze {
    padding: 80px 40px;
    text-align: center;
}

#competenze h2 {
    font-size: 36px;
    margin-bottom: 50px;
}

.cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.card {
    background-color: #f4f4f4;
    border-radius: 10px;
    padding: 30px;
    width: 280px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    
}

.cards .card.visibile:hover {
    transform: translateY(-10px);
}

.card h3 {
    color: #4ecca3;
    margin-bottom: 15px;
}
.card {
    background-color: #f4f4f4;
    border-radius: 10px;
    padding: 30px;
    width: 280px;
    min-height: 220px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.card p:not(.card-dettagli) {
    transition: opacity 0.3s ease;
}

.card-dettagli {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 30px;
    background: linear-gradient(135deg, #16213e, #0f3460);
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    box-shadow: 0 0 25px rgba(78, 204, 163, 0.4);
}

.cards .card.visibile:hover .card-dettagli {
    opacity: 1;
    transform: translateY(0);
}

.cards .card.visibile:hover p:not(.card-dettagli) {
    opacity: 0;
}

/* SEZIONE CONTATTI */
#contatti {
    background-color: #16213e;
    color: white;
    text-align: center;
    padding: 80px 20px;
}

#contatti a {
    color: #4ecca3;
}

/* FOOTER */
footer {
    background-color: #1a1a2e;
    color: #999;
    text-align: center;
    padding: 20px;
    font-size: 14px;
}
/* RESPONSIVE - per schermi sotto 768px (tablet/mobile) */
@media (max-width: 768px) {
    .hamburger {
    display: flex;
}

nav {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.menu {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1a1a2e;
    padding: 20px 0;
}

.menu.attivo {
    display: flex;
}

    .hero h1 {
        font-size: 32px;
    }

    .cards {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 90%;
    }
}
.profilo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #4ecca3;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease-out forwards;
    animation-delay: 0s;
}

.btn {
    display: inline-block;
    margin-top: 30px;
    padding: 14px 32px;
    background-color: #4ecca3;
    color: #16213e;
    text-decoration: none;
    font-weight: bold;
    border-radius: 30px;
    transition: background-color 0.3s, transform 0.3s;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease-out forwards, pulseGlow 2s ease-in-out infinite;
    animation-delay: 0.8s, 2s; /* il glow parte dopo l'entrata */
}

.btn:hover {
    background-color: #3eb393;
    transform: scale(1.05);
}
.menu a.attivo {
    color: #4ecca3;
    font-weight: bold;
}
.contact-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
}

.contact-form button {
    border: none;
    cursor: pointer;
}

#conferma-invio {
    color: #4ecca3;
    font-weight: bold;
    min-height: 24px;
}
/* ANIMAZIONI SCROLL */
.cards .card,
#contatti .contact-form {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.3s ease-out;
}

.cards .card.visibile,
#contatti .contact-form.visibile {
    opacity: 1;
    transform: translateY(0);
}
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(78, 204, 163, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(78, 204, 163, 0.9);
    }
}
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}