/* ===========================
   VARIABLES & RESET
=========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green: #3A7D44;
    --white: #F1F1F1;
    --black: #222222;
    --card-bg: #2C2C2C;
    --border: #3A7D44;
    --muted: #888888;
}

body {
    background-color: var(--black);
    color: var(--white);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===========================
   NAVIGATION
=========================== */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    border-bottom: 2px solid var(--green);
}

nav .logo {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 32px;
}

nav ul li a {
    font-size: 0.95rem;
    color: var(--white);
    transition: color 0.15s;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--green);
}

/* ===========================
   MAIN CONTENT WRAPPER
=========================== */
main {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 30px;
    flex: 1;
}

/* ===========================
   PLACEHOLDERS (video, card images, profile)
=========================== */
.placeholder {
    background-color: var(--card-bg);
    border: 2px dashed #444;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

/* ===========================
   HOMEPAGE — VIDEO
=========================== */
.video-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 60px;
}

.video-wrapper .placeholder {
    width: 100%;
    height: 100%;
}

/* ===========================
   HOMEPAGE — PROJECT CARDS GRID
=========================== */
.section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--muted);
    margin-bottom: 24px;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.project-card {
    display: block;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.15s;
}

.project-card:hover {
    border-color: var(--green);
}

.project-card .card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.project-card .card-image .placeholder {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
}

.project-card .card-body {
    padding: 20px 24px;
}

.project-card .card-body h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--white);
}

.project-card .card-body p {
    font-size: 0.875rem;
    color: var(--muted);
}

.card-tag {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--green);
}

/* ===========================
   PROJECT PAGES
=========================== */
.project-hero {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 40px;
    cursor: pointer;
}

.project-hero .placeholder {
    width: 100%;
    height: 100%;
    font-size: 1rem;
}

.project-header {
    margin-bottom: 32px;
}

.project-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.project-header .subtitle {
    color: var(--muted);
    font-size: 0.9rem;
}

.project-header .subtitle span {
    color: var(--green);
}

.text-block {
    max-width: 720px;
}

.text-block h2 {
    font-size: 1.1rem;
    color: var(--green);
    margin-top: 32px;
    margin-bottom: 12px;
}

.text-block p {
    font-size: 0.975rem;
    color: #CCCCCC;
    line-height: 1.8;
    margin-bottom: 16px;
}

/* ===========================
   ABOUT PAGE
=========================== */
.about-container {
    display: flex;
    gap: 56px;
    align-items: flex-start;
}

.profile-card {
    width: 260px;
    min-width: 260px;
    height: 260px;
}

.profile-card .placeholder {
    width: 100%;
    height: 100%;
}

.about-text h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.about-text .role {
    color: var(--green);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 24px;
}

.about-text p {
    font-size: 0.975rem;
    color: #CCCCCC;
    line-height: 1.8;
    margin-bottom: 16px;
    max-width: 600px;
}

/* ===========================
   LIGHTBOX
=========================== */
#lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#lightbox.active {
    display: flex;
}

#lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border: 1px solid var(--green);
    border-radius: 4px;
}

/* ===========================
   FOOTER
=========================== */
footer {
    border-top: 1px solid #3a3a3a;
    padding: 28px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

footer .email {
    font-size: 0.9rem;
    color: var(--muted);
    transition: color 0.15s;
}

footer .email:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--muted);
    font-size: 1.1rem;
    transition: color 0.15s;
}

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

/* ===========================
   RESPONSIVE (basic)
=========================== */
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;       /* riempie senza distorcere */
    object-position: center; /* centra il punto focale */
}


@media (max-width: 768px) {
    nav {
        padding: 16px 24px;
        flex-direction: column;
        gap: 16px;
    }

    main {
        padding: 40px 20px;
    }

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

    .about-container {
        flex-direction: column;
        gap: 32px;
    }

    .profile-card {
        width: 200px;
        min-width: 200px;
        height: 200px;
    }

    footer {
        padding: 24px 20px;
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}
