/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Funnel Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #000000;
    background-color: #ffffff;
    overflow-x: hidden;
}

* {
    cursor: none !important;
}

/* ===== CONTAINER E LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== ELEMENTI GEOMETRICI DECORATIVI ===== */
.geometric-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    background-color: #000000;
    opacity: 0.05;
    transition: transform 0.1s ease-out;
}

.shape-star {
    width: 120px;
    height: 120px;
    top: 8%;
    left: 18%;
    background-image: url('../assets/svg/pc.svg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    background-color: transparent;
    /* PC shape instead of star */
}

.shape-clock {
    width: 130px;
    height: 130px;
    top: 50%;
    right: 12%;
    background-image: url('../assets/svg/orologio.svg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    background-color: transparent;
    /* Clock shape moved to right */
}

.shape-plus {
    width: 180px;
    height: 180px;
    top: 40%;
    left: 12%;
    background-image: url('../assets/svg/tuta.svg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    background-color: transparent;
    /* Tuta SVG shape moved to left */
}

.shape-flower {
    width: 110px;
    height: 110px;
    top: 72%;
    left: 8%;
    background-image: url('../assets/svg/anello.svg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    background-color: transparent;
    /* Ring shape instead of flower */
}

.shape-sun {
    width: 100px;
    height: 100px;
    top: 28%;
    right: 8%;
    background-image: url('../assets/svg/cappello.svg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    background-color: transparent;
    /* Hat shape instead of sun */
}

.shape-cloud {
    width: 130px;
    height: 80px;
    top: 15%;
    left: 55%;
    /* Nuvola squadrata con protuberanze rettangolari */
    clip-path: polygon(20% 40%, 20% 25%, 35% 25%, 35% 10%, 50% 10%, 50% 0%, 65% 0%, 65% 10%, 80% 10%, 80% 25%, 95% 25%, 95% 40%, 100% 40%, 100% 75%, 85% 75%, 85% 90%, 70% 90%, 70% 100%, 30% 100%, 30% 90%, 15% 90%, 15% 75%, 0% 75%, 0% 40%);
}

.shape-eye {
    width: 200px;
    height: 130px;
    top: 62%;
    left: 38%;
    background-image: url('../assets/svg/borraccia.svg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    background-color: transparent;
    /* Water bottle shape instead of eye */
}

.shape-drop {
    width: 200px;
    height: 260px;
    bottom: 2%;
    right: 15%;
    background-image: url('../assets/svg/occhiali.svg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    background-color: transparent;
    /* Glasses shape instead of water drop */
}



/* ===== HEADER / HERO ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    position: relative;
    box-sizing: border-box;
}

.hero-content {
    max-width: 600px;
    z-index: 1;
}

.profile-container {
    margin-bottom: 32px;
}

.profile-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border: 4px solid #000000;
    transition: transform 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
}

.name {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.bio {
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.7;
    color: #333333;
    max-width: 500px;
    margin: 0 auto;
}

/* ===== SEZIONI ===== */
.section-title {
    font-size: 2.5rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 48px;
    letter-spacing: -0.01em;
}


/* ===== PORTFOLIO ===== */
.portfolio {
    padding: 80px 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.project-card {
    background-color: #ffffff;
    border: 3px solid #000000;
    overflow: hidden;
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    border-bottom: 3px solid #000000;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-image:hover .project-overlay {
    opacity: 1;
}



.project-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 16px 32px;
    border: none;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: #000000;
    position: relative;
    clip-path: polygon(8px 0%, 100% 0%, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0% 100%, 0% 8px);
}


.project-content {
    padding: 20px 26px;
    background: #ffffff;
}

.project-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.project-description {
    font-size: 16px;
    color: #666666;
    line-height: 1.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 24px 16px;
        height: 100vh;
        min-height: 100vh;
    }

    .profile-image {
        width: 160px;
        height: 160px;
    }

    .name {
        font-size: 2rem;
        margin-bottom: 16px;
    }

    .bio {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 32px;
    }

    .portfolio {
        padding: 60px 0;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }


    .project-content {
        padding: 20px;
    }
}

/* ===== BUSINESS CARD SECTION ===== */
.business-card-section {
    padding: 80px 0;
    text-align: center;
}

.business-card {
    width: calc(85mm * 3);
    height: calc(55mm * 3);
    background: white;
    display: flex;
    transform: scale(1);
    border: 3px solid #000000;
    overflow: hidden;
    margin: 48px auto 0 auto;
}

.business-card .left-section {
    width: 35%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
    clip-path: polygon(
        0% 0%,
        100% 0%,
        100% 12%,
        88% 12%,
        88% 25%,
        100% 25%,
        100% 40%,
        92% 40%,
        92% 55%,
        100% 55%,
        100% 68%,
        90% 68%,
        90% 82%,
        100% 82%,
        100% 100%,
        0% 100%
    );
}

.business-card #model-canvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
    image-rendering: high-quality;
    image-rendering: smooth;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-perspective: 1000;
    perspective: 1000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.business-card .right-section {
    width: 65%;
    padding: 45px;
    position: relative;
}

.business-card .name {
    margin-top: 60px;
    margin-bottom: 48px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.business-card .name-first {
    font-size: 42px;
    font-weight: 400;
    letter-spacing: 3px;
    line-height: 0.9;
    color: #666;
    margin-bottom: 6px;
}

.business-card .name-last {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -3px;
    line-height: 0.9;
    color: black;
}

.business-card .card-contact-info {
    margin-bottom: 42px;
}

.business-card .card-contact-item {
    font-size: 24px;
    font-weight: 600;
    color: black;
    margin-bottom: 12px;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.business-card .card-contact-icon {
    font-size: 24px;
    color: black;
    width: 30px;
    text-align: center;
}

.business-card .card-contact-item:nth-child(2) .card-contact-icon {
    font-size: 24px;
}

.business-card .card-contact-text {
    flex: 1;
    text-align: left;
    text-decoration: none;
    color: inherit;
}

.business-card .card-contact-text:hover {
    text-decoration: underline;
    text-underline-offset: 6px;
}

.business-card .card-contact-item:first-child .card-contact-text:hover {
    text-decoration: none;
}

.business-card .card-contact-item:last-child {
    margin-bottom: 0;
}

.business-card .card-cv-section {
    margin-bottom: 36px;
    text-align: left;
    line-height: 1;
}

.business-card .card-cv-link {
    display: inline-block;
    padding: 15px 50px;
    background: black;
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 1px;
    border: none;
    transition: all 0.3s ease;
    margin: 0;
    line-height: 1;
    vertical-align: top;
    position: relative;
    clip-path: polygon(8px 0%, 100% 0%, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0% 100%, 0% 8px);
}




.business-card .qr-section {
    position: absolute;
    bottom: 45px;
    right: 45px;
}

.business-card .qr-placeholder {
    width: 126px;
    height: 126px;
    background: white url('../assets/images/qr%20code.png') no-repeat center;
    background-size: 110%;
    padding: 6px;
    position: relative;
}

.business-card .qr-placeholder::before,
.business-card .qr-placeholder::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border: 6px solid black;
}

.business-card .qr-placeholder::before {
    top: -6px;
    left: -6px;
    border-right: none;
    border-bottom: none;
}

.business-card .qr-placeholder::after {
    bottom: -6px;
    right: -6px;
    border-left: none;
    border-top: none;
}

.business-card .qr-section::before,
.business-card .qr-section::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border: 6px solid black;
}

.business-card .qr-section::before {
    top: -6px;
    right: -6px;
    border-left: none;
    border-bottom: none;
}

.business-card .qr-section::after {
    bottom: -6px;
    left: -6px;
    border-right: none;
    border-top: none;
}

/* ===== COMPETENZE SECTION ===== */
.competenze {
    padding: 80px 0;
}

.competenze-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.competenza-block {
    border: 3px solid #000000;
    padding: 0;
    background: white;
    position: relative;
    overflow: hidden;
}

.competenza-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    padding: 16px 26px 16px 26px;
    color: #000000;
    background: #ffffff;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    position: relative;
    border-bottom: 3px solid #000000;
}


.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 16px 26px;
}

.tag {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 12px 12px 0;
    background-color: #000000;
    color: #ffffff;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    cursor: default;
    position: relative;
    clip-path: polygon(8px 0%, 100% 0%, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0% 100%, 0% 8px);
    text-decoration: none;
}

a.tag {
    cursor: pointer;
}


/* ===== BUSINESS CARD RESPONSIVE ===== */
@media (max-width: 768px) {
    .competenze,
    .business-card-section {
        padding: 60px 0;
    }

    .competenze-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .competenza-title {
        padding: 16px 20px;
    }

    .tag-container {
        padding: 20px;
    }

    .tag {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .business-card {
        width: calc(100vw - 32px);
        height: calc((100vw - 32px) * 55mm / 85mm);
        max-height: 260px;
        transform: scale(1);
        margin: 32px auto 0 auto;
    }

    .business-card .left-section {
        height: 100%;
        max-height: 100%;
    }

    .business-card #model-canvas {
        object-fit: contain;
    }

    .business-card .name {
        margin-top: 18px;
        margin-bottom: 18px;
    }

    .business-card .card-contact-info {
        margin-bottom: 18px;
    }

    .business-card .card-cv-section {
        margin-bottom: 20px;
    }

    .business-card .qr-section {
        bottom: 15px;
        right: 15px;
    }

    .business-card .qr-placeholder {
        width: 42px;
        height: 42px;
        padding: 2px;
    }

    .business-card .qr-placeholder::before,
    .business-card .qr-placeholder::after {
        width: 8px;
        height: 8px;
        border: 2px solid black;
    }

    .business-card .qr-placeholder::before {
        top: -2px;
        left: -2px;
        border-right: none;
        border-bottom: none;
    }

    .business-card .qr-placeholder::after {
        bottom: -2px;
        right: -2px;
        border-left: none;
        border-top: none;
    }

    .business-card .qr-section::before,
    .business-card .qr-section::after {
        width: 8px;
        height: 8px;
        border: 2px solid black;
    }

    .business-card .qr-section::before {
        top: -2px;
        right: -2px;
        border-left: none;
        border-bottom: none;
    }

    .business-card .qr-section::after {
        bottom: -2px;
        left: -2px;
        border-right: none;
        border-top: none;
    }
}

/* Medium mobile devices (375px to 768px) */
@media (min-width: 375px) and (max-width: 768px) {
    .business-card .right-section {
        padding: 20px;
    }

    .business-card .name-first {
        font-size: 18px;
        letter-spacing: 1.5px;
        margin-bottom: 3px;
    }

    .business-card .name-last {
        font-size: 20px;
        letter-spacing: -1px;
    }

    .business-card .card-contact-item {
        font-size: 11px;
        margin-bottom: 6px;
        letter-spacing: 0.8px;
        gap: 6px;
    }

    .business-card .card-contact-icon {
        font-size: 12px;
        width: 14px;
    }

    .business-card .card-contact-item:nth-child(2) .card-contact-icon {
        font-size: 12px;
    }

    .business-card .card-cv-link {
        padding: 6px 20px;
        font-size: 10px;
        letter-spacing: 0.5px;
    }
}

/* Small mobile devices (max 374px) */
@media (max-width: 374px) {
    .business-card .right-section {
        padding: 15px;
    }

    .business-card .name-first {
        font-size: 14px;
        letter-spacing: 1px;
        margin-bottom: 2px;
    }

    .business-card .name-last {
        font-size: 16px;
        letter-spacing: -1px;
    }

    .business-card .card-contact-item {
        font-size: 8px;
        margin-bottom: 4px;
        letter-spacing: 0.5px;
        gap: 4px;
    }

    .business-card .card-contact-icon {
        font-size: 8px;
        width: 10px;
    }

    .business-card .card-contact-item:nth-child(2) .card-contact-icon {
        font-size: 8px;
    }

    .business-card .card-cv-link {
        padding: 4px 16px;
        font-size: 7px;
        letter-spacing: 0.3px;
    }
}


