body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1f1f1f; /* grigio scuro */
    color: #ffffff; /* testi principali bianchi */
}

a {
    color: #38ff6a; /* link verde neon */
    text-decoration: none;
}

a:hover {
    color: #7cff95; /* verde chiaro per hover */
}

header {
    text-align: center;
    padding: 2rem 1rem;

    /* Immagine di sfondo invece del grigio */
    background: url('../img/neon-gaming-background.jpg') center/cover no-repeat;
    background-color: rgba(44, 44, 44, 0.7); /* overlay semi-trasparente per testo leggibile */
    background-blend-mode: overlay;

    border-radius: 12px; /* opzionale se vuoi box arrotondato */
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    color: #ffffff;
}


nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 0;
    margin-bottom: 1rem;
}

nav a {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.hero-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid #38ff6a; /* bordo verde neon */
    background-color: #1f1f1f; /* sfondo del cerchio per staccare il verde */
    object-fit: cover;
}

.hero h1 {
    margin: 0.5rem 0 0.2rem;
    color: #ffffff; /* nome personale bianco */
}

.hero p {
    margin: 0 0 1rem;
    font-style: italic;
    color: #38ff6a; /* descrizione verde */
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #38ff6a; /* bottone verde neon */
    color: #1f1f1f; /* testo bottone scuro */
    border-radius: 8px;
    font-weight: bold;
    transition: 0.2s;
}

.btn:hover {
    background-color: #7cff95; /* hover verde chiaro */
}

main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* centra OGNI riga */
    gap: 1rem;
    margin-top: 1rem;
}


.skill {
    background-color: #2a2a2a; /* grigio scuro box skill */
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    color: #38ff6a; /* testo verde neon */
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: #2a2a2a;
    color: #38ff6a; /* testo footer verde */
}

#recent-posts {
    margin-top: 2rem;
}

#recent-posts h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #ffffff; /* titolo bianco */
}

.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: auto;
}

.post-card {
    display: block;                   
    background-color: #2a2a2a;        
    background-size: cover;           
    background-position: center;      
    background-repeat: no-repeat;
    padding: 1.5rem;                  
    border-radius: 10px;
    color: #38ff6a;                   
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;            
    min-height: 180px;                
    display: flex;
    flex-direction: column;
    justify-content: flex-end;        
    overflow: hidden;                 
    position: relative; /* necessario per overlay */
}

/* overlay nero leggero sopra l'immagine */
.post-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.50); /* nero trasparente molto leggero */
    z-index: 0;
}

.post-card h3, .post-card p {
    position: relative; /* sopra l'overlay */
    z-index: 1;
    color: #ffffff;  
    text-shadow: 0 2px 6px rgba(0,0,0,0.8); 
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem; 
}

.post-card h3 {
    color: #38ff6a;
    font-size: 1.3rem; 
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.5);
}


.btn-small {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background-color: #38ff6a;
    color: #1f1f1f;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.85rem;
    text-decoration: none;
    transition: 0.2s;
}

.btn-small:hover {
    background-color: #7cff95;
}

.modules-grid {
    display: grid;
    grid-template-columns: 1fr;  /* una card per riga */
    gap: 2mm;
    margin-top: 1rem;
}

.module-card {
    display: block;
    background-color: #2a2a2a;  /* grigio neutro */
    color: #38ff6a;             /* testo verde neon */
    text-decoration: none;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.module-card h3 {
    margin: 0 0 0.3rem 0;
    font-size: 1.2rem;
    color: #38ff6a;
}

.module-card p {
    margin: 0;
    font-size: 0.95rem;
    color: #ffffff;
}

.module-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.two-columns {
    display: flex;
    gap: 2rem;               /* spazio tra colonna moduli e immagine */
    flex-wrap: wrap;         /* si adatta a schermi piccoli */
    margin-top: 2rem;
}

.modules-left {
    flex: 1 1 45%;           /* occupa circa metà spazio */
}

.diagram-right {
    flex: 1 1 50%;           /* occupa circa metà spazio */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.diagram-right .project-img {
    max-width: 100%;
    height: auto;
    margin-top: 1rem;
    display: block;
}