/* ======================================================
   PROFILE — chi sono, esperienze, discipline e interessi
   Struttura comune (hero, particelle, fine pagina) in page.css,
   navbar, pannello HUD e HUD di scroll in common.css
   ====================================================== */


/* ======================================================
   HERO: TESTO + RITRATTO
   ====================================================== */
.profile-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: center;
    gap: 5rem;
}

.profile-portrait {
    position: relative;
    justify-self: end;
    width: min(100%, 420px);
    margin: 0;
    overflow: hidden;
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-portrait img {
    display: block;
    width: 100%;
    height: auto;
    filter: grayscale(100%) contrast(1.05);
}

/* angoli del mirino sempre visibili (:nth-child(n) per pesare quanto page.css) */
.profile-portrait__corners i:nth-child(n) {
    opacity: 1;
    transform: none;
}

/* fascio di scansione all'arrivo */
.profile-portrait__scan {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 14px 2px rgba(255, 77, 50, 0.7);
    opacity: 0;
    pointer-events: none;
}

.profile-portrait__label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.85), transparent);
}

.profile-portrait__value {
    color: var(--accent);
}


/* ======================================================
   ESPERIENZE
   ====================================================== */
.profile-experience {
    --panel-bg: rgba(5, 5, 5, 0.82);  /* le particelle si intravedono dietro */

    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10rem var(--side-safe) 12rem;
}

.entry {
    width: 100%;
    max-width: 92rem;
}

.entry + .entry {
    margin-top: 8rem;
}

/* [01] RUOLO ——|——|—— TIPO */
.entry__head {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--muted);
}

.entry__index {
    color: var(--accent);
}

.entry__role {
    color: var(--text);
}

.entry__rule {
    flex: 1;
    height: 9px;
    background:
        linear-gradient(var(--rule), var(--rule)) center / 100% 1px no-repeat,
        repeating-linear-gradient(to right, var(--rule) 0 1px, transparent 1px 48px);
    transform-origin: left center;
}

/* crediti: una riga grande per ogni set / cliente */
.entry__credits {
    margin: 2.5rem 0 2.25rem;
    list-style: none;
    border-top: 1px solid var(--rule);
}

.credit {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 2rem;
    padding: 1.6rem 0;
    border-bottom: 1px solid var(--rule);
}

/* linea rossa che scorre sotto la riga al passaggio del mouse */
.credit::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(255, 77, 50, 0.6);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.7s var(--ease-out);
}

.credit:hover::after {
    transform: scaleX(1);
    transform-origin: left center;
}

.credit__code {
    min-width: 4ch;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--muted);
    transition: color 0.3s ease;
}

.credit__name {
    font-family: var(--font-helvetica);
    font-size: clamp(1.8rem, 4.5vw, 4rem);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--text);
    transition: color 0.3s ease, transform 0.6s var(--ease-out);
}

.credit:hover .credit__code,
.credit:hover .credit__name {
    color: var(--accent);
}

.credit:hover .credit__name {
    transform: translateX(0.3em);
}

.entry__text {
    max-width: 52rem;
    font-family: var(--font-helvetica);
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.72);
}


/* ======================================================
   DISCIPLINE E INTERESSI
   ====================================================== */
.profile-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    width: 100%;
    max-width: 92rem;
    margin-top: 8rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--rule);
}

.facts__label {
    display: flex;
    align-items: center;
    gap: 0.7em;
    margin-bottom: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.facts__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    list-style: none;
}

.facts__list li {
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--rule);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.facts__list li::before {
    content: "+ ";
    color: var(--accent);
}


/* ======================================================
   SCHERMI PICCOLI
   ====================================================== */
@media (max-width: 1024px) {
    .profile-hero__grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .profile-portrait {
        justify-self: start;
        width: min(100%, 340px);
    }
}

@media (max-width: 768px) {
    .profile-experience {
        padding-top: 6rem;
        padding-bottom: 8rem;
    }

    .entry__head {
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
    }

    .entry__rule {
        display: none;
    }

    .credit {
        gap: 1rem;
    }

    .profile-facts {
        grid-template-columns: 1fr;
        margin-top: 5rem;
    }
}
