﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #080808;
    color: #f5f5f5;
    font-family: "Inter", sans-serif;
    overflow-x: hidden;
}

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

button {
    font-family: inherit;
}


/* =========================================================
   VARIABLES
========================================================= */

:root {
    --background: #080808;
    --surface: #101010;
    --surface-light: #151515;
    --white: #f5f5f5;
    --text: #999;
    --muted: #555;
    --border: rgba(255, 255, 255, 0.08);
    --accent: #7c5cff;
    --container: 1400px;
}


/* =========================================================
   GENERAL
========================================================= */

main {
    width: 100%;
}

.section {
    position: relative;
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 150px 6%;
    border-top: 1px solid var(--border);
}

.section-label {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 80px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
}

    .section-label span {
        color: var(--accent);
    }


/* =========================================================
   HERO
========================================================= */

.hero {
    position: relative;
    min-height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
    padding: 140px 8% 100px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}


/* GRID */

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient( rgba(255, 255, 255, 0.025) 1px, transparent 1px ), linear-gradient( 90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px );
    background-size: 70px 70px;
    mask-image: linear-gradient( to bottom, black 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100% );
}


/* GLOW */

/* Luci morbide fatte con sfumature (senza filter: blur, che su iPhone
   può creare riquadri neri) */
.hero-glow {
    position: absolute;
    width: 900px;
    height: 900px;
    border-radius: 50%;
    pointer-events: none;
}

.hero-glow-one {
    background: radial-gradient(circle, rgba(112, 85, 255, 0.16) 0%, rgba(112, 85, 255, 0.06) 40%, rgba(112, 85, 255, 0) 70%);
    top: -300px;
    right: -250px;
}

.hero-glow-two {
    background: radial-gradient(circle, rgba(0, 198, 255, 0.14) 0%, rgba(0, 198, 255, 0.05) 40%, rgba(0, 198, 255, 0) 70%);
    bottom: -450px;
    left: calc(15% - 200px);
}


/* HERO CONTENT */

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1050px;
    animation: heroIn 1s ease forwards;
}

@keyframes heroIn {

    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* AVAILABILITY */

.availability {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 15px;
    margin-bottom: 35px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.03);
    color: #aaa;
    font-size: 11px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #48d597;
    box-shadow: 0 0 12px #48d597;
}


/* HERO TITLE */

.hero-title {
    max-width: 1100px;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(60px, 9vw, 140px);
    font-weight: 600;
    line-height: 0.9;
    letter-spacing: -6px;
}

    .hero-title span {
        display: block;
        color: transparent;
        -webkit-text-stroke: 1px #777;
    }


/* HERO DESCRIPTION */

.hero-description {
    max-width: 560px;
    margin-top: 40px;
    color: var(--text);
    font-size: 16px;
    line-height: 1.8;
}


/* HERO BUTTONS */

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 35px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 22px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.button-primary {
    background: var(--white);
    color: #080808;
}

    .button-primary span {
        margin-left: 15px;
    }

    .button-primary:hover {
        transform: translateY(-3px);
    }

.button-secondary {
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #aaa;
}

    .button-secondary:hover {
        border-color: white;
        color: white;
    }


/* SCROLL */

.scroll-indicator {
    position: absolute;
    right: 8%;
    bottom: 45px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #444;
    font-size: 9px;
    letter-spacing: 2px;
}

.scroll-line {
    width: 50px;
    height: 1px;
    background: #444;
}


/* =========================================================
   ABOUT
========================================================= */

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10%;
}

.about-title h2,
.skills-title h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(42px, 5vw, 75px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -3px;
}

    .about-title h2 span,
    .skills-title h2 span {
        display: block;
        color: #555;
    }

.about-text {
    max-width: 520px;
}

    .about-text p {
        margin-bottom: 25px;
        color: var(--text);
        font-size: 15px;
        line-height: 1.8;
    }


/* =========================================================
   PROJECTS
========================================================= */

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

    .section-header p {
        max-width: 300px;
        color: #777;
        font-size: 13px;
        line-height: 1.6;
    }


/* FEATURED PROJECT */

.featured-project {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 70px;
    margin-top: 30px;
}


/* PROJECT IMAGE */

.project-image {
    min-height: 500px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: radial-gradient( circle at 70% 20%, rgba(124, 92, 255, 0.3), transparent 40% ), #111;
}

.project-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-index {
    position: absolute;
    top: 25px;
    left: 25px;
    color: #555;
    font-size: 11px;
}


/* =========================================================
   BROWSER PREVIEW
========================================================= */

.browser-preview {
    position: relative;
    width: 82%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: #0b0b0b;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    animation: browserFloat 5s ease-in-out infinite;
}

