/* Stili Generali */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --white-color: #ffffff;
    --font-family: 'Arial', sans-serif;
}

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

body {
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: var(--light-color);
    color: var(--dark-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

h1, h2, h3 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

/* Header e Navigazione */
header {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

nav .logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--white-color);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--white-color);
    font-weight: bold;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease;
}

nav ul li a:hover {
    background-color: var(--primary-color);
    border-radius: 5px;
}

/* Sezioni */
section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 60px; /* Offset per l'header fisso */
}

/* Hero Section */
.hero {
    background: url('https://via.placeholder.com/1500x800/007bff/ffffff?text=Background+Immagine') no-repeat center center/cover;
    color: var(--white-color);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    margin-top: 0; /* No offset per la prima sezione */
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--white-color);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 1rem 2rem;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
}

/* About Me Section */
.about-me {
    background-color: var(--white-color);
    padding: 60px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.about-me h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text p {
    margin-bottom: 1rem;
}

.skills ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
}

.skills ul li {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Projects Section */
.projects {
    background-color: var(--light-color);
    text-align: center;
    padding: 60px 20px;
}

.projects h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card h3 {
    padding: 15px;
    margin-bottom: 0.5rem;
}

.project-card p {
    padding: 0 15px 15px;
    font-size: 0.95rem;
    color: var(--secondary-color);
}

.project-link {
    display: block;
    padding: 15px;
    background-color: var(--primary-color);
    color: var(--white-color);
    text-align: center;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.project-link:hover {
    background-color: #0056b3;
}

.project-link i {
    margin-left: 5px;
}

/* Contact Section */
.contact {
    background-color: var(--white-color);
    padding: 60px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--secondary-color);
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    text-align: center;
    padding: 2rem 0;
    margin-top: 40px;
}

.social-links a {
    color: var(--white-color);
    font-size: 1.8rem;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
    }

    nav ul {
        margin-top: 1rem;
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-image {
        width: 100%;
    }

    .about-text {
        width: 100%;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }
}
