/* =========================
   RESET
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================
   VARIABILI
========================= */
:root {
    --accent: rgb(133,145,156);
    --text-main: #111;
    --text-muted: #666;
    --bg-main: #fff;
    --transition: 0.3s ease;
}

/* =========================
   BASE
========================= */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================
   NAVBAR
========================= */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px;
    border-bottom: 2px solid rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-main);
}

/* logo */
nav h1 a {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    color: var(--text-main);
}

nav h1 a::after {
    display: none;
}

/* menu desktop */
nav ul {
    list-style: none;
    display: flex;
    gap: 32px;
}

nav ul a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    transition: color var(--transition);
}

nav ul a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width var(--transition);
}

nav ul a:hover {
    color: var(--accent);
}

nav ul a:hover::after {
    width: 100%;
}

/* =========================
   TOGGLE MOBILE
========================= */
.menu-toggle {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #111;
    z-index: 2000;
    appearance: none;
}

/* =========================
   BIO
========================= */
.bio-container {
    max-width: 1200px;
    margin: 50px auto 80px;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 40px;
}

.bio-image {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.7s ease-out forwards 0.15s;
}

.bio-image img {
    width: 100%;
    display: block;
    transition: transform 0.6s ease;
}

.bio-image:hover img {
    transform: scale(1.03);
}

.bio-text {
    margin-top: 150px;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.7s ease-out forwards 0.3s;
}

.bio-text h2 {
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--accent);
}

.bio-text p {
    margin-bottom: 16px;
}

/* =========================
   FOOTER
========================= */
footer {
    text-align: center;
    padding: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    background-color: #f1f1f1;
}

/* =========================
   ANIMAZIONI
========================= */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInMobile {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
    .bio-container {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
}

@media (max-width: 600px) {

    /* hamburger */
    .menu-toggle {
        display: block;
    }

    /* menu mobile */
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #fff;
        display: flex;
        flex-direction: column;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        z-index: 1500;
        padding-top: 30px;
    }

    .nav-links.open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links ul {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .nav-links ul li {
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        opacity: 0;
    }

    .nav-links ul li::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 25%;
        width: 50%;
        height: 1px;
        background: rgba(0,0,0,0.12);
    }

    .nav-links.open ul li:nth-child(1) { animation: slideInMobile 0.3s forwards 0s; }
    .nav-links.open ul li:nth-child(2) { animation: slideInMobile 0.3s forwards 0.05s; }
    .nav-links.open ul li:nth-child(3) { animation: slideInMobile 0.3s forwards 0.1s; }
    .nav-links.open ul li:nth-child(4) { animation: slideInMobile 0.3s forwards 0.15s; }
    .nav-links.open ul li:nth-child(5) { animation: slideInMobile 0.3s forwards 0.2s; }

    .nav-links a {
        font-size: 1.3rem;
        text-decoration: none;
        color: var(--text-main);
    }

    .nav-links a:hover {
        color: var(--accent);
    }

    /* instagram mobile */
    .nav-links > a {
        display: flex;
        justify-content: center;
        margin-top: 30px;
    }

    .nav-links > a img {
        width: 25px;
    }
}
/* =========================
   INSTAGRAM MOBILE
========================= */

/* sempre nascosta di default */
.nav-links > a {
    display: none;
}

/* visibile SOLO quando il menu è aperto su mobile */
@media (max-width: 600px) {
    .nav-links.open > a {
        display: flex;
        justify-content: center;
        margin-top: 30px;
    }

    .nav-links.open > a img {
        width: 25px;
    }
}
