* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --pink: #FF1493;
    --light-pink: #FFB6D9;
    --purple: #B967FF;
    --dark-purple: #7209B7;
    --bg: linear-gradient(135deg, #FF1493 0%, #B967FF 50%, #7209B7 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: white;
    overflow-x: hidden;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #FF1493 0%, #B967FF 50%, #7209B7 100%);
}

.animated-bg::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,182,217,0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
    top: 20%;
    left: 10%;
}

.animated-bg::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(185,103,255,0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 12s infinite ease-in-out reverse;
    bottom: 20%;
    right: 10%;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 50px) scale(1.1); }
}

/* Grid Pattern Overlay */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px);
    z-index: -1;
    pointer-events: none;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 8px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255,20,147,0.8);
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    text-shadow: 0 0 20px rgba(255,255,255,0.8);
}

.burger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.burger span {
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s;
}

/* Main Content */
main {
    padding-top: 80px;
}

section {
    min-height: 100vh;
    padding: 100px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Home Section */
.home-content {
    text-align: center;
    max-width: 1200px;
    width: 100%;
}

.home-content h1 {
    font-size: clamp(60px, 10vw, 120px);
    letter-spacing: 12px;
    margin-bottom: 20px;
    text-transform: uppercase;
    animation: glitch 3s infinite;
    text-shadow: 
        0 0 40px rgba(255,20,147,0.8),
        0 0 80px rgba(185,103,255,0.6);
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(-2px, 2px); }
    66% { transform: translate(2px, -2px); }
}

.subtitle {
    font-size: clamp(24px, 4vw, 40px);
    letter-spacing: 8px;
    margin-bottom: 50px;
    font-weight: 300;
}

.cta-button {
    display: inline-block;
    padding: 20px 50px;
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: bold;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(255,20,147,0.5);
}

.cta-button:hover {
    background: white;
    color: #FF1493;
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(255,255,255,0.5);
}

/* About Section */
.about-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 50px;
    align-items: center;
    text-align: center;
}

.about-text {
    width: 100%;
}