@keyframes browserFloat {

    0% {
        transform: perspective(1000px) rotateY(-8deg) rotateX(3deg) translateY(0);
    }

    50% {
        transform: perspective(1000px) rotateY(-2deg) rotateX(1deg) translateY(-7px);
    }

    100% {
        transform: perspective(1000px) rotateY(-8deg) rotateX(3deg) translateY(0);
    }
}

/* =========================================================
   BROWSER BAR
========================================================= */

.browser-bar {
    height: 35px;
    padding-left: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: #151515;
}

    .browser-bar span {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #444;
    }


/* =========================================================
   BROWSER SCREEN
========================================================= */

.browser-screen {
    width: 100%;
    height: calc(100% - 35px);
    overflow: hidden;
    background: #050505;
}


    /* =========================================================
   WEBSITE PREVIEW
========================================================= */

    .browser-screen img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        object-position: top center;
    }
/* PROJECT INFO */

.project-info {
    align-self: center;
}

.project-status {
    color: var(--accent);
    font-size: 10px;
    letter-spacing: 2px;
}

.project-info h3 {
    margin: 20px 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 42px;
    font-weight: 500;
    letter-spacing: -2px;
}

.project-info p {
    max-width: 420px;
    color: #888;
    font-size: 14px;
    line-height: 1.7;
}


/* TECHNOLOGIES */

.technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 30px 0;
}

    .technologies span {
        padding: 8px 11px;
        border: 1px solid var(--border);
        border-radius: 5px;
        color: #aaa;
        font-size: 10px;
    }


/* PROJECT LINK */

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid #444;
    font-size: 12px;
    transition: gap 0.3s ease, border-color 0.3s ease;
}

    .project-link:hover {
        gap: 30px;
        border-color: white;
    }


/* FUTURE PROJECTS */

.future-projects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.future-project {
    display: grid;
    grid-template-columns: 40px 1fr 30px;
    align-items: center;
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: transform 0.3s ease, background 0.3s ease;
}

    .future-project:hover {
        background: rgba(255, 255, 255, 0.03);
        transform: translateY(-3px);
    }

.future-number {
    color: #555;
    font-size: 11px;
}

.future-info small {
    color: #555;
    font-size: 8px;
    letter-spacing: 2px;
}

.future-info h3 {
    margin-top: 7px;
    font-size: 15px;
}

.future-arrow {
    color: #666;
}


/* =========================================================
   SKILLS
========================================================= */

.skills-content {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 100px;
}

.skills-list {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.skill {
    display: grid;
    grid-template-columns: 50px 1fr 100px;
    align-items: center;
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
    transition: padding 0.3s ease;
}

    .skill:hover {
        padding-left: 10px;
    }

.skill-number {
    color: #555;
    font-size: 10px;
}

.skill-name {
    font-family: "Space Grotesk", sans-serif;
    font-size: 20px;
}

.skill-description {
    color: #555;
    text-align: right;
    font-size: 10px;
}


/* =========================================================
   CONTACT
========================================================= */

.contact {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.contact-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.contact-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    right: -200px;
    bottom: -300px;
    border-radius: 50%;
    width: 1000px;
    height: 1000px;
    right: -400px;
    bottom: -500px;
    background: radial-gradient(circle, rgba(124, 92, 255, 0.14) 0%, rgba(124, 92, 255, 0.05) 40%, rgba(124, 92, 255, 0) 70%);
    pointer-events: none;
}

.contact-content {
    position: relative;
    z-index: 1;
}

.contact-subtitle {
    margin-bottom: 20px;
    color: #777;
    font-size: 13px;
}

.contact h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(70px, 12vw, 170px);
    font-weight: 500;
    line-height: 0.8;
    letter-spacing: -8px;
}

    .contact h2 span {
        color: var(--accent);
    }

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 25px;
    margin-top: 60px;
    padding-bottom: 10px;
    border-bottom: 1px solid #555;
    color: #aaa;
    font-size: 14px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

    .email-link:hover {
        color: white;
        border-color: white;
    }


/* =========================================================
   SCROLL REVEAL
========================================================= */

.about-content,
.featured-project,
.future-projects,
.skills-content,
.contact-content {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 900px) {

    .hero {
        padding-right: 6%;
        padding-left: 6%;
    }

    .section {
        padding: 110px 6%;
    }

    .about-content,
    .featured-project,
    .skills-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .featured-project {
        gap: 40px;
    }

    .project-image,
    .project-placeholder {
        min-height: 400px;
    }

    .skills-content {
        gap: 60px;
    }

    .contact h2 {
        letter-spacing: -4px;
    }
}

/* =========================================================
   LEGAL PAGES
========================================================= */

.legal-page {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 180px 6% 120px;
}

.legal-content {
    max-width: 850px;
}

    .legal-content h1 {
        margin-bottom: 20px;
        font-family: "Space Grotesk", sans-serif;
        font-size: clamp(60px, 8vw, 110px);
        font-weight: 500;
        line-height: 0.9;
        letter-spacing: -5px;
    }

        .legal-content h1 span {
            color: transparent;
            -webkit-text-stroke: 1px #777;
        }

