/* === MOBILE.CSS — versione app moderna per Marco Dattisi === */

/* Reset e base touch */
body,
html {
    font-family: 'Poppins', sans-serif;
    color: #f5f5f5;
    background: radial-gradient(circle at 50% 20%, #0d0d0d, #1a1a1a 80%);
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

.hero {
    height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 1.2rem;
    text-align: center;
    animation: fadeInHero 1s ease forwards;
}

@keyframes fadeInHero {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

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

.profile {
    width: 110px;
    height: 110px;
    border: 2px solid #f5c542;
    border-radius: 50%;
    margin-bottom: 1rem;
    animation: float 4s ease-in-out infinite;
    box-shadow: 0 0 18px rgba(245, 197, 66, 0.35);
}

.name {
    font-size: 1.8rem;
    letter-spacing: 0.5px;
}

.role {
    font-size: 1rem;
    color: #ddd;
    margin-bottom: 0.5rem;
}

.tagline {
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* === Pulsanti ottimizzati === */
.btn,
.btn-border {
    display: inline-block;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 14px;
    text-transform: uppercase;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(245, 197, 66, 0.25);
}

.btn {
    background: #f5c542;
    color: #0d0d0d;
}

.btn:hover {
    background: #fce88a;
    transform: translateY(-3px);
}

.btn-border {
    border: 2px solid #f5c542;
    color: #f5c542;
    background: transparent;
}

.btn-border:hover {
    background: #f5c542;
    color: #0d0d0d;
    transform: translateY(-3px);
}

/* === Sezioni effetto card === */
section {
    background: rgba(18, 18, 18, 0.9);
    margin: 1.2rem 0.8rem;
    padding: 2rem 1.2rem;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    transition: transform 0.3s ease, opacity 0.5s ease;
}

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

/* === Contatti === */
.contact a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #f5c542;
    text-decoration: none;
    margin: 0.4rem 0;
    transition: color 0.3s ease, transform 0.3s ease;
}

.contact a:hover {
    color: #fce88a;
    transform: scale(1.05);
}

/* === Footer compatto === */
footer {
    text-align: center;
    padding: 1rem 0.5rem;
    background: rgba(10, 10, 10, 0.95);
    border-top: 1px solid rgba(245, 197, 66, 0.25);
    font-size: 0.9rem;
    color: #aaa;
    backdrop-filter: blur(6px);
}

/* === Chat Marco AI === */
.ai-float-btn {
    position: fixed;
    bottom: 18px;
    right: 18px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5c542, #fce88a);
    color: #0d0d0d;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(245, 197, 66, 0.45);
    cursor: pointer;
    z-index: 100000;
    animation: gentlePulse 2.6s infinite ease-in-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ai-float-btn:active {
    transform: scale(0.9);
}

.ai-section {
    position: fixed !important;
    bottom: 90px !important;
    right: 16px !important;
    width: 92%;
    max-width: 340px;
    background: rgba(13, 13, 13, 0.96);
    border: 1px solid rgba(245, 197, 66, 0.4);
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(245, 197, 66, 0.25);
    padding: 1rem;
    display: none;
    flex-direction: column;
    animation: slideUpChat 0.4s ease forwards;
    z-index: 99999 !important;
}

.ai-section.visible {
    display: flex !important;
}

/* Animazioni */
@keyframes gentlePulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

@keyframes slideUpChat {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Chat interna === */
.chat-window {
    height: 240px;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-right: 0.3rem;
}

.chat-message {
    margin: 0.5rem 0;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.chat-message.bot {
    background: rgba(245, 197, 66, 0.1);
    border-left: 3px solid #f5c542;
}

.chat-message.user {
    background: rgba(255, 255, 255, 0.08);
    border-right: 3px solid #fce88a;
    text-align: right;
}

/* === FIX Z-INDEX MENU === */
.main-nav {
    position: sticky;
    top: 0;
    z-index: 10000 !important;
}

/* Evita che altre sezioni si sovrappongano */
.hero,
.bio-section,
.projects-section,
.ai-section,
.blog-section,
.contact,
footer,
header,
section {
    position: relative;
    z-index: 1;
}

/* Chat AI e loader restano sopra */
.ai-float-btn {
    z-index: 1000000 !important;
}

.ai-section {
    z-index: 999999 !important;
}

.loader-container {
    z-index: 9999999 !important;
}
/* === Fine mobile.css === */