/* ==========================================================================
   FONT
   ========================================================================== */

/* Open Sans (https://fonts.google.com/specimen/Open+Sans) - variabile 300..800 */
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('fonts/open-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('fonts/open-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Helvetica Neue LT Std 45 Light */
@font-face {
    font-family: 'Helvetica Neue LT Std';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/helvetica-neue-lt-std-light.woff') format('woff');
}


/* ==========================================================================
   VARIABILI
   ========================================================================== */

:root {
    --fontBase: 'Open Sans', Helvetica, Arial, sans-serif;
    --fontLight: 'Helvetica Neue LT Std', Helvetica, Arial, sans-serif;

    --txt: #666666;
    --txtBlack: #000000;
    --txtDark: #333333;
    --txtHead: #767676; /* contrasto 4.54:1 su bianco (WCAG AA) */
    --txtMuted: #999999;
    --line: #cccccc;
    --link: #bd1550;
    --linkHover: #e93675;
    --qidGradient: linear-gradient(90deg, #764ed1 0%, #c93d82 100%); /* da qualita-identita-digitale.it */
    --photoBorder: #ffffff;
    --photoShadow:
        -9px 5px 20px rgba(93, 202, 165, 0.45),   /* menta */
         9px 5px 20px rgba(55, 138, 221, 0.45);   /* azzurro */

    --mainBkg: #ffffff;
    --footerBkg: #191919;
    --footerTxt: #818181; /* contrasto 4.51:1 su --footerBkg (WCAG AA) */

    --contentWidth: 1280px;
    --gutter: 15px;
}


/* ==========================================================================
   RESET
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body, div, span, h1, h2, h3, h4, h5, h6, p,
a, img, ul, ol, li, header, main, footer {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    vertical-align: baseline;
    background: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--fontBase);
    font-size: 15px;
    line-height: 1.428571429;
    color: var(--txt);
    background-color: var(--mainBkg);
}

ul {
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

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

a:hover,
a:focus-visible {
    color: var(--linkHover);
}

/* A capo solo su mobile: reso visibile in mobile.css */
.br-mobile {
    display: none;
}


/* ==========================================================================
   GRID: .row > .row-content > .row-cell
   ========================================================================== */

.row {
    font-size: 0; /* annulla lo spazio bianco tra le .row-cell inline-block */
}

.row-content {
    position: relative;
    width: 100%;
    max-width: var(--contentWidth);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.row-cell {
    display: inline-block;
    vertical-align: top;
    position: relative;
    width: 100%;
    font-size: 15px;
}


/* ==========================================================================
   FOTO
   ========================================================================== */

#rowPhoto {
    padding-top: 90px;
}

#rowPhoto .photo {
    position: relative;
    display: block;
    width: 140px;
    height: 140px;
    margin: 0 auto;
}

/* L'ombra sta su un livello separato dietro la foto: si animano solo opacity e transform,
   che il browser gestisce in composizione senza ridisegnare la pagina. */
#rowPhoto .photo::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: var(--photoShadow);
    animation: photoPulse 3s ease-in-out infinite;
}

#rowPhoto img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 6px solid var(--photoBorder);
    border-radius: 50%;
}

@keyframes photoPulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50%      { opacity: 1;    transform: scale(1.07); }
}

@media (prefers-reduced-motion: reduce) {
    #rowPhoto .photo::before {
        animation: none;
    }
}


/* ==========================================================================
   INTESTAZIONE: nome, qualifica, LinkedIn
   ========================================================================== */

#rowIntro {
    padding-bottom: 90px;
    text-align: center;
}

#rowIntro h1 {
    margin-top: 55px;
    font-family: var(--fontLight);
    font-size: 49px;
    font-weight: 300;
    line-height: 1.1;
    color: var(--txtDark);
}

#rowIntro h2 {
    margin-top: 15px;
    font-family: var(--fontLight);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.2;
    color: var(--txtHead);
}

#rowIntro .platforms {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 15px 0 20px;
}

#rowIntro .platforms img {
    width: 20px;
    height: 20px;
}

#linkedin {
    display: inline-block;
    vertical-align: top;
}

#linkedin img {
    width: 150px;
}


/* ==========================================================================
   SVILUPPO
   ========================================================================== */

#rowLead {
    padding-top: 40px;
    text-align: center;
}

#rowLead p {
    margin-bottom: 20px;
    font-family: var(--fontLight);
    font-size: 21px;
    font-weight: 300;
    line-height: 1.4;
    color: var(--txtBlack);
}

#rowLead strong {
    font-weight: inherit; /* <strong> per la semantica, resta light */
}

#rowLead .logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px 40px;
    margin-top: 30px;
}

/* Ogni logo ha una versione nera; quella a colori le sta sopra e compare all'hover. */
#rowLead .logos li {
    position: relative;
}

#rowLead .logos a {
    display: block;
}

#rowLead .logos img {
    transition: opacity 0.3s;
}

#rowLead .logos .color {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

#rowLead .logos li:hover .color,
#rowLead .logos a:focus-visible .color {
    opacity: 1;
}

#rowLead .logos .app-icon img {
    border-radius: 22.5%; /* raggio delle icone iOS */
}

#rowLead .qid {
    margin-top: 90px;
}

#rowLead .qid a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#rowLead .qid span {
    font-family: var(--fontLight);
    font-size: 21px;
    font-weight: 300;
    line-height: 1.4;
    color: transparent;
    background: var(--qidGradient);
    -webkit-background-clip: text;
    background-clip: text;
}


/* ==========================================================================
   HO LAVORATO PER...
   ========================================================================== */

#rowWorks {
    padding: 40px 0;
}

#rowWorks .row-content {
    padding: 0;
}

#rowWorks .row-cell {
    margin-top: 50px;
    padding: 0 var(--gutter);
    font-size: 13px;
    text-align: center;
}

#rowWorks .row-cell.col {
    width: calc(100% / 3);
}

#rowWorks h2 {
    overflow: hidden;
    margin-bottom: 25px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--txtDark);
}

#rowWorks h2 span {
    display: inline-block;
    position: relative;
}

#rowWorks h2 span::before,
#rowWorks h2 span::after {
    content: "";
    position: absolute;
    top: 0.53em;
    width: 400%;
    height: 4px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

#rowWorks h2 span::before {
    right: 100%;
    margin-right: 45px;
}

#rowWorks h2 span::after {
    left: 100%;
    margin-left: 45px;
}

#rowWorks h3 {
    margin-bottom: 25px;
    font-family: var(--fontLight);
    font-size: 18px;
    font-weight: 300;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--txtBlack);
}

#rowWorks ul {
    font-family: var(--fontLight);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.6;
}

#rowWorks ul a {
    color: inherit; /* i link nell'elenco restano come il testo */
}

#rowWorks .works-detailed li + li {
    margin-top: 1.6em; /* una riga vuota tra le voci */
}

#rowWorks .work-name,
#rowWorks .work-desc {
    display: block;
}

#rowWorks .work-name {
    color: var(--txtBlack);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

#rowFooter {
    padding: 15px 0;
    text-align: center;
    background-color: var(--footerBkg);
}

#rowFooter .row-cell {
    font-size: 12px;
    line-height: 1.6;
    color: var(--footerTxt);
}