.legal-intro {
    margin-bottom: 80px;
    color: #555;
    font-size: 11px;
}

.legal-section {
    margin-bottom: 55px;
}

    .legal-section h2 {
        margin-bottom: 18px;
        font-family: "Space Grotesk", sans-serif;
        font-size: 24px;
        font-weight: 500;
    }

    .legal-section p {
        max-width: 750px;
        margin-bottom: 15px;
        color: #999;
        font-size: 14px;
        line-height: 1.8;
    }

    .legal-section a {
        color: #aaa;
        border-bottom: 1px solid #444;
        transition: color 0.3s ease, border-color 0.3s ease;
    }

        .legal-section a:hover {
            color: white;
            border-color: white;
        }

@media (max-width: 600px) {

    .legal-page {
        padding: 130px 6% 80px;
    }

    .legal-content h1 {
        font-size: 60px;
        letter-spacing: -3px;
    }

    .legal-intro {
        margin-bottom: 60px;
    }

    .legal-section {
        margin-bottom: 45px;
    }

        .legal-section h2 {
            font-size: 21px;
        }

        .legal-section p {
            font-size: 13px;
        }
}

/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 600px) {

        .button span,
        .project-link span,
        .future-arrow,
        .email-link span {
            display: none;
        }
    

    .hero {
        min-height: 100svh;
        padding: 120px 6% 80px;
    }

    .hero-title {
        font-size: 58px;
        letter-spacing: -3px;
    }

    .hero-description {
        font-size: 14px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .scroll-indicator {
        display: none;
    }

    .section {
        padding: 90px 6%;
    }

    .section-label {
        margin-bottom: 50px;
    }

    .about-title h2,
    .skills-title h2 {
        font-size: 45px;
    }

    .section-header {
        flex-direction: column;
        gap: 20px;
    }

    /* =====================================================
       PROJECT PREVIEW — MOBILE
    ===================================================== */

    .project-image {
        min-height: 0;
        padding: 25px 0;
    }

    .project-placeholder {
        min-height: 0;
        width: 100%;
    }

    .browser-preview {
        width: 92%;
        height: auto;
        aspect-ratio: 16 / 10;
        animation: browserFloatMobile 5s ease-in-out infinite;
    }

    @keyframes browserFloatMobile {

        0% {
            transform: perspective(800px) rotateY(-4deg) rotateX(2deg) translateY(0);
        }

        50% {
            transform: perspective(800px) rotateY(-1deg) rotateX(1deg) translateY(-4px);
        }

        100% {
            transform: perspective(800px) rotateY(-4deg) rotateX(2deg) translateY(0);
        }
    }

    .browser-bar {
        height: 25px;
        padding-left: 9px;
        gap: 4px;
    }

        .browser-bar span {
            width: 5px;
            height: 5px;
        }

    .browser-screen {
        height: calc(100% - 25px);
    }

        .browser-screen img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: top center;
        }

    .project-info {
        width: 100%;
    }

        .project-info h3 {
            font-size: 34px;
        }

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

    .skill {
        grid-template-columns: 35px 1fr;
    }

    .skill-description {
        display: none;
    }

    .contact {
        min-height: 70vh;
    }

        .contact h2 {
            font-size: 70px;
        }

    .email-link {
        font-size: 12px;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .browser-preview {
        animation: none;
    }
}

/* =========================================================
   NASCONDI LE FRECCE SU MOBILE
========================================================= */



/* =========================================================
   CONTENUTI DAL PANNELLO
========================================================= */

b.plain,
span.plain {
    font: inherit;
    color: inherit;
}

#onlineProjects .featured-project + .featured-project {
    margin-top: 120px;
}

a.future-project {
    color: inherit;
    text-decoration: none;
}


/* Contatti: "Parliamone." sempre dentro lo schermo su telefono */
@media (max-width: 600px) {
    .contact h2 {
        font-size: clamp(40px, 15vw, 70px);
        letter-spacing: -2px;
        line-height: 0.9;
    }

    .email-link {
        margin-top: 36px;
        font-size: 15px;
        max-width: 100%;
        word-break: break-word;
    }
}

/* Pagine legali: mostra solo la lingua scelta */
html[lang="en"] [data-lang-block="it"],
html[lang="it"] [data-lang-block="en"] {
    display: none;
}

.legal-note {
    margin-top: 40px;
    font-size: 12px;
    color: #777;
}

/* Anteprima progetti: lo schermo riempie sempre tutto lo spazio sotto la barra */
.browser-preview {
    display: flex;
    flex-direction: column;
}

.browser-bar {
    flex: 0 0 auto;
}

.browser-screen {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    position: relative;
}

    .browser-screen img {
        position: absolute;
        inset: 0;
    }