.about-text h2 {
    font-size: clamp(48px, 6vw, 72px);
    letter-spacing: 10px;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.about-text p {
    font-size: 20px;
    line-height: 1.8;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.about-image {
    position: relative;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    border: 5px solid rgba(255,255,255,0.5);
    overflow: hidden;
    box-shadow: 
        0 0 60px rgba(255,20,147,0.6),
        inset 0 0 60px rgba(185,103,255,0.3);
    animation: pulse 3s infinite;
    margin: 30px auto;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.about-image img {
    width: 130%;
    height: 140%;
    object-fit: cover;
    object-position: center;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.about-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Projects Section */
.projects-content {
    max-width: 1400px;
    width: 100%;
}

.projects-content h2 {
    font-size: clamp(48px, 6vw, 72px);
    letter-spacing: 10px;
    margin-bottom: 60px;
    text-align: center;
    text-transform: uppercase;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.project-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
    padding: 40px;
    border-radius: 20px;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.5s;
}

.project-card:hover::before {
    transform: scale(1);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(255,20,147,0.5);
    border-color: white;
}

.project-card h3 {
    font-size: 28px;
    margin-bottom: 15px;
    letter-spacing: 3px;
}

.project-card p {
    font-size: 18px;
    /*margin-bottom: 15px;*/
    letter-spacing: 3px;
}

.project-tag {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 12px;
    margin-top: 15px;
    letter-spacing: 1px;
}

/* Contact Section */
.contact-content {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.contact-content h2 {
    font-size: clamp(48px, 6vw, 72px);
    letter-spacing: 10px;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.contact-content p {
    font-size: 18px;
    margin-bottom: 50px;
    opacity: 0.9;
}

.contact-form {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(255,20,147,0.3);
    width: 100%;
}

.form-group {
    margin-bottom: 30px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    color: white;
    font-size: 16px;
    transition: all 0.3s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.5);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: white;
    background: rgba(255,255,255,0.15);
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-button {
    width: 100%;
    padding: 20px;
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    color: white;
    font-size: 16px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.submit-button:hover {
    background: white;
    color: #FF1493;
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(255,255,255,0.5);
}

.social-links {
    margin-top: 50px;
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    transition: all 0.3s;
    letter-spacing: 2px;
}

.social-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255,20,147,0.4);
}

.success-message {
    display: none;
    padding: 20px;
    background: rgba(76,175,80,0.3);
    border: 2px solid rgba(76,175,80,0.6);
    border-radius: 10px;
    margin-top: 20px;
    animation: slideIn 0.5s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Decorative Elements */
.deco-circle {
    position: absolute;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    pointer-events: none;
}

.deco-1 {
    width: 200px;
    height: 200px;
    top: 20%;
    left: 10%;
    animation: rotate 30s linear infinite;
}

.deco-2 {
    width: 150px;
    height: 150px;
    bottom: 30%;
    right: 15%;
    animation: rotate 15s linear infinite reverse;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
/* Footer */
footer {
  
    position: relative;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.footer-signature {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 4px;
    color: white;
    font-family: 'Raleway', sans-serif;
    text-shadow: 
        0 0 20px rgba(255,20,147,0.6),
        0 0 40px rgba(185,103,255,0.4);
    font-style: italic;
    position: relative;
    padding: 10px 20px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    background: rgba(255,255,255,0.05);
    transition: all 0.3s ease;
    animation: float 8s ease-in-out infinite;
}

.footer-signature::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FF1493, #B967FF, #7209B7);
    border-radius: 50px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.footer-signature:hover::before {
    opacity: 1;
}

.footer-signature:hover {
    transform: translateY(-3px);
    text-shadow: 
        0 0 30px rgba(255,20,147,0.8),
        0 0 60px rgba(185,103,255,0.6);
}



/* ==================== RESPONSIVE MOBILE ==================== */

@media (max-width: 768px) {
    /* NAVIGAZIONE MOBILE */
    nav {
        padding: 15px 20px;
    }

    .logo {
        font-size: 18px;
        letter-spacing: 4px;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(255,20,147,0.98);
        backdrop-filter: blur(20px);
        width: 100%;
        height: calc(100vh - 70px);
        padding: 50px;
        gap: 40px;
        transition: right 0.3s;
        justify-content: center;
        align-items: center;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 20px;
    }

    .burger {
        display: flex;
    }

    /* SEZIONI GENERALI */
    section {
        padding: 60px 20px;
        min-height: auto;
    }

    #home {
        min-height: 100vh;
    }

    /* HOME SECTION - FIX TITOLO */
    .home-content {
        padding: 0 10px;
    }

    .home-content h1 {
        font-size: 48px !important;
        letter-spacing: 2px !important;
        line-height: 1.1;
        margin-bottom: 20px;
        word-break: keep-all;
    }
    
    .subtitle {
        font-size: 18px !important;
        letter-spacing: 3px !important;
        margin-bottom: 40px;
        line-height: 1.4;
        padding: 0 10px;
    }
    
    .cta-button {
        padding: 15px 35px;
        font-size: 14px;
        letter-spacing: 2px;
        width: auto;
        display: inline-block;
    }
    
    /* ABOUT SECTION */
    .about-content {
        gap: 40px;
        padding: 0 10px;
    }
    
    .about-text h2 {
        font-size: 36px !important;
        letter-spacing: 5px !important;
        margin-bottom: 20px;
    }
    
    .about-text p {
        font-size: 20px;
        line-height: 1.7;
        padding: 0;
        text-align: center;
    }
    
    .about-image {
        width: 280px;
        height: 280px;
        margin: 20px auto;
    }
    
    /* PROJECTS SECTION */
    .projects-content {
        padding: 0 10px;
    }

    .projects-content h2 {
        font-size: 36px !important;
        letter-spacing: 5px !important;
        margin-bottom: 40px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .project-card {
        padding: 30px 25px;
        width: 100%;
        max-width: 100%;
    }
    
    .project-card h3 {
        font-size: 22px;
        letter-spacing: 2px;
        margin-bottom: 12px;
    }

    .project-card p {
    font-size: 18px;
    margin-bottom: 15px;
    letter-spacing: 3px;
    }
    
    /* CONTACT SECTION - FIX FORM CENTRATA */
    .contact-content {
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
    }

    .contact-content h2 {
        font-size: 36px !important;
        letter-spacing: 5px !important;
        margin-bottom: 20px;
    }
    
    .contact-content p {
        font-size: 16px;
        padding: 0 10px;
        margin-bottom: 40px;
    }
    
    .contact-form {
        padding: 30px 20px;
        width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }
    
    .form-group {
        margin-bottom: 25px;
        width: 100%;
    }

    .form-group label {
        font-size: 12px;
        letter-spacing: 1px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px 15px;
        font-size: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .form-group textarea {
        min-height: 120px;
    }
    
    .submit-button {
        padding: 15px 20px;
        font-size: 14px;
        letter-spacing: 2px;
        width: 100%;
    }
    
    /* SOCIAL LINKS */
    .social-links {
        margin-top: 40px;
        gap: 20px;
        width: 100%;
        justify-content: center;
    }
    
    .social-link {
        padding: 12px 25px;
        font-size: 14px;
    }

    .social-links img {
        max-width: 150px;
        height: auto;
    }
    
    /* ELEMENTI DECORATIVI - Nascondi su mobile */
    .deco-1, .deco-2 {
        display: none;
    }
    
    /* BACKGROUND ANIMATO */
    .animated-bg::before,
    .animated-bg::after {
        width: 250px;
        height: 250px;
    }

    /* TOUCH FEEDBACK */
    .cta-button:active, 
    .submit-button:active, 
    .social-link:active,
    .project-card:active {
        transform: scale(0.98);
    }

     /* FOOTER MOBILE */
    footer {
        padding: 30px 20px;
        justify-content: center;
    }

    .footer-signature {
        font-size: 20px;
        letter-spacing: 6px;
        padding: 8px 16px;
    }
}

/* iPhone SE e schermi molto piccoli */
@media (max-width: 375px) {
    .home-content h1 {
        font-size: 40px !important;
        letter-spacing: 4px !important;
    }
    
    .subtitle {
        font-size: 16px !important;
        letter-spacing: 2px !important;
    }

    .about-image {
        width: 240px;
        height: 240px;
    }
    
    .contact-form {
        padding: 25px 15px;
    }

    .project-card {
        padding: 25px 20px;
    }
}

/* Fix per prevenire zoom su input in iOS */
@media (max-width: 768px) {
    input, textarea, select {
        font-size: 16px !important;
    }
}

/* Migliora leggibilità generale */
@media (max-width: 768px) {
    body {
        line-height: 1.6;
    }
    
    h1, h2, h3 {
        line-height: 1.2;
    }
}